shiplightai 0.1.3 → 0.1.5

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.
package/README.md CHANGED
@@ -82,6 +82,8 @@ Add to your `.gitignore`:
82
82
 
83
83
  ```
84
84
  *.yaml.spec.ts
85
+ auth.setup.ts
86
+ .auth/
85
87
  .env
86
88
  ```
87
89
 
@@ -155,6 +157,7 @@ ANTHROPIC_API_KEY=sk-ant-...
155
157
  node_modules/
156
158
  test-results/
157
159
  *.yaml.spec.ts
160
+ auth.setup.ts
158
161
  .auth/
159
162
  .env
160
163
  ```
@@ -163,12 +166,16 @@ test-results/
163
166
 
164
167
  Each subdirectory is a separate project that can test a different application. Subdirectories that require login include a `shiplight.config.json` with credentials. Subdirectories that don't need login (e.g., public sites) simply omit it.
165
168
 
166
- **`my-saas-app/shiplight.config.json`** — login for one app:
169
+ **`my-saas-app/shiplight.config.json`** — login + variables for one app:
167
170
  ```json
168
171
  {
169
172
  "url": "https://my-saas.com",
170
173
  "username": "qa@my-saas.com",
171
- "password": "test-password"
174
+ "password": "test-password",
175
+ "variables": {
176
+ "BASE_URL": "https://my-saas.com",
177
+ "API_TOKEN": { "value": "sk-test-...", "sensitive": true }
178
+ }
172
179
  }
173
180
  ```
174
181
 
@@ -259,7 +266,7 @@ test('custom test with agent', async ({ page, agent }) => {
259
266
 
260
267
  ## Authentication (Optional)
261
268
 
262
- If your app requires login before tests can interact with it, use Playwright's built-in `globalSetup` to authenticate once, then share the session across all test workers via `storageState`. Skip this section if you're testing public pages.
269
+ If your app requires login, add credentials to `shiplight.config.json` and wire up a Playwright setup project. `shiplightConfig()` auto-generates an `auth.setup.ts` file in each directory that has credentials. Skip this section if you're testing public pages.
263
270
 
264
271
  ### 1. Create `shiplight.config.json`
265
272
 
@@ -276,120 +283,29 @@ Place this in your test subdirectory (see [Project Structure](#project-structure
276
283
 
277
284
  The `totp_secret` field is optional — only needed if your app uses 2FA.
278
285
 
279
- ### 2. Create `global-setup.ts`
280
-
281
- This runs once before all tests. It uses `@shiplightai/sdk-pro`'s `WebAgent.loginPage()` for AI-driven login — no fragile selectors that break when your login UI changes.
282
-
283
- ```ts
284
- import * as path from 'path';
285
- import { chromium, type FullConfig } from '@playwright/test';
286
- import { readFile, mkdir } from 'fs/promises';
287
- import { LoginType } from 'shiplight-types';
288
- import { resolveLoginConfig } from 'shiplightai';
289
-
290
- const AUTH_DIR = '.auth';
291
- const STORAGE_STATE_PATH = `${AUTH_DIR}/storage-state.json`;
292
-
293
- async function loadStorageState(): Promise<any | undefined> {
294
- try {
295
- const data = await readFile(STORAGE_STATE_PATH, 'utf-8');
296
- return JSON.parse(data);
297
- } catch {
298
- return undefined;
299
- }
300
- }
301
-
302
- async function globalSetup(config: FullConfig) {
303
- const baseURL = config.projects[0]?.use?.baseURL
304
- || process.env.PLAYWRIGHT_BASE_URL
305
- || 'https://your-app.com';
306
-
307
- // Resolve login credentials from env vars or shiplight.config.json
308
- const testDir = path.resolve(__dirname);
309
- const loginConfig = resolveLoginConfig(testDir);
310
-
311
- if (!loginConfig) {
312
- console.log('[global-setup] No login credentials found. Set SHIPLIGHT_LOGIN_EMAIL/PASSWORD env vars or add a shiplight.config.json.');
313
- return;
314
- }
315
-
316
- const { username, password, loginUrl, totpSecret } = loginConfig;
317
-
318
- const { WebAgent, createAgentContext, configureSdk, VariableStore } = await import('@shiplightai/sdk-pro');
319
-
320
- configureSdk({
321
- env: {
322
- GOOGLE_API_KEY: process.env.GOOGLE_API_KEY ?? '',
323
- ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY ?? '',
324
- },
325
- });
326
-
327
- const { resolveModelFromEnv } = await import('shiplight-types');
328
- const model = resolveModelFromEnv();
329
- if (!model) {
330
- console.log('[global-setup] No AI model configured. Set WEB_AGENT_MODEL, ANTHROPIC_API_KEY, or GOOGLE_API_KEY.');
331
- return;
332
- }
333
-
334
- const agent = new WebAgent(createAgentContext({
335
- model,
336
- variableStore: new VariableStore(),
337
- }));
338
-
339
- const browser = await chromium.launch();
340
- try {
341
- const storageState = await loadStorageState();
342
- const context = await browser.newContext({
343
- baseURL,
344
- ...(storageState && { storageState }),
345
- });
346
- const page = await context.newPage();
347
-
348
- const absoluteLoginUrl = loginUrl
349
- ? (loginUrl.startsWith('http') ? loginUrl : `${baseURL}${loginUrl}`)
350
- : baseURL;
351
-
352
- const result = await agent.loginPage(page, {
353
- site_url: absoluteLoginUrl,
354
- num_verification_exprs: 0,
355
- account: {
356
- type: LoginType.PASSWORD,
357
- username,
358
- password,
359
- ...(totpSecret && {
360
- two_factor_auth_config: { type: 'totp', data: totpSecret },
361
- }),
362
- },
363
- });
364
-
365
- if (!result.success) {
366
- throw new Error('[global-setup] Login failed.');
367
- }
368
-
369
- await mkdir(AUTH_DIR, { recursive: true });
370
- await context.storageState({ path: STORAGE_STATE_PATH });
371
- console.log('[global-setup] Auth state saved.');
372
- } finally {
373
- await browser.close();
374
- }
375
- }
376
-
377
- export default globalSetup;
378
- ```
286
+ ### 2. Add setup project to `playwright.config.ts`
379
287
 
380
- ### 3. Add `globalSetup` to `playwright.config.ts`
288
+ Use Playwright's standard project dependencies to run the auto-generated `auth.setup.ts` before authenticated tests:
381
289
 
382
290
  ```ts
383
291
  export default defineConfig({
384
292
  ...shiplightConfig(),
385
293
 
386
- globalSetup: './global-setup.ts',
387
- use: {
388
- storageState: '.auth/storage-state.json',
389
- },
294
+ projects: [
295
+ // Setup project — runs auto-generated auth.setup.ts
296
+ { name: 'my-app-setup', testDir: './my-app', testMatch: 'auth.setup.ts' },
297
+ {
298
+ name: 'my-app',
299
+ testDir: './my-app',
300
+ dependencies: ['my-app-setup'],
301
+ use: { storageState: './my-app/.auth/storage-state.json' },
302
+ },
303
+ ],
390
304
  });
391
305
  ```
392
306
 
307
+ That's it. No `global-setup.ts` needed — `shiplightConfig()` generates `auth.setup.ts` automatically from your `shiplight.config.json`.
308
+
393
309
  ### Credential resolution order
394
310
 
395
311
  Login credentials are resolved in this order (first match wins):
@@ -401,16 +317,16 @@ This means you can use `shiplight.config.json` for local development and overrid
401
317
 
402
318
  ### How it works
403
319
 
404
- 1. `globalSetup` runs once before any test worker starts
405
- 2. `resolveLoginConfig()` finds credentials from env vars or `shiplight.config.json`
406
- 3. If `.auth/storage-state.json` exists and cookies are still valid, the agent detects "already signed in" and skips login
407
- 4. If not signed in, the AI agent performs login (handles UI changes, 2FA, etc.)
408
- 5. The resulting cookies/localStorage are saved to `.auth/storage-state.json`
409
- 6. All test workers load this storage state every test starts already authenticated
320
+ 1. `shiplightConfig()` scans for `shiplight.config.json` files with credentials and generates `auth.setup.ts` next to each
321
+ 2. Playwright runs the setup project before dependent projects
322
+ 3. The AI agent logs in using `@shiplightai/sdk-pro`'s `WebAgent.loginPage()` no fragile selectors
323
+ 4. The resulting cookies/localStorage are saved to `<dir>/.auth/storage-state.json`
324
+ 5. All tests in the dependent project load this storage state — every test starts already authenticated
325
+ 6. Each directory is self-contained: its own credentials, its own auth state, its own setup
410
326
 
411
327
  ### 2FA / TOTP support
412
328
 
413
- Set `SHIPLIGHT_LOGIN_TOTP_SECRET` to your TOTP secret and the agent will generate and enter the 2FA code automatically.
329
+ Set `totp_secret` in `shiplight.config.json` or `SHIPLIGHT_LOGIN_TOTP_SECRET` as an env var, and the agent will generate and enter the 2FA code automatically.
414
330
 
415
331
  ## YAML Test Format
416
332
 
@@ -641,7 +557,7 @@ statements:
641
557
 
642
558
  ## Variables
643
559
 
644
- Use `{{VAR_NAME}}` to reference environment variables. At transpile time, these become `process.env.VAR_NAME` references in the generated code.
560
+ Use `{{VAR_NAME}}` syntax in YAML tests to reference variables. Variables are resolved at runtime.
645
561
 
646
562
  ```yaml
647
563
  statements:
@@ -654,12 +570,27 @@ statements:
654
570
  text: "{{TEST_USER}}"
655
571
  ```
656
572
 
657
- Set variables when running:
573
+ ### Defining variables in `shiplight.config.json`
658
574
 
659
- ```bash
660
- TEST_USER=admin TEST_PASS=secret npx playwright test
575
+ Declare variable defaults in your project's `shiplight.config.json`. These are loaded before each test runs.
576
+
577
+ ```json
578
+ {
579
+ "url": "https://my-app.com",
580
+ "username": "qa@my-app.com",
581
+ "password": "test-password",
582
+ "variables": {
583
+ "TEST_USER": "standard_user",
584
+ "TEST_PASS": { "value": "secret_sauce", "sensitive": true }
585
+ }
586
+ }
661
587
  ```
662
588
 
589
+ Variables can be either:
590
+ - **Plain string** — `"TEST_USER": "standard_user"`
591
+ - **Object with sensitive flag** — `"TEST_PASS": { "value": "secret_sauce", "sensitive": true }` (masked in logs)
592
+
593
+
663
594
  ## Templates
664
595
 
665
596
  Extract reusable flows into template files and include them with `template:`.
@@ -709,7 +640,7 @@ statements:
709
640
  - "VERIFY: Order summary is displayed"
710
641
  ```
711
642
 
712
- Template params (`{{username}}`) are substituted at transpile time. Environment variables (`{{TEST_USER}}`) pass through to the generated code for runtime resolution.
643
+ Template params (`{{username}}`) are substituted at transpile time. Variables (`{{TEST_USER}}`) pass through and are resolved at runtime.
713
644
 
714
645
  Templates can be nested (max depth: 5) and circular references are detected.
715
646
 
@@ -1,4 +1,4 @@
1
- "use strict";var $t=Object.create;var N=Object.defineProperty;var Yt=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames;var jt=Object.getPrototypeOf,Zt=Object.prototype.hasOwnProperty;var f=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ee=(e,t)=>{for(var i in t)N(e,i,{get:t[i],enumerable:!0})},_e=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Jt(t))!Zt.call(e,o)&&o!==i&&N(e,o,{get:()=>t[o],enumerable:!(r=Yt(t,o))||r.enumerable});return e};var qt=(e,t,i)=>(i=e!=null?$t(jt(e)):{},_e(t||!e||!e.__esModule?N(i,"default",{value:e,enumerable:!0}):i,e)),Qt=e=>_e(N({},"__esModule",{value:!0}),e);var Oe,Le=f(()=>{"use strict";Oe=class{version;goal;url;constructor(e,t){this.version=e,this.goal=t.goal,this.url=t.url}generatePrelude(){let e=`// version ${this.version}
1
+ "use strict";var Qt=Object.create;var R=Object.defineProperty;var ei=Object.getOwnPropertyDescriptor;var ti=Object.getOwnPropertyNames;var ii=Object.getPrototypeOf,ri=Object.prototype.hasOwnProperty;var f=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ie=(e,t)=>{for(var i in t)R(e,i,{get:t[i],enumerable:!0})},De=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ti(t))!ri.call(e,o)&&o!==i&&R(e,o,{get:()=>t[o],enumerable:!(r=ei(t,o))||r.enumerable});return e};var z=(e,t,i)=>(i=e!=null?Qt(ii(e)):{},De(t||!e||!e.__esModule?R(i,"default",{value:e,enumerable:!0}):i,e)),oi=e=>De(R({},"__esModule",{value:!0}),e);var Ce,Ke=f(()=>{"use strict";Ce=class{version;goal;url;constructor(e,t){this.version=e,this.goal=t.goal,this.url=t.url}generatePrelude(){let e=`// version ${this.version}
2
2
  `,t=this.goal,i=this.url;e+=`// Navigate to the specified URL
3
3
  const targetUrl = process.env.PLAYWRIGHT_STARTING_URL || '${i}';
4
4
  if (targetUrl !== null) {
@@ -12,4 +12,4 @@ await page.waitForTimeout(2000);
12
12
  `,e+=` // Goal:
13
13
  `;let r=t.trim().split(`
14
14
  `);for(let o of r)e+=` // ${o}
15
- `;return e}generatePostlude(){return""}}});function xe(e){if(!e)return"desktop";for(let t of ei)if(t.test(e))return"mobile";return"desktop"}var ei,Ie=f(()=>{"use strict";ei=[/iphone/i,/ipad/i,/android/i,/pixel/i,/galaxy/i,/mobile/i,/nexus/i,/blackberry/i,/kindle/i]});function De(e,t){if(!e||typeof e!="string")return e;let i=t instanceof Map?Object.fromEntries(t):t,r=n=>{let s=n.startsWith("$")?n.slice(1):n,l=i[s]??i[`$${s}`];return l!=null?String(l):void 0},o=e;return o=o.replace(/\{\{\s*\$?([^}]+?)\s*\}\}/g,(n,s)=>{let l=r(s.trim());return l!==void 0?l:n}),o=o.replace(/<secret>\$?([\w-]+)<\/secret>/g,(n,s)=>{let l=r(s);return l!==void 0?l:n}),o=o.replace(/\$\{([^}]+)\}/g,(n,s)=>{let l=r(s.trim());return l!==void 0?l:n}),o=o.replace(/\$([a-zA-Z_]\w*)/g,(n,s)=>{let l=r(s);return l!==void 0?l:n}),o}var We=f(()=>{"use strict"});function Ce(e){return e?e.startsWith(M)?"android":e.startsWith(T)?"ios":"web":"web"}function Ke(e){return e?e.startsWith(M)||e.startsWith(T):!1}function Ge(e){return!!e&&e.startsWith(M)}function Be(e){return!!e&&e.startsWith(T)}function Fe(e){return e.startsWith(M)?e.slice(M.length):e.startsWith(T)?e.slice(T.length):e}function He(e){return`${M}${e}`}function Ne(e){return`${T}${e}`}function z(e){return e?e.startsWith("http://")||e.startsWith("https://"):!1}function ze(e){return e?!z(e):!1}function j(e){return e?z(e)?["web"]:["android","ios"]:["web","android","ios"]}function Re(e,t){if(!t)return!0;let i=j(t);return e==="desktop"||e==="mobile"?i.includes("web"):i.includes(e)}var M,T,R=f(()=>{"use strict";M="android:",T="ios:"});function Ve(e){return e.startsWith(T)?e:`${T}${e}`}function Ue(e){let t=e.iosVersion?` (iOS ${e.iosVersion})`:"";return e.deviceType==="simulator"?`${e.name}${t} - Simulator`:`${e.name}${t}`}function Xe(e){return!!(/^[0-9a-fA-F]{40}$/.test(e)||/^[0-9a-fA-F]{8}-[0-9a-fA-F]{16}$/.test(e))}var $e=f(()=>{"use strict";R()});var Z,V,q,Q,ee,te,ie,re,oe,ne,I,ae,G,se,le,W,Ye,B,Je,je,U,Ze,qe,Qe,et,tt=f(()=>{"use strict";Z="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",V=112,q=1920,Q=1080,ee=1920,te=1080-V,ie=1280,re=720,oe=500,ne=500,I="Desktop Chrome",ae=(e=>(e.Chromium="chromium",e.Firefox="firefox",e.Webkit="webkit",e))(ae||{}),G={"Blackberry PlayBook":{name:"Blackberry PlayBook",userAgent:"Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/26.0 Safari/536.2+",screen:{width:600,height:1024},viewport:{width:600,height:1024},deviceScaleFactor:1,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"BlackBerry Z30":{name:"BlackBerry Z30",userAgent:"Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/26.0 Mobile Safari/537.10+",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy Note 3":{name:"Galaxy Note 3",userAgent:"Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/26.0 Mobile Safari/534.30",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy Note II":{name:"Galaxy Note II",userAgent:"Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/26.0 Mobile Safari/534.30",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy S III":{name:"Galaxy S III",userAgent:"Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/26.0 Mobile Safari/534.30",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy S5":{name:"Galaxy S5",userAgent:"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy S8":{name:"Galaxy S8",userAgent:"Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:740},viewport:{width:360,height:740},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy S9+":{name:"Galaxy S9+",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:320,height:658},viewport:{width:320,height:658},deviceScaleFactor:4.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy S24":{name:"Galaxy S24",userAgent:"Mozilla/5.0 (Linux; Android 14; SM-S921U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:780},viewport:{width:360,height:780},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy A55":{name:"Galaxy A55",userAgent:"Mozilla/5.0 (Linux; Android 14; SM-A556B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:480,height:1040},viewport:{width:480,height:1040},deviceScaleFactor:2.25,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy Tab S4":{name:"Galaxy Tab S4",userAgent:"Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:712,height:1138},viewport:{width:712,height:1138},deviceScaleFactor:2.25,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy Tab S9":{name:"Galaxy Tab S9",userAgent:"Mozilla/5.0 (Linux; Android 14; SM-X710) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:640,height:1024},viewport:{width:640,height:1024},deviceScaleFactor:2.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"iPad (gen 5)":{name:"iPad (gen 5)",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:768,height:1024},viewport:{width:768,height:1024},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad (gen 6)":{name:"iPad (gen 6)",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:768,height:1024},viewport:{width:768,height:1024},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad (gen 7)":{name:"iPad (gen 7)",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:810,height:1080},viewport:{width:810,height:1080},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad (gen 11)":{name:"iPad (gen 11)",userAgent:"Mozilla/5.0 (iPad; CPU OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/19E241 Safari/604.1",screen:{width:656,height:944},viewport:{width:656,height:944},deviceScaleFactor:2.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad Mini":{name:"iPad Mini",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:768,height:1024},viewport:{width:768,height:1024},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad Pro 11":{name:"iPad Pro 11",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:834,height:1194},viewport:{width:834,height:1194},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 6":{name:"iPhone 6",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 6 Plus":{name:"iPhone 6 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:414,height:736},viewport:{width:414,height:736},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 7":{name:"iPhone 7",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 7 Plus":{name:"iPhone 7 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:414,height:736},viewport:{width:414,height:736},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 8":{name:"iPhone 8",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 8 Plus":{name:"iPhone 8 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:414,height:736},viewport:{width:414,height:736},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone SE":{name:"iPhone SE",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/26.0 Mobile/14E304 Safari/602.1",screen:{width:320,height:568},viewport:{width:320,height:568},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone SE (3rd gen)":{name:"iPhone SE (3rd gen)",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/26.0 Mobile/19E241 Safari/602.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone X":{name:"iPhone X",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:812},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone XR":{name:"iPhone XR",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:414,height:896},viewport:{width:414,height:896},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 11":{name:"iPhone 11",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:414,height:896},viewport:{width:414,height:715},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 11 Pro":{name:"iPhone 11 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:635},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 11 Pro Max":{name:"iPhone 11 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:414,height:896},viewport:{width:414,height:715},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12":{name:"iPhone 12",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12 Pro":{name:"iPhone 12 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12 Pro Max":{name:"iPhone 12 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:428,height:926},viewport:{width:428,height:746},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12 Mini":{name:"iPhone 12 Mini",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:629},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13":{name:"iPhone 13",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13 Pro":{name:"iPhone 13 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13 Pro Max":{name:"iPhone 13 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:428,height:926},viewport:{width:428,height:746},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13 Mini":{name:"iPhone 13 Mini",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:629},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14":{name:"iPhone 14",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14 Plus":{name:"iPhone 14 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:428,height:926},viewport:{width:428,height:746},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14 Pro":{name:"iPhone 14 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:393,height:852},viewport:{width:393,height:660},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14 Pro Max":{name:"iPhone 14 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:430,height:932},viewport:{width:430,height:740},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15":{name:"iPhone 15",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:393,height:852},viewport:{width:393,height:659},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15 Plus":{name:"iPhone 15 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:430,height:932},viewport:{width:430,height:739},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15 Pro":{name:"iPhone 15 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:393,height:852},viewport:{width:393,height:659},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15 Pro Max":{name:"iPhone 15 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:430,height:932},viewport:{width:430,height:739},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Kindle Fire HDX":{name:"Kindle Fire HDX",userAgent:"Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",screen:{width:800,height:1280},viewport:{width:800,height:1280},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"LG Optimus L70":{name:"LG Optimus L70",userAgent:"Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:384,height:640},viewport:{width:384,height:640},deviceScaleFactor:1.25,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Microsoft Lumia 550":{name:"Microsoft Lumia 550",userAgent:"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36 Edge/14.14263",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Microsoft Lumia 950":{name:"Microsoft Lumia 950",userAgent:"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36 Edge/14.14263",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:4,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 10":{name:"Nexus 10",userAgent:"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:800,height:1280},viewport:{width:800,height:1280},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 4":{name:"Nexus 4",userAgent:"Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:384,height:640},viewport:{width:384,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 5":{name:"Nexus 5",userAgent:"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 5X":{name:"Nexus 5X",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:732},viewport:{width:412,height:732},deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 6":{name:"Nexus 6",userAgent:"Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:732},viewport:{width:412,height:732},deviceScaleFactor:3.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 6P":{name:"Nexus 6P",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:732},viewport:{width:412,height:732},deviceScaleFactor:3.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 7":{name:"Nexus 7",userAgent:"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:600,height:960},viewport:{width:600,height:960},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nokia Lumia 520":{name:"Nokia Lumia 520",userAgent:"Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)",screen:{width:320,height:533},viewport:{width:320,height:533},deviceScaleFactor:1.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nokia N9":{name:"Nokia N9",userAgent:"Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",screen:{width:480,height:854},viewport:{width:480,height:854},deviceScaleFactor:1,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Pixel 2":{name:"Pixel 2",userAgent:"Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:411,height:731},viewport:{width:411,height:731},deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 2 XL":{name:"Pixel 2 XL",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:411,height:823},viewport:{width:411,height:823},deviceScaleFactor:3.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 3":{name:"Pixel 3",userAgent:"Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:393,height:786},viewport:{width:393,height:786},deviceScaleFactor:2.75,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 4":{name:"Pixel 4",userAgent:"Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:353,height:745},viewport:{width:353,height:745},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 4a (5G)":{name:"Pixel 4a (5G)",userAgent:"Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:892},viewport:{width:412,height:765},deviceScaleFactor:2.63,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 5":{name:"Pixel 5",userAgent:"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:393,height:851},viewport:{width:393,height:727},deviceScaleFactor:2.75,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 7":{name:"Pixel 7",userAgent:"Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:915},viewport:{width:412,height:839},deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Moto G4":{name:"Moto G4",userAgent:"Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Desktop Chrome HiDPI":{name:"Desktop Chrome HiDPI",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Edge HiDPI":{name:"Desktop Edge HiDPI",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Firefox HiDPI":{name:"Desktop Firefox HiDPI",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0.1) Gecko/20100101 Firefox/142.0.1",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"firefox"},"Desktop Safari":{name:"Desktop Safari",userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"webkit"},"Desktop Chrome":{name:"Desktop Chrome",displayName:"Playwright Chromium",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1920,height:1080},viewport:{width:1920,height:1080},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Chrome Medium Resolution":{name:"Desktop Chrome Medium Resolution",displayName:"Playwright Chromium",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1280,height:720},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Chrome (Branded)":{name:"Desktop Chrome (Branded)",displayName:"Google Chrome",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1920,height:1080},viewport:{width:1920,height:1080},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"chrome"},"Desktop Chrome Medium Resolution (Branded)":{name:"Desktop Chrome Medium Resolution (Branded)",displayName:"Google Chrome",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1280,height:720},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"chrome"},"Desktop Edge":{name:"Desktop Edge",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1920,height:1080},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Edge (Branded)":{name:"Desktop Edge (Branded)",displayName:"Microsoft Edge",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1920,height:1080},viewport:{width:1920,height:1080},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"msedge"},"Desktop Edge Medium Resolution (Branded)":{name:"Desktop Edge Medium Resolution (Branded)",displayName:"Microsoft Edge",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1280,height:720},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"msedge"},"Desktop Firefox":{name:"Desktop Firefox",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0.1) Gecko/20100101 Firefox/142.0.1",screen:{width:1920,height:1080},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"firefox"}},se=(e=>(e.Desktop="desktop",e.Mobile="mobile",e))(se||{}),le={desktop:["Desktop Chrome","Desktop Chrome Medium Resolution","Desktop Chrome (Branded)","Desktop Chrome Medium Resolution (Branded)","Desktop Edge (Branded)","Desktop Edge Medium Resolution (Branded)","Desktop Safari"],mobile:["iPhone 15 Pro Max","iPhone 15 Pro","iPhone 15 Plus","iPhone 15","iPhone 14 Pro Max","iPhone 14 Pro","iPhone 14 Plus","iPhone 14","iPhone 13 Pro Max","iPhone 13 Pro","iPhone 13","iPhone 13 Mini","iPhone 12 Pro Max","iPhone 12 Pro","iPhone 12","iPhone 12 Mini","iPhone 11 Pro Max","iPhone 11 Pro","iPhone 11","iPhone XR","iPhone X","iPhone SE (3rd gen)","iPhone SE","iPhone 8 Plus","iPhone 8","iPhone 7 Plus","iPhone 7","iPhone 6 Plus","iPhone 6","Galaxy S24","Galaxy A55","Galaxy S9+","Galaxy S8","Galaxy S5","Galaxy Note 3","Galaxy Note II","Galaxy S III","Pixel 7","Pixel 5","Pixel 4a (5G)","Pixel 4","Pixel 3","Pixel 2 XL","Pixel 2","Nexus 6P","Nexus 6","Nexus 5X","Nexus 5","Nexus 4","Moto G4","LG Optimus L70","Microsoft Lumia 950","Microsoft Lumia 550","Nokia Lumia 520","Nokia N9","BlackBerry Z30"]},W=(e,t=!1)=>{let i=["chromium"];return t&&i.push("webkit"),le[e].map(r=>G[r]).filter(r=>r.defaultBrowserType&&i.includes(r.defaultBrowserType))},Ye=()=>Object.keys(G),B=e=>G[e],Je={desktop:{label:"Desktop",type:"desktop",devices:W("desktop")},mobile:{label:"Mobile Web",type:"mobile",devices:W("mobile")}},je={desktop:{label:"Desktop",type:"desktop",devices:W("desktop",!0)},mobile:{label:"Mobile Web",type:"mobile",devices:W("mobile",!0)}},U=(e,t=!1)=>{let i={userAgent:Z,viewport:{width:ee,height:te},isMobile:!1,hasTouch:!1};if(!e||e===I)return i;let r=B(e);if(!r)return i;let{width:o,height:n}=r.viewport,s=Math.max(oe/o,1),l=Math.max(ne/n,1),c=Math.max(s,l),p={width:Math.round(o*c),height:Math.round(n*c)};return{userAgent:r.userAgent,viewport:t?p:r.viewport,isMobile:r.isMobile,hasTouch:r.hasTouch}},Ze=e=>{let t={width:q,height:Q};if(!e||e===I)return t;let i=U(e);return i.viewport?{width:i.viewport.width,height:i.viewport.height+V}:t},qe=e=>{let t={width:ie,height:re};if(!e||e===I)return t;let i=U(e);return i.viewport?{width:i.viewport.width,height:i.viewport.height}:t},Qe=e=>!e||e===I?void 0:B(e)?.channel,et=e=>!e||e===I?"chromium":B(e)?.defaultBrowserType??"chromium"});var ce,he,it=f(()=>{"use strict";ce=(e=>(e.PASSWORD="password",e.OAUTH2="oauth2",e.SSO="sso",e.API="api",e))(ce||{}),he=(e=>(e.SMS="sms",e.EMAIL="email",e.TOTP="totp",e))(he||{})});var a,ue,X,de,D,pe,fe,me,y,$,we=f(()=>{"use strict";a=require("zod"),ue=a.z.enum(["JS_CODE","AI_MODE"]),X=a.z.object({type:ue,expression:a.z.string()}),de=a.z.enum(["DRAFT","STEP","ACTION","IF_ELSE","WHILE_LOOP"]),D=a.z.object({uid:a.z.string(),type:de}),pe=a.z.object({action_data:a.z.object({action_name:a.z.string(),kwargs:a.z.record(a.z.any()).optional(),args:a.z.array(a.z.any()).optional()}),action_description:a.z.string().optional(),url:a.z.string().optional(),xpath:a.z.string().nullable().optional(),locator:a.z.string().nullable().optional(),css_selector:a.z.string().nullable().optional(),unique_selector:a.z.string().nullable().optional(),element_index:a.z.number().nullable().optional(),frame_path:a.z.array(a.z.any()).optional(),artifacts:a.z.record(a.z.any()).optional(),feedback:a.z.string().optional(),original_browser_use_action:a.z.any().optional()}).passthrough(),fe=D.extend({type:a.z.literal("DRAFT"),description:a.z.string()}),me=D.extend({type:a.z.literal("ACTION"),description:a.z.string(),action_entity:pe.optional(),locator:a.z.string().optional(),use_pure_vision:a.z.boolean().optional()}),y=a.z.lazy(()=>a.z.union([fe,me,D.extend({type:a.z.literal("STEP"),description:a.z.string().optional().default(""),statements:a.z.array(y),reference_id:a.z.number().optional()}),D.extend({type:a.z.literal("IF_ELSE"),description:a.z.string().optional(),condition:X,then:a.z.array(y),else:a.z.array(y).optional()}),D.extend({type:a.z.literal("WHILE_LOOP"),description:a.z.string().optional(),condition:X,body:a.z.array(y),timeout_ms:a.z.number().optional()})])),$=a.z.object({version:a.z.string().optional(),goal:a.z.string(),url:a.z.string(),final_feedback:a.z.string().optional(),completed:a.z.boolean().optional(),success:a.z.boolean().optional(),statements:a.z.array(y),teardown:a.z.array(y).optional(),last_modified_at:a.z.string().optional()})});function ot(e,t){let i={...t?.test_case_id!==void 0?{test_case_id:t.test_case_id}:{},goal:e.goal,url:e.url,statements:e.statements.map(C)};return e.final_feedback&&(i.final_feedback=e.final_feedback),e.teardown&&e.teardown.length>0&&(i.teardown=e.teardown.map(C)),(0,F.stringify)(i,{lineWidth:120,defaultKeyType:"PLAIN",defaultStringType:"PLAIN"})}function C(e){switch(e.type){case"DRAFT":return ti(e);case"ACTION":return ii(e);case"STEP":return oi(e);case"IF_ELSE":return ni(e);case"WHILE_LOOP":return ai(e)}}function ti(e){return e.description}function ii(e){if((e.action_entity?.action_data?.action_name??e.action_entity?.action?.action_name)==="verify"){let n=(e.action_entity?.action_data?.kwargs??e.action_entity?.action?.kwargs)?.statement;if(typeof n=="string"&&!e.action_entity?.locator&&!e.action_entity?.xpath)return`VERIFY: ${n}`}if(!e.action_entity)return e.description;let i={description:e.description},r=ri(e.action_entity);return r&&(i.action_entity=r),e.locator&&(i.locator=e.locator),e.use_pure_vision&&(i.use_pure_vision=!0),i}function ri(e){let t={},i=!1,r=e.action_data??e.action;return r&&(t.action_data={action_name:r.action_name},r.kwargs&&Object.keys(r.kwargs).length>0&&(t.action_data.kwargs=r.kwargs),r.args&&r.args.length>0&&(t.action_data.args=r.args),i=!0),e.locator&&(t.locator=e.locator,i=!0),e.xpath&&(t.xpath=e.xpath,i=!0),i?t:void 0}function oi(e){let t={STEP:e.description,statements:e.statements.map(C)};return e.reference_id!==void 0&&(t.reference_id=e.reference_id),t}function ni(e){let t={IF:nt(e.condition),THEN:e.then.map(C)};return e.else&&e.else.length>0&&(t.ELSE=e.else.map(C)),t}function ai(e){let t={WHILE:nt(e.condition),DO:e.body.map(C)};return e.timeout_ms!==void 0&&(t.timeout_ms=e.timeout_ms),t}function nt(e){return e.type==="JS_CODE"?`js:${e.expression}`:e.expression}function at(e){try{let t=(0,F.parse)(e);if(!t||typeof t!="object")return{};let i={};return typeof t.test_case_id=="number"&&Number.isFinite(t.test_case_id)&&(i.test_case_id=t.test_case_id),i}catch{return{}}}function st(e){if(e.length>rt)throw new Error(`YAML input too large (${e.length} bytes, max ${rt})`);let t=(0,F.parse)(e);if(!t||typeof t!="object")throw new Error("Invalid YAML: expected an object at root level");let i={version:"1.2.0",goal:t.goal,url:t.url,statements:K(t.statements??[])};t.final_feedback&&(i.final_feedback=t.final_feedback),t.teardown&&Array.isArray(t.teardown)&&(i.teardown=K(t.teardown));let r=$.safeParse(i);if(!r.success)throw new Error(`Invalid TestFlow after YAML conversion: ${JSON.stringify(r.error.errors)}`);return r.data}function K(e){if(!Array.isArray(e))throw new Error("Expected an array of statements");return e.map(si)}function si(e){if(typeof e=="string")return li(e);if(typeof e!="object"||e===null)throw new Error(`Invalid statement: expected string or object, got ${typeof e}`);let t=e;if("IF"in t)return ci(t);if("WHILE"in t)return hi(t);if("STEP"in t)return ui(t);if("action_entity"in t)return di(t);if("description"in t&&typeof t.description=="string")return{uid:(0,A.v4)(),type:"DRAFT",description:t.description};throw new Error(`Cannot infer statement type from object: ${JSON.stringify(t)}`)}function li(e){let t=e.match(/^VERIFY:\s*(.+)$/i);return t?{uid:(0,A.v4)(),type:"ACTION",description:`Verify: ${t[1]}`,action_entity:{action_description:`Verify: ${t[1]}`,action_data:{action_name:"verify",kwargs:{statement:t[1]}}}}:{uid:(0,A.v4)(),type:"DRAFT",description:e}}function lt(e){if(typeof e!="string")throw new Error(`Condition must be a string, got ${typeof e}`);return e.startsWith("js:")?{type:"JS_CODE",expression:e.slice(3)}:{type:"AI_MODE",expression:e}}function ci(e){let t=lt(e.IF),i=e.THEN;if(!Array.isArray(i))throw new Error("IF_ELSE requires a THEN array");let r={uid:(0,A.v4)(),type:"IF_ELSE",condition:t,then:K(i)};return"ELSE"in e&&Array.isArray(e.ELSE)&&(r.else=K(e.ELSE)),r}function hi(e){let t=lt(e.WHILE),i=e.DO;if(!Array.isArray(i))throw new Error("WHILE_LOOP requires a DO array");let r={uid:(0,A.v4)(),type:"WHILE_LOOP",condition:t,body:K(i)};return typeof e.timeout_ms=="number"&&(r.timeout_ms=e.timeout_ms),r}function ui(e){let t=typeof e.STEP=="string"?e.STEP:"";if(!Array.isArray(e.statements))throw new Error("STEP requires a statements array");let i={uid:(0,A.v4)(),type:"STEP",description:t,statements:K(e.statements)};return typeof e.reference_id=="number"&&(i.reference_id=e.reference_id),i}function di(e){let t=typeof e.description=="string"?e.description:"",i=e.action_entity,r;i&&(r={action_description:t,...i});let o={uid:(0,A.v4)(),type:"ACTION",description:t};return r&&(o.action_entity=r),typeof e.locator=="string"&&(o.locator=e.locator),typeof e.use_pure_vision=="boolean"&&(o.use_pure_vision=e.use_pure_vision),o}var F,A,rt,ct=f(()=>{"use strict";we();F=require("yaml"),A=require("uuid");rt=1024*1024});function ge(e){for(let t of e){if(t.type==="STEP"&&t.reference_id)return!0;let i=P(t);for(let r of i)if(ge(r.statements))return!0}return!1}function pt(e){let t=new Set;function i(r){for(let o of r){o.type==="STEP"&&o.reference_id&&t.add(o.reference_id);let n=P(o);for(let s of n)i(s.statements)}}return i(e),Array.from(t)}function wt(e){if(!e?.statements||!Array.isArray(e.statements))return{};let t={};return O(e.statements,"main",t),e.teardown&&Array.isArray(e.teardown)&&O(e.teardown,"teardown",t),t}function k(e,t,i){let r=e+".",o=t.filter(([h])=>h===e||h.startsWith(r));if(o.length===0)return[];let n=[],s=new Set;for(let[h]of o){let d=h===e?"":h.slice(r.length);if(!d)continue;let S=d.split(".")[0];s.has(S)||s.add(S)}let l=Array.from(s);l.sort((h,d)=>{let S=/^\d+$/.test(h)?parseInt(h,10):-1,L=/^\d+$/.test(d)?parseInt(d,10):-1;return S>=0&&L>=0?S-L:h==="then"&&d==="else"?-1:h==="else"&&d==="then"||h==="body"?1:d==="body"?-1:h.localeCompare(d)});function c(h){return i[h]}function p(h){let d=h.match(/^(IF|WHILE)\s+([\s\S]+)$/);return{type:"JS_CODE",expression:(d?d[2].trim():h)||"true"}}for(let h of l){let d=e?`${e}.${h}`:h,S=c(d),L=S?.description??"",Mi=d;if(h==="then"){let u=`${e}.then`,b=`${e}.else`,m=k(u,t,i),x=k(b,t,i),H=c(e),Xt=H?p(H.description):{type:"JS_CODE",expression:"true"};n.push({uid:e,type:"IF_ELSE",condition:Xt,then:m,...x.length>0?{else:x}:{}});continue}if(h==="else")continue;if(h==="body"){let u=`${e}.body`,b=k(u,t,i),m=c(e),x=m?p(m.description):{type:"JS_CODE",expression:"true"};n.push({uid:e,type:"WHILE_LOOP",condition:x,body:b});continue}let g=`${e}.${h}`,zt=t.some(([u])=>u.startsWith(g+".then.")||u===g+".then"),Rt=t.some(([u])=>u.startsWith(g+".else.")||u===g+".else"),Vt=t.some(([u])=>u.startsWith(g+".body.")||u===g+".body"),Ut=t.filter(([u])=>{if(!u.startsWith(g+"."))return!1;let m=u.slice(g.length+1).split(".")[0];return/^\d+$/.test(m)&&m!=="then"&&m!=="else"&&m!=="body"});if(zt||Rt){let u=g+".then",b=g+".else",m=k(u,t,i),x=k(b,t,i),H=S?p(L):{type:"JS_CODE",expression:"true"};n.push({uid:d,type:"IF_ELSE",condition:H,then:m,...x.length>0?{else:x}:{}})}else if(Vt){let u=g+".body",b=k(u,t,i),m=S?p(L):{type:"JS_CODE",expression:"true"};n.push({uid:d,type:"WHILE_LOOP",condition:m,body:b})}else if(Ut.length>0){let u=k(g,t,i);n.push({uid:d,type:"STEP",description:L||"Group",statements:u})}else n.push({uid:d,type:"ACTION",description:L||"Action",action_entity:S?.action_entity})}return n}function gt(e){let t=Object.entries(e),i=r=>{let o=r+".";return t.some(([s])=>s===r||s.startsWith(o))?k(r,t,e):[]};return{before:i("before"),main:i("main"),teardown:i("teardown"),after:i("after")}}var P,w,v,E,_,ht,ut,dt,pi,fi,ft,mt,O,Se=f(()=>{"use strict";P=e=>{let t=[];switch(e.type){case"STEP":e.statements&&t.push({key:"statements",statements:e.statements});break;case"IF_ELSE":e.then&&t.push({key:"then",statements:e.then}),e.else&&t.push({key:"else",statements:e.else});break;case"WHILE_LOOP":e.body&&t.push({key:"body",statements:e.body});break}return t},w=(e,t,i=void 0,r="root")=>{for(let o=0;o<e.length;o++){let n=e[o],s=n.uid;if(s===t)return{stableId:s,path:[o],statement:n,parent:i,containerKey:r,index:o};let l=P(n);for(let c of l){let p=w(c.statements,t,n,c.key);if(p)return{...p,path:[o,c.key,...p.path]}}}return null},v=(e,t,i)=>{let r=w(e,t);if(!r)return null;let{statement:o,parent:n,containerKey:s,index:l}=r,c=null;switch(o.type){case"DRAFT":case"ACTION":c=E(e,r)||_(e,r);break;case"STEP":if(o.statements&&o.statements.length>0)return o.statements[0];c=E(e,r)||_(e,r);break;case"IF_ELSE":if(i===!0&&o.then&&o.then.length>0)return o.then[0];if(i===!1&&o.else&&o.else.length>0)return o.else[0];c=E(e,r)||_(e,r);break;case"WHILE_LOOP":if(i===!0&&o.body&&o.body.length>0)return o.body[0];c=E(e,r)||_(e,r);break;default:c=E(e,r)||_(e,r);break}if(n&&n.type==="WHILE_LOOP"&&s==="body"){if(!c)return n;let p=w(e,c.uid);if(!p||p.parent!==n)return n}return c},E=(e,t)=>{if(!t.parent)return e[t.index+1]||null;let r=P(t.parent).find(o=>o.key===t.containerKey);return r&&t.index+1<r.statements.length?r.statements[t.index+1]:null},_=(e,t)=>{if(!t.parent)return null;let i=t.parent.uid,r=w(e,i);return r?E(e,r)||_(e,r):null},ht=e=>{let t=[],i=r=>{for(let o of r){t.push(o);let n=P(o);for(let s of n)i(s.statements)}};return i(e),t},ut=e=>{switch(e.type){case"DRAFT":case"ACTION":return!0;case"STEP":return!0;case"IF_ELSE":case"WHILE_LOOP":return!0;default:return!1}},dt=(e,t,i)=>{if(!w(e,t))return null;if(i===null){let l=[],c=t;for(;c!==null&&w(e,c);)if(l.push(c),c=v(e,c)?.uid||null,l.length>1e3)return null;return l}if(!w(e,i))return null;if(t===i)return[];let n=[],s=t;for(;s&&s!==i;){let l=w(e,s);if(!l)break;if(n.push(s),l.statement.type==="IF_ELSE"){let c=pi(l.statement,i);c?s=v(e,s,c==="then")?.uid||null:s=v(e,s)?.uid||null}else l.statement.type==="WHILE_LOOP"?fi(l.statement,i)?s=v(e,s,!0)?.uid||null:s=v(e,s,!1)?.uid||null:s=v(e,s)?.uid||null;if(n.length>1e3)return null}return s===i?n:null},pi=(e,t)=>{if(e.type!=="IF_ELSE")return null;let i=e;return i.then&&w(i.then,t)?"then":i.else&&w(i.else,t)?"else":null},fi=(e,t)=>{if(e.type!=="WHILE_LOOP")return!1;let i=e;return!!(i.body&&w(i.body,t))};ft=e=>e.startsWith("ai_")?!0:["js_code","function","assert","verify","wait_for_download_complete","extract_activation_code","extract_email_content"].includes(e),mt=e=>!["js_code","function","assert","ai_assert","verify","ai_extract","ai_wait_until","upload_file","login","extract_activation_code","extract_email_content","ai_step"].includes(e),O=(e,t,i)=>{e.forEach((r,o)=>{let n=`${t}.${o}`;r.type==="DRAFT"?i[n]={description:r.description||"Draft",action_entity:void 0}:r.type==="ACTION"?i[n]={description:r.description||"Action",action_entity:r.action_entity}:r.type==="STEP"&&r.statements?O(r.statements,n,i):r.type==="IF_ELSE"?(i[n]={description:"IF "+(r.condition?.expression||""),action_entity:void 0},r.then&&O(r.then,`${n}.then`,i),r.else&&O(r.else,`${n}.else`,i)):r.type==="WHILE_LOOP"&&(i[n]={description:"WHILE "+(r.condition?.expression||""),action_entity:void 0},r.body&&O(r.body,`${n}.body`,i))})}});function St(){return{version:"1.0",entries:{}}}function Mt(e,t){return{action_entity:e,updated_at:new Date().toISOString(),updated_by:{source:"runner",test_run_id:t}}}function Tt(e,t){let i=t?.entries[e.uid],r=i?.action_entity??e.action_entity;return e.locator&&r?{...r,locator:e.locator}:i?i.action_entity:e.action_entity?e.action_entity:null}function Pt(e,t,i,r){return e.entries[t]={action_entity:i,updated_at:new Date().toISOString(),updated_by:r},e}function bt(e,t){let i=e??{version:"1.0",entries:{}};for(let[r,o]of t)i.entries[r]=o;return i}function yt(e){return e?Object.keys(e.entries).length===0:!0}function At(e){return e?Object.keys(e.entries).length:0}function kt(e,t){if(!t||Object.keys(t.entries).length===0)return e;let i=Me(e.statements,t),r=e.teardown?Me(e.teardown,t):void 0;return{...e,statements:i,teardown:r}}function Me(e,t){return e.map(i=>mi(i,t))}function mi(e,t){if(e.type==="ACTION"){let o=e,n=t.entries[o.uid];return n?{...o,action_entity:n.action_entity}:o}let i=P(e);if(i.length===0)return e;let r={};for(let o of i)r[o.key]=Me(o.statements,t);return{...e,...r}}var vt=f(()=>{"use strict";Se()});var Te,Pe,Et,_t=f(()=>{"use strict";Te=(e=>(e.DRAFT="DRAFT",e.STEP="STEP",e.ACTION="ACTION",e.IF_ELSE="IF_ELSE",e.WHILE_LOOP="WHILE_LOOP",e))(Te||{}),Pe=(e=>(e.JS_CODE="JS_CODE",e.AI_MODE="AI_MODE",e))(Pe||{}),Et=18e4});var Ot,xt=f(()=>{"use strict";Ot=class Lt{data={};sensitive=new Set;get(t){return this.data[t]}set(t,i,r=!1){this.data[t]=i,r?this.sensitive.add(t):this.sensitive.has(t)&&this.sensitive.delete(t)}getAll(){return{...this.data}}isSensitive(t){return this.sensitive.has(t)}getAllSensitiveKeys(){return new Set(this.sensitive)}delete(t){return this.sensitive.delete(t),delete this.data[t]}clear(){this.data={},this.sensitive.clear()}has(t){return t in this.data}get size(){return Object.keys(this.data).length}merge(t){for(let[i,r]of Object.entries(t.getAll()))this.set(i,r,t.isSensitive(i))}toJSON(){return{data:{...this.data},sensitiveKeys:Array.from(this.sensitive)}}static fromJSON(t){let i=new Lt;if(t.data){let r=new Set(t.sensitiveKeys||[]);for(let[o,n]of Object.entries(t.data))i.set(o,n,r.has(o))}return i}}});function It(e){return{copilot:e?.models?.copilot||be,webagent:e?.models?.webagent||ye}}function Dt(e=process.env){if(e.WEB_AGENT_MODEL)return e.WEB_AGENT_MODEL;if(e.ANTHROPIC_API_KEY)return Ae;if(e.GOOGLE_API_KEY)return ke}var be,ye,Ae,ke,Wt=f(()=>{"use strict";be="claude-sonnet-4-5",ye="gemini-2.5-pro",Ae="claude-haiku-4-5",ke="gemini-2.5-pro"});var ve,Ct=f(()=>{"use strict";ve=(e=>(e.INITIALIZING="initializing",e.READY="ready",e.PROCESSING="processing",e.STOPPING="stopping",e.WAITING_USER="waiting_user",e.COMPLETED="completed",e.FAILED="failed",e))(ve||{})});function Kt(e){let t=e.trim();if(!t||t.startsWith("List of devices"))return null;let i=t.split(/\s+/);if(i.length<2)return null;let r=i[0],o=i[1],n="usb";return r.startsWith("emulator-")?n="emulator":r.includes(":")&&(n="wifi"),{id:r,state:o,connectionType:n}}function Gt(e){return e.startsWith(M)?e:`${M}${e}`}function Bt(e){return e.model?`${e.model} (${e.id})`:e.connectionType==="emulator"?`Android Emulator (${e.id})`:e.id}var Ft=f(()=>{"use strict";R()});var Ht={};Ee(Ht,{ADDRESS_BAR_HEIGHT:()=>V,ANDROID_DEVICE_PREFIX:()=>M,ActionEntitySchema:()=>pe,ActionSchema:()=>me,AgentStatus:()=>ve,BaseStatementSchema:()=>D,BrowserType:()=>ae,ConditionSchema:()=>X,ConditionType:()=>Pe,ConditionTypeSchema:()=>ue,DEFAULT_ANTHROPIC_MODEL:()=>Ae,DEFAULT_COPILOT_MODEL:()=>be,DEFAULT_DEVICE_NAME:()=>I,DEFAULT_GOOGLE_MODEL:()=>ke,DEFAULT_WEBAGENT_MODEL:()=>ye,DEFAULT_WHILE_LOOP_TIMEOUT_MS:()=>Et,DEVICE_CATEGORIES:()=>le,DeviceType:()=>se,DraftSchema:()=>fe,IOS_DEVICE_PREFIX:()=>T,LoginType:()=>ce,MIN_WINDOW_HEIGHT:()=>ne,MIN_WINDOW_WIDTH:()=>oe,NodeJSCodeCommon:()=>Oe,PLAYWRIGHT_DEVICES:()=>G,RECORD_VIDEO_HEIGHT:()=>re,RECORD_VIDEO_WIDTH:()=>ie,StatementSchema:()=>y,StatementType:()=>Te,StatementTypeSchema:()=>de,TestFlowSchema:()=>$,TwoFactorAuthType:()=>he,UI_DEVICE_CATEGORIES:()=>Je,UI_DEVICE_CATEGORIES_ELECTRON:()=>je,USER_AGENT:()=>Z,VIEWPORT_HEIGHT:()=>te,VIEWPORT_WIDTH:()=>ee,VariableStore:()=>Ot,WINDOW_HEIGHT:()=>Q,WINDOW_WIDTH:()=>q,actionStepsMapToTestFlowSections:()=>gt,allowPureVisionAction:()=>mt,collectActionSteps:()=>O,createAndroidDeviceName:()=>He,createEmptyStore:()=>St,createIOSDeviceName:()=>Ne,createRunnerStoreEntry:()=>Mt,extractActionStepsFromTestFlow:()=>wt,extractDeviceIdentifier:()=>Fe,extractYamlMetadata:()=>at,findNextAfterContainer:()=>_,findNextSibling:()=>E,findNextStatement:()=>v,findPathBetweenStatements:()=>dt,findStatementPathById:()=>w,getAllDeviceNames:()=>Ye,getAllReferenceIds:()=>pt,getAllStatementsInOrder:()=>ht,getAndroidDeviceDisplayName:()=>Bt,getBrowserWindowSize:()=>Ze,getCompatiblePlatforms:()=>j,getDeviceBrowserType:()=>et,getDeviceByName:()=>B,getDeviceChannel:()=>Qe,getDeviceOptions:()=>U,getDevicesByCategory:()=>W,getIOSDeviceDisplayName:()=>Ue,getLoginConfigPlatform:()=>xe,getRecordVideoSize:()=>qe,getStatementContainers:()=>P,getStoreSize:()=>At,getTestPlatformFromDeviceName:()=>Ce,hasReferenceIds:()=>ge,isAndroidDevice:()=>Ge,isAppPackage:()=>ze,isDynamicAction:()=>ft,isExecutableStatement:()=>ut,isIOSDevice:()=>Be,isNativeDevice:()=>Ke,isPhysicalDeviceUDID:()=>Xe,isPlatformCompatibleWithUrl:()=>Re,isStoreEmpty:()=>yt,isWebUrl:()=>z,mergeActionEntitiesIntoTestFlow:()=>kt,mergeStoreUpdates:()=>bt,parseAdbDeviceLine:()=>Kt,replaceVariables:()=>De,resolveActionEntity:()=>Tt,resolveModelFromEnv:()=>Dt,resolveModels:()=>It,testFlowToYaml:()=>ot,toAndroidDeviceName:()=>Gt,toIOSDeviceName:()=>Ve,updateStoreEntry:()=>Pt,yamlToTestFlow:()=>st});var Nt=f(()=>{"use strict";Le();Ie();We();$e();tt();it();ct();we();vt();Se();_t();xt();Wt();Ct();Ft();R()});var Si={};Ee(Si,{expect:()=>J.expect,test:()=>gi});module.exports=Qt(Si);var J=require("@playwright/test"),Y;async function wi(){return Y||(Y=await import("@shiplightai/sdk-pro"),Y)}var gi=J.test.extend({agent:async({},e,t)=>{let{WebAgent:i,createAgentContext:r,configureSdk:o,VariableStore:n}=await wi();o({env:{GOOGLE_API_KEY:process.env.GOOGLE_API_KEY??"",ANTHROPIC_API_KEY:process.env.ANTHROPIC_API_KEY??""}});let{resolveModelFromEnv:s}=await Promise.resolve().then(()=>(Nt(),Ht)),l=s();if(!l)throw new Error("No AI model configured. Set WEB_AGENT_MODEL, ANTHROPIC_API_KEY, or GOOGLE_API_KEY.");let c=new i(r({model:l,variableStore:new n}));await e(c)}});0&&(module.exports={expect,test});
15
+ `;return e}generatePostlude(){return""}}});function Ge(e){if(!e)return"desktop";for(let t of ai)if(t.test(e))return"mobile";return"desktop"}var ai,Be=f(()=>{"use strict";ai=[/iphone/i,/ipad/i,/android/i,/pixel/i,/galaxy/i,/mobile/i,/nexus/i,/blackberry/i,/kindle/i]});function Fe(e,t){if(!e||typeof e!="string")return e;let i=t instanceof Map?Object.fromEntries(t):t,r=n=>{let s=n.startsWith("$")?n.slice(1):n,l=i[s]??i[`$${s}`];return l!=null?String(l):void 0},o=e;return o=o.replace(/\{\{\s*\$?([^}]+?)\s*\}\}/g,(n,s)=>{let l=r(s.trim());return l!==void 0?l:n}),o=o.replace(/<secret>\$?([\w-]+)<\/secret>/g,(n,s)=>{let l=r(s);return l!==void 0?l:n}),o=o.replace(/\$\{([^}]+)\}/g,(n,s)=>{let l=r(s.trim());return l!==void 0?l:n}),o=o.replace(/\$([a-zA-Z_]\w*)/g,(n,s)=>{let l=r(s);return l!==void 0?l:n}),o}var He=f(()=>{"use strict"});function Ne(e){return e?e.startsWith(M)?"android":e.startsWith(T)?"ios":"web":"web"}function Re(e){return e?e.startsWith(M)||e.startsWith(T):!1}function ze(e){return!!e&&e.startsWith(M)}function Ve(e){return!!e&&e.startsWith(T)}function Ue(e){return e.startsWith(M)?e.slice(M.length):e.startsWith(T)?e.slice(T.length):e}function Xe(e){return`${M}${e}`}function $e(e){return`${T}${e}`}function U(e){return e?e.startsWith("http://")||e.startsWith("https://"):!1}function Ye(e){return e?!U(e):!1}function ee(e){return e?U(e)?["web"]:["android","ios"]:["web","android","ios"]}function Je(e,t){if(!t)return!0;let i=ee(t);return e==="desktop"||e==="mobile"?i.includes("web"):i.includes(e)}var M,T,X=f(()=>{"use strict";M="android:",T="ios:"});function je(e){return e.startsWith(T)?e:`${T}${e}`}function Ze(e){let t=e.iosVersion?` (iOS ${e.iosVersion})`:"";return e.deviceType==="simulator"?`${e.name}${t} - Simulator`:`${e.name}${t}`}function qe(e){return!!(/^[0-9a-fA-F]{40}$/.test(e)||/^[0-9a-fA-F]{8}-[0-9a-fA-F]{16}$/.test(e))}var Qe=f(()=>{"use strict";X()});var te,$,ie,re,oe,ne,ae,se,le,ce,D,he,B,ue,de,C,et,F,tt,it,Y,rt,ot,nt,at,st=f(()=>{"use strict";te="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",$=112,ie=1920,re=1080,oe=1920,ne=1080-$,ae=1280,se=720,le=500,ce=500,D="Desktop Chrome",he=(e=>(e.Chromium="chromium",e.Firefox="firefox",e.Webkit="webkit",e))(he||{}),B={"Blackberry PlayBook":{name:"Blackberry PlayBook",userAgent:"Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/26.0 Safari/536.2+",screen:{width:600,height:1024},viewport:{width:600,height:1024},deviceScaleFactor:1,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"BlackBerry Z30":{name:"BlackBerry Z30",userAgent:"Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/26.0 Mobile Safari/537.10+",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy Note 3":{name:"Galaxy Note 3",userAgent:"Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/26.0 Mobile Safari/534.30",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy Note II":{name:"Galaxy Note II",userAgent:"Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/26.0 Mobile Safari/534.30",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy S III":{name:"Galaxy S III",userAgent:"Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/26.0 Mobile Safari/534.30",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy S5":{name:"Galaxy S5",userAgent:"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy S8":{name:"Galaxy S8",userAgent:"Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:740},viewport:{width:360,height:740},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy S9+":{name:"Galaxy S9+",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:320,height:658},viewport:{width:320,height:658},deviceScaleFactor:4.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy S24":{name:"Galaxy S24",userAgent:"Mozilla/5.0 (Linux; Android 14; SM-S921U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:780},viewport:{width:360,height:780},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy A55":{name:"Galaxy A55",userAgent:"Mozilla/5.0 (Linux; Android 14; SM-A556B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:480,height:1040},viewport:{width:480,height:1040},deviceScaleFactor:2.25,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy Tab S4":{name:"Galaxy Tab S4",userAgent:"Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:712,height:1138},viewport:{width:712,height:1138},deviceScaleFactor:2.25,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy Tab S9":{name:"Galaxy Tab S9",userAgent:"Mozilla/5.0 (Linux; Android 14; SM-X710) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:640,height:1024},viewport:{width:640,height:1024},deviceScaleFactor:2.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"iPad (gen 5)":{name:"iPad (gen 5)",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:768,height:1024},viewport:{width:768,height:1024},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad (gen 6)":{name:"iPad (gen 6)",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:768,height:1024},viewport:{width:768,height:1024},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad (gen 7)":{name:"iPad (gen 7)",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:810,height:1080},viewport:{width:810,height:1080},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad (gen 11)":{name:"iPad (gen 11)",userAgent:"Mozilla/5.0 (iPad; CPU OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/19E241 Safari/604.1",screen:{width:656,height:944},viewport:{width:656,height:944},deviceScaleFactor:2.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad Mini":{name:"iPad Mini",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:768,height:1024},viewport:{width:768,height:1024},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad Pro 11":{name:"iPad Pro 11",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:834,height:1194},viewport:{width:834,height:1194},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 6":{name:"iPhone 6",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 6 Plus":{name:"iPhone 6 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:414,height:736},viewport:{width:414,height:736},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 7":{name:"iPhone 7",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 7 Plus":{name:"iPhone 7 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:414,height:736},viewport:{width:414,height:736},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 8":{name:"iPhone 8",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 8 Plus":{name:"iPhone 8 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:414,height:736},viewport:{width:414,height:736},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone SE":{name:"iPhone SE",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/26.0 Mobile/14E304 Safari/602.1",screen:{width:320,height:568},viewport:{width:320,height:568},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone SE (3rd gen)":{name:"iPhone SE (3rd gen)",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/26.0 Mobile/19E241 Safari/602.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone X":{name:"iPhone X",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:812},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone XR":{name:"iPhone XR",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:414,height:896},viewport:{width:414,height:896},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 11":{name:"iPhone 11",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:414,height:896},viewport:{width:414,height:715},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 11 Pro":{name:"iPhone 11 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:635},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 11 Pro Max":{name:"iPhone 11 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:414,height:896},viewport:{width:414,height:715},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12":{name:"iPhone 12",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12 Pro":{name:"iPhone 12 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12 Pro Max":{name:"iPhone 12 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:428,height:926},viewport:{width:428,height:746},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12 Mini":{name:"iPhone 12 Mini",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:629},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13":{name:"iPhone 13",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13 Pro":{name:"iPhone 13 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13 Pro Max":{name:"iPhone 13 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:428,height:926},viewport:{width:428,height:746},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13 Mini":{name:"iPhone 13 Mini",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:629},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14":{name:"iPhone 14",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14 Plus":{name:"iPhone 14 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:428,height:926},viewport:{width:428,height:746},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14 Pro":{name:"iPhone 14 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:393,height:852},viewport:{width:393,height:660},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14 Pro Max":{name:"iPhone 14 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:430,height:932},viewport:{width:430,height:740},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15":{name:"iPhone 15",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:393,height:852},viewport:{width:393,height:659},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15 Plus":{name:"iPhone 15 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:430,height:932},viewport:{width:430,height:739},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15 Pro":{name:"iPhone 15 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:393,height:852},viewport:{width:393,height:659},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15 Pro Max":{name:"iPhone 15 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:430,height:932},viewport:{width:430,height:739},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Kindle Fire HDX":{name:"Kindle Fire HDX",userAgent:"Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",screen:{width:800,height:1280},viewport:{width:800,height:1280},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"LG Optimus L70":{name:"LG Optimus L70",userAgent:"Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:384,height:640},viewport:{width:384,height:640},deviceScaleFactor:1.25,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Microsoft Lumia 550":{name:"Microsoft Lumia 550",userAgent:"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36 Edge/14.14263",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Microsoft Lumia 950":{name:"Microsoft Lumia 950",userAgent:"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36 Edge/14.14263",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:4,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 10":{name:"Nexus 10",userAgent:"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:800,height:1280},viewport:{width:800,height:1280},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 4":{name:"Nexus 4",userAgent:"Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:384,height:640},viewport:{width:384,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 5":{name:"Nexus 5",userAgent:"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 5X":{name:"Nexus 5X",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:732},viewport:{width:412,height:732},deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 6":{name:"Nexus 6",userAgent:"Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:732},viewport:{width:412,height:732},deviceScaleFactor:3.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 6P":{name:"Nexus 6P",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:732},viewport:{width:412,height:732},deviceScaleFactor:3.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 7":{name:"Nexus 7",userAgent:"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:600,height:960},viewport:{width:600,height:960},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nokia Lumia 520":{name:"Nokia Lumia 520",userAgent:"Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)",screen:{width:320,height:533},viewport:{width:320,height:533},deviceScaleFactor:1.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nokia N9":{name:"Nokia N9",userAgent:"Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",screen:{width:480,height:854},viewport:{width:480,height:854},deviceScaleFactor:1,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Pixel 2":{name:"Pixel 2",userAgent:"Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:411,height:731},viewport:{width:411,height:731},deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 2 XL":{name:"Pixel 2 XL",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:411,height:823},viewport:{width:411,height:823},deviceScaleFactor:3.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 3":{name:"Pixel 3",userAgent:"Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:393,height:786},viewport:{width:393,height:786},deviceScaleFactor:2.75,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 4":{name:"Pixel 4",userAgent:"Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:353,height:745},viewport:{width:353,height:745},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 4a (5G)":{name:"Pixel 4a (5G)",userAgent:"Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:892},viewport:{width:412,height:765},deviceScaleFactor:2.63,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 5":{name:"Pixel 5",userAgent:"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:393,height:851},viewport:{width:393,height:727},deviceScaleFactor:2.75,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 7":{name:"Pixel 7",userAgent:"Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:915},viewport:{width:412,height:839},deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Moto G4":{name:"Moto G4",userAgent:"Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Desktop Chrome HiDPI":{name:"Desktop Chrome HiDPI",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Edge HiDPI":{name:"Desktop Edge HiDPI",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Firefox HiDPI":{name:"Desktop Firefox HiDPI",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0.1) Gecko/20100101 Firefox/142.0.1",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"firefox"},"Desktop Safari":{name:"Desktop Safari",userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"webkit"},"Desktop Chrome":{name:"Desktop Chrome",displayName:"Playwright Chromium",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1920,height:1080},viewport:{width:1920,height:1080},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Chrome Medium Resolution":{name:"Desktop Chrome Medium Resolution",displayName:"Playwright Chromium",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1280,height:720},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Chrome (Branded)":{name:"Desktop Chrome (Branded)",displayName:"Google Chrome",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1920,height:1080},viewport:{width:1920,height:1080},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"chrome"},"Desktop Chrome Medium Resolution (Branded)":{name:"Desktop Chrome Medium Resolution (Branded)",displayName:"Google Chrome",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1280,height:720},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"chrome"},"Desktop Edge":{name:"Desktop Edge",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1920,height:1080},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Edge (Branded)":{name:"Desktop Edge (Branded)",displayName:"Microsoft Edge",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1920,height:1080},viewport:{width:1920,height:1080},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"msedge"},"Desktop Edge Medium Resolution (Branded)":{name:"Desktop Edge Medium Resolution (Branded)",displayName:"Microsoft Edge",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1280,height:720},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"msedge"},"Desktop Firefox":{name:"Desktop Firefox",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0.1) Gecko/20100101 Firefox/142.0.1",screen:{width:1920,height:1080},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"firefox"}},ue=(e=>(e.Desktop="desktop",e.Mobile="mobile",e))(ue||{}),de={desktop:["Desktop Chrome","Desktop Chrome Medium Resolution","Desktop Chrome (Branded)","Desktop Chrome Medium Resolution (Branded)","Desktop Edge (Branded)","Desktop Edge Medium Resolution (Branded)","Desktop Safari"],mobile:["iPhone 15 Pro Max","iPhone 15 Pro","iPhone 15 Plus","iPhone 15","iPhone 14 Pro Max","iPhone 14 Pro","iPhone 14 Plus","iPhone 14","iPhone 13 Pro Max","iPhone 13 Pro","iPhone 13","iPhone 13 Mini","iPhone 12 Pro Max","iPhone 12 Pro","iPhone 12","iPhone 12 Mini","iPhone 11 Pro Max","iPhone 11 Pro","iPhone 11","iPhone XR","iPhone X","iPhone SE (3rd gen)","iPhone SE","iPhone 8 Plus","iPhone 8","iPhone 7 Plus","iPhone 7","iPhone 6 Plus","iPhone 6","Galaxy S24","Galaxy A55","Galaxy S9+","Galaxy S8","Galaxy S5","Galaxy Note 3","Galaxy Note II","Galaxy S III","Pixel 7","Pixel 5","Pixel 4a (5G)","Pixel 4","Pixel 3","Pixel 2 XL","Pixel 2","Nexus 6P","Nexus 6","Nexus 5X","Nexus 5","Nexus 4","Moto G4","LG Optimus L70","Microsoft Lumia 950","Microsoft Lumia 550","Nokia Lumia 520","Nokia N9","BlackBerry Z30"]},C=(e,t=!1)=>{let i=["chromium"];return t&&i.push("webkit"),de[e].map(r=>B[r]).filter(r=>r.defaultBrowserType&&i.includes(r.defaultBrowserType))},et=()=>Object.keys(B),F=e=>B[e],tt={desktop:{label:"Desktop",type:"desktop",devices:C("desktop")},mobile:{label:"Mobile Web",type:"mobile",devices:C("mobile")}},it={desktop:{label:"Desktop",type:"desktop",devices:C("desktop",!0)},mobile:{label:"Mobile Web",type:"mobile",devices:C("mobile",!0)}},Y=(e,t=!1)=>{let i={userAgent:te,viewport:{width:oe,height:ne},isMobile:!1,hasTouch:!1};if(!e||e===D)return i;let r=F(e);if(!r)return i;let{width:o,height:n}=r.viewport,s=Math.max(le/o,1),l=Math.max(ce/n,1),c=Math.max(s,l),p={width:Math.round(o*c),height:Math.round(n*c)};return{userAgent:r.userAgent,viewport:t?p:r.viewport,isMobile:r.isMobile,hasTouch:r.hasTouch}},rt=e=>{let t={width:ie,height:re};if(!e||e===D)return t;let i=Y(e);return i.viewport?{width:i.viewport.width,height:i.viewport.height+$}:t},ot=e=>{let t={width:ae,height:se};if(!e||e===D)return t;let i=Y(e);return i.viewport?{width:i.viewport.width,height:i.viewport.height}:t},nt=e=>!e||e===D?void 0:F(e)?.channel,at=e=>!e||e===D?"chromium":F(e)?.defaultBrowserType??"chromium"});var pe,fe,lt=f(()=>{"use strict";pe=(e=>(e.PASSWORD="password",e.OAUTH2="oauth2",e.SSO="sso",e.API="api",e))(pe||{}),fe=(e=>(e.SMS="sms",e.EMAIL="email",e.TOTP="totp",e))(fe||{})});var a,me,J,we,W,ge,Se,Me,A,j,Te=f(()=>{"use strict";a=require("zod"),me=a.z.enum(["JS_CODE","AI_MODE"]),J=a.z.object({type:me,expression:a.z.string()}),we=a.z.enum(["DRAFT","STEP","ACTION","IF_ELSE","WHILE_LOOP"]),W=a.z.object({uid:a.z.string(),type:we}),ge=a.z.object({action_data:a.z.object({action_name:a.z.string(),kwargs:a.z.record(a.z.any()).optional(),args:a.z.array(a.z.any()).optional()}),action_description:a.z.string().optional(),url:a.z.string().optional(),xpath:a.z.string().nullable().optional(),locator:a.z.string().nullable().optional(),css_selector:a.z.string().nullable().optional(),unique_selector:a.z.string().nullable().optional(),element_index:a.z.number().nullable().optional(),frame_path:a.z.array(a.z.any()).optional(),artifacts:a.z.record(a.z.any()).optional(),feedback:a.z.string().optional(),original_browser_use_action:a.z.any().optional()}).passthrough(),Se=W.extend({type:a.z.literal("DRAFT"),description:a.z.string()}),Me=W.extend({type:a.z.literal("ACTION"),description:a.z.string(),action_entity:ge.optional(),locator:a.z.string().optional(),use_pure_vision:a.z.boolean().optional()}),A=a.z.lazy(()=>a.z.union([Se,Me,W.extend({type:a.z.literal("STEP"),description:a.z.string().optional().default(""),statements:a.z.array(A),reference_id:a.z.number().optional()}),W.extend({type:a.z.literal("IF_ELSE"),description:a.z.string().optional(),condition:J,then:a.z.array(A),else:a.z.array(A).optional()}),W.extend({type:a.z.literal("WHILE_LOOP"),description:a.z.string().optional(),condition:J,body:a.z.array(A),timeout_ms:a.z.number().optional()})])),j=a.z.object({version:a.z.string().optional(),goal:a.z.string(),url:a.z.string(),final_feedback:a.z.string().optional(),completed:a.z.boolean().optional(),success:a.z.boolean().optional(),statements:a.z.array(A),teardown:a.z.array(A).optional(),last_modified_at:a.z.string().optional()})});function ht(e,t){let i={...t?.test_case_id!==void 0?{test_case_id:t.test_case_id}:{},goal:e.goal,url:e.url,statements:e.statements.map(K)};return e.final_feedback&&(i.final_feedback=e.final_feedback),e.teardown&&e.teardown.length>0&&(i.teardown=e.teardown.map(K)),(0,H.stringify)(i,{lineWidth:120,defaultKeyType:"PLAIN",defaultStringType:"PLAIN"})}function K(e){switch(e.type){case"DRAFT":return si(e);case"ACTION":return li(e);case"STEP":return hi(e);case"IF_ELSE":return ui(e);case"WHILE_LOOP":return di(e)}}function si(e){return e.description}function li(e){if((e.action_entity?.action_data?.action_name??e.action_entity?.action?.action_name)==="verify"){let n=(e.action_entity?.action_data?.kwargs??e.action_entity?.action?.kwargs)?.statement;if(typeof n=="string"&&!e.action_entity?.locator&&!e.action_entity?.xpath)return`VERIFY: ${n}`}if(!e.action_entity)return e.description;let i={description:e.description},r=ci(e.action_entity);return r&&(i.action_entity=r),e.locator&&(i.locator=e.locator),e.use_pure_vision&&(i.use_pure_vision=!0),i}function ci(e){let t={},i=!1,r=e.action_data??e.action;return r&&(t.action_data={action_name:r.action_name},r.kwargs&&Object.keys(r.kwargs).length>0&&(t.action_data.kwargs=r.kwargs),r.args&&r.args.length>0&&(t.action_data.args=r.args),i=!0),e.locator&&(t.locator=e.locator,i=!0),e.xpath&&(t.xpath=e.xpath,i=!0),i?t:void 0}function hi(e){let t={STEP:e.description,statements:e.statements.map(K)};return e.reference_id!==void 0&&(t.reference_id=e.reference_id),t}function ui(e){let t={IF:ut(e.condition),THEN:e.then.map(K)};return e.else&&e.else.length>0&&(t.ELSE=e.else.map(K)),t}function di(e){let t={WHILE:ut(e.condition),DO:e.body.map(K)};return e.timeout_ms!==void 0&&(t.timeout_ms=e.timeout_ms),t}function ut(e){return e.type==="JS_CODE"?`js:${e.expression}`:e.expression}function dt(e){try{let t=(0,H.parse)(e);if(!t||typeof t!="object")return{};let i={};return typeof t.test_case_id=="number"&&Number.isFinite(t.test_case_id)&&(i.test_case_id=t.test_case_id),i}catch{return{}}}function pt(e){if(e.length>ct)throw new Error(`YAML input too large (${e.length} bytes, max ${ct})`);let t=(0,H.parse)(e);if(!t||typeof t!="object")throw new Error("Invalid YAML: expected an object at root level");let i={version:"1.2.0",goal:t.goal,url:t.url,statements:G(t.statements??[])};t.final_feedback&&(i.final_feedback=t.final_feedback),t.teardown&&Array.isArray(t.teardown)&&(i.teardown=G(t.teardown));let r=j.safeParse(i);if(!r.success)throw new Error(`Invalid TestFlow after YAML conversion: ${JSON.stringify(r.error.errors)}`);return r.data}function G(e){if(!Array.isArray(e))throw new Error("Expected an array of statements");return e.map(pi)}function pi(e){if(typeof e=="string")return fi(e);if(typeof e!="object"||e===null)throw new Error(`Invalid statement: expected string or object, got ${typeof e}`);let t=e;if("IF"in t)return mi(t);if("WHILE"in t)return wi(t);if("STEP"in t)return gi(t);if("action_entity"in t)return Si(t);if("description"in t&&typeof t.description=="string")return{uid:(0,k.v4)(),type:"DRAFT",description:t.description};throw new Error(`Cannot infer statement type from object: ${JSON.stringify(t)}`)}function fi(e){let t=e.match(/^VERIFY:\s*(.+)$/i);return t?{uid:(0,k.v4)(),type:"ACTION",description:`Verify: ${t[1]}`,action_entity:{action_description:`Verify: ${t[1]}`,action_data:{action_name:"verify",kwargs:{statement:t[1]}}}}:{uid:(0,k.v4)(),type:"DRAFT",description:e}}function ft(e){if(typeof e!="string")throw new Error(`Condition must be a string, got ${typeof e}`);return e.startsWith("js:")?{type:"JS_CODE",expression:e.slice(3)}:{type:"AI_MODE",expression:e}}function mi(e){let t=ft(e.IF),i=e.THEN;if(!Array.isArray(i))throw new Error("IF_ELSE requires a THEN array");let r={uid:(0,k.v4)(),type:"IF_ELSE",condition:t,then:G(i)};return"ELSE"in e&&Array.isArray(e.ELSE)&&(r.else=G(e.ELSE)),r}function wi(e){let t=ft(e.WHILE),i=e.DO;if(!Array.isArray(i))throw new Error("WHILE_LOOP requires a DO array");let r={uid:(0,k.v4)(),type:"WHILE_LOOP",condition:t,body:G(i)};return typeof e.timeout_ms=="number"&&(r.timeout_ms=e.timeout_ms),r}function gi(e){let t=typeof e.STEP=="string"?e.STEP:"";if(!Array.isArray(e.statements))throw new Error("STEP requires a statements array");let i={uid:(0,k.v4)(),type:"STEP",description:t,statements:G(e.statements)};return typeof e.reference_id=="number"&&(i.reference_id=e.reference_id),i}function Si(e){let t=typeof e.description=="string"?e.description:"",i=e.action_entity,r;i&&(r={action_description:t,...i});let o={uid:(0,k.v4)(),type:"ACTION",description:t};return r&&(o.action_entity=r),typeof e.locator=="string"&&(o.locator=e.locator),typeof e.use_pure_vision=="boolean"&&(o.use_pure_vision=e.use_pure_vision),o}var H,k,ct,mt=f(()=>{"use strict";Te();H=require("yaml"),k=require("uuid");ct=1024*1024});function be(e){for(let t of e){if(t.type==="STEP"&&t.reference_id)return!0;let i=P(t);for(let r of i)if(be(r.statements))return!0}return!1}function Mt(e){let t=new Set;function i(r){for(let o of r){o.type==="STEP"&&o.reference_id&&t.add(o.reference_id);let n=P(o);for(let s of n)i(s.statements)}}return i(e),Array.from(t)}function Pt(e){if(!e?.statements||!Array.isArray(e.statements))return{};let t={};return L(e.statements,"main",t),e.teardown&&Array.isArray(e.teardown)&&L(e.teardown,"teardown",t),t}function v(e,t,i){let r=e+".",o=t.filter(([h])=>h===e||h.startsWith(r));if(o.length===0)return[];let n=[],s=new Set;for(let[h]of o){let u=h===e?"":h.slice(r.length);if(!u)continue;let w=u.split(".")[0];s.has(w)||s.add(w)}let l=Array.from(s);l.sort((h,u)=>{let w=/^\d+$/.test(h)?parseInt(h,10):-1,b=/^\d+$/.test(u)?parseInt(u,10):-1;return w>=0&&b>=0?w-b:h==="then"&&u==="else"?-1:h==="else"&&u==="then"||h==="body"?1:u==="body"?-1:h.localeCompare(u)});function c(h){return i[h]}function p(h){let u=h.match(/^(IF|WHILE)\s+([\s\S]+)$/);return{type:"JS_CODE",expression:(u?u[2].trim():h)||"true"}}for(let h of l){let u=e?`${e}.${h}`:h,w=c(u),b=w?.description??"",xe=u;if(h==="then"){let d=`${e}.then`,y=`${e}.else`,g=v(d,t,i),x=v(y,t,i),N=c(e),qt=N?p(N.description):{type:"JS_CODE",expression:"true"};n.push({uid:e,type:"IF_ELSE",condition:qt,then:g,...x.length>0?{else:x}:{}});continue}if(h==="else")continue;if(h==="body"){let d=`${e}.body`,y=v(d,t,i),g=c(e),x=g?p(g.description):{type:"JS_CODE",expression:"true"};n.push({uid:e,type:"WHILE_LOOP",condition:x,body:y});continue}let m=`${e}.${h}`,Q=t.some(([d])=>d.startsWith(m+".then.")||d===m+".then"),Jt=t.some(([d])=>d.startsWith(m+".else.")||d===m+".else"),jt=t.some(([d])=>d.startsWith(m+".body.")||d===m+".body"),Zt=t.filter(([d])=>{if(!d.startsWith(m+"."))return!1;let g=d.slice(m.length+1).split(".")[0];return/^\d+$/.test(g)&&g!=="then"&&g!=="else"&&g!=="body"});if(Q||Jt){let d=m+".then",y=m+".else",g=v(d,t,i),x=v(y,t,i),N=w?p(b):{type:"JS_CODE",expression:"true"};n.push({uid:u,type:"IF_ELSE",condition:N,then:g,...x.length>0?{else:x}:{}})}else if(jt){let d=m+".body",y=v(d,t,i),g=w?p(b):{type:"JS_CODE",expression:"true"};n.push({uid:u,type:"WHILE_LOOP",condition:g,body:y})}else if(Zt.length>0){let d=v(m,t,i);n.push({uid:u,type:"STEP",description:b||"Group",statements:d})}else n.push({uid:u,type:"ACTION",description:b||"Action",action_entity:w?.action_entity})}return n}function yt(e){let t=Object.entries(e),i=r=>{let o=r+".";return t.some(([s])=>s===r||s.startsWith(o))?v(r,t,e):[]};return{before:i("before"),main:i("main"),teardown:i("teardown"),after:i("after")}}var P,S,E,_,O,wt,gt,St,Mi,Ti,Tt,bt,L,Pe=f(()=>{"use strict";P=e=>{let t=[];switch(e.type){case"STEP":e.statements&&t.push({key:"statements",statements:e.statements});break;case"IF_ELSE":e.then&&t.push({key:"then",statements:e.then}),e.else&&t.push({key:"else",statements:e.else});break;case"WHILE_LOOP":e.body&&t.push({key:"body",statements:e.body});break}return t},S=(e,t,i=void 0,r="root")=>{for(let o=0;o<e.length;o++){let n=e[o],s=n.uid;if(s===t)return{stableId:s,path:[o],statement:n,parent:i,containerKey:r,index:o};let l=P(n);for(let c of l){let p=S(c.statements,t,n,c.key);if(p)return{...p,path:[o,c.key,...p.path]}}}return null},E=(e,t,i)=>{let r=S(e,t);if(!r)return null;let{statement:o,parent:n,containerKey:s,index:l}=r,c=null;switch(o.type){case"DRAFT":case"ACTION":c=_(e,r)||O(e,r);break;case"STEP":if(o.statements&&o.statements.length>0)return o.statements[0];c=_(e,r)||O(e,r);break;case"IF_ELSE":if(i===!0&&o.then&&o.then.length>0)return o.then[0];if(i===!1&&o.else&&o.else.length>0)return o.else[0];c=_(e,r)||O(e,r);break;case"WHILE_LOOP":if(i===!0&&o.body&&o.body.length>0)return o.body[0];c=_(e,r)||O(e,r);break;default:c=_(e,r)||O(e,r);break}if(n&&n.type==="WHILE_LOOP"&&s==="body"){if(!c)return n;let p=S(e,c.uid);if(!p||p.parent!==n)return n}return c},_=(e,t)=>{if(!t.parent)return e[t.index+1]||null;let r=P(t.parent).find(o=>o.key===t.containerKey);return r&&t.index+1<r.statements.length?r.statements[t.index+1]:null},O=(e,t)=>{if(!t.parent)return null;let i=t.parent.uid,r=S(e,i);return r?_(e,r)||O(e,r):null},wt=e=>{let t=[],i=r=>{for(let o of r){t.push(o);let n=P(o);for(let s of n)i(s.statements)}};return i(e),t},gt=e=>{switch(e.type){case"DRAFT":case"ACTION":return!0;case"STEP":return!0;case"IF_ELSE":case"WHILE_LOOP":return!0;default:return!1}},St=(e,t,i)=>{if(!S(e,t))return null;if(i===null){let l=[],c=t;for(;c!==null&&S(e,c);)if(l.push(c),c=E(e,c)?.uid||null,l.length>1e3)return null;return l}if(!S(e,i))return null;if(t===i)return[];let n=[],s=t;for(;s&&s!==i;){let l=S(e,s);if(!l)break;if(n.push(s),l.statement.type==="IF_ELSE"){let c=Mi(l.statement,i);c?s=E(e,s,c==="then")?.uid||null:s=E(e,s)?.uid||null}else l.statement.type==="WHILE_LOOP"?Ti(l.statement,i)?s=E(e,s,!0)?.uid||null:s=E(e,s,!1)?.uid||null:s=E(e,s)?.uid||null;if(n.length>1e3)return null}return s===i?n:null},Mi=(e,t)=>{if(e.type!=="IF_ELSE")return null;let i=e;return i.then&&S(i.then,t)?"then":i.else&&S(i.else,t)?"else":null},Ti=(e,t)=>{if(e.type!=="WHILE_LOOP")return!1;let i=e;return!!(i.body&&S(i.body,t))};Tt=e=>e.startsWith("ai_")?!0:["js_code","function","assert","verify","wait_for_download_complete","extract_activation_code","extract_email_content"].includes(e),bt=e=>!["js_code","function","assert","ai_assert","verify","ai_extract","ai_wait_until","upload_file","login","extract_activation_code","extract_email_content","ai_step"].includes(e),L=(e,t,i)=>{e.forEach((r,o)=>{let n=`${t}.${o}`;r.type==="DRAFT"?i[n]={description:r.description||"Draft",action_entity:void 0}:r.type==="ACTION"?i[n]={description:r.description||"Action",action_entity:r.action_entity}:r.type==="STEP"&&r.statements?L(r.statements,n,i):r.type==="IF_ELSE"?(i[n]={description:"IF "+(r.condition?.expression||""),action_entity:void 0},r.then&&L(r.then,`${n}.then`,i),r.else&&L(r.else,`${n}.else`,i)):r.type==="WHILE_LOOP"&&(i[n]={description:"WHILE "+(r.condition?.expression||""),action_entity:void 0},r.body&&L(r.body,`${n}.body`,i))})}});function At(){return{version:"1.0",entries:{}}}function kt(e,t){return{action_entity:e,updated_at:new Date().toISOString(),updated_by:{source:"runner",test_run_id:t}}}function vt(e,t){let i=t?.entries[e.uid],r=i?.action_entity??e.action_entity;return e.locator&&r?{...r,locator:e.locator}:i?i.action_entity:e.action_entity?e.action_entity:null}function Et(e,t,i,r){return e.entries[t]={action_entity:i,updated_at:new Date().toISOString(),updated_by:r},e}function _t(e,t){let i=e??{version:"1.0",entries:{}};for(let[r,o]of t)i.entries[r]=o;return i}function Ot(e){return e?Object.keys(e.entries).length===0:!0}function Lt(e){return e?Object.keys(e.entries).length:0}function xt(e,t){if(!t||Object.keys(t.entries).length===0)return e;let i=ye(e.statements,t),r=e.teardown?ye(e.teardown,t):void 0;return{...e,statements:i,teardown:r}}function ye(e,t){return e.map(i=>bi(i,t))}function bi(e,t){if(e.type==="ACTION"){let o=e,n=t.entries[o.uid];return n?{...o,action_entity:n.action_entity}:o}let i=P(e);if(i.length===0)return e;let r={};for(let o of i)r[o.key]=ye(o.statements,t);return{...e,...r}}var It=f(()=>{"use strict";Pe()});var Ae,ke,Dt,Wt=f(()=>{"use strict";Ae=(e=>(e.DRAFT="DRAFT",e.STEP="STEP",e.ACTION="ACTION",e.IF_ELSE="IF_ELSE",e.WHILE_LOOP="WHILE_LOOP",e))(Ae||{}),ke=(e=>(e.JS_CODE="JS_CODE",e.AI_MODE="AI_MODE",e))(ke||{}),Dt=18e4});var Ct,Gt=f(()=>{"use strict";Ct=class Kt{data={};sensitive=new Set;get(t){return this.data[t]}set(t,i,r=!1){this.data[t]=i,r?this.sensitive.add(t):this.sensitive.has(t)&&this.sensitive.delete(t)}getAll(){return{...this.data}}isSensitive(t){return this.sensitive.has(t)}getAllSensitiveKeys(){return new Set(this.sensitive)}delete(t){return this.sensitive.delete(t),delete this.data[t]}clear(){this.data={},this.sensitive.clear()}has(t){return t in this.data}get size(){return Object.keys(this.data).length}merge(t){for(let[i,r]of Object.entries(t.getAll()))this.set(i,r,t.isSensitive(i))}toJSON(){return{data:{...this.data},sensitiveKeys:Array.from(this.sensitive)}}static fromJSON(t){let i=new Kt;if(t.data){let r=new Set(t.sensitiveKeys||[]);for(let[o,n]of Object.entries(t.data))i.set(o,n,r.has(o))}return i}}});function Bt(e){return{copilot:e?.models?.copilot||ve,webagent:e?.models?.webagent||Ee}}function Ft(e=process.env){if(e.WEB_AGENT_MODEL)return e.WEB_AGENT_MODEL;if(e.ANTHROPIC_API_KEY)return _e;if(e.GOOGLE_API_KEY)return Oe}var ve,Ee,_e,Oe,Ht=f(()=>{"use strict";ve="claude-sonnet-4-5",Ee="gemini-2.5-pro",_e="claude-haiku-4-5",Oe="gemini-2.5-pro"});var Le,Nt=f(()=>{"use strict";Le=(e=>(e.INITIALIZING="initializing",e.READY="ready",e.PROCESSING="processing",e.STOPPING="stopping",e.WAITING_USER="waiting_user",e.COMPLETED="completed",e.FAILED="failed",e))(Le||{})});function Rt(e){let t=e.trim();if(!t||t.startsWith("List of devices"))return null;let i=t.split(/\s+/);if(i.length<2)return null;let r=i[0],o=i[1],n="usb";return r.startsWith("emulator-")?n="emulator":r.includes(":")&&(n="wifi"),{id:r,state:o,connectionType:n}}function zt(e){return e.startsWith(M)?e:`${M}${e}`}function Vt(e){return e.model?`${e.model} (${e.id})`:e.connectionType==="emulator"?`Android Emulator (${e.id})`:e.id}var Ut=f(()=>{"use strict";X()});var Xt={};Ie(Xt,{ADDRESS_BAR_HEIGHT:()=>$,ANDROID_DEVICE_PREFIX:()=>M,ActionEntitySchema:()=>ge,ActionSchema:()=>Me,AgentStatus:()=>Le,BaseStatementSchema:()=>W,BrowserType:()=>he,ConditionSchema:()=>J,ConditionType:()=>ke,ConditionTypeSchema:()=>me,DEFAULT_ANTHROPIC_MODEL:()=>_e,DEFAULT_COPILOT_MODEL:()=>ve,DEFAULT_DEVICE_NAME:()=>D,DEFAULT_GOOGLE_MODEL:()=>Oe,DEFAULT_WEBAGENT_MODEL:()=>Ee,DEFAULT_WHILE_LOOP_TIMEOUT_MS:()=>Dt,DEVICE_CATEGORIES:()=>de,DeviceType:()=>ue,DraftSchema:()=>Se,IOS_DEVICE_PREFIX:()=>T,LoginType:()=>pe,MIN_WINDOW_HEIGHT:()=>ce,MIN_WINDOW_WIDTH:()=>le,NodeJSCodeCommon:()=>Ce,PLAYWRIGHT_DEVICES:()=>B,RECORD_VIDEO_HEIGHT:()=>se,RECORD_VIDEO_WIDTH:()=>ae,StatementSchema:()=>A,StatementType:()=>Ae,StatementTypeSchema:()=>we,TestFlowSchema:()=>j,TwoFactorAuthType:()=>fe,UI_DEVICE_CATEGORIES:()=>tt,UI_DEVICE_CATEGORIES_ELECTRON:()=>it,USER_AGENT:()=>te,VIEWPORT_HEIGHT:()=>ne,VIEWPORT_WIDTH:()=>oe,VariableStore:()=>Ct,WINDOW_HEIGHT:()=>re,WINDOW_WIDTH:()=>ie,actionStepsMapToTestFlowSections:()=>yt,allowPureVisionAction:()=>bt,collectActionSteps:()=>L,createAndroidDeviceName:()=>Xe,createEmptyStore:()=>At,createIOSDeviceName:()=>$e,createRunnerStoreEntry:()=>kt,extractActionStepsFromTestFlow:()=>Pt,extractDeviceIdentifier:()=>Ue,extractYamlMetadata:()=>dt,findNextAfterContainer:()=>O,findNextSibling:()=>_,findNextStatement:()=>E,findPathBetweenStatements:()=>St,findStatementPathById:()=>S,getAllDeviceNames:()=>et,getAllReferenceIds:()=>Mt,getAllStatementsInOrder:()=>wt,getAndroidDeviceDisplayName:()=>Vt,getBrowserWindowSize:()=>rt,getCompatiblePlatforms:()=>ee,getDeviceBrowserType:()=>at,getDeviceByName:()=>F,getDeviceChannel:()=>nt,getDeviceOptions:()=>Y,getDevicesByCategory:()=>C,getIOSDeviceDisplayName:()=>Ze,getLoginConfigPlatform:()=>Ge,getRecordVideoSize:()=>ot,getStatementContainers:()=>P,getStoreSize:()=>Lt,getTestPlatformFromDeviceName:()=>Ne,hasReferenceIds:()=>be,isAndroidDevice:()=>ze,isAppPackage:()=>Ye,isDynamicAction:()=>Tt,isExecutableStatement:()=>gt,isIOSDevice:()=>Ve,isNativeDevice:()=>Re,isPhysicalDeviceUDID:()=>qe,isPlatformCompatibleWithUrl:()=>Je,isStoreEmpty:()=>Ot,isWebUrl:()=>U,mergeActionEntitiesIntoTestFlow:()=>xt,mergeStoreUpdates:()=>_t,parseAdbDeviceLine:()=>Rt,replaceVariables:()=>Fe,resolveActionEntity:()=>vt,resolveModelFromEnv:()=>Ft,resolveModels:()=>Bt,testFlowToYaml:()=>ht,toAndroidDeviceName:()=>zt,toIOSDeviceName:()=>je,updateStoreEntry:()=>Et,yamlToTestFlow:()=>pt});var $t=f(()=>{"use strict";Ke();Be();He();Qe();st();lt();mt();Te();It();Pe();Wt();Gt();Ht();Nt();Ut();X()});var Ai={};Ie(Ai,{expect:()=>q.expect,test:()=>yi});module.exports=oi(Ai);var Yt=z(require("path"),1),q=require("@playwright/test");var V=z(require("fs"),1),I=z(require("path"),1);function We(e){let t=I.resolve(e),i=I.resolve(process.cwd());for(;;){for(let o of["shiplight.config.json","login.config.json"]){let n=I.join(t,o);if(V.existsSync(n)){try{let s=JSON.parse(V.readFileSync(n,"utf-8"));if(s.variables&&typeof s.variables=="object")return ni(s.variables)}catch{}return[]}}if(t===i)break;let r=I.dirname(t);if(r===t)break;t=r}return[]}function ni(e){let t=[];for(let[i,r]of Object.entries(e))if(typeof r=="string")t.push({key:i,value:r,sensitive:!1});else if(r&&typeof r=="object"&&"value"in r){let o=r;t.push({key:i,value:String(o.value),sensitive:o.sensitive===!0})}return t}var Z;async function Pi(){return Z||(Z=await import("@shiplightai/sdk-pro"),Z)}var yi=q.test.extend({agent:async({},e,t)=>{let{WebAgent:i,createAgentContext:r,configureSdk:o,VariableStore:n}=await Pi();o({env:{GOOGLE_API_KEY:process.env.GOOGLE_API_KEY??"",ANTHROPIC_API_KEY:process.env.ANTHROPIC_API_KEY??""}});let{resolveModelFromEnv:s}=await Promise.resolve().then(()=>($t(),Xt)),l=s();if(!l)throw new Error("No AI model configured. Set WEB_AGENT_MODEL, ANTHROPIC_API_KEY, or GOOGLE_API_KEY.");let c=new n,p=t.project.testDir||process.cwd(),h=t.file,u=h?Yt.dirname(h):p,w=We(u);for(let{key:xe,value:m,sensitive:Q}of w)c.set(xe,m,Q);let b=new i(r({model:l,variableStore:c}));await e(b)}});0&&(module.exports={expect,test});