@unotest/dsl 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,186 @@
1
+ import { S as Statement, B as BlockStatement } from '../block-statement-D2TekS1-.js';
2
+ import { F as FunctionDefineStatement } from '../function-define-statement-Ri23krF1.js';
3
+
4
+ interface AstSourceLocation {
5
+ line: number;
6
+ col: number;
7
+ }
8
+ interface ExecutionError {
9
+ message: string;
10
+ /** Error class name (e.g. "AssertionError", "LocatorError"). Lets consumers
11
+ * classify failure vs. infra error without parsing the message. */
12
+ name?: string;
13
+ stack?: string;
14
+ /** Path to a screenshot saved on failure (driver-side). */
15
+ screenshotPath?: string;
16
+ /** Path to the semantic-DOM / a11y snapshot saved on failure (web). */
17
+ snapshotPath?: string;
18
+ /** Path to the a11y-tree dump saved on failure (mobile). */
19
+ treePath?: string;
20
+ /** Optional rich detail (top-3 NearMisses, etc.). Free-form for the explainer. */
21
+ details?: unknown;
22
+ }
23
+ type ExecutionEvent = {
24
+ kind: 'step-start';
25
+ node: Statement;
26
+ file: string;
27
+ line: number;
28
+ col: number;
29
+ callStack?: readonly string[];
30
+ } | {
31
+ kind: 'step-end';
32
+ node: Statement;
33
+ file: string;
34
+ line: number;
35
+ col: number;
36
+ ok: true;
37
+ callStack?: readonly string[];
38
+ } | {
39
+ kind: 'step-end';
40
+ node: Statement;
41
+ file: string;
42
+ line: number;
43
+ col: number;
44
+ ok: false;
45
+ error: ExecutionError;
46
+ callStack?: readonly string[];
47
+ } | {
48
+ kind: 'paused';
49
+ reason: 'step' | 'failure' | 'breakpoint';
50
+ file: string;
51
+ line: number;
52
+ col: number;
53
+ };
54
+ interface RunOptions {
55
+ /** "auto" = run until completion / failure. "step" = pause after each statement. */
56
+ mode: 'auto' | 'step';
57
+ /** When true, on uncaught error we emit `paused: 'failure'` instead of throwing. */
58
+ pauseOnFailure: boolean;
59
+ /** With `pauseOnFailure`: after the consumer resumes a failure-pause,
60
+ * RE-EXECUTE the failed statement (mobile's D-17 resume-after-failure —
61
+ * the human/agent fixes the world, resume retries). Default false: the
62
+ * run continues with the NEXT statement (web semantics — the debug
63
+ * plane owns recovery). */
64
+ resumeRetriesFailedStep?: boolean;
65
+ /** Safety budget — abort with synthetic failure if exceeded. */
66
+ maxSteps?: number;
67
+ /** Wall-clock budget — same semantics. */
68
+ maxDurationMs?: number;
69
+ /** Maximum user-function nesting depth. Default 32. Guards against runaway
70
+ * recursion that wouldn't trip `maxSteps` (deep expression-tree calls). */
71
+ maxCallDepth?: number;
72
+ /** Mutable set of "line:col" keys. The walker checks membership before each
73
+ * statement; on hit, emits `paused: 'breakpoint'`. set-bp/clear-bp commands
74
+ * from a debug-commands watcher mutate this set in place — same instance
75
+ * reference is shared with the watcher. */
76
+ breakpoints?: Set<string>;
77
+ /** Ref-object atomic flag for "pause on next statement". The pause-command
78
+ * watcher sets `value = true`; the walker reads it at every step-start,
79
+ * yields `paused: 'step'` if set, and resets to false. Ref-object (not raw
80
+ * boolean) so the watcher's mutation is visible without re-passing options. */
81
+ pauseRequested?: {
82
+ value: boolean;
83
+ };
84
+ }
85
+ interface RunResult {
86
+ outcome: 'completed' | 'failed' | 'aborted';
87
+ stepsExecuted: number;
88
+ durationMs: number;
89
+ error?: ExecutionError;
90
+ }
91
+
92
+ /** Per-run variable + call-depth state. The walker calls these around
93
+ * user-function invocation and for assignment/lookup; it never inspects
94
+ * values — they flow through as opaque `unknown`. */
95
+ interface IExecutionRuntime {
96
+ getVar(name: string): unknown;
97
+ setVar(name: string, value: unknown): void;
98
+ pushScope(): void;
99
+ popScope(): void;
100
+ /** Throws when nesting exceeds `maxDepth` — the walker passes
101
+ * `RunOptions.maxCallDepth` (default 32). */
102
+ enterCall(maxDepth: number): void;
103
+ exitCall(): void;
104
+ }
105
+ /** One built-in host function. `runtime` is the SAME object the walker
106
+ * was given — targets type it concretely in their registries. */
107
+ interface HostFunction<R = unknown> {
108
+ invoke(runtime: R, ...args: unknown[]): unknown | Promise<unknown>;
109
+ }
110
+ /** Name → built-in lookup. Targets pass their FunctionRegistry as-is.
111
+ * `undefined` for unknown names — the walker throws its uniform
112
+ * "Unknown DSL function" error (static layers catch this earlier). */
113
+ interface IFunctionDispatcher<R = unknown> {
114
+ get(name: string): HostFunction<R> | undefined;
115
+ }
116
+
117
+ declare class UnsupportedAstNodeError extends Error {
118
+ constructor(nodeType: string, line: number, col: number);
119
+ }
120
+ declare class IncrementTypeError extends Error {
121
+ constructor(varName: string, actualKind: string, line: number, col: number);
122
+ }
123
+ declare class PropertyAccessTypeError extends Error {
124
+ constructor(receiverKind: string, propName: string, line: number, col: number);
125
+ }
126
+ declare class ExecutionWalker<R extends IExecutionRuntime = IExecutionRuntime> {
127
+ private readonly dispatcher;
128
+ constructor(dispatcher: IFunctionDispatcher<R>);
129
+ private entryFile;
130
+ private fnFile;
131
+ /** Project-root-relative posix file the current step lives in: origin of
132
+ * the innermost user-function frame, else the entry file. `callStack`
133
+ * only ever holds user-function names (pushed in callUserFunction), so
134
+ * every frame has a `fnFile` entry; the `?? entryFile` is a defensive
135
+ * fallback, not a normal path. */
136
+ private fileForStack;
137
+ run(program: BlockStatement, testName: string, runtime: R, opts: RunOptions, helpers?: BlockStatement[], entryFile?: string, fnFile?: ReadonlyMap<string, string>): AsyncGenerator<ExecutionEvent, RunResult>;
138
+ private runBlock;
139
+ private runStatement;
140
+ private execStatement;
141
+ private evalExpression;
142
+ private callUserFunction;
143
+ private runLoop;
144
+ /** Run one loop-body pass. Returns `true` if a `break` fired (caller stops
145
+ * the loop), `false` for normal completion or `continue` (both end this
146
+ * iteration the same way). Each pass counts as a step so an empty-bodied
147
+ * infinite loop still trips `maxSteps`; `checkBudgets` enforces wall-clock. */
148
+ private runLoopIteration;
149
+ private applyIncrement;
150
+ private checkBudgets;
151
+ }
152
+
153
+ declare class VariableScope<V = unknown> {
154
+ private stack;
155
+ private current;
156
+ push(): void;
157
+ pop(): void;
158
+ get(name: string): V | undefined;
159
+ has(name: string): boolean;
160
+ set(name: string, value: V): void;
161
+ toObject(): Record<string, V>;
162
+ /** Depth of the push-stack. 0 at construction; +1 per push, -1 per pop. */
163
+ depth(): number;
164
+ }
165
+
166
+ declare class ReturnSignal extends Error {
167
+ readonly value: unknown;
168
+ constructor(value: unknown);
169
+ }
170
+
171
+ declare class BreakSignal extends Error {
172
+ constructor();
173
+ }
174
+ declare class ContinueSignal extends Error {
175
+ constructor();
176
+ }
177
+
178
+ declare class UserFunctionResolver {
179
+ private readonly fns;
180
+ register(fnDef: FunctionDefineStatement, source?: string): void;
181
+ get(name: string): FunctionDefineStatement | undefined;
182
+ has(name: string): boolean;
183
+ names(): string[];
184
+ }
185
+
186
+ export { type AstSourceLocation, BreakSignal, ContinueSignal, type ExecutionError, type ExecutionEvent, ExecutionWalker, type HostFunction, type IExecutionRuntime, type IFunctionDispatcher, IncrementTypeError, PropertyAccessTypeError, ReturnSignal, type RunOptions, type RunResult, UnsupportedAstNodeError, UserFunctionResolver, VariableScope };
@@ -0,0 +1 @@
1
+ const _0x56ac1e=_0xd454;(function(_0x4a44d3,_0x46f056){const _0x42f151={_0x175caf:0x9c,_0x233d37:0xb7,_0x4e5f48:0xfb,_0x44661d:0xae,_0x53da60:0xf1},_0x2d5f3a=_0xd454,_0x2c39df=_0x4a44d3();while(!![]){try{const _0x36c1c3=-parseInt(_0x2d5f3a(_0x42f151._0x175caf))/0x1*(-parseInt(_0x2d5f3a(0xdc))/0x2)+-parseInt(_0x2d5f3a(0xdb))/0x3+parseInt(_0x2d5f3a(0xef))/0x4*(parseInt(_0x2d5f3a(_0x42f151._0x233d37))/0x5)+-parseInt(_0x2d5f3a(0x8f))/0x6+parseInt(_0x2d5f3a(_0x42f151._0x4e5f48))/0x7+-parseInt(_0x2d5f3a(_0x42f151._0x44661d))/0x8+-parseInt(_0x2d5f3a(_0x42f151._0x53da60))/0x9*(-parseInt(_0x2d5f3a(0xa4))/0xa);if(_0x36c1c3===_0x46f056)break;else _0x2c39df['push'](_0x2c39df['shift']());}catch(_0x53d7e4){_0x2c39df['push'](_0x2c39df['shift']());}}}(_0x1c5d,0xb2a93));import{ArrayAccessExpression,ArrayExpression,AssignmentStatement,BinaryExpression,BlockStatement,BreakStatement,ConditionalExpression,ContinueStatement,DoWhileStatement,ForStatement,FunctionDefineStatement,FunctionStatement,FunctionalExpression,IfStatement,IncrementExpression,IncrementStatement,MemberCallExpression,MetaBlockStatement,NumberValue,ObjectExpression,PropertyAccessExpression,RegExpExpression,ReturnStatement,StepStatement,StringValue,ValueExpression,VarStatement,VariableExpression,WhileStatement,__name}from'../chunk-YSVX2W7P.js';var ReturnSignal=class extends Error{constructor(_0x509787){const _0x31dea8=_0xd454;super(_0x31dea8(0xe1)),this[_0x31dea8(0xc0)]=_0x509787,this['name']='ReturnSignal';}[_0x56ac1e(0xc0)];static{__name(this,_0x56ac1e(0xe1));}},BreakSignal=class extends Error{static{__name(this,_0x56ac1e(0xb4));}constructor(){const _0x4688a4={_0x51562d:0xb4},_0x47cef8=_0x56ac1e;super(_0x47cef8(0xb4)),this['name']=_0x47cef8(_0x4688a4._0x51562d);}},ContinueSignal=class extends Error{static{__name(this,_0x56ac1e(0xf2));}constructor(){const _0x1bdb89=_0x56ac1e;super(_0x1bdb89(0xf2)),this['name']=_0x1bdb89(0xf2);}},UserFunctionResolver=class{static{__name(this,'UserFunctionResolver');}[_0x56ac1e(0x103)]=new Map();[_0x56ac1e(0x9e)](_0x152c48,_0x1987ca){const _0x37fba4={_0x336573:0x103,_0x66dbf4:0xeb,_0x335b65:0xcf,_0x3df8b7:0xc8},_0x37664a=_0x56ac1e;if(this[_0x37664a(_0x37fba4._0x336573)][_0x37664a(0xc2)](_0x152c48[_0x37664a(0xc8)])){const _0x5798b4=this['fns'][_0x37664a(_0x37fba4._0x66dbf4)](_0x152c48[_0x37664a(0xc8)]),_0x2fc950=_0x5798b4['token']?.[_0x37664a(_0x37fba4._0x335b65)]?.();throw new Error('Duplicate\x20user\x20function\x20\x22'+_0x152c48[_0x37664a(_0x37fba4._0x3df8b7)]+'\x22'+(_0x2fc950?_0x37664a(0x104)+_0x2fc950+(_0x1987ca?_0x37664a(0xb1)+_0x1987ca:'')+')':''));}this[_0x37664a(0x103)][_0x37664a(0xc5)](_0x152c48['name'],_0x152c48);}[_0x56ac1e(0xeb)](_0xa91fd2){const _0x383580={_0x1130a7:0xeb},_0x13e68c=_0x56ac1e;return this[_0x13e68c(0x103)][_0x13e68c(_0x383580._0x1130a7)](_0xa91fd2);}['has'](_0x53a08b){const _0x3b6363={_0x38c202:0x103},_0xed40f6=_0x56ac1e;return this[_0xed40f6(_0x3b6363._0x38c202)]['has'](_0x53a08b);}[_0x56ac1e(0xa5)](){const _0xd6f50f=_0x56ac1e;return[...this[_0xd6f50f(0x103)]['keys']()][_0xd6f50f(0x100)]();}},UnsupportedAstNodeError=class extends Error{static{__name(this,_0x56ac1e(0xb8));}constructor(_0x43a070,_0xb8a173,_0x1b938d){const _0x3825b6={_0xe9072e:0xc8,_0x46ee45:0xb8},_0x1b141f=_0x56ac1e;super('Unsupported\x20AST\x20node\x20\x22'+_0x43a070+'\x22\x20at\x20'+_0xb8a173+':'+_0x1b938d),this[_0x1b141f(_0x3825b6._0xe9072e)]=_0x1b141f(_0x3825b6._0x46ee45);}},IncrementTypeError=class extends Error{static{__name(this,_0x56ac1e(0x9b));}constructor(_0x28e7ed,_0x4faea7,_0x23646d,_0x3f392a){const _0x113439={_0x4a2efe:0xc8},_0x4f4951=_0x56ac1e;super(_0x4f4951(0x10a)+_0x28e7ed+'\x22\x20—\x20it\x20holds\x20a\x20'+_0x4faea7+',\x20not\x20a\x20number,\x20at\x20'+_0x23646d+':'+_0x3f392a+'.'),this[_0x4f4951(_0x113439._0x4a2efe)]=_0x4f4951(0x9b);}},PropertyAccessTypeError=class extends Error{static{__name(this,'PropertyAccessTypeError');}constructor(_0x2d8683,_0x47ae43,_0x42c235,_0x280dd1){const _0x478f92=_0x56ac1e;super('Property\x20access\x20\x22.'+_0x47ae43+_0x478f92(0xea)+_0x2d8683+')\x20at\x20'+_0x42c235+':'+_0x280dd1+'.\x20Property\x20reads\x20only\x20work\x20on\x20DSL\x20objects\x20/\x20arrays\x20/\x20locators.'),this['name']='PropertyAccessTypeError';}},DEFAULT_MAX_CALL_DEPTH=0x20;function isBlockMappable(_0x333ba8){const _0x2d86a2={_0x59e1e1:0xa1,_0x52cb9e:0xcc},_0x1e7092=_0x56ac1e;return _0x333ba8[_0x1e7092(0x102)](_0x1e7092(_0x2d86a2._0x59e1e1))||_0x333ba8['startsWith'](_0x1e7092(_0x2d86a2._0x52cb9e));}__name(isBlockMappable,_0x56ac1e(0x96));function _0x1c5d(){const _0x23f1b9=['sw5KzxGGywnJzxnZifS','ChvZAfnJB3bL','Bg9JyxrPB25pzG','zgLZCgf0y2HLCG','Bg9VC2vfCxvHBa','C3rYAw5N','vMfYAwfIBgvty29Wzs5WB3aOktOGDw5KzxjMBg93icHTB3jLihbVChmGDgHHBIbWDxnOzxmP','iIbHDca','nta4ndy4mKDsyKf2qG','zxHWCJe','CNvUtg9VCeL0zxjHDgLVBG','vw5ZDxbWB3j0zwqGyMLUyxj5ig9WzxjHDg9Yici','zNvUy3rPB25HBev4ChjLC3nPB24','zw50CMLLCW','Dg9pyMPLy3q','AxncBg9JA01HChbHyMXL','zxHWCMvZC2LVBG','zMfPBgvK','iIbUB3qGzM91BMqGAw4GC2nLBMfYAw8Gqvnu','CMvHzfbYB3bLCNr5','sw5JCMvTzw50vhLWzuvYCM9Y','ndeZvgjTtxfr','Bwf4rhvYyxrPB25nCYbIDwrNzxqGka','CMvNAxn0zxi','BNvTzxjPy0nVBxbHCMu','y2fSBfvZzxjgDw5JDgLVBG','DgvZDf8','BNvSBa','zwXZzvn0yxrLBwvUDa','mJa2mZCZmeT5B1b5yW','BMfTzxm','zw50zxjdywXS','BNvTyMvY','AxnuCNv0AhK','zM5gAwXL','CNvUu3rHDgvTzw50','ChjVDg90ExbL','z2v0q29SDw1U','yMXVy2S','mtaYmtiYmdHTBevNz2O','CMvJzwL2zxi','rw50CNKGzNvUy3rPB24GiG','igLUia','zxzHBev4ChjLC3nPB24','AxngAw5PDgu','qNjLywTtAwDUywW','Aw52B2TL','zNjVBuvUDhjPzxm','ndu4mdvqwuv0z2O','vw5ZDxbWB3j0zwrbC3roB2rLrxjYB3i','y2fSBa','ChvZAa','AxnjBNrLz2vY','Aw5KzxHLCW','yxnoDw1Izxi','C3rHDgvTzw50CW','BMvZDgvKiez1BMn0Aw9UrgvMAw5Lu3rHDgvTzw50','DMfSDwu','B3bLCMf0Aw9U','AgfZ','Bwf4u3rLChm','vMfYAwfIBgvty29Wzq','C2v0','C3rLCc1LBMq','CMvZDw1LuMv0CMLLC0zHAwXLzfn0zxa','BMfTzq','BM93','ChjVCgvYDgLLCW','BxmPigv4Agf1C3rLza','zMXVD18','zxHPDenHBgW','zMfSC2u','z2v0tgLUzq','y29UC3rYDwn0B3i','Bwf4rhvYyxrPB25nCW','Cg9W','Cg9Wu2nVCgu','zwXLBwvUDhm','yxbWBhLcAw5HCNLpCa','y29TCgXLDgvK','z2v0vMfY','y29UzgL0Aw9U','Bw9Kzq','Aw5PDgLHBgL6yxrPB24','ndi3mZmYm0vKyxL3DW','mJq4vgXPww1d','CNvUqMXVy2S','BgvUz3rO','Cgf1C2vpBKzHAwX1CMu','DMfYAwfIBgu','uMv0DxjUu2LNBMfS','zMLSzuzVCLn0ywnR','vw5ZDxbWB3j0zwqGy29UzgL0Aw9UywWGB3bLCMf0B3iGiG','Cgf1C2vszxf1zxn0zwq','zxHWCMvZC2LVBIa','C2v0vMfY','vw5RBM93BIbeu0WGzNvUy3rPB24GiG','Dw5KzwzPBMvK','xsbVBIbUB24Ty29SBgvJDgLVBIb2ywX1zsbHDca','iIbVBIbUB24TB2jQzwn0ihzHBhvLicG','z2v0','vxnLCIbMDw5JDgLVBIaI','BwvZC2fNzq','y2HLy2TcDwrNzxrZ','ndm2Defryxzm','C3rHy2S','odfgv3LYww8','q29UDgLUDwvtAwDUywW','yM9KEq','Bwf4q2fSBerLChrO','yxjNtMfTzxm','yNjLywTWB2LUDa','C3rHDgvTzw50','Dg9Rzw4','Cgf1C2vK','C3rLCa','otyXmtyZn1HYCgrduq','DhLWzq','zw50CNLgAwXL','y3vYCMvUDa','zgvWDgG','C29YDa','CNvUtg9VCa','C3rHCNrZv2L0Aa','zM5Z','icHHBhjLywr5igrLzMLUzwqGyxqGBgLUzsa','iIbIB2r5igLZig5VDcbHiejSB2nRu3rHDgvTzw50','AwztDgf0zw1LBNq','zMfPBhvYzq','Dhj1zq','yxjNDw1LBNrZ','q2fUBM90igLUy3jLBwvUDc9KzwnYzw1LBNqGiG','zxHLy1n0yxrLBwvUDa','zxHWCJi','yxbWBhLjBMnYzw1LBNq'];_0x1c5d=function(){return _0x23f1b9;};return _0x1c5d();}function _0xd454(_0x24f934,_0x1d4df4){_0x24f934=_0x24f934-0x8c;const _0x1c5dc5=_0x1c5d();let _0xd45422=_0x1c5dc5[_0x24f934];if(_0xd454['nfXgPA']===undefined){var _0x3548ec=function(_0x16e421){const _0x4a1e77='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x509787='',_0x152c48='';for(let _0x1987ca=0x0,_0x5798b4,_0x2fc950,_0xa91fd2=0x0;_0x2fc950=_0x16e421['charAt'](_0xa91fd2++);~_0x2fc950&&(_0x5798b4=_0x1987ca%0x4?_0x5798b4*0x40+_0x2fc950:_0x2fc950,_0x1987ca++%0x4)?_0x509787+=String['fromCharCode'](0xff&_0x5798b4>>(-0x2*_0x1987ca&0x6)):0x0){_0x2fc950=_0x4a1e77['indexOf'](_0x2fc950);}for(let _0x53a08b=0x0,_0x43a070=_0x509787['length'];_0x53a08b<_0x43a070;_0x53a08b++){_0x152c48+='%'+('00'+_0x509787['charCodeAt'](_0x53a08b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x152c48);};_0xd454['nOdNre']=_0x3548ec,_0xd454['RWzTfY']={},_0xd454['nfXgPA']=!![];}const _0xb38667=_0x1c5dc5[0x0],_0x16a608=_0x24f934+_0xb38667,_0x3fd8fe=_0xd454['RWzTfY'][_0x16a608];return!_0x3fd8fe?(_0xd45422=_0xd454['nOdNre'](_0xd45422),_0xd454['RWzTfY'][_0x16a608]=_0xd45422):_0xd45422=_0x3fd8fe,_0xd45422;}var ExecutionWalker=class{constructor(_0x1a8905){this['dispatcher']=_0x1a8905;}[_0x56ac1e(0x111)];static{__name(this,'ExecutionWalker');}[_0x56ac1e(0xfd)]='';['fnFile']=new Map();[_0x56ac1e(0xe2)](_0x5ab574){const _0x211d8d={_0x3ddd09:0xde,_0xb0c433:0xa9,_0x21d0c5:0xeb},_0x546060=_0x56ac1e;if(_0x5ab574[_0x546060(_0x211d8d._0x3ddd09)]===0x0)return this['entryFile'];const _0xd59b2d=_0x5ab574[_0x5ab574['length']-0x1];return this[_0x546060(_0x211d8d._0xb0c433)][_0x546060(_0x211d8d._0x21d0c5)](_0xd59b2d)??this['entryFile'];}async*['run'](_0x55c68e,_0x40657e,_0x5a6a9f,_0xb324df,_0x831f9e,_0x7e9ce1='',_0x4ab4a5=new Map()){const _0x5e6504={_0x5d9572:0xbe,_0x527c22:0x9e,_0x4d8348:0x98,_0x1f100d:0xc9,_0x136bb2:0xc9,_0x431beb:0xb0,_0x37250a:0xdd,_0x1aef7a:0xf3,_0x1a3eff:0xd6,_0x536e68:0xc9},_0x271671=_0x56ac1e;this[_0x271671(0xfd)]=_0x7e9ce1,this['fnFile']=_0x4ab4a5;const _0x2fbc1b=Date[_0x271671(0xc9)]();let _0x14cfe9=0x0;const _0x54d217=new UserFunctionResolver(),_0x5d02b3=[_0x55c68e,..._0x831f9e??[]];for(const _0x8e7919 of _0x5d02b3){for(const _0x414d53 of _0x8e7919[_0x271671(_0x5e6504._0x5d9572)]){_0x414d53 instanceof FunctionDefineStatement&&_0x54d217[_0x271671(_0x5e6504._0x527c22)](_0x414d53);}}const _0x46c70d=_0x54d217[_0x271671(0xeb)](_0x40657e);if(!_0x46c70d)return{'outcome':_0x271671(_0x5e6504._0x4d8348),'stepsExecuted':_0x14cfe9,'durationMs':Date[_0x271671(_0x5e6504._0x1f100d)]()-_0x2fbc1b,'error':{'message':'Test\x20function\x20\x22'+_0x40657e+_0x271671(0x99)}};if(!(_0x46c70d[_0x271671(0xf3)]instanceof BlockStatement))return{'outcome':'failed','stepsExecuted':_0x14cfe9,'durationMs':Date[_0x271671(_0x5e6504._0x136bb2)]()-_0x2fbc1b,'error':{'message':'Test\x20\x22'+_0x40657e+_0x271671(0x105)}};if(!isBlockMappable(_0x40657e))return{'outcome':_0x271671(0x98),'stepsExecuted':_0x14cfe9,'durationMs':Date['now']()-_0x2fbc1b,'error':{'message':_0x271671(_0x5e6504._0x431beb)+_0x40657e+'\x22\x20must\x20start\x20with\x20test_\x20or\x20flow_'}};const _0x2ac156=__name(()=>_0x14cfe9,'getSteps'),_0x28b93d=__name(_0x1deb9e=>{_0x14cfe9=_0x1deb9e;},'setSteps'),_0x5c6fe9=[];try{return yield*this[_0x271671(_0x5e6504._0x37250a)](_0x46c70d[_0x271671(_0x5e6504._0x1aef7a)],_0x5a6a9f,_0xb324df,_0x2ac156,_0x28b93d,_0x2fbc1b,_0x54d217,_0x5c6fe9),{'outcome':_0x271671(_0x5e6504._0x1a3eff),'stepsExecuted':_0x14cfe9,'durationMs':Date['now']()-_0x2fbc1b};}catch(_0xae5f70){return{'outcome':_0x271671(0x98),'stepsExecuted':_0x14cfe9,'durationMs':Date[_0x271671(_0x5e6504._0x536e68)]()-_0x2fbc1b,'error':toExecutionError(_0xae5f70)};}}async*[_0x56ac1e(0xdd)](_0x2a3501,_0x3b6653,_0x5cf2cb,_0x1c2f87,_0x5a91ba,_0x4219a4,_0x3c6089,_0x3f0fc1){const _0x13789b={_0x5e1e8d:0xbe,_0x57944d:0xf3},_0x351259=_0x56ac1e;for(const _0x1e6907 of _0x2a3501[_0x351259(_0x13789b._0x5e1e8d)]){if(_0x1e6907 instanceof StepStatement){yield*this[_0x351259(0xdd)](_0x1e6907[_0x351259(_0x13789b._0x57944d)],_0x3b6653,_0x5cf2cb,_0x1c2f87,_0x5a91ba,_0x4219a4,_0x3c6089,_0x3f0fc1);continue;}if(_0x1e6907 instanceof MetaBlockStatement){_0x1e6907['body']instanceof BlockStatement?yield*this[_0x351259(0xdd)](_0x1e6907['body'],_0x3b6653,_0x5cf2cb,_0x1c2f87,_0x5a91ba,_0x4219a4,_0x3c6089,_0x3f0fc1):yield*this[_0x351259(0xaa)](_0x1e6907[_0x351259(0xf3)],_0x3b6653,_0x5cf2cb,_0x1c2f87,_0x5a91ba,_0x4219a4,_0x3c6089,_0x3f0fc1);continue;}yield*this[_0x351259(0xaa)](_0x1e6907,_0x3b6653,_0x5cf2cb,_0x1c2f87,_0x5a91ba,_0x4219a4,_0x3c6089,_0x3f0fc1);}}async*[_0x56ac1e(0xaa)](_0x4a7d7a,_0x464be7,_0x2ccec3,_0x6f5784,_0x942288,_0x3e54fa,_0x229115,_0x44e5a4){const _0x2d4102={_0x272f4e:0xde,_0x1410fc:0xe4,_0xc3288:0xfa,_0x4b64b1:0xc2,_0x20266a:0xc6,_0x108e1e:0xf9,_0x36bd50:0xdf},_0x5a3cb1=_0x56ac1e,{line:_0x106bea,col:_0x57fd6e}=locationOf(_0x4a7d7a),_0x26faf8=this[_0x5a3cb1(0xe2)](_0x44e5a4),_0x396dd7=_0x44e5a4[_0x5a3cb1(_0x2d4102._0x272f4e)]===0x0?void 0x0:[..._0x44e5a4];yield{'kind':'step-start','node':_0x4a7d7a,'file':_0x26faf8,'line':_0x106bea,'col':_0x57fd6e,'callStack':_0x396dd7};if(_0x2ccec3[_0x5a3cb1(_0x2d4102._0x1410fc)]?.['value'])_0x2ccec3['pauseRequested'][_0x5a3cb1(0xc0)]=![],yield{'kind':'paused','reason':_0x5a3cb1(_0x2d4102._0xc3288),'file':_0x26faf8,'line':_0x106bea,'col':_0x57fd6e};else _0x2ccec3['breakpoints']?.[_0x5a3cb1(_0x2d4102._0x4b64b1)](_0x106bea+':'+_0x57fd6e)&&(yield{'kind':_0x5a3cb1(0xf9),'reason':_0x5a3cb1(0xf6),'file':_0x26faf8,'line':_0x106bea,'col':_0x57fd6e});while(!![]){this[_0x5a3cb1(0xee)](_0x2ccec3,_0x6f5784(),_0x3e54fa);try{yield*this['execStatement'](_0x4a7d7a,_0x464be7,_0x2ccec3,_0x6f5784,_0x942288,_0x3e54fa,_0x229115,_0x44e5a4),_0x942288(_0x6f5784()+0x1),yield{'kind':_0x5a3cb1(_0x2d4102._0x20266a),'node':_0x4a7d7a,'file':_0x26faf8,'line':_0x106bea,'col':_0x57fd6e,'ok':!![],'callStack':_0x396dd7};if(_0x2ccec3[_0x5a3cb1(0xd9)]==='step')yield{'kind':_0x5a3cb1(_0x2d4102._0x108e1e),'reason':'step','file':_0x26faf8,'line':_0x106bea,'col':_0x57fd6e};return;}catch(_0x47997a){if(_0x47997a instanceof ReturnSignal||_0x47997a instanceof BreakSignal||_0x47997a instanceof ContinueSignal)throw _0x47997a;const _0xd5e43c=toExecutionError(_0x47997a);yield{'kind':_0x5a3cb1(_0x2d4102._0x20266a),'node':_0x4a7d7a,'file':_0x26faf8,'line':_0x106bea,'col':_0x57fd6e,'ok':![],'error':_0xd5e43c,'callStack':_0x396dd7};if(!_0x2ccec3[_0x5a3cb1(_0x2d4102._0x36bd50)])throw _0x47997a;yield{'kind':'paused','reason':_0x5a3cb1(0x107),'file':_0x26faf8,'line':_0x106bea,'col':_0x57fd6e};if(!_0x2ccec3[_0x5a3cb1(0xc7)])return;}}}async*[_0x56ac1e(0x10b)](_0x21c95b,_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee){const _0x2ed4ee={_0x30850d:0xdd,_0x297b79:0x97,_0x57b20e:0xb2,_0x4b286d:0x10b,_0x16d8f1:0x106,_0x17718d:0xa3,_0x200446:0x10b,_0x427feb:0xbf,_0x2932a7:0x97,_0x4f430f:0xd0},_0x35ba15=_0x56ac1e;if(_0x21c95b instanceof BlockStatement){yield*this[_0x35ba15(_0x2ed4ee._0x30850d)](_0x21c95b,_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);return;}if(_0x21c95b instanceof StepStatement){yield*this['execStatement'](_0x21c95b[_0x35ba15(0xf3)],_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);return;}if(_0x21c95b instanceof MetaBlockStatement){yield*this[_0x35ba15(0x10b)](_0x21c95b['body'],_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);return;}if(_0x21c95b instanceof AssignmentStatement){const _0x406c43=yield*this[_0x35ba15(0xb2)](_0x21c95b[_0x35ba15(_0x2ed4ee._0x297b79)],_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);_0x3c5e36['setVar'](_0x21c95b[_0x35ba15(0xe0)],_0x406c43);return;}if(_0x21c95b instanceof FunctionStatement){yield*this[_0x35ba15(0xb2)](_0x21c95b[_0x35ba15(0x93)],_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);return;}if(_0x21c95b instanceof IfStatement){const _0x5f2420=yield*this[_0x35ba15(_0x2ed4ee._0x57b20e)](_0x21c95b[_0x35ba15(0x97)],_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);if(isTruthy(_0x5f2420))yield*this[_0x35ba15(_0x2ed4ee._0x4b286d)](_0x21c95b[_0x35ba15(_0x2ed4ee._0x16d8f1)],_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);else _0x21c95b[_0x35ba15(_0x2ed4ee._0x17718d)]&&(yield*this[_0x35ba15(_0x2ed4ee._0x200446)](_0x21c95b[_0x35ba15(_0x2ed4ee._0x17718d)],_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee));return;}if(_0x21c95b instanceof ReturnStatement){const _0x27c303=_0x21c95b['expression'],_0x4c4309=yield*this[_0x35ba15(_0x2ed4ee._0x57b20e)](_0x27c303,_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);throw new ReturnSignal(_0x4c4309);}if(_0x21c95b instanceof FunctionDefineStatement){const {line:_0x36704a,col:_0xf9d99}=locationOf(_0x21c95b);throw new UnsupportedAstNodeError(_0x35ba15(_0x2ed4ee._0x427feb),_0x36704a,_0xf9d99);}if(_0x21c95b instanceof VarStatement){const {line:_0x50f03d,col:_0x19cd82}=locationOf(_0x21c95b);throw new UnsupportedAstNodeError('VarStatement\x20(use\x20bare\x20assignment\x20instead)',_0x50f03d,_0x19cd82);}if(_0x21c95b instanceof IncrementStatement){yield*this[_0x35ba15(0xb2)](_0x21c95b[_0x35ba15(_0x2ed4ee._0x2932a7)],_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);return;}if(_0x21c95b instanceof BreakStatement)throw new BreakSignal();if(_0x21c95b instanceof ContinueStatement)throw new ContinueSignal();if(_0x21c95b instanceof ForStatement||_0x21c95b instanceof WhileStatement||_0x21c95b instanceof DoWhileStatement){yield*this['runLoop'](_0x21c95b,_0x3c5e36,_0x4591af,_0x2bd47a,_0x3d7bc5,_0x227c1c,_0x47aaf6,_0x435bee);return;}const {line:_0xbc9421,col:_0x54e82b}=locationOf(_0x21c95b);throw new UnsupportedAstNodeError(_0x21c95b[_0x35ba15(_0x2ed4ee._0x4f430f)]['name'],_0xbc9421,_0x54e82b);}async*['evalExpression'](_0x5f0646,_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3){const _0x48cb40={_0x36c2bd:0xd0,_0x2303e0:0x108,_0x34d872:0xc8,_0x1de73e:0xc8,_0xa31765:0xd7,_0x336087:0x109,_0x333914:0xb2,_0x442b68:0xba,_0x5f4b4e:0x111,_0x301e1e:0xe7,_0x12c327:0x8e,_0x3f737f:0xb5,_0x4ad90e:0xaf,_0x4288dd:0x8e,_0x134a3f:0xc8,_0x21d00f:0x10c,_0x35abf4:0xc1,_0x1e6fe9:0xba,_0x49ea11:0x10d},_0xeb1584=_0x56ac1e;if(_0x5f0646 instanceof ValueExpression){const _0x3fc2ca=_0x5f0646[_0xeb1584(0xc0)];if(_0x3fc2ca instanceof StringValue)return _0x3fc2ca['asString']();if(_0x3fc2ca instanceof NumberValue)return _0x3fc2ca[_0xeb1584(0xbd)]();const {line:_0x1f927d,col:_0x599b54}=locationOf(_0x5f0646);throw new UnsupportedAstNodeError('ValueExpression\x20payload\x20'+_0x3fc2ca[_0xeb1584(_0x48cb40._0x36c2bd)][_0xeb1584(0xc8)],_0x1f927d,_0x599b54);}if(_0x5f0646 instanceof RegExpExpression)return _0x5f0646['eval']();if(_0x5f0646 instanceof VariableExpression){if(_0x5f0646[_0xeb1584(0xc8)]===_0xeb1584(_0x48cb40._0x2303e0))return!![];if(_0x5f0646[_0xeb1584(_0x48cb40._0x34d872)]===_0xeb1584(0xce))return![];if(_0x5f0646[_0xeb1584(_0x48cb40._0x1de73e)]===_0xeb1584(0xa2))return null;return _0x3dee3e[_0xeb1584(_0x48cb40._0xa31765)](_0x5f0646['name']);}if(_0x5f0646 instanceof FunctionalExpression){const _0x5127ba=[];for(const _0x3c5018 of _0x5f0646[_0xeb1584(_0x48cb40._0x336087)]){const _0x1db820=yield*this[_0xeb1584(_0x48cb40._0x333914)](_0x3c5018,_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3);_0x5127ba[_0xeb1584(_0x48cb40._0x442b68)](_0x1db820);}const _0x9e3b55=_0x44124c[_0xeb1584(0xeb)](_0x5f0646[_0xeb1584(0xc8)]);if(_0x9e3b55)return yield*this['callUserFunction'](_0x9e3b55,_0x5127ba,_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3);const _0x134c29=this[_0xeb1584(_0x48cb40._0x5f4b4e)]['get'](_0x5f0646['name']);if(!_0x134c29){const {line:_0x3f9394,col:_0x56237d}=locationOf(_0x5f0646);throw new Error(_0xeb1584(_0x48cb40._0x301e1e)+_0x5f0646[_0xeb1584(0xc8)]+_0xeb1584(_0x48cb40._0x12c327)+_0x3f9394+':'+_0x56237d);}return await _0x134c29[_0xeb1584(_0x48cb40._0x3f737f)](_0x3dee3e,..._0x5127ba);}if(_0x5f0646 instanceof MemberCallExpression){const _0x44fedf=yield*this['evalExpression'](_0x5f0646[_0xeb1584(_0x48cb40._0x4ad90e)],_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3),_0x2138b4=[_0x44fedf];for(const _0x1e0242 of _0x5f0646[_0xeb1584(_0x48cb40._0x336087)]){const _0x4a2fed=yield*this[_0xeb1584(_0x48cb40._0x333914)](_0x1e0242,_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3);_0x2138b4[_0xeb1584(_0x48cb40._0x442b68)](_0x4a2fed);}const _0x20a7b6=this['dispatcher']['get'](_0x5f0646['name']);if(!_0x20a7b6){const {line:_0x338334,col:_0x39869b}=locationOf(_0x5f0646);throw new Error(_0xeb1584(0xe7)+_0x5f0646[_0xeb1584(0xc8)]+_0xeb1584(_0x48cb40._0x4288dd)+_0x338334+':'+_0x39869b);}return await _0x20a7b6['invoke'](_0x3dee3e,..._0x2138b4);}if(_0x5f0646 instanceof PropertyAccessExpression){const _0x5c69bb=yield*this[_0xeb1584(0xb2)](_0x5f0646[_0xeb1584(0xaf)],_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3);return readProperty(_0x5c69bb,_0x5f0646[_0xeb1584(_0x48cb40._0x134a3f)],_0x5f0646);}if(_0x5f0646 instanceof BinaryExpression){const _0x5020eb=yield*this['evalExpression'](_0x5f0646[_0xeb1584(0x90)],_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3),_0xd61acb=yield*this['evalExpression'](_0x5f0646[_0xeb1584(_0x48cb40._0x21d00f)],_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3);return applyBinaryOp(_0x5f0646[_0xeb1584(_0x48cb40._0x35abf4)],_0x5020eb,_0xd61acb);}if(_0x5f0646 instanceof ConditionalExpression){const _0x247e83=yield*this['evalExpression'](_0x5f0646['expr1'],_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3),_0x5a12c9=yield*this[_0xeb1584(_0x48cb40._0x333914)](_0x5f0646['expr2'],_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3);return applyConditionalOp(_0x5f0646['operation'],_0x247e83,_0x5a12c9);}if(_0x5f0646 instanceof ArrayExpression){const _0x577fc6=[];for(const _0x145bde of _0x5f0646[_0xeb1584(0xd4)]){const _0x512518=yield*this['evalExpression'](_0x145bde,_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3);_0x577fc6[_0xeb1584(_0x48cb40._0x1e6fe9)](_0x512518);}return _0x577fc6;}if(_0x5f0646 instanceof ObjectExpression){const _0x920c12={},_0x3be591=_0x5f0646[_0xeb1584(0xca)];for(const [_0x20554a,_0x1be204]of _0x3be591[_0xeb1584(0x94)]()){const _0x385c60=yield*this['evalExpression'](_0x1be204,_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3);_0x920c12[_0x20554a]=_0x385c60;}return _0x920c12;}if(_0x5f0646 instanceof ArrayAccessExpression){const _0x383005=_0x5f0646;let _0x2f903b=_0x3dee3e[_0xeb1584(0xd7)](_0x383005['variable']);for(const _0x4b835f of _0x383005[_0xeb1584(0xbc)]){const _0x188b22=yield*this['evalExpression'](_0x4b835f,_0x3dee3e,_0x4765d2,_0x703e01,_0x2c4e03,_0x2b9029,_0x44124c,_0x2cf2b3);_0x2f903b=readIndex(_0x2f903b,_0x188b22,_0x5f0646);}return _0x2f903b;}if(_0x5f0646 instanceof IncrementExpression)return this[_0xeb1584(_0x48cb40._0x49ea11)](_0x5f0646,_0x3dee3e);const {line:_0x174fa4,col:_0x54f466}=locationOf(_0x5f0646);throw new UnsupportedAstNodeError(_0xeb1584(0xe5)+_0x5f0646['constructor'][_0xeb1584(_0x48cb40._0x34d872)],_0x174fa4,_0x54f466);}async*[_0x56ac1e(0xa0)](_0x59d057,_0x3e4268,_0x55b6c7,_0x3a1a4b,_0x28c18a,_0x5e075f,_0x218a84,_0x5a4f18,_0x13fa43){const _0x50ea63={_0x133fdc:0xf4,_0x18e84b:0xe6,_0x34372e:0xf5,_0x22c1bf:0xec,_0x4fed18:0xf3,_0x4df808:0xc0,_0x35b864:0xd2},_0x5f2852=_0x56ac1e;_0x55b6c7[_0x5f2852(0xa6)](_0x3a1a4b[_0x5f2852(_0x50ea63._0x133fdc)]??DEFAULT_MAX_CALL_DEPTH),_0x13fa43[_0x5f2852(0xba)](_0x59d057[_0x5f2852(0xc8)]);try{_0x55b6c7[_0x5f2852(0x10f)]();try{for(let _0x5a48fb=0x0;_0x5a48fb<_0x59d057[_0x5f2852(0xf5)][_0x5f2852(0xde)];_0x5a48fb++){_0x55b6c7[_0x5f2852(_0x50ea63._0x18e84b)](_0x59d057[_0x5f2852(_0x50ea63._0x34372e)][_0x5a48fb],_0x3e4268[_0x5a48fb]??null);}if(!(_0x59d057['body']instanceof BlockStatement))throw new Error(_0x5f2852(_0x50ea63._0x22c1bf)+_0x59d057[_0x5f2852(0xc8)]+_0x5f2852(0x105));try{return yield*this[_0x5f2852(0xdd)](_0x59d057[_0x5f2852(_0x50ea63._0x4fed18)],_0x55b6c7,_0x3a1a4b,_0x28c18a,_0x5e075f,_0x218a84,_0x5a4f18,_0x13fa43),null;}catch(_0x4c39db){if(_0x4c39db instanceof ReturnSignal)return _0x4c39db[_0x5f2852(_0x50ea63._0x4df808)]??null;throw _0x4c39db;}}finally{_0x55b6c7[_0x5f2852(0xd3)]();}}finally{_0x13fa43[_0x5f2852(_0x50ea63._0x35b864)](),_0x55b6c7[_0x5f2852(0xcd)]();}}async*[_0x56ac1e(0x101)](_0x2fdb93,_0x222226,_0x5bbb61,_0x47f8c6,_0x19a989,_0x189cd4,_0x1ec560,_0x13ba26){const _0xb6721f={_0x2e380e:0xda,_0x57cac8:0x91,_0x2ff77a:0xad,_0x137419:0x10b,_0x102658:0xb2,_0xd9dfa5:0xf7,_0x13b9c3:0xd8},_0x24cfbf=_0x56ac1e;if(_0x2fdb93 instanceof ForStatement){yield*this[_0x24cfbf(0x10b)](_0x2fdb93[_0x24cfbf(_0xb6721f._0x2e380e)],_0x222226,_0x5bbb61,_0x47f8c6,_0x19a989,_0x189cd4,_0x1ec560,_0x13ba26);while(isTruthy(yield*this['evalExpression'](_0x2fdb93['termination'],_0x222226,_0x5bbb61,_0x47f8c6,_0x19a989,_0x189cd4,_0x1ec560,_0x13ba26))){const _0xe200e2=yield*this[_0x24cfbf(_0xb6721f._0x57cac8)](_0x2fdb93[_0x24cfbf(_0xb6721f._0x2ff77a)],_0x222226,_0x5bbb61,_0x47f8c6,_0x19a989,_0x189cd4,_0x1ec560,_0x13ba26);if(_0xe200e2)break;yield*this[_0x24cfbf(_0xb6721f._0x137419)](_0x2fdb93['increment'],_0x222226,_0x5bbb61,_0x47f8c6,_0x19a989,_0x189cd4,_0x1ec560,_0x13ba26);}return;}if(_0x2fdb93 instanceof WhileStatement){while(isTruthy(yield*this[_0x24cfbf(_0xb6721f._0x102658)](_0x2fdb93[_0x24cfbf(0xd8)],_0x222226,_0x5bbb61,_0x47f8c6,_0x19a989,_0x189cd4,_0x1ec560,_0x13ba26))){const _0x256469=yield*this['runLoopIteration'](_0x2fdb93[_0x24cfbf(_0xb6721f._0xd9dfa5)],_0x222226,_0x5bbb61,_0x47f8c6,_0x19a989,_0x189cd4,_0x1ec560,_0x13ba26);if(_0x256469)break;}return;}do{const _0x182569=yield*this[_0x24cfbf(0x91)](_0x2fdb93['statement'],_0x222226,_0x5bbb61,_0x47f8c6,_0x19a989,_0x189cd4,_0x1ec560,_0x13ba26);if(_0x182569)break;}while(isTruthy(yield*this[_0x24cfbf(_0xb6721f._0x102658)](_0x2fdb93[_0x24cfbf(_0xb6721f._0x13b9c3)],_0x222226,_0x5bbb61,_0x47f8c6,_0x19a989,_0x189cd4,_0x1ec560,_0x13ba26)));}async*[_0x56ac1e(0x91)](_0x45b99e,_0x3e2295,_0x3b6c6e,_0x76d0da,_0x2768a0,_0x21e770,_0x357735,_0x224304){const _0x4eb1ad={_0x451e73:0xee,_0x5075f2:0x10b},_0x1302e9=_0x56ac1e;_0x2768a0(_0x76d0da()+0x1),this[_0x1302e9(_0x4eb1ad._0x451e73)](_0x3b6c6e,_0x76d0da(),_0x21e770);try{yield*this[_0x1302e9(_0x4eb1ad._0x5075f2)](_0x45b99e,_0x3e2295,_0x3b6c6e,_0x76d0da,_0x2768a0,_0x21e770,_0x357735,_0x224304);}catch(_0x573930){if(_0x573930 instanceof BreakSignal)return!![];if(_0x573930 instanceof ContinueSignal)return![];throw _0x573930;}return![];}[_0x56ac1e(0x10d)](_0x14529b,_0x1718dd){const _0x249964={_0x10ccdc:0xd7,_0x5d3606:0xfc,_0x2eb891:0xfc},_0x104903=_0x56ac1e,_0x2ecbf4=_0x14529b[_0x104903(0xe0)]['name'],_0x3a5558=_0x1718dd[_0x104903(_0x249964._0x10ccdc)](_0x2ecbf4);if(typeof _0x3a5558!==_0x104903(0xa7)){const {line:_0x49d205,col:_0xa0bb50}=locationOf(_0x14529b);throw new IncrementTypeError(_0x2ecbf4,_0x3a5558===null?_0x104903(0xa2):typeof _0x3a5558,_0x49d205,_0xa0bb50);}const _0x21d16a=_0x14529b[_0x104903(_0x249964._0x5d3606)]===0x0||_0x14529b[_0x104903(0xfc)]===0x2,_0x1db774=_0x14529b[_0x104903(_0x249964._0x2eb891)]===0x0||_0x14529b[_0x104903(0xfc)]===0x1,_0x16c03f=_0x21d16a?_0x3a5558+0x1:_0x3a5558-0x1;return _0x1718dd['setVar'](_0x2ecbf4,_0x16c03f),_0x1db774?_0x16c03f:_0x3a5558;}[_0x56ac1e(0xee)](_0x830c9,_0x277419,_0x3b49c2){const _0x163863={_0x3180dd:0xc3,_0xc23aea:0xc3,_0x1a6cdc:0xc3,_0x11b41a:0xc9,_0x44d66c:0xd1,_0x2c0fb9:0x9d,_0x232ca9:0xcb},_0x6ca9e2=_0x56ac1e;if(_0x830c9[_0x6ca9e2(_0x163863._0x3180dd)]!==void 0x0&&_0x277419>=_0x830c9[_0x6ca9e2(_0x163863._0xc23aea)])throw new Error('maxSteps\x20budget\x20('+_0x830c9[_0x6ca9e2(_0x163863._0x1a6cdc)]+')\x20exhausted');if(_0x830c9[_0x6ca9e2(0xd1)]!==void 0x0&&Date[_0x6ca9e2(_0x163863._0x11b41a)]()-_0x3b49c2>=_0x830c9[_0x6ca9e2(_0x163863._0x44d66c)])throw new Error(_0x6ca9e2(_0x163863._0x2c0fb9)+_0x830c9['maxDurationMs']+_0x6ca9e2(_0x163863._0x232ca9));}};function locationOf(_0x469d76){const _0x5d2b62={_0x3f2d5b:0xac},_0x3ca26e=_0x56ac1e,_0x48aea1=_0x469d76[_0x3ca26e(0xf8)];if(!_0x48aea1)return{'line':0x0,'col':0x0};return{'line':_0x48aea1[_0x3ca26e(0xcf)]?_0x48aea1[_0x3ca26e(0xcf)]():0x0,'col':_0x48aea1[_0x3ca26e(_0x5d2b62._0x3f2d5b)]?_0x48aea1[_0x3ca26e(0xac)]():0x0};}__name(locationOf,_0x56ac1e(0x110));function isTruthy(_0x4889f8){const _0x56861a={_0x326a89:0xa7,_0x388805:0x8c},_0x5c7e5b=_0x56ac1e;if(typeof _0x4889f8===_0x5c7e5b(_0x56861a._0x326a89))return _0x4889f8!==0x0;if(typeof _0x4889f8==='boolean')return _0x4889f8;if(typeof _0x4889f8===_0x5c7e5b(_0x56861a._0x388805))return _0x4889f8[_0x5c7e5b(0xde)]>0x0;return _0x4889f8!=null;}__name(isTruthy,_0x56ac1e(0xa8));function applyBinaryOp(_0x1fd9d3,_0x546518,_0xc9d956){const _0x415829={_0x3ea6bd:0x8c,_0x19a9b8:0x92},_0x2ed8ec=_0x56ac1e;if(_0x1fd9d3==='+'&&(typeof _0x546518===_0x2ed8ec(_0x415829._0x3ea6bd)||typeof _0xc9d956==='string'))return String(_0x546518)+String(_0xc9d956);const _0x3df405=typeof _0x546518===_0x2ed8ec(0xa7)?_0x546518:Number(_0x546518),_0x5e5e33=typeof _0xc9d956==='number'?_0xc9d956:Number(_0xc9d956);switch(_0x1fd9d3){case'+':return _0x3df405+_0x5e5e33;case'-':return _0x3df405-_0x5e5e33;case'*':return _0x3df405*_0x5e5e33;case'/':return _0x3df405/_0x5e5e33;default:throw new Error(_0x2ed8ec(_0x415829._0x19a9b8)+_0x1fd9d3+'\x22');}}__name(applyBinaryOp,_0x56ac1e(0xd5));function applyConditionalOp(_0x29a8ea,_0x32ae07,_0x24d93d){const _0xff17ba=_0x56ac1e;switch(_0x29a8ea){case'==':return looseEqual(_0x32ae07,_0x24d93d);case'!=':return!looseEqual(_0x32ae07,_0x24d93d);case'<':return numericCompare(_0x32ae07,_0x24d93d)<0x0;case'<=':return numericCompare(_0x32ae07,_0x24d93d)<=0x0;case'>':return numericCompare(_0x32ae07,_0x24d93d)>0x0;case'>=':return numericCompare(_0x32ae07,_0x24d93d)>=0x0;case'&&':return isTruthy(_0x32ae07)&&isTruthy(_0x24d93d);case'||':return isTruthy(_0x32ae07)||isTruthy(_0x24d93d);default:throw new Error(_0xff17ba(0xe3)+_0x29a8ea+'\x22');}}__name(applyConditionalOp,'applyConditionalOp');function looseEqual(_0x4e83ce,_0x5ae5e5){const _0x2582ef={_0x256ccc:0xa7,_0x215e41:0x8c,_0x76ecf1:0xb3},_0x26e271=_0x56ac1e;if(_0x4e83ce===_0x5ae5e5)return!![];if(typeof _0x4e83ce===_0x26e271(0xa7)&&typeof _0x5ae5e5===_0x26e271(_0x2582ef._0x256ccc))return _0x4e83ce===_0x5ae5e5;if(typeof _0x4e83ce==='string'&&typeof _0x5ae5e5===_0x26e271(_0x2582ef._0x215e41))return _0x4e83ce===_0x5ae5e5;const _0x1c438d=Number(_0x4e83ce),_0x22f908=Number(_0x5ae5e5);if(Number[_0x26e271(0xb3)](_0x1c438d)&&Number[_0x26e271(_0x2582ef._0x76ecf1)](_0x22f908))return _0x1c438d===_0x22f908;return![];}__name(looseEqual,_0x56ac1e(0x112));function numericCompare(_0x1c9ae6,_0x21fb7c){if(typeof _0x1c9ae6==='string'&&typeof _0x21fb7c==='string')return _0x1c9ae6<_0x21fb7c?-0x1:_0x1c9ae6>_0x21fb7c?0x1:0x0;const _0x8b9fb2=Number(_0x1c9ae6),_0x78db2c=Number(_0x21fb7c);return _0x8b9fb2-_0x78db2c;}__name(numericCompare,_0x56ac1e(0x9f));function readProperty(_0x2084d5,_0x4ac99b,_0x54a3b9){const _0x127304={_0x166ece:0xab},_0x2a497d=_0x56ac1e,{line:_0x3d744c,col:_0x214df6}=locationOf(_0x54a3b9);if(_0x2084d5===null||_0x2084d5===void 0x0)throw new PropertyAccessTypeError(_0x2084d5===null?'null':_0x2a497d(0xe8),_0x4ac99b,_0x3d744c,_0x214df6);if(typeof _0x2084d5==='object'){const _0x9ac1f9=_0x2084d5;return Object[_0x2a497d(_0x127304._0x166ece)]['hasOwnProperty'][_0x2a497d(0xb9)](_0x9ac1f9,_0x4ac99b)?_0x9ac1f9[_0x4ac99b]:null;}throw new PropertyAccessTypeError(typeof _0x2084d5,_0x4ac99b,_0x3d744c,_0x214df6);}__name(readProperty,_0x56ac1e(0x9a));function readIndex(_0x56ee32,_0x5861f8,_0x317562){const _0x43f1bd=_0x56ac1e;if(Array['isArray'](_0x56ee32)){const _0x14a378=Number(_0x5861f8);if(!Number[_0x43f1bd(0xbb)](_0x14a378))throw new Error('Array\x20index\x20must\x20be\x20an\x20integer,\x20got\x20'+String(_0x5861f8));return _0x56ee32[_0x14a378]??null;}if(_0x56ee32&&typeof _0x56ee32==='object')return _0x56ee32[String(_0x5861f8)]??null;const {line:_0x55bccb,col:_0x137566}=locationOf(_0x317562);throw new Error(_0x43f1bd(0x10e)+String(_0x5861f8)+_0x43f1bd(0xe9)+_0x55bccb+':'+_0x137566);}__name(readIndex,'readIndex');function toExecutionError(_0x2372c0){const _0x6d3ca2={_0x42e45c:0xed,_0x2d2c0d:0xc8,_0x4faee5:0xf0},_0x18303b=_0x56ac1e;if(_0x2372c0 instanceof Error){const _0xcbcb18={'message':_0x2372c0[_0x18303b(_0x6d3ca2._0x42e45c)]};if(_0x2372c0[_0x18303b(_0x6d3ca2._0x2d2c0d)])_0xcbcb18['name']=_0x2372c0[_0x18303b(_0x6d3ca2._0x2d2c0d)];if(_0x2372c0[_0x18303b(_0x6d3ca2._0x4faee5)])_0xcbcb18['stack']=_0x2372c0[_0x18303b(0xf0)];return _0xcbcb18;}return{'message':String(_0x2372c0)};}__name(toExecutionError,'toExecutionError');var VariableScope=class{static{__name(this,_0x56ac1e(0xc4));}[_0x56ac1e(0xf0)]=[];[_0x56ac1e(0xfe)]=new Map();[_0x56ac1e(0xba)](){const _0x2d9595={_0x17fffd:0xba},_0x5e1f52=_0x56ac1e;this['stack'][_0x5e1f52(_0x2d9595._0x17fffd)](new Map(this[_0x5e1f52(0xfe)]));}['pop'](){const _0x225e3d={_0x2b05a1:0xf0,_0x54fcd4:0x8d,_0x213788:0xfe},_0x25fa2f=_0x56ac1e,_0x543a33=this[_0x25fa2f(_0x225e3d._0x2b05a1)][_0x25fa2f(0xd2)]();if(_0x543a33===void 0x0)throw new Error(_0x25fa2f(_0x225e3d._0x54fcd4));this[_0x25fa2f(_0x225e3d._0x213788)]=_0x543a33;}[_0x56ac1e(0xeb)](_0x2a511a){const _0x399ec5={_0x5e8a3e:0xfe,_0x498b6e:0xeb},_0x517505=_0x56ac1e;return this[_0x517505(_0x399ec5._0x5e8a3e)][_0x517505(_0x399ec5._0x498b6e)](_0x2a511a);}['has'](_0x20d00e){const _0x8ef41b=_0x56ac1e;return this['current'][_0x8ef41b(0xc2)](_0x20d00e);}[_0x56ac1e(0xc5)](_0x589055,_0x222e6f){const _0x5b7c82={_0x3f395c:0xfe},_0xdaf60a=_0x56ac1e;this[_0xdaf60a(_0x5b7c82._0x3f395c)]['set'](_0x589055,_0x222e6f);}[_0x56ac1e(0x95)](){const _0x27e94f=_0x56ac1e;return Object[_0x27e94f(0xb6)](this[_0x27e94f(0xfe)][_0x27e94f(0x94)]());}[_0x56ac1e(0xff)](){return this['stack']['length'];}};export{BreakSignal,ContinueSignal,ExecutionWalker,IncrementTypeError,PropertyAccessTypeError,ReturnSignal,UnsupportedAstNodeError,UserFunctionResolver,VariableScope};
@@ -0,0 +1,13 @@
1
+ import { S as Statement, T as Token } from './block-statement-D2TekS1-.js';
2
+
3
+ declare class FunctionDefineStatement implements Statement {
4
+ readonly name: string;
5
+ readonly argNames: string[];
6
+ readonly body: Statement;
7
+ readonly token: Token;
8
+ constructor(name: string, argNames: string[], body: Statement, token: Token);
9
+ execute(): void;
10
+ toString(): string;
11
+ }
12
+
13
+ export { FunctionDefineStatement as F };
@@ -0,0 +1,24 @@
1
+ import { T as Token } from './block-statement-D2TekS1-.js';
2
+
3
+ interface Value {
4
+ asNumber(): number;
5
+ asString(): string;
6
+ clone(): Value;
7
+ }
8
+
9
+ interface Expression {
10
+ token: Token;
11
+ eval(): Value;
12
+ }
13
+
14
+ declare class FunctionalExpression implements Expression {
15
+ readonly name: string;
16
+ readonly arguments: Expression[];
17
+ readonly token: Token;
18
+ constructor(name: string, argument: Expression[], token: Token);
19
+ addArgument(argument: Expression): number;
20
+ eval(): Value;
21
+ toString(): string;
22
+ }
23
+
24
+ export { type Expression as E, FunctionalExpression as F, type Value as V };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- import { V as Value, S as Statement, E as Expression, T as Token, F as FunctionalExpression, B as BlockStatement } from './functional-expression-C1PH7fye.js';
2
- export { a as TokenType } from './functional-expression-C1PH7fye.js';
1
+ import { V as Value, E as Expression, F as FunctionalExpression } from './functional-expression-rmx1REeL.js';
2
+ import { S as Statement, T as Token, B as BlockStatement } from './block-statement-D2TekS1-.js';
3
+ export { a as TokenType } from './block-statement-D2TekS1-.js';
4
+ export { F as FunctionDefineStatement } from './function-define-statement-Ri23krF1.js';
3
5
 
4
6
  /**
5
7
  * DSL code builders — canonical source of truth for generating DSL text.
@@ -277,16 +279,6 @@ declare class ForStatement implements Statement {
277
279
  toString(): string;
278
280
  }
279
281
 
280
- declare class FunctionDefineStatement implements Statement {
281
- readonly name: string;
282
- readonly argNames: string[];
283
- readonly body: Statement;
284
- readonly token: Token;
285
- constructor(name: string, argNames: string[], body: Statement, token: Token);
286
- execute(): void;
287
- toString(): string;
288
- }
289
-
290
282
  /**
291
283
  * Web extension: method-call chain — `receiver.name(args)`.
292
284
  *
@@ -603,4 +595,4 @@ declare class Parser {
603
595
  private get;
604
596
  }
605
597
 
606
- export { ArrayAccessExpression, ArrayAssignmentStatement, ArrayExpression, ArrayValue, AssignmentStatement, BinaryExpression, BlockStatement, BreakStatement, type CallableExpression, ConditionalExpression, ContinueStatement, DoWhileStatement, Expression, ForStatement, type Func, FunctionDefineStatement, FunctionStatement, FunctionalExpression, Functions, IfStatement, IncrementExpression, IncrementStatement, IncrementType, Lexer, MemberCallExpression, MetaBlockStatement, NumberValue, ObjectExpression, ObjectValue, Operator, ParseError, Parser, PrintStatement, PropertyAccessExpression, RegExpExpression, RegExpFlagError, RegExpValue, ReturnStatement, Statement, StepStatement, StringValue, Token, UnaryExpression, UserDefineFunction, Value, ValueExpression, type VarDeclarator, VarStatement, VariableExpression, Variables, WhileStatement, buildAssertAuthenticatedDsl, buildAssertCountEqualsDsl, buildAssertDialogOpenDsl, buildAssertInputValueDsl, buildAssertListNotEmptyDsl, buildAssertNoVisibleErrorDsl, buildAssertNotVisibleDsl, buildAssertPageReadyDsl, buildAssertRouteIsDsl, buildAssertSectionTitleDsl, buildAssertTableNotEmptyDsl, buildAssertTextContainsDsl, buildAssertTextEqualsDsl, buildAssertToastVisibleDsl, buildAssertUrlContainsDsl, buildAssertUrlEqualsDsl, buildAssertVisibleDsl, buildClickDsl, buildClipboardPasteDsl, buildCloseDialogDsl, buildDragAndDropDsl, buildFillDsl, buildFillFormDsl, buildFlowDsl, buildForceClickDsl, buildKeypressDsl, buildLoginAsDsl, buildNavigateDsl, buildOpenDsl, buildOpenMenuItemDsl, buildOpenTabDsl, buildSaveFormDsl, buildScrollIntoViewDsl, buildScrollToBottomDsl, buildScrollToTopDsl, buildSelectComboboxValueDsl, buildSwitchToFrameDsl, buildSwitchToMainFrameDsl, buildTypeTextDsl, buildWaitForDsl, buildWaitForHiddenDsl, buildWaitForNavigationDsl, buildWaitForTextDsl, buildWaitForURLDsl, getOperatorName };
598
+ export { ArrayAccessExpression, ArrayAssignmentStatement, ArrayExpression, ArrayValue, AssignmentStatement, BinaryExpression, BlockStatement, BreakStatement, type CallableExpression, ConditionalExpression, ContinueStatement, DoWhileStatement, Expression, ForStatement, type Func, FunctionStatement, FunctionalExpression, Functions, IfStatement, IncrementExpression, IncrementStatement, IncrementType, Lexer, MemberCallExpression, MetaBlockStatement, NumberValue, ObjectExpression, ObjectValue, Operator, ParseError, Parser, PrintStatement, PropertyAccessExpression, RegExpExpression, RegExpFlagError, RegExpValue, ReturnStatement, Statement, StepStatement, StringValue, Token, UnaryExpression, UserDefineFunction, Value, ValueExpression, type VarDeclarator, VarStatement, VariableExpression, Variables, WhileStatement, buildAssertAuthenticatedDsl, buildAssertCountEqualsDsl, buildAssertDialogOpenDsl, buildAssertInputValueDsl, buildAssertListNotEmptyDsl, buildAssertNoVisibleErrorDsl, buildAssertNotVisibleDsl, buildAssertPageReadyDsl, buildAssertRouteIsDsl, buildAssertSectionTitleDsl, buildAssertTableNotEmptyDsl, buildAssertTextContainsDsl, buildAssertTextEqualsDsl, buildAssertToastVisibleDsl, buildAssertUrlContainsDsl, buildAssertUrlEqualsDsl, buildAssertVisibleDsl, buildClickDsl, buildClipboardPasteDsl, buildCloseDialogDsl, buildDragAndDropDsl, buildFillDsl, buildFillFormDsl, buildFlowDsl, buildForceClickDsl, buildKeypressDsl, buildLoginAsDsl, buildNavigateDsl, buildOpenDsl, buildOpenMenuItemDsl, buildOpenTabDsl, buildSaveFormDsl, buildScrollIntoViewDsl, buildScrollToBottomDsl, buildScrollToTopDsl, buildSelectComboboxValueDsl, buildSwitchToFrameDsl, buildSwitchToMainFrameDsl, buildTypeTextDsl, buildWaitForDsl, buildWaitForHiddenDsl, buildWaitForNavigationDsl, buildWaitForTextDsl, buildWaitForURLDsl, getOperatorName };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x211578,_0x4e253d){var _0x22d17f={_0x42b3e8:0x9a,_0x24c9d7:0x99,_0x46d4fb:0x98,_0x2edd99:0x91,_0x5cdb7f:0x92,_0x35485e:0x96,_0x39548b:0x95},_0x5188f7=_0x409f,_0x520337=_0x211578();while(!![]){try{var _0x78bc29=parseInt(_0x5188f7(0x9b))/0x1*(-parseInt(_0x5188f7(0x93))/0x2)+-parseInt(_0x5188f7(_0x22d17f._0x42b3e8))/0x3*(parseInt(_0x5188f7(0x94))/0x4)+-parseInt(_0x5188f7(_0x22d17f._0x24c9d7))/0x5+parseInt(_0x5188f7(0x97))/0x6*(parseInt(_0x5188f7(_0x22d17f._0x46d4fb))/0x7)+-parseInt(_0x5188f7(_0x22d17f._0x2edd99))/0x8+-parseInt(_0x5188f7(_0x22d17f._0x5cdb7f))/0x9+parseInt(_0x5188f7(_0x22d17f._0x35485e))/0xa*(parseInt(_0x5188f7(_0x22d17f._0x39548b))/0xb);if(_0x78bc29===_0x4e253d)break;else _0x520337['push'](_0x520337['shift']());}catch(_0x53700a){_0x520337['push'](_0x520337['shift']());}}}(_0x3d7e,0x472ed));function _0x409f(_0x1c2716,_0x2d4ca9){_0x1c2716=_0x1c2716-0x91;var _0x3d7e39=_0x3d7e();var _0x409f53=_0x3d7e39[_0x1c2716];if(_0x409f['zzFZbR']===undefined){var _0x338fa8=function(_0x5a00ae){var _0x3dadc1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x144e77='',_0x2f0cd5='';for(var _0xb09e50=0x0,_0x1db7ea,_0x325b0f,_0x11ce10=0x0;_0x325b0f=_0x5a00ae['charAt'](_0x11ce10++);~_0x325b0f&&(_0x1db7ea=_0xb09e50%0x4?_0x1db7ea*0x40+_0x325b0f:_0x325b0f,_0xb09e50++%0x4)?_0x144e77+=String['fromCharCode'](0xff&_0x1db7ea>>(-0x2*_0xb09e50&0x6)):0x0){_0x325b0f=_0x3dadc1['indexOf'](_0x325b0f);}for(var _0xa4cb9e=0x0,_0x4b5b78=_0x144e77['length'];_0xa4cb9e<_0x4b5b78;_0xa4cb9e++){_0x2f0cd5+='%'+('00'+_0x144e77['charCodeAt'](_0xa4cb9e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2f0cd5);};_0x409f['EDcWGb']=_0x338fa8,_0x409f['weTzFI']={},_0x409f['zzFZbR']=!![];}var _0x28c6ac=_0x3d7e39[0x0],_0x397304=_0x1c2716+_0x28c6ac,_0x3265cb=_0x409f['weTzFI'][_0x397304];return!_0x3265cb?(_0x409f53=_0x409f['EDcWGb'](_0x409f53),_0x409f['weTzFI'][_0x397304]=_0x409f53):_0x409f53=_0x3265cb,_0x409f53;}import{ArrayAccessExpression,ArrayAssignmentStatement,ArrayExpression,ArrayValue,AssignmentStatement,BinaryExpression,BlockStatement,BreakStatement,ConditionalExpression,ContinueStatement,DoWhileStatement,ForStatement,FunctionDefineStatement,FunctionStatement,FunctionalExpression,Functions,IfStatement,IncrementExpression,IncrementStatement,IncrementType,Lexer,MemberCallExpression,MetaBlockStatement,NumberValue,ObjectExpression,ObjectValue,Operator,ParseError,Parser,PrintStatement,PropertyAccessExpression,RegExpExpression,RegExpFlagError,RegExpValue,ReturnStatement,StepStatement,StringValue,Token,TokenType,UnaryExpression,UserDefineFunction,ValueExpression,VarStatement,VariableExpression,Variables,WhileStatement,buildAssertAuthenticatedDsl,buildAssertCountEqualsDsl,buildAssertDialogOpenDsl,buildAssertInputValueDsl,buildAssertListNotEmptyDsl,buildAssertNoVisibleErrorDsl,buildAssertNotVisibleDsl,buildAssertPageReadyDsl,buildAssertRouteIsDsl,buildAssertSectionTitleDsl,buildAssertTableNotEmptyDsl,buildAssertTextContainsDsl,buildAssertTextEqualsDsl,buildAssertToastVisibleDsl,buildAssertUrlContainsDsl,buildAssertUrlEqualsDsl,buildAssertVisibleDsl,buildClickDsl,buildClipboardPasteDsl,buildCloseDialogDsl,buildDragAndDropDsl,buildFillDsl,buildFillFormDsl,buildFlowDsl,buildForceClickDsl,buildKeypressDsl,buildLoginAsDsl,buildNavigateDsl,buildOpenDsl,buildOpenMenuItemDsl,buildOpenTabDsl,buildSaveFormDsl,buildScrollIntoViewDsl,buildScrollToBottomDsl,buildScrollToTopDsl,buildSelectComboboxValueDsl,buildSwitchToFrameDsl,buildSwitchToMainFrameDsl,buildTypeTextDsl,buildWaitForDsl,buildWaitForHiddenDsl,buildWaitForNavigationDsl,buildWaitForTextDsl,buildWaitForURLDsl,getOperatorName}from'./chunk-YSVX2W7P.js';function _0x3d7e(){var _0x5cb317=['mJqYt0jgvuvp','nZK4odGWDuDTsNbb','mtK1nZi2tg9Rq3j0','n3zwD254rG','mta5odKWmfnozeHzBW','mtm0ndCYm3HfBgP1wG','nZGWn1LVveXnCW','mJKYmZG4oeP2rvnnDW','ndeXntuWmMXXzuL0sW','mNPRs0f6ua','ngzVwxjYCq'];_0x3d7e=function(){return _0x5cb317;};return _0x3d7e();}export{ArrayAccessExpression,ArrayAssignmentStatement,ArrayExpression,ArrayValue,AssignmentStatement,BinaryExpression,BlockStatement,BreakStatement,ConditionalExpression,ContinueStatement,DoWhileStatement,ForStatement,FunctionDefineStatement,FunctionStatement,FunctionalExpression,Functions,IfStatement,IncrementExpression,IncrementStatement,IncrementType,Lexer,MemberCallExpression,MetaBlockStatement,NumberValue,ObjectExpression,ObjectValue,Operator,ParseError,Parser,PrintStatement,PropertyAccessExpression,RegExpExpression,RegExpFlagError,RegExpValue,ReturnStatement,StepStatement,StringValue,Token,TokenType,UnaryExpression,UserDefineFunction,ValueExpression,VarStatement,VariableExpression,Variables,WhileStatement,buildAssertAuthenticatedDsl,buildAssertCountEqualsDsl,buildAssertDialogOpenDsl,buildAssertInputValueDsl,buildAssertListNotEmptyDsl,buildAssertNoVisibleErrorDsl,buildAssertNotVisibleDsl,buildAssertPageReadyDsl,buildAssertRouteIsDsl,buildAssertSectionTitleDsl,buildAssertTableNotEmptyDsl,buildAssertTextContainsDsl,buildAssertTextEqualsDsl,buildAssertToastVisibleDsl,buildAssertUrlContainsDsl,buildAssertUrlEqualsDsl,buildAssertVisibleDsl,buildClickDsl,buildClipboardPasteDsl,buildCloseDialogDsl,buildDragAndDropDsl,buildFillDsl,buildFillFormDsl,buildFlowDsl,buildForceClickDsl,buildKeypressDsl,buildLoginAsDsl,buildNavigateDsl,buildOpenDsl,buildOpenMenuItemDsl,buildOpenTabDsl,buildSaveFormDsl,buildScrollIntoViewDsl,buildScrollToBottomDsl,buildScrollToTopDsl,buildSelectComboboxValueDsl,buildSwitchToFrameDsl,buildSwitchToMainFrameDsl,buildTypeTextDsl,buildWaitForDsl,buildWaitForHiddenDsl,buildWaitForNavigationDsl,buildWaitForTextDsl,buildWaitForURLDsl,getOperatorName};
1
+ function _0x5b95(_0x4cea60,_0x513b1f){_0x4cea60=_0x4cea60-0xe0;var _0x474e91=_0x474e();var _0x5b952c=_0x474e91[_0x4cea60];if(_0x5b95['jfAFQo']===undefined){var _0x339e57=function(_0x5aa647){var _0x369575='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x883ca9='',_0x17ac7c='';for(var _0x3cc507=0x0,_0x8accee,_0x3ba107,_0x5d965d=0x0;_0x3ba107=_0x5aa647['charAt'](_0x5d965d++);~_0x3ba107&&(_0x8accee=_0x3cc507%0x4?_0x8accee*0x40+_0x3ba107:_0x3ba107,_0x3cc507++%0x4)?_0x883ca9+=String['fromCharCode'](0xff&_0x8accee>>(-0x2*_0x3cc507&0x6)):0x0){_0x3ba107=_0x369575['indexOf'](_0x3ba107);}for(var _0x5296b3=0x0,_0x1248b9=_0x883ca9['length'];_0x5296b3<_0x1248b9;_0x5296b3++){_0x17ac7c+='%'+('00'+_0x883ca9['charCodeAt'](_0x5296b3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x17ac7c);};_0x5b95['JzCsYQ']=_0x339e57,_0x5b95['donzIu']={},_0x5b95['jfAFQo']=!![];}var _0x4717c6=_0x474e91[0x0],_0x116e56=_0x4cea60+_0x4717c6,_0x92905d=_0x5b95['donzIu'][_0x116e56];return!_0x92905d?(_0x5b952c=_0x5b95['JzCsYQ'](_0x5b952c),_0x5b95['donzIu'][_0x116e56]=_0x5b952c):_0x5b952c=_0x92905d,_0x5b952c;}function _0x474e(){var _0x279811=['ndy4mtm0mvzeDLnbva','mtGXntK4Ew94DfD3','nJGYmMXPthvUrG','odDMEw9UCwu','nduXndCWwNvZtKXM','mte4mda3mLHKBwPcBq','mJeXmtmXmNbJt3rbta','nKL0Be9dra','mJiXndCWouLQu2v6sq'];_0x474e=function(){return _0x279811;};return _0x474e();}(function(_0x13162a,_0x5457e8){var _0xa25071={_0x3d7d65:0xe8,_0x3e9fa6:0xe2,_0x2d7c64:0xe1,_0x40a876:0xe4,_0xbce990:0xe5,_0xfc5ab9:0xe3,_0xdf7000:0xe6},_0x3f1f2f=_0x5b95,_0x4c1425=_0x13162a();while(!![]){try{var _0x1ddb22=-parseInt(_0x3f1f2f(0xe7))/0x1+parseInt(_0x3f1f2f(_0xa25071._0x3d7d65))/0x2*(parseInt(_0x3f1f2f(0xe0))/0x3)+-parseInt(_0x3f1f2f(_0xa25071._0x3e9fa6))/0x4+parseInt(_0x3f1f2f(_0xa25071._0x2d7c64))/0x5+parseInt(_0x3f1f2f(_0xa25071._0x40a876))/0x6*(-parseInt(_0x3f1f2f(_0xa25071._0xbce990))/0x7)+parseInt(_0x3f1f2f(_0xa25071._0xfc5ab9))/0x8+parseInt(_0x3f1f2f(_0xa25071._0xdf7000))/0x9;if(_0x1ddb22===_0x5457e8)break;else _0x4c1425['push'](_0x4c1425['shift']());}catch(_0x175225){_0x4c1425['push'](_0x4c1425['shift']());}}}(_0x474e,0x2c031));import{ArrayAccessExpression,ArrayAssignmentStatement,ArrayExpression,ArrayValue,AssignmentStatement,BinaryExpression,BlockStatement,BreakStatement,ConditionalExpression,ContinueStatement,DoWhileStatement,ForStatement,FunctionDefineStatement,FunctionStatement,FunctionalExpression,Functions,IfStatement,IncrementExpression,IncrementStatement,IncrementType,Lexer,MemberCallExpression,MetaBlockStatement,NumberValue,ObjectExpression,ObjectValue,Operator,ParseError,Parser,PrintStatement,PropertyAccessExpression,RegExpExpression,RegExpFlagError,RegExpValue,ReturnStatement,StepStatement,StringValue,Token,TokenType,UnaryExpression,UserDefineFunction,ValueExpression,VarStatement,VariableExpression,Variables,WhileStatement,buildAssertAuthenticatedDsl,buildAssertCountEqualsDsl,buildAssertDialogOpenDsl,buildAssertInputValueDsl,buildAssertListNotEmptyDsl,buildAssertNoVisibleErrorDsl,buildAssertNotVisibleDsl,buildAssertPageReadyDsl,buildAssertRouteIsDsl,buildAssertSectionTitleDsl,buildAssertTableNotEmptyDsl,buildAssertTextContainsDsl,buildAssertTextEqualsDsl,buildAssertToastVisibleDsl,buildAssertUrlContainsDsl,buildAssertUrlEqualsDsl,buildAssertVisibleDsl,buildClickDsl,buildClipboardPasteDsl,buildCloseDialogDsl,buildDragAndDropDsl,buildFillDsl,buildFillFormDsl,buildFlowDsl,buildForceClickDsl,buildKeypressDsl,buildLoginAsDsl,buildNavigateDsl,buildOpenDsl,buildOpenMenuItemDsl,buildOpenTabDsl,buildSaveFormDsl,buildScrollIntoViewDsl,buildScrollToBottomDsl,buildScrollToTopDsl,buildSelectComboboxValueDsl,buildSwitchToFrameDsl,buildSwitchToMainFrameDsl,buildTypeTextDsl,buildWaitForDsl,buildWaitForHiddenDsl,buildWaitForNavigationDsl,buildWaitForTextDsl,buildWaitForURLDsl,getOperatorName}from'./chunk-YSVX2W7P.js';export{ArrayAccessExpression,ArrayAssignmentStatement,ArrayExpression,ArrayValue,AssignmentStatement,BinaryExpression,BlockStatement,BreakStatement,ConditionalExpression,ContinueStatement,DoWhileStatement,ForStatement,FunctionDefineStatement,FunctionStatement,FunctionalExpression,Functions,IfStatement,IncrementExpression,IncrementStatement,IncrementType,Lexer,MemberCallExpression,MetaBlockStatement,NumberValue,ObjectExpression,ObjectValue,Operator,ParseError,Parser,PrintStatement,PropertyAccessExpression,RegExpExpression,RegExpFlagError,RegExpValue,ReturnStatement,StepStatement,StringValue,Token,TokenType,UnaryExpression,UserDefineFunction,ValueExpression,VarStatement,VariableExpression,Variables,WhileStatement,buildAssertAuthenticatedDsl,buildAssertCountEqualsDsl,buildAssertDialogOpenDsl,buildAssertInputValueDsl,buildAssertListNotEmptyDsl,buildAssertNoVisibleErrorDsl,buildAssertNotVisibleDsl,buildAssertPageReadyDsl,buildAssertRouteIsDsl,buildAssertSectionTitleDsl,buildAssertTableNotEmptyDsl,buildAssertTextContainsDsl,buildAssertTextEqualsDsl,buildAssertToastVisibleDsl,buildAssertUrlContainsDsl,buildAssertUrlEqualsDsl,buildAssertVisibleDsl,buildClickDsl,buildClipboardPasteDsl,buildCloseDialogDsl,buildDragAndDropDsl,buildFillDsl,buildFillFormDsl,buildFlowDsl,buildForceClickDsl,buildKeypressDsl,buildLoginAsDsl,buildNavigateDsl,buildOpenDsl,buildOpenMenuItemDsl,buildOpenTabDsl,buildSaveFormDsl,buildScrollIntoViewDsl,buildScrollToBottomDsl,buildScrollToTopDsl,buildSelectComboboxValueDsl,buildSwitchToFrameDsl,buildSwitchToMainFrameDsl,buildTypeTextDsl,buildWaitForDsl,buildWaitForHiddenDsl,buildWaitForNavigationDsl,buildWaitForTextDsl,buildWaitForURLDsl,getOperatorName};
@@ -1,7 +1,13 @@
1
- import { B as BlockStatement, F as FunctionalExpression, S as Statement, E as Expression } from '../functional-expression-C1PH7fye.js';
1
+ import { B as BlockStatement, S as Statement } from '../block-statement-D2TekS1-.js';
2
+ import { F as FunctionalExpression, E as Expression } from '../functional-expression-rmx1REeL.js';
2
3
 
3
4
  interface DslDiagnostic {
4
5
  severity: 'error' | 'warning';
6
+ /** Stable engine rule id (`unknown-function`, `arity`, `arg-kind`,
7
+ * `step-coverage`, `unsupported-statement`, …). Consumers map it to
8
+ * their own namespaces (web: `validator:<rule>`) — never classify by
9
+ * message text. */
10
+ rule: string;
5
11
  line: number | null;
6
12
  column: number | null;
7
13
  message: string;
@@ -65,13 +71,23 @@ interface FunctionSemanticsResolver {
65
71
  inferReturnKind(expression: FunctionalExpression, session: ValidationSession): InferredKind;
66
72
  }
67
73
 
68
- declare function validateDsl(ast: Statement, code: string, isWrapped: boolean, registry: FunctionContractRegistry & FunctionSemanticsResolver): DslDiagnostic[];
69
-
70
74
  type DiagnosticEmitter = {
71
- error(line: number | null, column: number | null, message: string): void;
72
- warning(line: number | null, column: number | null, message: string): void;
75
+ error(rule: string, line: number | null, column: number | null, message: string): void;
76
+ warning(rule: string, line: number | null, column: number | null, message: string): void;
73
77
  };
74
78
 
79
+ interface CompatibilityWalkerOptions {
80
+ /** Engine rule ids to drop entirely. Lets a target vocab opt out of
81
+ * rules its DSL dialect replaces (mobile disables
82
+ * `unsupported-statement` in favour of its stricter frozen-subset
83
+ * pass) — rules themselves stay config-unaware (OCP: the filter
84
+ * lives ONLY in the emitter). */
85
+ disabledRules?: Iterable<string>;
86
+ }
87
+
88
+ type ValidateDslOptions = CompatibilityWalkerOptions;
89
+ declare function validateDsl(ast: Statement, code: string, isWrapped: boolean, registry: FunctionContractRegistry & FunctionSemanticsResolver, options?: ValidateDslOptions): DslDiagnostic[];
90
+
75
91
  type ValidationIssue = {
76
92
  message: string;
77
93
  };