@mablhq/mabl-cli 1.45.8 → 1.47.20
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/api/basicApiClient.js +6 -0
- package/api/featureSet.js +0 -4
- package/api/mablApiClient.js +8 -0
- package/browserEngines/browserEngine.js +40 -0
- package/browserEngines/browserEngines.js +14 -0
- package/browserEngines/chromiumBrowserEngine.js +175 -0
- package/browserEngines/firefoxBrowserEngine.js +117 -0
- package/browserEngines/unsupportedBrowserEngine.js +26 -0
- package/browserLauncher/frameBase.js +5 -1
- package/browserLauncher/pageEvent.js +1 -0
- package/{api/entities/Plan.js → browserLauncher/playwrightBrowserLauncher/browserDelegate.js} +0 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumBrowserDelegate.js +58 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumElementHandleDelegate.js +65 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumFrameDelegate.js +12 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumPageDelegate.js +117 -0
- package/browserLauncher/playwrightBrowserLauncher/elementHandleDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxBrowserDelegate.js +54 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxElementHandleDelegate.js +61 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxFrameDelegate.js +23 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxPageDelegate.js +83 -0
- package/browserLauncher/playwrightBrowserLauncher/frameDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/pageDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +44 -35
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +30 -5
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +33 -64
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +35 -11
- package/browserLauncher/playwrightBrowserLauncher/playwrightHttpRequest.js +9 -1
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +28 -50
- package/commands/constants.js +6 -1
- package/commands/tests/testsUtil.js +27 -182
- package/commands/tests/tests_cmds/import.js +2 -2
- package/commands/tests/tests_cmds/run.js +9 -9
- package/commands/workspaces/workspace_cmds/copy.js +1 -2
- package/domUtil/index.js +1 -1
- package/execution/index.js +1 -1
- package/functions/apiTest/utils.js +47 -0
- package/functions/types.js +2 -0
- package/functions/utils.js +12 -0
- package/mablApi/index.js +1 -1
- package/mablscript/importer.js +3 -0
- package/mablscript/types/VariableNamespace.js +3 -3
- package/mablscriptFind/index.js +1 -1
- package/package.json +5 -4
- package/popupDismissal/index.js +7 -20
- package/proxy/index.js +1 -1
- package/resources/mablFind.js +1 -1
- package/resources/pdf-viewer/index.js +1 -1
- package/resources/pdf-viewer/libmablPdfViewer.js +117 -113
- package/resources/pdf-viewer/pdf.worker.0ceac9378bfc3bfcb634.js +81 -0
- package/resources/pdf-viewer/pdf.worker.df20a5600902b0735d4b.js +2 -0
- package/resources/popupDismissal.js +1 -1
- package/util/actionabilityUtil.js +4 -4
- package/util/browserTestUtils.js +18 -0
- package/util/clickUtil.js +7 -2
- package/util/fileUploadUtil.js +1 -1
- package/util/jestUtil.js +21 -0
- package/mablscript/types/VariableDataType.js +0 -28
- package/resources/pdf-viewer/pdf.worker.5953c23fa7251d236190.js +0 -2
- package/resources/pdf-viewer/pdf.worker.5f2736435a8b46d97859.js +0 -81
|
@@ -26,8 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.toBasicHttpAuthenticationCredentials = exports.
|
|
30
|
-
const async_retry_1 = __importDefault(require("async-retry"));
|
|
29
|
+
exports.toBasicHttpAuthenticationCredentials = exports.logTestInfoIfPresent = exports.milliSecondsToSeconds = exports.calculateTotalTimeSeconds = exports.extractTestRunConfig = exports.pullDownTestRunConfig = exports.validateRunCommandWithLabels = exports.validateRunEditCommand = exports.cleanupTestResources = exports.sleep = exports.editTheTest = exports.runTheTest = exports.prepareTrainerForSplitPlayback = exports.cleanUpInitialPages = exports.getExtensionBackgroundPageWithCliTool = exports.createBrowserForExecutionEngine = exports.createBrowser = exports.getFinalUrl = void 0;
|
|
31
30
|
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
32
31
|
const fs = __importStar(require("fs-extra"));
|
|
33
32
|
const os = __importStar(require("os"));
|
|
@@ -36,45 +35,14 @@ const browserLauncher_1 = require("../../browserLauncher/browserLauncher");
|
|
|
36
35
|
const trainingSessionActions_1 = require("../../core/messaging/actions/trainingSessionActions");
|
|
37
36
|
const logLineMessaging_1 = require("../../core/messaging/logLineMessaging");
|
|
38
37
|
const messaging_1 = require("../../core/messaging/messaging");
|
|
39
|
-
const env_1 = require("../../env/env");
|
|
40
38
|
const cliConfigProvider_1 = require("../../providers/cliConfigProvider");
|
|
41
39
|
const loggingProvider_1 = require("../../providers/logging/loggingProvider");
|
|
42
40
|
const fileUploadUtil_1 = require("../../util/fileUploadUtil");
|
|
43
41
|
const logUtils_1 = require("../../util/logUtils");
|
|
44
|
-
const resourceUtil_1 = require("../../util/resourceUtil");
|
|
45
|
-
const configKeys_1 = require("../config/config_cmds/configKeys");
|
|
46
42
|
const constants_1 = require("../constants");
|
|
47
|
-
const mobileEmulationUtil_1 = require("./mobileEmulationUtil");
|
|
48
43
|
const trainerUtil_1 = require("./tests_cmds/trainerUtil");
|
|
49
44
|
const chalk = require('chalk');
|
|
50
|
-
const chromeFinder = require('chrome-launcher/dist/chrome-finder');
|
|
51
|
-
const launchUtils = require('chrome-launcher/dist/utils');
|
|
52
|
-
const tmp = require('tmp-promise');
|
|
53
|
-
const baseExecutionEngineLaunchArgs = [
|
|
54
|
-
'--unlimited-storage',
|
|
55
|
-
'--disable-dev-shm-usage',
|
|
56
|
-
'--enable-print-preview-register-promos',
|
|
57
|
-
'--kiosk-printing',
|
|
58
|
-
'--disable-infobars',
|
|
59
|
-
'--enable-logging',
|
|
60
|
-
'--v=0',
|
|
61
|
-
'--enable-features=NetworkService,NetworkServiceInProcess',
|
|
62
|
-
'--disable-features=site-per-process',
|
|
63
|
-
'--disable-component-update',
|
|
64
|
-
];
|
|
65
|
-
const ExecutionEngineFakeAudioFilePath = '/opt/media/mabl_test_audio.wav';
|
|
66
|
-
const ExecutionEngineFakeVideoFilePath = '/opt/media/mabl_test_pattern.y4m';
|
|
67
45
|
let RUNNING_TEST = false;
|
|
68
|
-
function getTempChromePrefDirectory() {
|
|
69
|
-
const tempDir = tmp.dirSync({
|
|
70
|
-
mode: 0o777,
|
|
71
|
-
prefix: `${env_1.CONF_FILE_PROJECT_NAME}-`,
|
|
72
|
-
});
|
|
73
|
-
const preferencesPath = path.normalize(`${tempDir.name}/chromePreferences`);
|
|
74
|
-
fs.ensureDirSync(preferencesPath, 0o777);
|
|
75
|
-
return preferencesPath;
|
|
76
|
-
}
|
|
77
|
-
exports.getTempChromePrefDirectory = getTempChromePrefDirectory;
|
|
78
46
|
function getFinalUrl(test, parsedUrl) {
|
|
79
47
|
const finalUrl = parsedUrl || test.url;
|
|
80
48
|
if (!finalUrl) {
|
|
@@ -83,29 +51,8 @@ function getFinalUrl(test, parsedUrl) {
|
|
|
83
51
|
return finalUrl;
|
|
84
52
|
}
|
|
85
53
|
exports.getFinalUrl = getFinalUrl;
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
return chromes.filter((chrome) => {
|
|
89
|
-
const lowCase = chrome.toLowerCase();
|
|
90
|
-
return !(lowCase.includes('canary') ||
|
|
91
|
-
lowCase.includes('dev') ||
|
|
92
|
-
lowCase.includes('beta'));
|
|
93
|
-
})[0];
|
|
94
|
-
}
|
|
95
|
-
exports.searchForChrome = searchForChrome;
|
|
96
|
-
async function findChrome() {
|
|
97
|
-
const existingLocation = await cliConfigProvider_1.CliConfigProvider.getConfigProperty(configKeys_1.configKeys.browserPath);
|
|
98
|
-
if (typeof existingLocation === 'string' &&
|
|
99
|
-
existingLocation &&
|
|
100
|
-
fs.existsSync(existingLocation)) {
|
|
101
|
-
return existingLocation;
|
|
102
|
-
}
|
|
103
|
-
const chromePath = searchForChrome();
|
|
104
|
-
await cliConfigProvider_1.CliConfigProvider.setConfigProperty(configKeys_1.configKeys.browserPath, chromePath);
|
|
105
|
-
return chromePath;
|
|
106
|
-
}
|
|
107
|
-
exports.findChrome = findChrome;
|
|
108
|
-
async function launchBrowserInstance(launchArgs, userDataDir, headless, credentials, options) {
|
|
54
|
+
async function launchBrowserInstance(options) {
|
|
55
|
+
var _a;
|
|
109
56
|
const optionsProxy = await maybeGetProxyOptions(options);
|
|
110
57
|
if (optionsProxy) {
|
|
111
58
|
options = {
|
|
@@ -115,13 +62,13 @@ async function launchBrowserInstance(launchArgs, userDataDir, headless, credenti
|
|
|
115
62
|
}
|
|
116
63
|
let browser;
|
|
117
64
|
try {
|
|
118
|
-
browser = await maybeLaunchBrowser(
|
|
65
|
+
browser = await maybeLaunchBrowser(options);
|
|
119
66
|
}
|
|
120
67
|
catch (error) {
|
|
121
68
|
if (error.message.includes('Running as root without --no-sandbox is not supported')) {
|
|
122
|
-
|
|
69
|
+
(_a = options.commandLineArgs) === null || _a === void 0 ? void 0 : _a.push('--no-sandbox');
|
|
123
70
|
messaging_1.mablEventEmitter.log('Unable to initialize browser with standard settings, attempting to run with --no-sandbox setting', Date.now(), logLineMessaging_1.LogLineColor.yellow);
|
|
124
|
-
return maybeLaunchBrowser(
|
|
71
|
+
return maybeLaunchBrowser(options).catch((error) => {
|
|
125
72
|
messaging_1.mablEventEmitter.log('Browser launch failed', Date.now(), logLineMessaging_1.LogLineColor.red);
|
|
126
73
|
messaging_1.mablEventEmitter.log(error.message);
|
|
127
74
|
});
|
|
@@ -151,30 +98,9 @@ async function maybeGetProxyOptions(options) {
|
|
|
151
98
|
}
|
|
152
99
|
return optionsProxy;
|
|
153
100
|
}
|
|
154
|
-
function maybeLaunchBrowser(
|
|
155
|
-
return browserLauncher_1.BrowserLauncherFactory.createRunner(options === null || options === void 0 ? void 0 : options.runnerType, options === null || options === void 0 ? void 0 : options.loggerFunc).launch(
|
|
156
|
-
...options,
|
|
157
|
-
headless,
|
|
158
|
-
args: launchArgs,
|
|
159
|
-
userDataDir,
|
|
160
|
-
downloadPath: createDownloadDirectory(),
|
|
161
|
-
credentials,
|
|
162
|
-
});
|
|
101
|
+
function maybeLaunchBrowser(options) {
|
|
102
|
+
return browserLauncher_1.BrowserLauncherFactory.createRunner(options === null || options === void 0 ? void 0 : options.runnerType, options === null || options === void 0 ? void 0 : options.loggerFunc).launch(options);
|
|
163
103
|
}
|
|
164
|
-
async function prepareChromePreferencesDirectory(browserPreferences) {
|
|
165
|
-
return (0, async_retry_1.default)(() => {
|
|
166
|
-
const tempBrowserPreferencesDirectory = getTempChromePrefDirectory();
|
|
167
|
-
fs.ensureDirSync(path.normalize(`${tempBrowserPreferencesDirectory}/Default`));
|
|
168
|
-
const prefFilePath = path.normalize(`${tempBrowserPreferencesDirectory}/Default/Preferences`);
|
|
169
|
-
fs.writeFileSync(prefFilePath, JSON.stringify(browserPreferences, null, 3));
|
|
170
|
-
fs.chmodSync(path.normalize(`${tempBrowserPreferencesDirectory}/Default`), 0o777);
|
|
171
|
-
fs.chmodSync(prefFilePath, 0o777);
|
|
172
|
-
return tempBrowserPreferencesDirectory;
|
|
173
|
-
}, {
|
|
174
|
-
retries: 5,
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
exports.prepareChromePreferencesDirectory = prepareChromePreferencesDirectory;
|
|
178
104
|
function removeTempBrowserPreferencesDirectory(tempDirPath) {
|
|
179
105
|
try {
|
|
180
106
|
fs.removeSync(tempDirPath);
|
|
@@ -182,89 +108,33 @@ function removeTempBrowserPreferencesDirectory(tempDirPath) {
|
|
|
182
108
|
catch (error) {
|
|
183
109
|
}
|
|
184
110
|
}
|
|
185
|
-
async function createBrowser(
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
const
|
|
189
|
-
const launchArgs = [];
|
|
190
|
-
if (containerTesting) {
|
|
191
|
-
launchArgs.push('--no-sandbox');
|
|
192
|
-
}
|
|
193
|
-
if (disableIsolation) {
|
|
194
|
-
disableFeaturesFlags.push('IsolateOrigins');
|
|
195
|
-
}
|
|
196
|
-
disableFeaturesFlags.push('site-per-process');
|
|
197
|
-
launchArgs.push(`--disable-features=${disableFeaturesFlags.join(',')}`);
|
|
198
|
-
if (options === null || options === void 0 ? void 0 : options.autoOpenDevtoolsForTabs) {
|
|
199
|
-
launchArgs.push('--auto-open-devtools-for-tabs');
|
|
200
|
-
}
|
|
201
|
-
const fakeMicrophoneMedia = (0, resourceUtil_1.findResource)('media/mabl_test_audio.wav', resourcesDirectoryOverride);
|
|
202
|
-
const fakeWebcamMedia = (0, resourceUtil_1.findResource)('media/mabl_test_pattern.y4m', resourcesDirectoryOverride);
|
|
203
|
-
const defaultDeviceDescriptor = addLaunchArgs(launchArgs, browserWidth, browserHeight, fakeMicrophoneMedia, fakeWebcamMedia, ignoreCertificateErrors, emulationConfig);
|
|
204
|
-
let ignoreDefaultArgs;
|
|
205
|
-
if (enableExtensions) {
|
|
206
|
-
ignoreDefaultArgs = ['--disable-extensions'];
|
|
207
|
-
}
|
|
208
|
-
const maybeBrowser = await launchBrowserInstance(launchArgs, tempBrowserPreferencesDirectory, headless, credentials, {
|
|
111
|
+
async function createBrowser(engine, options) {
|
|
112
|
+
const userDataDir = await engine.prepareBrowserPreferencesDirectory(options.windowPlacement);
|
|
113
|
+
const browserEngineLaunchOptions = engine.getBrowserLaunchOptions(options);
|
|
114
|
+
const maybeBrowser = await launchBrowserInstance({
|
|
209
115
|
...options,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
defaultUserAgent: options === null || options === void 0 ? void 0 : options.defaultUserAgent,
|
|
214
|
-
enableScreencastModeForScreenshotTimeouts: false,
|
|
116
|
+
...browserEngineLaunchOptions,
|
|
117
|
+
downloadPath: createDownloadDirectory(),
|
|
118
|
+
userDataDir,
|
|
215
119
|
});
|
|
216
120
|
if (!maybeBrowser) {
|
|
217
|
-
throw new Error('Unable to start
|
|
121
|
+
throw new Error('Unable to start browser session');
|
|
218
122
|
}
|
|
219
|
-
maybeBrowser.on(browserLauncher_1.BrowserEvent.BrowserDestroyed, () => removeTempBrowserPreferencesDirectory(
|
|
123
|
+
maybeBrowser.on(browserLauncher_1.BrowserEvent.BrowserDestroyed, () => removeTempBrowserPreferencesDirectory(maybeBrowser.getBrowserPreferencesDirectory()));
|
|
220
124
|
return maybeBrowser;
|
|
221
125
|
}
|
|
222
126
|
exports.createBrowser = createBrowser;
|
|
223
|
-
function
|
|
224
|
-
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
if (ignoreCertificateErrors) {
|
|
233
|
-
launchArgs.push('--ignore-certificate-errors');
|
|
234
|
-
}
|
|
235
|
-
return defaultDeviceDescriptor;
|
|
236
|
-
}
|
|
237
|
-
function addExecutionEngineLaunchArgs(browserWidth, browserHeight, proxyInfo, emulationConfig) {
|
|
238
|
-
const launchArgs = [...baseExecutionEngineLaunchArgs];
|
|
239
|
-
if (proxyInfo.pacProxy) {
|
|
240
|
-
launchArgs.push(`--proxy-pac-url=${proxyInfo.pacProxy}`);
|
|
241
|
-
}
|
|
242
|
-
else if (proxyInfo.socksProxy) {
|
|
243
|
-
launchArgs.push(`--proxy-server=socks=${proxyInfo.socksProxy}`);
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
throw new Error('no proxy provided for cloud run');
|
|
247
|
-
}
|
|
248
|
-
const defaultDeviceDescriptor = addLaunchArgs(launchArgs, browserWidth, browserHeight, ExecutionEngineFakeAudioFilePath, ExecutionEngineFakeVideoFilePath, true, emulationConfig);
|
|
249
|
-
loggingProvider_1.logger.debug(`launchArgs: ${JSON.stringify(launchArgs)}`);
|
|
250
|
-
return { defaultDeviceDescriptor, launchArgs };
|
|
251
|
-
}
|
|
252
|
-
exports.addExecutionEngineLaunchArgs = addExecutionEngineLaunchArgs;
|
|
253
|
-
async function createBrowserForExecutionEngine(browserWidth, browserHeight, headless, tempBrowserPreferencesDirectory, proxyInfo, options) {
|
|
254
|
-
const { credentials, deviceEmulationConfig, userAgent } = options;
|
|
255
|
-
if (deviceEmulationConfig && !userAgent) {
|
|
256
|
-
options = {
|
|
257
|
-
...options,
|
|
258
|
-
userAgent: deviceEmulationConfig.device_config.user_agent,
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
const { launchArgs, defaultDeviceDescriptor } = addExecutionEngineLaunchArgs(browserWidth, browserHeight, proxyInfo, deviceEmulationConfig);
|
|
262
|
-
if (defaultDeviceDescriptor) {
|
|
263
|
-
options = { ...options, defaultDeviceDescriptor };
|
|
264
|
-
}
|
|
265
|
-
const maybeBrowser = await maybeLaunchBrowser(launchArgs, tempBrowserPreferencesDirectory, headless, credentials, options);
|
|
127
|
+
async function createBrowserForExecutionEngine(engine, proxyInfo, options) {
|
|
128
|
+
const userDataDir = await engine.prepareBrowserPreferencesDirectory();
|
|
129
|
+
const launchOptions = engine.getExecutionEngineBrowserLaunchOptions(options, proxyInfo);
|
|
130
|
+
const maybeBrowser = await maybeLaunchBrowser({
|
|
131
|
+
...options,
|
|
132
|
+
...launchOptions,
|
|
133
|
+
downloadPath: createDownloadDirectory(),
|
|
134
|
+
userDataDir,
|
|
135
|
+
});
|
|
266
136
|
if (!maybeBrowser) {
|
|
267
|
-
throw new Error('Unable to start
|
|
137
|
+
throw new Error('Unable to start browser session');
|
|
268
138
|
}
|
|
269
139
|
return maybeBrowser;
|
|
270
140
|
}
|
|
@@ -584,31 +454,6 @@ function logTestInfoIfPresent(description, infoArg) {
|
|
|
584
454
|
}
|
|
585
455
|
}
|
|
586
456
|
exports.logTestInfoIfPresent = logTestInfoIfPresent;
|
|
587
|
-
function generateChromiumPreferencesFile(windowPlacement) {
|
|
588
|
-
const preferences = {
|
|
589
|
-
download: {
|
|
590
|
-
open_pdf_in_system_reader: true,
|
|
591
|
-
prompt_for_download: false,
|
|
592
|
-
},
|
|
593
|
-
profile: {
|
|
594
|
-
avatar_index: 5,
|
|
595
|
-
name: 'mabl',
|
|
596
|
-
},
|
|
597
|
-
plugins: {
|
|
598
|
-
always_open_pdf_externally: true,
|
|
599
|
-
},
|
|
600
|
-
};
|
|
601
|
-
if (windowPlacement) {
|
|
602
|
-
preferences.browser = {
|
|
603
|
-
window_placement: {
|
|
604
|
-
always_on_top: false,
|
|
605
|
-
...windowPlacement,
|
|
606
|
-
},
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
return preferences;
|
|
610
|
-
}
|
|
611
|
-
exports.generateChromiumPreferencesFile = generateChromiumPreferencesFile;
|
|
612
457
|
function createDownloadDirectory() {
|
|
613
458
|
return fs.mkdtempSync(path.join(os.tmpdir(), `mablTestRun-${Date.now()}-`));
|
|
614
459
|
}
|
|
@@ -38,9 +38,9 @@ const RichPromise_1 = __importDefault(require("../../../util/RichPromise"));
|
|
|
38
38
|
const pureUtil_1 = require("../../../util/pureUtil");
|
|
39
39
|
const constants_1 = require("../../constants");
|
|
40
40
|
const authenticationProvider_1 = require("../../../providers/authenticationProvider");
|
|
41
|
-
const testsUtil_1 = require("../testsUtil");
|
|
42
41
|
const asyncUtil_1 = require("../../../util/asyncUtil");
|
|
43
42
|
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
43
|
+
const chromiumBrowserEngine_1 = require("../../../browserEngines/chromiumBrowserEngine");
|
|
44
44
|
const { MablTestRunner, MablTestsRunner } = require('../../../execution');
|
|
45
45
|
const DEFAULT_ASYNC_TIMEOUT_MILLIS = 120000;
|
|
46
46
|
const CommandArgAuto = 'auto-save';
|
|
@@ -245,7 +245,7 @@ async function runTests(workspaceId, name, apiClient, importedTests) {
|
|
|
245
245
|
var _a, _b;
|
|
246
246
|
const flows = importedTests.map((steps) => stepsToFlow(workspaceId, steps));
|
|
247
247
|
const firstUrl = (_a = flows.find((flow) => flow.url)) === null || _a === void 0 ? void 0 : _a.url;
|
|
248
|
-
const browserPath = await
|
|
248
|
+
const browserPath = await new chromiumBrowserEngine_1.ChromiumBrowserEngine().findBrowserExecutable();
|
|
249
249
|
for (let flowIndex = 0; flowIndex < flows.length; flowIndex++) {
|
|
250
250
|
loggingProvider_1.logger.info(`Running test ${flowIndex + 1} of ${flows.length}.`);
|
|
251
251
|
const flow = flows[flowIndex];
|
|
@@ -162,25 +162,19 @@ exports.builder = (yargs) => {
|
|
|
162
162
|
choices: Object.keys(mablApi_1.JourneyParameters.PageLoadWaitEnum).map((pageLoadWait) => pageLoadWait.toLowerCase()),
|
|
163
163
|
})
|
|
164
164
|
.option(constants_1.CommandArgBrowser, {
|
|
165
|
-
describe:
|
|
165
|
+
describe: `Target browser to execute the test against, must be one of ${constants_1.ValidBrowserTypesForLocalRuns}, defaults to ${constants_1.DefaultBrowserType}`,
|
|
166
166
|
type: 'string',
|
|
167
167
|
nargs: 1,
|
|
168
|
-
choices:
|
|
168
|
+
choices: constants_1.ValidBrowserTypesForLocalRuns,
|
|
169
169
|
hidden: true,
|
|
170
170
|
})
|
|
171
171
|
.check((argv) => {
|
|
172
172
|
(0, testsUtil_1.validateRunCommandWithLabels)(argv[constants_1.CommandArgId], argv[constants_1.CommandArgLabelsInclude], argv[constants_1.CommandArgLabelsExclude], argv[constants_1.CommandArgTestRunId], argv[constants_1.CommandArgFromPlanId], true, argv[constants_1.CommandArgTestFile]);
|
|
173
|
-
validateBrowserInput(argv[constants_1.CommandArgBrowser]);
|
|
174
173
|
const httpHeaders = argv[constants_1.CommandArgHttpHeaders];
|
|
175
174
|
(0, util_1.validateArrayInputs)(httpHeaders, 'HTTP headers must be SPACE delimited, e.g. "--http-headers "foo:bar" "baz:qux"');
|
|
176
175
|
argv[constants_1.CommandArgHttpHeaders] = (0, util_1.validateValuePairInputs)('HTTP header', httpHeaders);
|
|
177
176
|
return true;
|
|
178
177
|
});
|
|
179
|
-
function validateBrowserInput(browser) {
|
|
180
|
-
if (browser && !['chrome', 'edge'].includes(browser)) {
|
|
181
|
-
throw new Error('invalid browser type, valid browser types are [chrome,edge]');
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
178
|
};
|
|
185
179
|
const exitCodeOnError = 1;
|
|
186
180
|
exports.handler = (0, util_1.failWrapper)(run, exitCodeOnError);
|
|
@@ -205,8 +199,14 @@ async function run(parsed) {
|
|
|
205
199
|
case 'edge':
|
|
206
200
|
browserType = browserTypes_1.BrowserType.Edge;
|
|
207
201
|
break;
|
|
208
|
-
|
|
202
|
+
case 'firefox':
|
|
203
|
+
browserType = browserTypes_1.BrowserType.Firefox;
|
|
204
|
+
break;
|
|
205
|
+
case 'chrome':
|
|
209
206
|
browserType = browserTypes_1.BrowserType.Chrome;
|
|
207
|
+
break;
|
|
208
|
+
default:
|
|
209
|
+
browserType = constants_1.DefaultBrowserType;
|
|
210
210
|
}
|
|
211
211
|
const testRunnerConfig = {
|
|
212
212
|
_cliCreated: true,
|
|
@@ -33,8 +33,7 @@ function getTimestamp() {
|
|
|
33
33
|
}
|
|
34
34
|
function hasOwnerRoleInWorkspace(user, workspaceId) {
|
|
35
35
|
var _a;
|
|
36
|
-
const hasOwnerRole = (_a = user.roles) === null || _a === void 0 ? void 0 : _a.some((role) => role.organization_id === workspaceId &&
|
|
37
|
-
role.role === mablApi_1.UserRole.RoleEnum.Owner);
|
|
36
|
+
const hasOwnerRole = (_a = user.roles) === null || _a === void 0 ? void 0 : _a.some((role) => role.organization_id === workspaceId && role.role === mablApi_1.UserRoleEnum.Owner);
|
|
38
37
|
if (!hasOwnerRole) {
|
|
39
38
|
loggingProvider_1.logger.warn(chalk_1.default.yellow(`You must be an owner in both workspaces to copy. You do not have owner permissions in workspace: ${workspaceId}`));
|
|
40
39
|
}
|
package/domUtil/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.domUtil=t():e.domUtil=t()}(global,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containsMablTemplatePattern=t.isString=t.isNestableElement=t.LONE_VARIABLE_REGEXP=t.FAKER_FORMAT_IN_EXPRESSION_REGEX_CREATE=t.FAKER_EXPRESSION_REGEXP_CREATE=t.FAKER_EXPRESSION_NAMED_GROUP=t.FAKER_EXPRESSION=t.FAKE_NAMESPACE=t.FAKER_GROUP_NAME=t.RANDOM_FORMAT_IN_EXPRESSION_REGEXP_CREATE=t.RANDOM_FORMAT_REGEXP_CREATE=t.RANDOM_FORMAT=t.LENGTH_GROUP=t.LENGTH_GROUP_NAME=t.ALPHABET_GROUP=t.RANDOM_STRING_CHOICES=t.ALPHABET_GROUP_NAME=t.CURRENT_DATE_REGEXP_CREATE=t.CURRENT_DATE_NAME_GROUP=t.CURRENT_DATE_GROUP_NAME=t.VARIABLE_IN_EXPRESSION_REGEXP_CREATE=t.SINGLE_VARIABLE_REGEX_CREATE=t.VARIABLE_GROUP=t.VARIABLE_GROUP_NAME=t.EXCLUDED_USER_VARIABLE_NAMES=t.ALL_VARIABLE_REGEXP_CREATE=t.COMPOUND_VARIABLE_PATTERN=t.USER_VARIABLE_REGEXP_CREATE=t.VARIABLE_REGEXP=t.INDEX_EXPRESSION_REGEXP=t.DOUBLE_QUOTED_IDENTIFIER_REGEXP=t.SINGLE_QUOTED_IDENTIFIER_REGEXP=t.ARRAY_INDEX_REGEXP=t.IDENTIFIER_REGEXP=t.USER_NAMESPACE_REGEXP=t.PATTERN_REGEXP=t.patternRanges=void 0,t.patternRanges={alpha:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",alphaLower:"abcdefghijklmnopqrstuvwxyz",alphaUpper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",digit:"0123456789",alnum:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},t.PATTERN_REGEXP=/{{([^{}]*)}}/gi,t.USER_NAMESPACE_REGEXP=/^user\./g,t.IDENTIFIER_REGEXP="[a-zA-Z_][a-zA-Z0-9_]*",t.ARRAY_INDEX_REGEXP="[0-9]+",t.SINGLE_QUOTED_IDENTIFIER_REGEXP=`'${t.IDENTIFIER_REGEXP}'`,t.DOUBLE_QUOTED_IDENTIFIER_REGEXP=`"${t.IDENTIFIER_REGEXP}"`,t.INDEX_EXPRESSION_REGEXP=`\\[(?:${t.ARRAY_INDEX_REGEXP}|${t.SINGLE_QUOTED_IDENTIFIER_REGEXP}|${t.DOUBLE_QUOTED_IDENTIFIER_REGEXP})\\]`,t.VARIABLE_REGEXP=`${t.IDENTIFIER_REGEXP}(?:${t.INDEX_EXPRESSION_REGEXP})*`;t.USER_VARIABLE_REGEXP_CREATE=()=>RegExp("^"+t.IDENTIFIER_REGEXP+"$"),t.COMPOUND_VARIABLE_PATTERN=`(${t.VARIABLE_REGEXP})(\\.(${t.VARIABLE_REGEXP}))*`;t.ALL_VARIABLE_REGEXP_CREATE=()=>RegExp("^"+t.COMPOUND_VARIABLE_PATTERN+"$"),t.EXCLUDED_USER_VARIABLE_NAMES=["user","web","mail","api"],t.VARIABLE_GROUP_NAME="variable",t.VARIABLE_GROUP="(?<"+t.VARIABLE_GROUP_NAME+">"+t.COMPOUND_VARIABLE_PATTERN+")";t.SINGLE_VARIABLE_REGEX_CREATE=()=>RegExp("{{@"+t.VARIABLE_GROUP+"}}");t.VARIABLE_IN_EXPRESSION_REGEXP_CREATE=()=>RegExp("@"+t.VARIABLE_GROUP,"g"),t.CURRENT_DATE_GROUP_NAME="date",t.CURRENT_DATE_NAME_GROUP="(?<"+t.CURRENT_DATE_GROUP_NAME+">date)";t.CURRENT_DATE_REGEXP_CREATE=()=>RegExp("{{"+t.CURRENT_DATE_NAME_GROUP+"(:iso)?}}"),t.ALPHABET_GROUP_NAME="alphabet",t.RANDOM_STRING_CHOICES=Object.keys(t.patternRanges).join("|"),t.ALPHABET_GROUP="(?<"+t.ALPHABET_GROUP_NAME+">"+t.RANDOM_STRING_CHOICES+")",t.LENGTH_GROUP_NAME="length",t.LENGTH_GROUP="(?<"+t.LENGTH_GROUP_NAME+">[\\d]+)",t.RANDOM_FORMAT=t.ALPHABET_GROUP+":"+t.LENGTH_GROUP;t.RANDOM_FORMAT_REGEXP_CREATE=()=>RegExp("{{"+t.RANDOM_FORMAT+"}}");t.RANDOM_FORMAT_IN_EXPRESSION_REGEXP_CREATE=()=>RegExp(t.RANDOM_FORMAT,"g"),t.FAKER_GROUP_NAME="faker",t.FAKE_NAMESPACE="fake.",t.FAKER_EXPRESSION=t.FAKE_NAMESPACE+"[a-zA-Z]+\\.[a-zA-Z]+(\\((\\d+)\\))?",t.FAKER_EXPRESSION_NAMED_GROUP="(?<"+t.FAKER_GROUP_NAME+">{{"+t.FAKER_EXPRESSION+"}})";t.FAKER_EXPRESSION_REGEXP_CREATE=()=>RegExp(t.FAKER_EXPRESSION_NAMED_GROUP);t.FAKER_FORMAT_IN_EXPRESSION_REGEX_CREATE=()=>RegExp("("+t.FAKER_EXPRESSION+")","g"),t.LONE_VARIABLE_REGEXP="^{{@"+t.VARIABLE_GROUP+"}}$",t.isNestableElement=function(e){return e instanceof Object||e instanceof Array},t.isString=function(e){return e&&e instanceof String||"string"==typeof e},t.containsMablTemplatePattern=function(e){return!!e&&e.search(t.PATTERN_REGEXP)>=0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_ATTR_PROPS_OPTIONS=t.ALLOWED_ASSERTIBLE_ATTRS_PROPS=t.ASSERTIBLE_ATTRIBUTE_TYPES=void 0,t.ASSERTIBLE_ATTRIBUTE_TYPES=["string","number","boolean"],t.ALLOWED_ASSERTIBLE_ATTRS_PROPS=["accessKey","accessKeyLabel ","align","alt","aria-checked","aria-label","aria-labelledby","aria-disabled","autofocus","border","checked","class","className","clientHeight","clientLeft","clientTop","clientWidth","complete","computedName","computedRole","contentEditable","contextMenu","crossOrigin","currentSrc","dataset ","defaultChecked","defaultValue","dir","disabled","draggable","formEncType","formMethod","formNoValidate","formTarget","height","hidden","href","hspace","id","indeterminate","inert","innerText","isContentEditable ","isMap","itemId ","itemScope ","lang","length","localName","longDesc","lowSrc","maxLength","multiple","name","namespaceURI","naturalHeight","naturalWidth","noModule","offsetHeight ","offsetLeft","offsetTop","offsetWidth","prefix","referrerPolicy","required","selectedIndex","size","sizes","slot","src","srcset","tabIndex","tagName","title","translate","type","validationMessage","validity","value","vspace","width","willValidate"],t.ALL_ATTR_PROPS_OPTIONS={},t.ALLOWED_ASSERTIBLE_ATTRS_PROPS.forEach(e=>t.ALL_ATTR_PROPS_OPTIONS[e]="")},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MablscriptUtils=t.replaceVariables=t.findVariables=t.b64DecodeUnicode=t.b64EncodeUnicode=t.buildStepArgumentString=t.isValidVariableName=t.isValidUserVariableName=t.getVariableNameFromLoneVariablePattern=t.isLoneVariablePattern=t.unescapeMablscriptString=t.escapeMablscriptString=void 0;const a=n(0);function l(e){return"string"==typeof e?e.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/"/g,'\\"').replace(/\r/g,""):""}function c(e){return!!e&&RegExp(a.LONE_VARIABLE_REGEXP).test(e)}t.escapeMablscriptString=l,t.unescapeMablscriptString=function(e){return"string"==typeof e?e.replace(/\\"/g,'"').replace(/\\n/g,"\n").replace(/\\\\/g,"\\"):""},t.isLoneVariablePattern=c,t.getVariableNameFromLoneVariablePattern=function(e){var t,n;if(c(e)){const r=RegExp(a.LONE_VARIABLE_REGEXP);return null===(n=null===(t=e.match(r))||void 0===t?void 0:t.groups)||void 0===n?void 0:n[a.VARIABLE_GROUP_NAME]}},t.isValidUserVariableName=function(e){return!!e&&((0,a.USER_VARIABLE_REGEXP_CREATE)().test(e)&&-1===a.EXCLUDED_USER_VARIABLE_NAMES.indexOf(e))},t.isValidVariableName=function(e){return!!e&&(0,a.ALL_VARIABLE_REGEXP_CREATE)().test(e)},t.buildStepArgumentString=function e(t){switch(typeof t){case"string":return`"${l(t)}"`;case"boolean":case"number":return""+t;case"object":{if(t instanceof Array)return`[${t.map(e).join(",")}]`;const n=[];return Object.keys(t).forEach(r=>{const i=e(t[r]);"string"==typeof r&&r&&"string"==typeof i&&i&&n.push(`"${r}":${i}`)}),n.sort(),`{${n.join(",")}}`}default:return}},t.b64EncodeUnicode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt("0x"+t,16))})))},t.b64DecodeUnicode=function(e){try{return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}catch(t){return atob(e)}},t.findVariables=function(e){const t=null==e?void 0:e.match(a.PATTERN_REGEXP);return(null==t?void 0:t.reduce((e,t)=>{const n=null==t?void 0:t.match((0,a.VARIABLE_IN_EXPRESSION_REGEXP_CREATE)());return null==n||n.forEach(t=>e.push(t.substring(1))),e},[]))||[]},t.replaceVariables=function(e,t){return null===e?null:null==e?void 0:e.replace(a.PATTERN_REGEXP,e=>e.replace((0,a.VARIABLE_IN_EXPRESSION_REGEXP_CREATE)(),t))},t.MablscriptUtils=o(n(2))},function(e,t,n){"use strict";function r(e){return void 0!==e.tag_name&&("input"===e.tag_name.toLowerCase()?!e.inputElementType||-1===["radio","button","submit","reset"].indexOf(e.inputElementType.toLowerCase()):-1===["button","option","li","param"].indexOf(e.tag_name.toLowerCase()))}function i(e){return e&&void 0!==e.uuid&&void 0!==e.xpath}Object.defineProperty(t,"__esModule",{value:!0}),t.areSelectorsEqual=t.isCompositeSelector=t.isStandardSelectorAndContext=t.isStandardSelector=t.isCookieSelector=t.isEmailSelector=t.isTabSelector=t.isCssSelector=t.isXPathSelector=t.ignoreValueAttribute=t.SELECTOR_ATTRIBUTE_KEYS=t.SELECTOR_EQUIVALENCE_IGNORED_KEYS=t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP=t.isSimpleElementSelectorCommonKeys=void 0,t.isSimpleElementSelectorCommonKeys=function(e){return"string"==typeof e&&!["css_query","repeat_xpaths","selector_type","tag_name","uuid","xpath"].includes(e)},t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP={elementId:"id",name:"name",href:"href",inputElementType:"inputElementType",label:"label",placeholder:"placeholder",tagName:"tag_name",text:"text",slotText:"slot_text",url:"url",title:"title",uuid:"uuid",xPath:"xpath",cssQuery:"css_query",className:"class_name",src:"src",alt:"alt",form:"form",for:"for_attr",target:"target",inputValue:"value",dataTracking:"data_tracking",titleAttr:"title_attr",ariaLabel:"aria_label",labelAttr:"label_attr",dataAutomationId:"data_automation_id",dataTestId:"data_test_id",dataTestid:"data_testid",testId:"test_id",ngModel:"ng_model",ngShow:"ng_show",ariaOwns:"aria_owns",ariaLabelledby:"aria_labelledby",ngClass:"ng_class",ariaControls:"aria_controls",tabindex:"tabindex",role:"role",maxlength:"maxlength",autocomplete:"autocomplete",height:"height",width:"width",style:"style",boundingX:"bounding_x",boundingY:"bounding_y",boundingHeight:"bounding_height",boundingWidth:"bounding_width",visible:"visible",dataTarget:"data_target",dataValue:"data_value",dataId:"data_id",dataName:"data_name",dataProp:"data_prop",index:"index",item:"item"},t.SELECTOR_EQUIVALENCE_IGNORED_KEYS={aria_owns:()=>!0,bounding_x:()=>!0,bounding_y:()=>!0,bounding_height:()=>!0,bounding_width:()=>!0,class_name:()=>!0,style:()=>!0,title_attr:function(e){if(void 0===e.tag_name)return!1;return["input","textarea"].includes(e.tag_name.toLowerCase())},uuid:()=>!0,value:r},t.SELECTOR_ATTRIBUTE_KEYS=Object.keys(t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP).map(e=>t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP[e]),t.ignoreValueAttribute=r,t.isXPathSelector=function(e){return e&&void 0!==e.xpath},t.isCssSelector=function(e){return e&&void 0!==e.css_query},t.isTabSelector=function(e){return e&&"tab"===e.selector_type&&void 0!==e.url},t.isEmailSelector=function(e){return e&&"email"===e.selector_type},t.isCookieSelector=function(e){return e&&void 0!==e.name},t.isStandardSelector=i,t.isStandardSelectorAndContext=function(e){return e&&void 0!==e.currentContextNode},t.isCompositeSelector=function(e){return e&&e.length>=1&&e.every(i)},t.areSelectorsEqual=function(e,t){if(void 0===e)return void 0===t;if(void 0===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(5),t)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(6),t),i(n(7),t),i(n(1),t),i(n(2),t),i(n(9),t),i(n(3),t),i(n(10),t),i(n(0),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeOverlayById=t.destroySelectionOverlay=t.highlightElements=t.highlightElement=t.positionSelectionHighlight=t.renderSelectionOverlay=t.xpathElement=t.maybeGetRootNode=t.createXpathFromPathArray=t.sanitizeXPath=t.getAncestorElements=t.isSelect=t.isFileInput=t.isTextField=t.isInputField=t.getInputTypeFromElement=t.getPlaceholderFromElement=t.getAnchorHrefFromElement=t.getInputLabelFromElement=t.getLabelForInput=t.normalizeText=t.truncateText=t.getSlotTextFromElement=t.getTextFromElement=t.compactWhitespace=t.createXPathFromElement=t.getIframesInfo=t.getAttributePropertyMap=t.getSelectedTextFromElement=t.getClassNameFromElement=t.getSelectedIndexFromElement=t.getElementValueFromElement=t.getNodeNameFromElement=t.getTagNameFromElement=t.getNameFromElement=t.getIdFromElement=t.createIgnoredDomElement=t.createBaseEventMessage=t.getAttributeFromElement=t.getPropertyFromElement=t.MAX_ATTRIBUTE_SIZE=t.MAX_SELECTOR_INNER_TEXT_LENGTH=t.MABL_INSERTED_ELEMENTS=t.MABL_SECONDARY_DRAGGABLE_DIV_ID=t.MABL_TERTIARY_IFRAME_ID=t.MABL_IGNORE_ELEMENT_CLASS=t.MABL_DRAGGABLE_DIV_ID=t.MABL_SECONDARY_IFRAME_ID=t.MABL_HIGHLIGHT_ID=t.MABL_OVERLAY_ID=void 0,t.getParentElements=t.removeParentElements=t.isElementInShadowRoot=t.isExpectedToBeInvisible=t.isDisplayed=t.getInnerText=t.getElementByXpath=t.getAllElementsByXpath=t.getFirstElementBySelectors=t.getLastElementBySelectors=t.getAllElementBySelectors=t.destroyElement=t.getElementMatchingSelectionTarget=t.selectOption=t.adjustTarget=void 0;const r=n(1);t.MABL_OVERLAY_ID="mabl-selection-overlay-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_HIGHLIGHT_ID="mabl-selection-highlight-22b76b1b-4c57-4644-98ab-6f2ff555d1cc";const i="mabl-selection-overlay-22b76b1b-4c57-4644-98ab-6f2ff555d1cc";var o;t.MABL_SECONDARY_IFRAME_ID="mabl-secondary-iframe-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_DRAGGABLE_DIV_ID="mabl-draggable-div-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_IGNORE_ELEMENT_CLASS="mabl-element-ignore-actions",t.MABL_TERTIARY_IFRAME_ID="mabl-tertiary-iframe-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_SECONDARY_DRAGGABLE_DIV_ID="mabl-secondary-draggable-div-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_INSERTED_ELEMENTS=[t.MABL_OVERLAY_ID,t.MABL_HIGHLIGHT_ID,i,"mabl-iframe-22b76b1b-4c57-4644-98ab-6f2ff555d1cc","mabl-iframe-draggable-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_SECONDARY_IFRAME_ID,t.MABL_DRAGGABLE_DIV_ID],function(e){e[e["accessibility-check"]=0]="accessibility-check",e[e["assert-cookie"]=1]="assert-cookie",e[e["assert-email"]=2]="assert-email",e[e["assert-variable"]=3]="assert-variable",e[e["await-tab"]=4]="await-tab",e[e["await-uploads"]=5]="await-uploads",e[e["clear-cookies"]=6]="clear-cookies",e[e.click=7]="click",e[e.click_hold=8]="click_hold",e[e.conditional_else=9]="conditional_else",e[e.conditional_end=10]="conditional_end",e[e["double-click"]=11]="double-click",e[e.download=12]="download",e[e["download-pdf"]=13]="download-pdf",e[e.echo=14]="echo",e[e["end-flow"]=15]="end-flow",e[e["evaluate-js-snippet"]=16]="evaluate-js-snippet",e[e.hover=17]="hover",e[e.input=18]="input",e[e.keypress=19]="keypress",e[e.location=20]="location",e[e["mouse-select"]=21]="mouse-select",e[e.navigation=22]="navigation",e[e["open-email"]=23]="open-email",e[e.release=24]="release",e[e["remove-cookie"]=25]="remove-cookie",e[e["send-http-request"]=26]="send-http-request",e[e["set-cookie"]=27]="set-cookie",e[e["set-files"]=28]="set-files",e[e["set-variable"]=29]="set-variable",e[e["start-flow"]=30]="start-flow",e[e["switch-context-to"]=31]="switch-context-to",e[e["synthetic-click"]=32]="synthetic-click",e[e.url=33]="url",e[e["visit-url"]=34]="visit-url",e[e.viewport=35]="viewport",e[e.wait=36]="wait"}(o||(o={}));const a=["button","checkbox","file","radio","reset","submit"];function l(e,t){return f(e[t])}function c(e,t){return f(e.getAttribute(t))}t.MAX_SELECTOR_INNER_TEXT_LENGTH=300,t.MAX_ATTRIBUTE_SIZE=5e3,t.getPropertyFromElement=l,t.getAttributeFromElement=c;const u=[{name:"src",attribute:"src",handler:l},{name:"elementId",attribute:"id",handler:E},{name:"tagName",handler:_},{name:"text",handler:h},{name:"slotText",handler:T},{name:"label",handler:O},{name:"href",attribute:"href",handler:S},{name:"placeholder",attribute:"placeholder",handler:N},{name:"inputElementType",attribute:"type",handler:P},{name:"inputValue",attribute:"value",handler:m},{name:"className",attribute:"class",handler:R},{name:"visible",handler:function(e){return H(e).toString()}},...[{name:"alt",attribute:"alt"},{name:"form",attribute:"form"},{name:"for",attribute:"for"},{name:"target",attribute:"target"},{name:"name",attribute:"name"},{name:"target",attribute:"target"},{name:"name",attribute:"name"},{name:"dataTracking",attribute:"data-tracking"},{name:"titleAttr",attribute:"title"},{name:"ariaLabel",attribute:"aria-label"},{name:"labelAttr",attribute:"label"},{name:"dataAutomationId",attribute:"data-automation-id"},{name:"dataTestId",attribute:"data-test-id"},{name:"dataTestid",attribute:"data-testid"},{name:"testId",attribute:"test-id"},{name:"ngModel",attribute:"ng-model"},{name:"ngShow",attribute:"ng-show"},{name:"ngClass",attribute:"ng-class"},{name:"ariaOwns",attribute:"aria-owns"},{name:"ariaLabelledby",attribute:"aria-labelledby"},{name:"ariaControls",attribute:"aria-controls"},{name:"tabindex",attribute:"tabindex"},{name:"role",attribute:"role"},{name:"maxlength",attribute:"maxlength"},{name:"autocomplete",attribute:"autocomplete"},{name:"height",attribute:"height"},{name:"width",attribute:"width"},{name:"style",attribute:"style"},{name:"dataTarget",attribute:"data-target"},{name:"dataValue",attribute:"data-value"},{name:"dataId",attribute:"data-id"},{name:"dataName",attribute:"data-name"},{name:"dataProp",attribute:"data-prop"},{name:"index",attribute:"index"},{name:"item",attribute:"item"}].map(e=>({...e,handler:c}))],s=[{propertyName:"slotText",extractor:T}];function d(e,t,n,r,i){const o={action:t,listener:n,xPath:r,context:i};return u.forEach(t=>{const n=t.handler(e,t.attribute||t.name);o[t.name]=n}),o}function E(e){return f(e.id)}function f(e){var n;return("string"!=typeof e||e.length<t.MAX_ATTRIBUTE_SIZE)&&null!==(n=e)&&void 0!==n?n:void 0}function _(e){var t;return null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase()}function p(e){var t;return f(null===(t=null==e?void 0:e.nodeName)||void 0===t?void 0:t.toLowerCase())}function m(e){return f(e.value)}function R(e){return f(e.className)}function A(e){return function e(t,n){const r=null==t?void 0:t.parentElement;if(r){const i=x(t,r);return e(r,`/${i}${n}`)}if(k(t)){return D(`//${x(t,t.getRootNode())}${n}`)}return D("//html[1]"+n)}(e,"")}function g(e){var t;return null===(t=null==e?void 0:e.replace(/[ \t\xA0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\n\x0B\f\r\x85\u2028\u2029]+/g," "))||void 0===t?void 0:t.trim()}function b(e){return g(e).substring(0,t.MAX_SELECTOR_INNER_TEXT_LENGTH).replace(/"/g,'\\"')}function h(e){return b(e.innerText||"")}function T(e){const t=e.querySelectorAll("slot");if(1!==t.length)return;const n=t.item(0).assignedNodes().find(e=>e.nodeType===Node.TEXT_NODE);return n?b(n.data):void 0}function v(e,t){var n;return null!==(n=null==e?void 0:e.substring(0,t))&&void 0!==n?n:e}function y(e,n=!0){const r=g(e);return r&&n?v(r,t.MAX_SELECTOR_INNER_TEXT_LENGTH):r}function I(e){if(!e||!L(e))return;const t=e.closest("label");if(t)return t;if(e.id){const t=(""+(e.id||"")).replace(/'/g,"\\'"),n=document.querySelector(`label[for='${t}']`);if(n)return n}const n=V("(./preceding-sibling::*//descendant-or-self::*[self::input|self::label])[last()]",e);if(n.length>0){const e=n[0];if("label"===_(e)&&!e.getAttribute("for"))return e}const r=V("(../preceding-sibling::*//descendant-or-self::*[self::input|self::label])[last()]",e);if(r.length>0){const e=r[0];if("label"===_(e)&&!e.getAttribute("for"))return e}}function O(e){const t=I(e);if(t)return h(t)}function S(e){if("a"===_(e))return f(e.href)}function N(e){if(L(e))return f(e.placeholder)}function P(e){if(L(e))return e.type||"text"}function L(e){const t=_(e);return"input"===t||"textarea"===t}function D(e){return(e=e.replace("*[local-name()='#document-fragment']/shadow[1]/body","body[1]")).replace(/#document-fragment\[0]\/shadow\[1]\/body\[0]/,"body[1]")}function M(e){if("function"==typeof e.getRootNode)return e.getRootNode()}function x(e,t){let n;const r=p(e);n=r?e instanceof HTMLElement&&!(null==r?void 0:r.includes(":"))?r:`*[local-name()='${r}']`:"*";const i=function(e,t){let n=-1;const r=p(e);if(!r)return n;for(const i in t)if(null==t?void 0:t.hasOwnProperty(i)){const o=t[i];if(p(o)===r&&(n+=1,o===e))return n}return n}(e,t.children)+1;return i?`${n}[${i}]`:""+n}function C(){const e=document.createElement("div");return e.id=t.MABL_HIGHLIGHT_ID,e.classList.add(i),e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="0",e.style.height="0",e.style.borderStyle="solid",e.style.borderWidth="2px",e.style.borderColor="black",e}function F(e,n,r){const i=e.getBoundingClientRect(),o=C();o.id=`${t.MABL_HIGHLIGHT_ID}-${n}`,o.style.left=G(i.x),o.style.top=G(i.y),o.style.width=G(i.width),o.style.height=G(i.height),r.appendChild(o)}function G(e){return Math.round(e)+"px"}function B(e){const t=document.getElementById(e);if(t)try{document.body.removeChild(t)}catch(e){document.documentElement.removeChild(t)}}function U(e){var t;null===(t=null==e?void 0:e.parentNode)||void 0===t||t.removeChild(e)}function X(e){return e.css_query?function(e){const t=document.querySelectorAll(e);return t.item(t.length-1)}(e.value||e.css_query):e.xpath?(t=e.value||e.xpath,null===(r=V(t,n))||void 0===r?void 0:r.pop()):void 0;var t,n,r}function w(e){return e.css_query?document.querySelector(e.value||e.css_query):e.xpath?j(e.value||e.xpath):void 0}function V(e,t=document,n=!0){t=void 0!==t?t:document;const r=[];let i;try{i=document.evaluate(e,t,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null)}catch(e){if(n&&e instanceof DOMException)return console.log(e),[];throw e}for(let e=0,t=i.snapshotLength;e<t;++e)r.push(i.snapshotItem(e));return r}function j(e,t=document,n=!0){t=void 0!==t?t:document;try{return document.evaluate(e,t,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(e){if(n&&e instanceof DOMException)return console.log(e),null;throw e}}function H(e){var t;if("input"===_(e)&&"hidden"===(null===(t=e.type)||void 0===t?void 0:t.toLowerCase()))return!1;if(!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))return!1;const n=window.getComputedStyle(e);return(!n||"0"!==n.opacity)&&(n&&"none"!==n.display&&"collapse"!==n.visibility&&"hidden"!==n.visibility)}function k(e){var t;return"#document-fragment"===(null===(t=M(e))||void 0===t?void 0:t.nodeName)}t.createBaseEventMessage=d,t.createIgnoredDomElement=function(e){const n=document.createElement(e);return n.className=t.MABL_IGNORE_ELEMENT_CLASS,n},t.getIdFromElement=E,t.getNameFromElement=function(e){return f(e.name)},t.getTagNameFromElement=_,t.getNodeNameFromElement=p,t.getElementValueFromElement=m,t.getSelectedIndexFromElement=function(e){return e.selectedIndex},t.getClassNameFromElement=R,t.getSelectedTextFromElement=function(e){var t;if("select"===_(e)&&(null==e?void 0:e.selectedOptions)&&!((null===(t=null==e?void 0:e.selectedOptions)||void 0===t?void 0:t.length)<1))return e.selectedOptions[0].innerText},t.getAttributePropertyMap=function(e){const t={};for(const n in e)try{const i=e[n],o=typeof i;if(r.ALLOWED_ASSERTIBLE_ATTRS_PROPS.includes(n)&&r.ASSERTIBLE_ATTRIBUTE_TYPES.includes(o)){if(null==i||"string"===o&&!i.length&&"value"!==n)continue;t[n]=y(i.toString(),!1)}}catch(e){console.error("Could not process an attribute/property for element",e)}return e.getAttributeNames().forEach(n=>{if(!(null==t?void 0:t.hasOwnProperty(n))){const r=e.getAttribute(n);t[n]=y(r||"",!1)}}),s.forEach(n=>{const r=n.extractor(e);r&&(t[n.propertyName]=r)}),t},t.getIframesInfo=function(){const e=[];return[].forEach.call(document.getElementsByTagName("iframe"),n=>{if(!t.MABL_INSERTED_ELEMENTS.includes(n.id)){const t=d(n,"record","switch-context-to",A(n));t.absoluteSrc=n.src,e.push(t)}}),e},t.createXPathFromElement=A,t.compactWhitespace=g,t.getTextFromElement=h,t.getSlotTextFromElement=T,t.truncateText=v,t.normalizeText=y,t.getLabelForInput=I,t.getInputLabelFromElement=O,t.getAnchorHrefFromElement=S,t.getPlaceholderFromElement=N,t.getInputTypeFromElement=P,t.isInputField=L,t.isTextField=function(e){const t=_(e),n=e.type;return"input"===t&&!a.includes(n)||"textarea"===t},t.isFileInput=function(e){const t=_(e),n=(e.type||"").toLowerCase();return"input"===t&&"file"===n},t.isSelect=function(e){return"select"===_(e)},t.getAncestorElements=function(e,t=0,n=[]){const r=[],i=n.map(e=>e.toLowerCase());let o=null==e?void 0:e.parentElement;for(;o&&(t<=0||r.length<t);)i.includes(_(o))||r.push(o),o=o.parentElement;return r},t.sanitizeXPath=D,t.createXpathFromPathArray=function(e){return D("//"+e.map((e,t,n)=>{const r=p(e);if(!r)return"";const i=n[t+1];return"#document"!==r&&i&&i?x(e,i):""}).reduce((e,t)=>""===t?e:`${t}/${e}`))},t.maybeGetRootNode=M,t.xpathElement=x,t.renderSelectionOverlay=function(e){const n=document.createElement("div");n.id=t.MABL_OVERLAY_ID,n.classList.add(i),n.setAttribute("style","\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(24,197,207,0.25);\n z-index: 2147483646;\n cursor: pointer;\n display:block;");const r=document.createElement("div");r.classList.add(i),r.innerText=e,r.setAttribute("style","\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 50px;\n color: white;\n transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);"),n.appendChild(r);const o=C();n.appendChild(o);try{document.body.appendChild(n)}catch(e){document.documentElement.appendChild(n)}},t.positionSelectionHighlight=function(e){const n=document.elementsFromPoint(e.clientX,e.clientY).find(e=>!e.classList.contains(i));if(!n)return;const r=n.getBoundingClientRect(),o=document.getElementById(t.MABL_HIGHLIGHT_ID);o&&(o.style.left=G(r.x),o.style.top=G(r.y),o.style.width=G(r.width),o.style.height=G(r.height))},t.highlightElement=F,t.highlightElements=function(e){const n=t.MABL_HIGHLIGHT_ID+"-parent";let r=document.getElementById(n);r&&U(r),r=document.createElement("div"),r.id=n,e.length>0&&e.forEach((e,t)=>{F(e,t,r)});const o=document.getElementById(t.MABL_OVERLAY_ID),a=document.createElement("div");a.classList.add(i),a.innerText=e.length+" elements found",a.setAttribute("style","\n position: absolute;\n top: 60%;\n left: 50%;\n font-size: 40px;\n color: white;\n transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);"),r.appendChild(a),o.appendChild(r)},t.destroySelectionOverlay=function(){B(t.MABL_OVERLAY_ID)},t.removeOverlayById=B,t.adjustTarget=function(e,t){let n=e,r=null==t?void 0:t.slice();for(;n&&!(n instanceof HTMLElement);)n=n.parentElement,null==r||r.pop();const i=function(e,t){const n=_(e);if("button"!==n&&"input"!==n){let e;t.forEach((t,n)=>{var r;const i=null!==(r=_(t))&&void 0!==r?r:"";e||"button"!==i&&"input"!==i||(e=n)}),e&&(t=t.slice(e))}return t}(e,r);return i!==r&&(n=i[0],r=i),function(e){return"html"===_(e)}(n)&&(n=void 0,r=void 0),{path:r,target:n}},t.selectOption=function(e,t,n){e.focus(),"any"===t?e.options.length>1&&0===e.selectedIndex?e.selectedIndex=1:e.selectedIndex=0:e.selectedIndex=[...e.options].findIndex(e=>e.innerText===n),e.dispatchEvent(new Event("change")),e.blur();const r=new InputEvent("input");e.dispatchEvent(r)},t.getElementMatchingSelectionTarget=function(e){return"primarySelectors"in e.find?"find_last"===e.find.type?X(e.find.primarySelectors):w(e.find.primarySelectors):e.xPath?j(e.xPath):void 0},t.destroyElement=U,t.getAllElementBySelectors=function(e){try{if(e.css_query)return document.querySelectorAll(e.value||e.css_query);if(e.xpath)return V(e.value||e.xpath)}catch(e){}return[]},t.getLastElementBySelectors=X,t.getFirstElementBySelectors=w,t.getAllElementsByXpath=V,t.getElementByXpath=j,t.getInnerText=function e(t){const n=_(t)||"";return"select"!==n&&"option"!==n&&"optgroup"!==n?t.innerText||"":H(t)?[("option"===n?t.innerText||t.text:t.innerText)||"",Array.from(t.childNodes||[]).map(e).filter(e=>e).join(" ")].filter(e=>e).join(" "):""},t.isDisplayed=H,t.isExpectedToBeInvisible=function(e){var t;return"input"===_(e)&&"file"===(null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.toLowerCase())},t.isElementInShadowRoot=k,t.removeParentElements=function(e){return e?e.filter(t=>!e.some(e=>t!==e&&t.contains(e))):[]},t.getParentElements=function(e){const t=[];let n=e.parentElement;for(;n;)t.push(n),n=n.parentElement;return t}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isVariable=t.namespace=t.extractVariableObjectByName=t.resolveVariableValue=t.VariableSource=t.VariableType=void 0;const i=r(n(8)),o=n(0);function a(e,t){try{return e[t]||e["user."+t]}catch(e){return}}function l(e,t){const n=e.indexOf(t);return n<0?[e,void 0]:[e.substr(0,n),e.substr(n+1)]}function c(e){return!!e&&"object"==typeof e}!function(e){e.INPUT="input",e.MABL_MAILBOX="mablMailbox",e.JAVASCRIPT="javascript",e.GENERATED="generated",e.ELEMENT_PROPERTY="elementProperty",e.ELEMENT_COUNT="elementCount"}(t.VariableType||(t.VariableType={})),function(e){e.PLAN="Plan",e.JOURNEY_VAR="Default value",e.RUNTIME="Runtime",e.DDT="DataTable",e.ENV="Environment",e.MABL_MAIL="mabl Mailbox",e.JAVASCRIPT="JavaScript",e.ELEMENT_PROP="Element property",e.API="API step",e.ELEMENT_COUNT="Element count",e.FLOW_PARAMETER="Flow parameter",e.TEST_RUN="Test run",e.TEMPLATE="String template"}(t.VariableSource||(t.VariableSource={})),t.resolveVariableValue=function(e,t,n=(e=>null==e?void 0:e.value)){let r,l=a(t,e);if(!l&&(e.includes(".")||e.includes("["))){const n=[e.indexOf("["),e.indexOf(".")].filter(e=>e>=0).reduce((e,t)=>Math.min(e,t));if(l=a(t,e.slice(0,n)),l){const t="."===e[n]?1:0;r=e.slice(n+t,e.length)}}let c=n(l);return c&&r&&(0,o.isNestableElement)(c)&&(c=(0,i.default)(c,r)),c},t.extractVariableObjectByName=a,t.namespace=function e(t={}){return new Proxy(t,{get(e,t){if("string"==typeof t){const[n,r]=l(t,".");return r?c(e[n])?e[n][r]:void 0:e[n]}return Reflect.get(e,t)},set(t,n,r){if("string"==typeof n){const[i,o]=l(n,".");return o?((null==t?void 0:t.hasOwnProperty(i))||(t[i]=e()),t[i][o]=r,!0):(t[i]=r,!0)}return Reflect.set(t,n,r),!0},deleteProperty(e,t){if("string"==typeof t){const[n,r]=l(t,".");return r?!c(e[n])||delete e[n][r]:((null==e?void 0:e.hasOwnProperty(n))&&delete e[n],!0)}return Reflect.deleteProperty(e,t)},has(e,t){if("string"==typeof t){const[n,r]=l(t,".");return r?n in e&&c(e[n])&&r in e[n]:n in e}return Reflect.has(e,t)}})},t.isVariable=function(e){return void 0!==e.variableType&&void 0!==e.name}},function(e,t){var n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/,i=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,l=/^\[object .+?Constructor\]$/,c="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,s=c||u||Function("return this")();var d,E=Array.prototype,f=Function.prototype,_=Object.prototype,p=s["__core-js_shared__"],m=(d=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",R=f.toString,A=_.hasOwnProperty,g=_.toString,b=RegExp("^"+R.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),h=s.Symbol,T=E.splice,v=C(s,"Map"),y=C(Object,"create"),I=h?h.prototype:void 0,O=I?I.toString:void 0;function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function D(e,t){for(var i,o=0,a=(t=function(e,t){if(U(e))return!1;var i=typeof e;if("number"==i||"symbol"==i||"boolean"==i||null==e||w(e))return!0;return r.test(e)||!n.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:U(i=t)?i:F(i)).length;null!=e&&o<a;)e=e[G(t[o++])];return o&&o==a?e:void 0}function M(e){return!(!X(e)||(t=e,m&&m in t))&&(function(e){var t=X(e)?g.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:l).test(function(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function x(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function C(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return M(n)?n:void 0}S.prototype.clear=function(){this.__data__=y?y(null):{}},S.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},S.prototype.get=function(e){var t=this.__data__;if(y){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return A.call(t,e)?t[e]:void 0},S.prototype.has=function(e){var t=this.__data__;return y?void 0!==t[e]:A.call(t,e)},S.prototype.set=function(e,t){return this.__data__[e]=y&&void 0===t?"__lodash_hash_undefined__":t,this},N.prototype.clear=function(){this.__data__=[]},N.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0)&&(n==t.length-1?t.pop():T.call(t,n,1),!0)},N.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},N.prototype.has=function(e){return L(this.__data__,e)>-1},N.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},P.prototype.clear=function(){this.__data__={hash:new S,map:new(v||N),string:new S}},P.prototype.delete=function(e){return x(this,e).delete(e)},P.prototype.get=function(e){return x(this,e).get(e)},P.prototype.has=function(e){return x(this,e).has(e)},P.prototype.set=function(e,t){return x(this,e).set(e,t),this};var F=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(w(e))return O?O.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return i.test(e)&&n.push(""),e.replace(o,(function(e,t,r,i){n.push(r?i.replace(a,"$1"):t||e)})),n}));function G(e){if("string"==typeof e||w(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(B.Cache||P),n}B.Cache=P;var U=Array.isArray;function X(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==g.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:D(e,t);return void 0===r?n:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNormalizedFindDescriptor=t.mapHintsToFindDescriptor=t.mapWaitUntilToPropertyPreferences=t.getAncestorDescriptor=t.isAncestor=t.matchesAncestorXpath=t.computeRelativeXpath=t.isRelativeXpath=t.findIsWaitUntil=t.descriptorHasIntendedProperties=t.descriptorHasWaitTimeout=t.findIsRepeatedElements=t.descriptorHasOrdinalPreference=t.getWaitUntilTimeoutMs=t.compareStrings=t.getEffectiveSelectorValue=t.getComparator=t.isFindCustomDescriptor=t.ConfidenceLevel=t.PropertyComparator=t.isFindElementType=t.isFindType=t.FindType=t.isFindElementDescriptor=t.isFindOptions=t.ElementExpectation=void 0;const r=n(3);var i,o;function a(e){return[i.FIND_ANY,i.FIND_FIRST,i.FIND_LAST,i.FIND_ONE,i.FIND_ALL].some(t=>t===e)}function l(e){var t,n;return void 0!==(null===(n=null===(t=e.configuration)||void 0===t?void 0:t.ordinalPreference)||void 0===n?void 0:n.position)}function c(e){var t,n;return void 0!==(null===(n=null===(t=e.findOptions)||void 0===t?void 0:t.waitUntil)||void 0===n?void 0:n.timeoutSeconds)}function u(e){var t,n,r,i;return Object.values((null===(t=e.configuration)||void 0===t?void 0:t.propertyPreferences)||{}).some(e=>null==e?void 0:e.intended)||((null===(i=null===(r=null===(n=e.findOptions)||void 0===n?void 0:n.waitUntil)||void 0===r?void 0:r.properties)||void 0===i?void 0:i[e.selector.uuid])||[]).length>0}function s(e,t,n){return t+n.substring(1)===e}function d(e,t){return!!(e.selector.relative_xpath&&e.selector.xpath&&t.selector.xpath&&s(e.selector.xpath,t.selector.xpath,e.selector.relative_xpath))}function E(e,t){return!!(e.selector.relative_xpath&&!e.selector.findable_ancestor_uuid||e.selector.findable_ancestor_uuid===t.selector.uuid||d(e,t))}function f(e,t={}){const n={...t};for(const i of e)if((0,r.isSimpleElementSelectorCommonKeys)(i)){const e={...t[i]||{},intended:!0};n[i]=e}return n}function _(e,t){var n;const r=(null==t?void 0:t[e.selector.uuid])||[],i=null===(n=e.configuration)||void 0===n?void 0:n.propertyPreferences;return{...e,configuration:{...e.configuration,propertyPreferences:f(r,i)}}}!function(e){e.MISSING="missing",e.PRESENT="present"}(t.ElementExpectation||(t.ElementExpectation={})),t.isFindOptions=function(e){return e&&(void 0===e.waitUntil||function(e){return e&&void 0!==e.timeoutSeconds&&void 0!==e.properties}(e.waitUntil))},t.isFindElementDescriptor=function(e){return e&&a(e.findType)},function(e){e.FIND_ALL="find_all",e.FIND_ANY="find_any",e.FIND_COOKIE="find_cookie",e.FIND_EMAIL="find_email",e.FIND_FIRST="find_first",e.FIND_LAST="find_last",e.FIND_ONE="find_one",e.FIND_TAB="find_tab"}(i=t.FindType||(t.FindType={})),function(e){e.fromString=function(t){const n=t;if(!Object.values(e).includes(n))throw new Error("No FindType match found for value: "+t);return n}}(i=t.FindType||(t.FindType={})),t.isFindType=function(e){return!!Object.values(i).find(t=>t===e)},t.isFindElementType=a,function(e){e.EQUALS="equals",e.CONTAINS="contains"}(o=t.PropertyComparator||(t.PropertyComparator={})),function(e){e.LOW="low",e.MEDIUM="medium",e.HIGH="high",e.UNKNOWN="unknown"}(t.ConfidenceLevel||(t.ConfidenceLevel={})),t.isFindCustomDescriptor=function(e){return e&&"object"==typeof e&&"string"==typeof e.findType&&[i.FIND_ALL,i.FIND_FIRST,i.FIND_LAST,i.FIND_ANY,i.FIND_ALL].includes(e.findType)},t.getComparator=function(e,t){var n;return(null===(n=null==t?void 0:t[e])||void 0===n?void 0:n.comparator)||o.EQUALS},t.getEffectiveSelectorValue=function(e,t,n){const r=null==n?void 0:n[e],i=(null==r?void 0:r.intended)&&(null==r?void 0:r.value)?null==r?void 0:r.value:t[e];return"string"==typeof i?i:void 0},t.compareStrings=function(e,t,n){return!(!e||!t)&&(n&&n!==o.EQUALS?n===o.CONTAINS&&t.includes(e):e===t)},t.getWaitUntilTimeoutMs=function(e){var t,n,r,i;return(null===(n=null===(t=e.findOptions)||void 0===t?void 0:t.waitUntil)||void 0===n?void 0:n.timeoutSeconds)?1e3*(null===(i=null===(r=e.findOptions)||void 0===r?void 0:r.waitUntil)||void 0===i?void 0:i.timeoutSeconds):void 0},t.descriptorHasOrdinalPreference=l,t.findIsRepeatedElements=function(e){return l(e)||(e.auxiliaryDescriptors||[]).some(l)},t.descriptorHasWaitTimeout=c,t.descriptorHasIntendedProperties=u,t.findIsWaitUntil=function(e){return c(e)&&(u(e)||((null==e?void 0:e.auxiliaryDescriptors)||[]).some(u))},t.isRelativeXpath=s,t.computeRelativeXpath=function(e,t){if(e.startsWith(t)&&e.length>t.length)return"."+e.substring(t.length)},t.matchesAncestorXpath=d,t.isAncestor=E,t.getAncestorDescriptor=function(e){var t;if(e.auxiliaryDescriptors&&e.auxiliaryDescriptors.length>0){const n=e.auxiliaryDescriptors.filter(t=>E(e,t));if(n.length>0){const r=n[0],i=(e.auxiliaryDescriptors||[]).filter(e=>e!==r),o={...r},a=e.selector;return"#document-fragment"===(null===(t=a.currentContextNode)||void 0===t?void 0:t.nodeName)&&(o.selector.currentContextNode=a.currentContextNode),{...e.type?{type:e.type}:{},...e.findOptions?{findOptions:e.findOptions}:{},...o,auxiliaryDescriptors:i}}}},t.mapWaitUntilToPropertyPreferences=function(e){var t;return(null===(t=e.findOptions)||void 0===t?void 0:t.waitUntil)&&Object.keys(e.findOptions.waitUntil.properties).length?function(e,t){const n=_(e,t),r=(e.auxiliaryDescriptors||[]).map(e=>_(e,t));return r.length&&(n.auxiliaryDescriptors=r),n}(e,e.findOptions.waitUntil.properties):e},t.mapHintsToFindDescriptor=function(e){var t,n;if(null===(n=null===(t=e.findOptions)||void 0===t?void 0:t.hints)||void 0===n?void 0:n.selectorSubstitutions){const t=e.findOptions.hints.selectorSubstitutions[e.selector.uuid];if(t&&(e.selector={...e.selector,...t},e.overrides))for(const n of e.overrides)n.selector={...n.selector,...t}}return e},t.isNormalizedFindDescriptor=function(e){return"object"==typeof e&&(null==e?void 0:e.selector)&&(0,r.isStandardSelector)(e.selector)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCustomFindDescriptor=t.isFindOneDescriptor=void 0,t.isFindOneDescriptor=function(e){return e&&!e.foundElementSelectors&&!!e.selector},t.isCustomFindDescriptor=function(e){return!!(null==e?void 0:e.primarySelectors)}}])}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.domUtil=t():e.domUtil=t()}(global,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containsMablTemplatePattern=t.isString=t.isNestableElement=t.LONE_VARIABLE_REGEXP=t.FAKER_FORMAT_IN_EXPRESSION_REGEX_CREATE=t.FAKER_EXPRESSION_REGEXP_CREATE=t.FAKER_EXPRESSION_NAMED_GROUP=t.FAKER_EXPRESSION=t.FAKE_NAMESPACE=t.FAKER_GROUP_NAME=t.RANDOM_FORMAT_IN_EXPRESSION_REGEXP_CREATE=t.RANDOM_FORMAT_REGEXP_CREATE=t.RANDOM_FORMAT=t.LENGTH_GROUP=t.LENGTH_GROUP_NAME=t.ALPHABET_GROUP=t.RANDOM_STRING_CHOICES=t.ALPHABET_GROUP_NAME=t.CURRENT_DATE_REGEXP_CREATE=t.CURRENT_DATE_NAME_GROUP=t.CURRENT_DATE_GROUP_NAME=t.VARIABLE_IN_EXPRESSION_REGEXP_CREATE=t.SINGLE_VARIABLE_REGEX_CREATE=t.VARIABLE_GROUP=t.VARIABLE_GROUP_NAME=t.EXCLUDED_USER_VARIABLE_NAMES=t.ALL_VARIABLE_REGEXP_CREATE=t.COMPOUND_VARIABLE_PATTERN=t.USER_VARIABLE_REGEXP_CREATE=t.VARIABLE_REGEXP=t.INDEX_EXPRESSION_REGEXP=t.DOUBLE_QUOTED_IDENTIFIER_REGEXP=t.SINGLE_QUOTED_IDENTIFIER_REGEXP=t.ARRAY_INDEX_REGEXP=t.IDENTIFIER_REGEXP=t.USER_NAMESPACE_REGEXP=t.PATTERN_REGEXP=t.patternRanges=void 0,t.patternRanges={alpha:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",alphaLower:"abcdefghijklmnopqrstuvwxyz",alphaUpper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",digit:"0123456789",alnum:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},t.PATTERN_REGEXP=/{{([^{}]*)}}/gi,t.USER_NAMESPACE_REGEXP=/^user\./g,t.IDENTIFIER_REGEXP="[a-zA-Z_][a-zA-Z0-9_]*",t.ARRAY_INDEX_REGEXP="[0-9]+",t.SINGLE_QUOTED_IDENTIFIER_REGEXP=`'${t.IDENTIFIER_REGEXP}'`,t.DOUBLE_QUOTED_IDENTIFIER_REGEXP=`"${t.IDENTIFIER_REGEXP}"`,t.INDEX_EXPRESSION_REGEXP=`\\[(?:${t.ARRAY_INDEX_REGEXP}|${t.SINGLE_QUOTED_IDENTIFIER_REGEXP}|${t.DOUBLE_QUOTED_IDENTIFIER_REGEXP})\\]`,t.VARIABLE_REGEXP=`${t.IDENTIFIER_REGEXP}(?:${t.INDEX_EXPRESSION_REGEXP})*`;t.USER_VARIABLE_REGEXP_CREATE=()=>RegExp("^"+t.IDENTIFIER_REGEXP+"$"),t.COMPOUND_VARIABLE_PATTERN=`(${t.VARIABLE_REGEXP})(\\.(${t.VARIABLE_REGEXP}))*`;t.ALL_VARIABLE_REGEXP_CREATE=()=>RegExp("^"+t.COMPOUND_VARIABLE_PATTERN+"$"),t.EXCLUDED_USER_VARIABLE_NAMES=["user","web","mail","api"],t.VARIABLE_GROUP_NAME="variable",t.VARIABLE_GROUP="(?<"+t.VARIABLE_GROUP_NAME+">"+t.COMPOUND_VARIABLE_PATTERN+")";t.SINGLE_VARIABLE_REGEX_CREATE=()=>RegExp("{{@"+t.VARIABLE_GROUP+"}}");t.VARIABLE_IN_EXPRESSION_REGEXP_CREATE=()=>RegExp("@"+t.VARIABLE_GROUP,"g"),t.CURRENT_DATE_GROUP_NAME="date",t.CURRENT_DATE_NAME_GROUP="(?<"+t.CURRENT_DATE_GROUP_NAME+">date)";t.CURRENT_DATE_REGEXP_CREATE=()=>RegExp("{{"+t.CURRENT_DATE_NAME_GROUP+"(:iso)?}}"),t.ALPHABET_GROUP_NAME="alphabet",t.RANDOM_STRING_CHOICES=Object.keys(t.patternRanges).join("|"),t.ALPHABET_GROUP="(?<"+t.ALPHABET_GROUP_NAME+">"+t.RANDOM_STRING_CHOICES+")",t.LENGTH_GROUP_NAME="length",t.LENGTH_GROUP="(?<"+t.LENGTH_GROUP_NAME+">[\\d]+)",t.RANDOM_FORMAT=t.ALPHABET_GROUP+":"+t.LENGTH_GROUP;t.RANDOM_FORMAT_REGEXP_CREATE=()=>RegExp("{{"+t.RANDOM_FORMAT+"}}");t.RANDOM_FORMAT_IN_EXPRESSION_REGEXP_CREATE=()=>RegExp(t.RANDOM_FORMAT,"g"),t.FAKER_GROUP_NAME="faker",t.FAKE_NAMESPACE="fake.",t.FAKER_EXPRESSION=t.FAKE_NAMESPACE+"[a-zA-Z]+\\.[a-zA-Z]+(\\((\\d+)\\))?",t.FAKER_EXPRESSION_NAMED_GROUP="(?<"+t.FAKER_GROUP_NAME+">{{"+t.FAKER_EXPRESSION+"}})";t.FAKER_EXPRESSION_REGEXP_CREATE=()=>RegExp(t.FAKER_EXPRESSION_NAMED_GROUP);t.FAKER_FORMAT_IN_EXPRESSION_REGEX_CREATE=()=>RegExp("("+t.FAKER_EXPRESSION+")","g"),t.LONE_VARIABLE_REGEXP="^{{@"+t.VARIABLE_GROUP+"}}$",t.isNestableElement=function(e){return e instanceof Object||e instanceof Array},t.isString=function(e){return e&&e instanceof String||"string"==typeof e},t.containsMablTemplatePattern=function(e){return!!e&&e.search(t.PATTERN_REGEXP)>=0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MablscriptUtils=t.replaceVariables=t.findVariables=t.b64DecodeUnicode=t.b64EncodeUnicode=t.buildStepArgumentString=t.isValidVariableName=t.isValidUserVariableName=t.getVariableNameFromLoneVariablePattern=t.isLoneVariablePattern=t.unescapeMablscriptString=t.escapeMablscriptString=void 0;const a=n(0);function l(e){return"string"==typeof e?e.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/"/g,'\\"').replace(/\r/g,""):""}function c(e){return!!e&&RegExp(a.LONE_VARIABLE_REGEXP).test(e)}t.escapeMablscriptString=l,t.unescapeMablscriptString=function(e){return"string"==typeof e?e.replace(/\\"/g,'"').replace(/\\n/g,"\n").replace(/\\\\/g,"\\"):""},t.isLoneVariablePattern=c,t.getVariableNameFromLoneVariablePattern=function(e){var t,n;if(c(e)){const r=RegExp(a.LONE_VARIABLE_REGEXP);return null===(n=null===(t=e.match(r))||void 0===t?void 0:t.groups)||void 0===n?void 0:n[a.VARIABLE_GROUP_NAME]}},t.isValidUserVariableName=function(e){return!!e&&((0,a.USER_VARIABLE_REGEXP_CREATE)().test(e)&&-1===a.EXCLUDED_USER_VARIABLE_NAMES.indexOf(e))},t.isValidVariableName=function(e){return!!e&&(0,a.ALL_VARIABLE_REGEXP_CREATE)().test(e)},t.buildStepArgumentString=function e(t){switch(typeof t){case"string":return`"${l(t)}"`;case"boolean":case"number":return""+t;case"object":{if(t instanceof Array)return`[${t.map(e).join(",")}]`;const n=[];return Object.keys(t).forEach(r=>{const i=e(t[r]);"string"==typeof r&&r&&"string"==typeof i&&i&&n.push(`"${r}":${i}`)}),n.sort(),`{${n.join(",")}}`}default:return}},t.b64EncodeUnicode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt("0x"+t,16))})))},t.b64DecodeUnicode=function(e){try{return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}catch(t){return atob(e)}},t.findVariables=function(e){const t=null==e?void 0:e.match(a.PATTERN_REGEXP);return(null==t?void 0:t.reduce((e,t)=>{const n=null==t?void 0:t.match((0,a.VARIABLE_IN_EXPRESSION_REGEXP_CREATE)());return null==n||n.forEach(t=>e.push(t.substring(1))),e},[]))||[]},t.replaceVariables=function(e,t){return null===e?null:null==e?void 0:e.replace(a.PATTERN_REGEXP,e=>e.replace((0,a.VARIABLE_IN_EXPRESSION_REGEXP_CREATE)(),t))},t.MablscriptUtils=o(n(1))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_ATTR_PROPS_OPTIONS=t.ALLOWED_ASSERTIBLE_ATTRS_PROPS=t.ASSERTIBLE_ATTRIBUTE_TYPES=void 0,t.ASSERTIBLE_ATTRIBUTE_TYPES=["string","number","boolean"],t.ALLOWED_ASSERTIBLE_ATTRS_PROPS=["accessKey","accessKeyLabel ","align","alt","aria-checked","aria-label","aria-labelledby","aria-disabled","autofocus","border","checked","class","className","clientHeight","clientLeft","clientTop","clientWidth","complete","computedName","computedRole","contentEditable","contextMenu","crossOrigin","currentSrc","dataset ","defaultChecked","defaultValue","dir","disabled","draggable","formEncType","formMethod","formNoValidate","formTarget","height","hidden","href","hspace","id","indeterminate","inert","innerText","isContentEditable ","isMap","itemId ","itemScope ","lang","length","localName","longDesc","lowSrc","maxLength","multiple","name","namespaceURI","naturalHeight","naturalWidth","noModule","offsetHeight ","offsetLeft","offsetTop","offsetWidth","prefix","referrerPolicy","required","selectedIndex","size","sizes","slot","src","srcset","tabIndex","tagName","title","translate","type","validationMessage","validity","value","vspace","width","willValidate"],t.ALL_ATTR_PROPS_OPTIONS={},t.ALLOWED_ASSERTIBLE_ATTRS_PROPS.forEach(e=>t.ALL_ATTR_PROPS_OPTIONS[e]="")},function(e,t){var n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/,i=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,l=/^\[object .+?Constructor\]$/,c="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,s=c||u||Function("return this")();var d,E=Array.prototype,f=Function.prototype,_=Object.prototype,p=s["__core-js_shared__"],m=(d=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",b=f.toString,A=_.hasOwnProperty,g=_.toString,R=RegExp("^"+b.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),h=s.Symbol,y=E.splice,v=C(s,"Map"),T=C(Object,"create"),I=h?h.prototype:void 0,O=I?I.toString:void 0;function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function M(e,t){for(var i,o=0,a=(t=function(e,t){if(B(e))return!1;var i=typeof e;if("number"==i||"symbol"==i||"boolean"==i||null==e||X(e))return!0;return r.test(e)||!n.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:B(i=t)?i:F(i)).length;null!=e&&o<a;)e=e[G(t[o++])];return o&&o==a?e:void 0}function D(e){return!(!V(e)||(t=e,m&&m in t))&&(function(e){var t=V(e)?g.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?R:l).test(function(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function x(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function C(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return D(n)?n:void 0}S.prototype.clear=function(){this.__data__=T?T(null):{}},S.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},S.prototype.get=function(e){var t=this.__data__;if(T){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return A.call(t,e)?t[e]:void 0},S.prototype.has=function(e){var t=this.__data__;return T?void 0!==t[e]:A.call(t,e)},S.prototype.set=function(e,t){return this.__data__[e]=T&&void 0===t?"__lodash_hash_undefined__":t,this},N.prototype.clear=function(){this.__data__=[]},N.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0)&&(n==t.length-1?t.pop():y.call(t,n,1),!0)},N.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},N.prototype.has=function(e){return L(this.__data__,e)>-1},N.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},P.prototype.clear=function(){this.__data__={hash:new S,map:new(v||N),string:new S}},P.prototype.delete=function(e){return x(this,e).delete(e)},P.prototype.get=function(e){return x(this,e).get(e)},P.prototype.has=function(e){return x(this,e).has(e)},P.prototype.set=function(e,t){return x(this,e).set(e,t),this};var F=U((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(X(e))return O?O.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return i.test(e)&&n.push(""),e.replace(o,(function(e,t,r,i){n.push(r?i.replace(a,"$1"):t||e)})),n}));function G(e){if("string"==typeof e||X(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function U(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(U.Cache||P),n}U.Cache=P;var B=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function X(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==g.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.extractVariableNameFromPath=t.resolveVariable=t.sanitizeUserVariableName=t.addUserNamespace=t.removeUserNamespace=t.USER_NAMESPACE=t.createDottedNamedMap=void 0;const i=r(n(3)),o=n(1),a=n(0);function l(e,t){const n=e.indexOf(t);return n<0?[e,void 0]:[e.substr(0,n),e.substr(n+1)]}function c(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function u(e){return function(e,t){if(e.startsWith(t))return e.substring(t.length);return e}(e,t.USER_NAMESPACE)}function s(e){return function(e,t){if(e.startsWith(t))return e;return`${t}${e}`}(e,t.USER_NAMESPACE)}function d(e,t){return Object.keys(t).find(t=>e.startsWith(t)&&(e.length===t.length||"["===e[t.length]||"."===e[t.length]))}t.createDottedNamedMap=function e(t={}){return new Proxy(t,{get(e,t){if("string"==typeof t){const[n,r]=l(t,".");return r?c(e[n])?e[n][r]:void 0:e[n]}return Reflect.get(e,t)},set(t,n,r){if("string"==typeof n){const[i,o]=l(n,".");return o?((null==t?void 0:t.hasOwnProperty(i))||(t[i]=e()),t[i][o]=r,!0):(t[i]=r,!0)}return Reflect.set(t,n,r),!0},deleteProperty(e,t){if("string"==typeof t){const[n,r]=l(t,".");return r?!c(e[n])||delete e[n][r]:((null==e?void 0:e.hasOwnProperty(n))&&delete e[n],!0)}return Reflect.deleteProperty(e,t)},has(e,t){if("string"==typeof t){const[n,r]=l(t,".");return r?n in e&&c(e[n])&&r in e[n]:n in e}return Reflect.has(e,t)}})},t.USER_NAMESPACE="user.",t.removeUserNamespace=u,t.addUserNamespace=s,t.sanitizeUserVariableName=function(e){if(!e)return;const t=u(s(e));return(0,o.isValidUserVariableName)(t)?s(t):void 0},t.resolveVariable=function(e,n,r){let o=e,l=d(e,n);if(l||(o=t.USER_NAMESPACE+e,l=d(o,n)),l){let e=r(n[l]),t=o.slice(l.length);if(t.endsWith(".")||/^\.{2,}/.test(t))return;return t=t.replace(/^\.*/,""),t&&(e=(0,a.isNestableElement)(e)?(0,i.default)(e,t):void 0),e}},t.extractVariableNameFromPath=d},function(e,t,n){"use strict";function r(e){return void 0!==e.tag_name&&("input"===e.tag_name.toLowerCase()?!e.inputElementType||-1===["radio","button","submit","reset"].indexOf(e.inputElementType.toLowerCase()):-1===["button","option","li","param"].indexOf(e.tag_name.toLowerCase()))}function i(e){return e&&void 0!==e.uuid&&void 0!==e.xpath}Object.defineProperty(t,"__esModule",{value:!0}),t.areSelectorsEqual=t.isCompositeSelector=t.isStandardSelectorAndContext=t.isStandardSelector=t.isCookieSelector=t.isEmailSelector=t.isTabSelector=t.isCssSelector=t.isXPathSelector=t.ignoreValueAttribute=t.SELECTOR_ATTRIBUTE_KEYS=t.SELECTOR_EQUIVALENCE_IGNORED_KEYS=t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP=t.isSimpleElementSelectorCommonKeys=void 0,t.isSimpleElementSelectorCommonKeys=function(e){return"string"==typeof e&&!["css_query","repeat_xpaths","selector_type","tag_name","uuid","xpath"].includes(e)},t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP={elementId:"id",name:"name",href:"href",inputElementType:"inputElementType",label:"label",placeholder:"placeholder",tagName:"tag_name",text:"text",slotText:"slot_text",url:"url",title:"title",uuid:"uuid",xPath:"xpath",cssQuery:"css_query",className:"class_name",src:"src",alt:"alt",form:"form",for:"for_attr",target:"target",inputValue:"value",dataTracking:"data_tracking",titleAttr:"title_attr",ariaLabel:"aria_label",labelAttr:"label_attr",dataAutomationId:"data_automation_id",dataTestId:"data_test_id",dataTestid:"data_testid",testId:"test_id",ngModel:"ng_model",ngShow:"ng_show",ariaOwns:"aria_owns",ariaLabelledby:"aria_labelledby",ngClass:"ng_class",ariaControls:"aria_controls",tabindex:"tabindex",role:"role",maxlength:"maxlength",autocomplete:"autocomplete",height:"height",width:"width",style:"style",boundingX:"bounding_x",boundingY:"bounding_y",boundingHeight:"bounding_height",boundingWidth:"bounding_width",visible:"visible",dataTarget:"data_target",dataValue:"data_value",dataId:"data_id",dataName:"data_name",dataProp:"data_prop",index:"index",item:"item"},t.SELECTOR_EQUIVALENCE_IGNORED_KEYS={aria_owns:()=>!0,bounding_x:()=>!0,bounding_y:()=>!0,bounding_height:()=>!0,bounding_width:()=>!0,class_name:()=>!0,style:()=>!0,title_attr:function(e){if(void 0===e.tag_name)return!1;return["input","textarea"].includes(e.tag_name.toLowerCase())},uuid:()=>!0,value:r},t.SELECTOR_ATTRIBUTE_KEYS=Object.keys(t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP).map(e=>t.PROTOTYPE_TO_SELECTOR_ATTRIBUTE_MAP[e]),t.ignoreValueAttribute=r,t.isXPathSelector=function(e){return e&&void 0!==e.xpath},t.isCssSelector=function(e){return e&&void 0!==e.css_query},t.isTabSelector=function(e){return e&&"tab"===e.selector_type&&void 0!==e.url},t.isEmailSelector=function(e){return e&&"email"===e.selector_type},t.isCookieSelector=function(e){return e&&void 0!==e.name},t.isStandardSelector=i,t.isStandardSelectorAndContext=function(e){return e&&void 0!==e.currentContextNode},t.isCompositeSelector=function(e){return e&&e.length>=1&&e.every(i)},t.areSelectorsEqual=function(e,t){if(void 0===e)return void 0===t;if(void 0===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(7),t)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveVariable=t.isVariableDataType=t.isSimpleObject=t.isLegacyVariable=t.namespace=t.resolveVariableValue=t.LegacyVariableSource=t.VariableType=void 0,i(n(8),t);var o=n(9);Object.defineProperty(t,"VariableType",{enumerable:!0,get:function(){return o.VariableType}}),Object.defineProperty(t,"LegacyVariableSource",{enumerable:!0,get:function(){return o.LegacyVariableSource}}),Object.defineProperty(t,"resolveVariableValue",{enumerable:!0,get:function(){return o.resolveVariableValue}}),Object.defineProperty(t,"namespace",{enumerable:!0,get:function(){return o.namespace}}),Object.defineProperty(t,"isLegacyVariable",{enumerable:!0,get:function(){return o.isLegacyVariable}});var a=n(10);Object.defineProperty(t,"isSimpleObject",{enumerable:!0,get:function(){return a.isSimpleObject}}),Object.defineProperty(t,"isVariableDataType",{enumerable:!0,get:function(){return a.isVariableDataType}});var l=n(4);Object.defineProperty(t,"resolveVariable",{enumerable:!0,get:function(){return l.resolveVariable}}),i(n(2),t),i(n(1),t),i(n(11),t),i(n(5),t),i(n(12),t),i(n(0),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.destroySelectionOverlay=t.highlightElements=t.highlightElement=t.positionSelectionHighlight=t.renderSelectionOverlay=t.xpathElement=t.maybeGetRootNode=t.createXpathFromPathArray=t.sanitizeXPath=t.getAncestorElements=t.isSelect=t.isFileInput=t.isTextField=t.isInputField=t.getInputTypeFromElement=t.getPlaceholderFromElement=t.getAnchorHrefFromElement=t.getInputLabelFromElement=t.getLabelUsingForAttribute=t.getLabelForInput=t.normalizeText=t.truncateText=t.getSlotTextFromElement=t.getTextFromElement=t.compactWhitespace=t.createXPathFromElement=t.getIframesInfo=t.getAttributePropertyMap=t.getSelectedTextFromElement=t.getClassNameFromElement=t.getSelectedIndexFromElement=t.getElementValueFromElement=t.getNodeNameFromElement=t.getTagNameFromElement=t.getNameFromElement=t.getIdFromElement=t.createIgnoredDomElement=t.createBaseEventMessage=t.getAttributeFromElement=t.getPropertyFromElement=t.MAX_ATTRIBUTE_SIZE=t.MAX_SELECTOR_INNER_TEXT_LENGTH=t.MABL_INSERTED_ELEMENTS=t.MABL_SECONDARY_DRAGGABLE_DIV_ID=t.MABL_TERTIARY_IFRAME_ID=t.MABL_IGNORE_ELEMENT_CLASS=t.MABL_DRAGGABLE_DIV_ID=t.MABL_SECONDARY_IFRAME_ID=t.MABL_HIGHLIGHT_ID=t.MABL_OVERLAY_ID=void 0,t.getParentElements=t.removeParentElements=t.isElementInShadowRoot=t.isExpectedToBeInvisible=t.isDisplayed=t.getInnerText=t.getElementByXpath=t.getAllElementsByXpath=t.getFirstElementBySelectors=t.getLastElementBySelectors=t.getAllElementBySelectors=t.destroyElement=t.getElementMatchingSelectionTarget=t.selectOption=t.adjustTarget=t.removeOverlayById=void 0;const r=n(2);t.MABL_OVERLAY_ID="mabl-selection-overlay-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_HIGHLIGHT_ID="mabl-selection-highlight-22b76b1b-4c57-4644-98ab-6f2ff555d1cc";const i="mabl-selection-overlay-22b76b1b-4c57-4644-98ab-6f2ff555d1cc";var o;t.MABL_SECONDARY_IFRAME_ID="mabl-secondary-iframe-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_DRAGGABLE_DIV_ID="mabl-draggable-div-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_IGNORE_ELEMENT_CLASS="mabl-element-ignore-actions",t.MABL_TERTIARY_IFRAME_ID="mabl-tertiary-iframe-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_SECONDARY_DRAGGABLE_DIV_ID="mabl-secondary-draggable-div-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_INSERTED_ELEMENTS=[t.MABL_OVERLAY_ID,t.MABL_HIGHLIGHT_ID,i,"mabl-iframe-22b76b1b-4c57-4644-98ab-6f2ff555d1cc","mabl-iframe-draggable-22b76b1b-4c57-4644-98ab-6f2ff555d1cc",t.MABL_SECONDARY_IFRAME_ID,t.MABL_DRAGGABLE_DIV_ID],function(e){e[e["accessibility-check"]=0]="accessibility-check",e[e["assert-cookie"]=1]="assert-cookie",e[e["assert-email"]=2]="assert-email",e[e["assert-variable"]=3]="assert-variable",e[e["await-tab"]=4]="await-tab",e[e["await-uploads"]=5]="await-uploads",e[e["clear-cookies"]=6]="clear-cookies",e[e.click=7]="click",e[e.click_hold=8]="click_hold",e[e.conditional_else=9]="conditional_else",e[e.conditional_end=10]="conditional_end",e[e["double-click"]=11]="double-click",e[e.download=12]="download",e[e["download-pdf"]=13]="download-pdf",e[e.echo=14]="echo",e[e["end-flow"]=15]="end-flow",e[e["evaluate-js-snippet"]=16]="evaluate-js-snippet",e[e.hover=17]="hover",e[e.input=18]="input",e[e.keypress=19]="keypress",e[e.location=20]="location",e[e["mouse-select"]=21]="mouse-select",e[e.navigation=22]="navigation",e[e["open-email"]=23]="open-email",e[e.release=24]="release",e[e["remove-cookie"]=25]="remove-cookie",e[e["send-http-request"]=26]="send-http-request",e[e["set-cookie"]=27]="set-cookie",e[e["set-files"]=28]="set-files",e[e["set-variable"]=29]="set-variable",e[e["start-flow"]=30]="start-flow",e[e["switch-context-to"]=31]="switch-context-to",e[e["synthetic-click"]=32]="synthetic-click",e[e.url=33]="url",e[e["visit-url"]=34]="visit-url",e[e.viewport=35]="viewport",e[e.wait=36]="wait"}(o||(o={}));const a=["button","checkbox","file","radio","reset","submit"];function l(e,t){return f(e[t])}function c(e,t){return f(e.getAttribute(t))}t.MAX_SELECTOR_INNER_TEXT_LENGTH=300,t.MAX_ATTRIBUTE_SIZE=5e3,t.getPropertyFromElement=l,t.getAttributeFromElement=c;const u=[{name:"src",attribute:"src",handler:l},{name:"elementId",attribute:"id",handler:E},{name:"tagName",handler:_},{name:"text",handler:h},{name:"slotText",handler:y},{name:"label",handler:S},{name:"href",attribute:"href",handler:N},{name:"placeholder",attribute:"placeholder",handler:P},{name:"inputElementType",attribute:"type",handler:L},{name:"inputValue",attribute:"value",handler:m},{name:"className",attribute:"class",handler:b},{name:"visible",handler:function(e){return k(e).toString()}},...[{name:"alt",attribute:"alt"},{name:"form",attribute:"form"},{name:"for",attribute:"for"},{name:"target",attribute:"target"},{name:"name",attribute:"name"},{name:"target",attribute:"target"},{name:"name",attribute:"name"},{name:"dataTracking",attribute:"data-tracking"},{name:"titleAttr",attribute:"title"},{name:"ariaLabel",attribute:"aria-label"},{name:"labelAttr",attribute:"label"},{name:"dataAutomationId",attribute:"data-automation-id"},{name:"dataTestId",attribute:"data-test-id"},{name:"dataTestid",attribute:"data-testid"},{name:"testId",attribute:"test-id"},{name:"ngModel",attribute:"ng-model"},{name:"ngShow",attribute:"ng-show"},{name:"ngClass",attribute:"ng-class"},{name:"ariaOwns",attribute:"aria-owns"},{name:"ariaLabelledby",attribute:"aria-labelledby"},{name:"ariaControls",attribute:"aria-controls"},{name:"tabindex",attribute:"tabindex"},{name:"role",attribute:"role"},{name:"maxlength",attribute:"maxlength"},{name:"autocomplete",attribute:"autocomplete"},{name:"height",attribute:"height"},{name:"width",attribute:"width"},{name:"style",attribute:"style"},{name:"dataTarget",attribute:"data-target"},{name:"dataValue",attribute:"data-value"},{name:"dataId",attribute:"data-id"},{name:"dataName",attribute:"data-name"},{name:"dataProp",attribute:"data-prop"},{name:"index",attribute:"index"},{name:"item",attribute:"item"}].map(e=>({...e,handler:c}))],s=[{propertyName:"slotText",extractor:y}];function d(e,t,n,r,i){const o={action:t,listener:n,xPath:r,context:i};return u.forEach(t=>{const n=t.handler(e,t.attribute||t.name);o[t.name]=n}),o}function E(e){return f(e.id)}function f(e){var n;return("string"!=typeof e||e.length<t.MAX_ATTRIBUTE_SIZE)&&null!==(n=e)&&void 0!==n?n:void 0}function _(e){var t;return null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase()}function p(e){var t;return f(null===(t=null==e?void 0:e.nodeName)||void 0===t?void 0:t.toLowerCase())}function m(e){return f(e.value)}function b(e){return f(e.className)}function A(e){return function e(t,n){const r=null==t?void 0:t.parentElement;if(r){const i=C(t,r);return e(r,`/${i}${n}`)}if($(t)){return D(`//${C(t,t.getRootNode())}${n}`)}return D("//html[1]"+n)}(e,"")}function g(e){var t;return null===(t=null==e?void 0:e.replace(/[ \t\xA0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\n\x0B\f\r\x85\u2028\u2029]+/g," "))||void 0===t?void 0:t.trim()}function R(e){return g(e).substring(0,t.MAX_SELECTOR_INNER_TEXT_LENGTH).replace(/"/g,'\\"')}function h(e){return R(e.innerText||"")}function y(e){const t=e.querySelectorAll("slot");if(1!==t.length)return;const n=t.item(0).assignedNodes().find(e=>e.nodeType===Node.TEXT_NODE);return n?R(n.data):void 0}function v(e,t){var n;return null!==(n=null==e?void 0:e.substring(0,t))&&void 0!==n?n:e}function T(e,n=!0){const r=g(e);return r&&n?v(r,t.MAX_SELECTOR_INNER_TEXT_LENGTH):r}function I(e){if(!e||!M(e))return;const t=e.closest("label");if(t)return t;const n=O(e);if(n)return n;const r=j("(./preceding-sibling::*//descendant-or-self::*[self::input|self::label])[last()]",e);if(r.length>0){const e=r[0];if("label"===_(e)&&!e.getAttribute("for"))return e}const i=j("(../preceding-sibling::*//descendant-or-self::*[self::input|self::label])[last()]",e);if(i.length>0){const e=i[0];if("label"===_(e)&&!e.getAttribute("for"))return e}}function O(e){if((null==e?void 0:e.id)&&-1===(null==e?void 0:e.id.indexOf("\n"))){const t=(""+(e.id||"")).replace(/'/g,"\\'"),n=document.querySelector(`label[for='${t}']`);if(n)return n}}function S(e){const t=I(e);if(t)return h(t)}function N(e){if("a"===_(e))return f(e.href)}function P(e){if(M(e))return f(e.placeholder)}function L(e){if(M(e))return e.type||"text"}function M(e){const t=_(e);return"input"===t||"textarea"===t}function D(e){return(e=e.replace("*[local-name()='#document-fragment']/shadow[1]/body","body[1]")).replace(/#document-fragment\[0]\/shadow\[1]\/body\[0]/,"body[1]")}function x(e){if("function"==typeof e.getRootNode)return e.getRootNode()}function C(e,t){let n;const r=p(e);n=r?e instanceof HTMLElement&&!(null==r?void 0:r.includes(":"))?r:`*[local-name()='${r}']`:"*";const i=function(e,t){let n=-1;const r=p(e);if(!r)return n;for(const i in t)if(null==t?void 0:t.hasOwnProperty(i)){const o=t[i];if(p(o)===r&&(n+=1,o===e))return n}return n}(e,t.children)+1;return i?`${n}[${i}]`:""+n}function F(){const e=document.createElement("div");return e.id=t.MABL_HIGHLIGHT_ID,e.classList.add(i),e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="0",e.style.height="0",e.style.borderStyle="solid",e.style.borderWidth="2px",e.style.borderColor="black",e}function G(e,n,r){const i=e.getBoundingClientRect(),o=F();o.id=`${t.MABL_HIGHLIGHT_ID}-${n}`,o.style.left=U(i.x),o.style.top=U(i.y),o.style.width=U(i.width),o.style.height=U(i.height),r.appendChild(o)}function U(e){return Math.round(e)+"px"}function B(e){const t=document.getElementById(e);if(t)try{document.body.removeChild(t)}catch(e){document.documentElement.removeChild(t)}}function V(e){var t;null===(t=null==e?void 0:e.parentNode)||void 0===t||t.removeChild(e)}function X(e){return e.css_query?function(e){const t=document.querySelectorAll(e);return t.item(t.length-1)}(e.value||e.css_query):e.xpath?(t=e.value||e.xpath,null===(r=j(t,n))||void 0===r?void 0:r.pop()):void 0;var t,n,r}function w(e){return e.css_query?document.querySelector(e.value||e.css_query):e.xpath?H(e.value||e.xpath):void 0}function j(e,t=document,n=!0){t=void 0!==t?t:document;const r=[];let i;try{i=document.evaluate(e,t,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null)}catch(e){if(n&&e instanceof DOMException)return console.log(e),[];throw e}for(let e=0,t=i.snapshotLength;e<t;++e)r.push(i.snapshotItem(e));return r}function H(e,t=document,n=!0){t=void 0!==t?t:document;try{return document.evaluate(e,t,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(e){if(n&&e instanceof DOMException)return console.log(e),null;throw e}}function k(e){var t;if("input"===_(e)&&"hidden"===(null===(t=e.type)||void 0===t?void 0:t.toLowerCase()))return!1;if(!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))return!1;const n=window.getComputedStyle(e);return(!n||"0"!==n.opacity)&&(n&&"none"!==n.display&&"collapse"!==n.visibility&&"hidden"!==n.visibility)}function $(e){var t;return"#document-fragment"===(null===(t=x(e))||void 0===t?void 0:t.nodeName)}t.createBaseEventMessage=d,t.createIgnoredDomElement=function(e){const n=document.createElement(e);return n.className=t.MABL_IGNORE_ELEMENT_CLASS,n},t.getIdFromElement=E,t.getNameFromElement=function(e){return f(e.name)},t.getTagNameFromElement=_,t.getNodeNameFromElement=p,t.getElementValueFromElement=m,t.getSelectedIndexFromElement=function(e){return e.selectedIndex},t.getClassNameFromElement=b,t.getSelectedTextFromElement=function(e){var t;if("select"===_(e)&&(null==e?void 0:e.selectedOptions)&&!((null===(t=null==e?void 0:e.selectedOptions)||void 0===t?void 0:t.length)<1))return e.selectedOptions[0].innerText},t.getAttributePropertyMap=function(e){const t={};for(const n in e)try{const i=e[n],o=typeof i;if(r.ALLOWED_ASSERTIBLE_ATTRS_PROPS.includes(n)&&r.ASSERTIBLE_ATTRIBUTE_TYPES.includes(o)){if(null==i||"string"===o&&!i.length&&"value"!==n)continue;t[n]=T(i.toString(),!1)}}catch(e){console.error("Could not process an attribute/property for element",e)}return e.getAttributeNames().forEach(n=>{if(!(null==t?void 0:t.hasOwnProperty(n))){const r=e.getAttribute(n);t[n]=T(r||"",!1)}}),s.forEach(n=>{const r=n.extractor(e);r&&(t[n.propertyName]=r)}),t},t.getIframesInfo=function(){const e=[];return[].forEach.call(document.getElementsByTagName("iframe"),n=>{if(!t.MABL_INSERTED_ELEMENTS.includes(n.id)){const t=d(n,"record","switch-context-to",A(n));t.absoluteSrc=n.src,e.push(t)}}),e},t.createXPathFromElement=A,t.compactWhitespace=g,t.getTextFromElement=h,t.getSlotTextFromElement=y,t.truncateText=v,t.normalizeText=T,t.getLabelForInput=I,t.getLabelUsingForAttribute=O,t.getInputLabelFromElement=S,t.getAnchorHrefFromElement=N,t.getPlaceholderFromElement=P,t.getInputTypeFromElement=L,t.isInputField=M,t.isTextField=function(e){const t=_(e),n=e.type;return"input"===t&&!a.includes(n)||"textarea"===t},t.isFileInput=function(e){const t=_(e),n=(e.type||"").toLowerCase();return"input"===t&&"file"===n},t.isSelect=function(e){return"select"===_(e)},t.getAncestorElements=function(e,t=0,n=[]){const r=[],i=n.map(e=>e.toLowerCase());let o=null==e?void 0:e.parentElement;for(;o&&(t<=0||r.length<t);)i.includes(_(o))||r.push(o),o=o.parentElement;return r},t.sanitizeXPath=D,t.createXpathFromPathArray=function(e){return D("//"+e.map((e,t,n)=>{const r=p(e);if(!r)return"";const i=n[t+1];return"#document"!==r&&i&&i?C(e,i):""}).reduce((e,t)=>""===t?e:`${t}/${e}`))},t.maybeGetRootNode=x,t.xpathElement=C,t.renderSelectionOverlay=function(e){const n=document.createElement("div");n.id=t.MABL_OVERLAY_ID,n.classList.add(i),n.setAttribute("style","\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(24,197,207,0.25);\n z-index: 2147483646;\n cursor: pointer;\n display:block;");const r=document.createElement("div");r.classList.add(i),r.innerText=e,r.setAttribute("style","\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 50px;\n color: white;\n transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);"),n.appendChild(r);const o=F();n.appendChild(o);try{document.body.appendChild(n)}catch(e){document.documentElement.appendChild(n)}},t.positionSelectionHighlight=function(e){const n=document.elementsFromPoint(e.clientX,e.clientY).find(e=>!e.classList.contains(i));if(!n)return;const r=n.getBoundingClientRect(),o=document.getElementById(t.MABL_HIGHLIGHT_ID);o&&(o.style.left=U(r.x),o.style.top=U(r.y),o.style.width=U(r.width),o.style.height=U(r.height))},t.highlightElement=G,t.highlightElements=function(e){const n=t.MABL_HIGHLIGHT_ID+"-parent";let r=document.getElementById(n);r&&V(r),r=document.createElement("div"),r.id=n,e.length>0&&e.forEach((e,t)=>{G(e,t,r)});const o=document.getElementById(t.MABL_OVERLAY_ID),a=document.createElement("div");a.classList.add(i),a.innerText=e.length+" elements found",a.setAttribute("style","\n position: absolute;\n top: 60%;\n left: 50%;\n font-size: 40px;\n color: white;\n transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);"),r.appendChild(a),o.appendChild(r)},t.destroySelectionOverlay=function(){B(t.MABL_OVERLAY_ID)},t.removeOverlayById=B,t.adjustTarget=function(e,t){let n=e,r=null==t?void 0:t.slice();for(;n&&!(n instanceof HTMLElement);)n=n.parentElement,null==r||r.pop();const i=function(e,t){const n=_(e);if("button"!==n&&"input"!==n){let e;t.forEach((t,n)=>{var r;const i=null!==(r=_(t))&&void 0!==r?r:"";e||"button"!==i&&"input"!==i||(e=n)}),e&&(t=t.slice(e))}return t}(e,r);return i!==r&&(n=i[0],r=i),function(e){return"html"===_(e)}(n)&&(n=void 0,r=void 0),{path:r,target:n}},t.selectOption=function(e,t,n){e.focus(),"any"===t?e.options.length>1&&0===e.selectedIndex?e.selectedIndex=1:e.selectedIndex=0:e.selectedIndex=[...e.options].findIndex(e=>e.innerText===n),e.dispatchEvent(new Event("change")),e.blur();const r=new InputEvent("input");e.dispatchEvent(r)},t.getElementMatchingSelectionTarget=function(e){return"primarySelectors"in e.find?"find_last"===e.find.type?X(e.find.primarySelectors):w(e.find.primarySelectors):e.xPath?H(e.xPath):void 0},t.destroyElement=V,t.getAllElementBySelectors=function(e){try{if(e.css_query)return document.querySelectorAll(e.value||e.css_query);if(e.xpath)return j(e.value||e.xpath)}catch(e){}return[]},t.getLastElementBySelectors=X,t.getFirstElementBySelectors=w,t.getAllElementsByXpath=j,t.getElementByXpath=H,t.getInnerText=function e(t){const n=_(t)||"";return"select"!==n&&"option"!==n&&"optgroup"!==n?t.innerText||"":k(t)?[("option"===n?t.innerText||t.text:t.innerText)||"",Array.from(t.childNodes||[]).map(e).filter(e=>e).join(" ")].filter(e=>e).join(" "):""},t.isDisplayed=k,t.isExpectedToBeInvisible=function(e){var t;return"input"===_(e)&&"file"===(null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.toLowerCase())},t.isElementInShadowRoot=$,t.removeParentElements=function(e){return e?e.filter(t=>!e.some(e=>t!==e&&t.contains(e))):[]},t.getParentElements=function(e){const t=[];let n=e.parentElement;for(;n;)t.push(n),n=n.parentElement;return t}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isLegacyVariable=t.namespace=t.resolveVariableValue=t.LegacyVariableSource=t.VariableType=void 0;const i=r(n(3)),o=n(0),a=n(4);!function(e){e.INPUT="input",e.MABL_MAILBOX="mablMailbox",e.JAVASCRIPT="javascript",e.GENERATED="generated",e.ELEMENT_PROPERTY="elementProperty",e.ELEMENT_COUNT="elementCount"}(t.VariableType||(t.VariableType={})),function(e){e.PLAN="Plan",e.JOURNEY_VAR="Default value",e.RUNTIME="Runtime",e.DDT="DataTable",e.ENV="Environment",e.MABL_MAIL="mabl Mailbox",e.JAVASCRIPT="JavaScript",e.ELEMENT_PROP="Element property",e.API="API step",e.ELEMENT_COUNT="Element count",e.FLOW_PARAMETER="Flow parameter",e.TEST_RUN="Test run",e.TEMPLATE="String template"}(t.LegacyVariableSource||(t.LegacyVariableSource={}));const l=e=>null==e?void 0:e.value;function c(e,t){try{return e[t]||e["user."+t]}catch(e){return}}t.resolveVariableValue=function(e,t,n=l){let r,a=c(t,e);if(!a&&(e.includes(".")||e.includes("["))){const n=[e.indexOf("["),e.indexOf(".")].filter(e=>e>=0).reduce((e,t)=>Math.min(e,t));if(a=c(t,e.slice(0,n)),a){const t="."===e[n]?1:0;r=e.slice(n+t,e.length)}}let u=n(a);return u&&r&&(0,o.isNestableElement)(u)&&(u=(0,i.default)(u,r)),u},t.namespace=function(e={}){return(0,a.createDottedNamedMap)(e)},t.isLegacyVariable=function(e){return!!e&&"object"==typeof e&&void 0!==e.variableType&&void 0!==e.name}},function(e,t,n){"use strict";function r(e){return Object.prototype.constructor===e.constructor}Object.defineProperty(t,"__esModule",{value:!0}),t.isSimpleObject=t.isVariableDataType=void 0,t.isVariableDataType=function e(t){return null==t||"boolean"==typeof t||"number"==typeof t||"bigint"==typeof t||"string"==typeof t||"object"==typeof t&&(Array.isArray(t)?t.every(e):!!r(t)&&!!Object.entries(t).every(([t,n])=>t&&"string"==typeof t&&e(n)))},t.isSimpleObject=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNormalizedFindDescriptor=t.mapHintsToFindDescriptor=t.mapWaitUntilToPropertyPreferences=t.getAncestorDescriptor=t.isAncestor=t.matchesAncestorXpath=t.computeRelativeXpath=t.isRelativeXpath=t.findIsWaitUntil=t.descriptorHasIntendedProperties=t.descriptorHasWaitTimeout=t.findIsRepeatedElements=t.descriptorHasOrdinalPreference=t.getWaitUntilTimeoutMs=t.compareStrings=t.getEffectiveSelectorValue=t.getComparator=t.isFindCustomDescriptor=t.ConfidenceLevel=t.PropertyComparator=t.isFindElementType=t.isFindType=t.FindType=t.isFindElementDescriptor=t.isFindOptions=t.ElementExpectation=void 0;const r=n(5);var i,o;function a(e){return[i.FIND_ANY,i.FIND_FIRST,i.FIND_LAST,i.FIND_ONE,i.FIND_ALL].some(t=>t===e)}function l(e){var t,n;return void 0!==(null===(n=null===(t=e.configuration)||void 0===t?void 0:t.ordinalPreference)||void 0===n?void 0:n.position)}function c(e){var t,n;return void 0!==(null===(n=null===(t=e.findOptions)||void 0===t?void 0:t.waitUntil)||void 0===n?void 0:n.timeoutSeconds)}function u(e){var t,n,r,i;return Object.values((null===(t=e.configuration)||void 0===t?void 0:t.propertyPreferences)||{}).some(e=>null==e?void 0:e.intended)||((null===(i=null===(r=null===(n=e.findOptions)||void 0===n?void 0:n.waitUntil)||void 0===r?void 0:r.properties)||void 0===i?void 0:i[e.selector.uuid])||[]).length>0}function s(e,t,n){return t+n.substring(1)===e}function d(e,t){return!!(e.selector.relative_xpath&&e.selector.xpath&&t.selector.xpath&&s(e.selector.xpath,t.selector.xpath,e.selector.relative_xpath))}function E(e,t){return!!(e.selector.relative_xpath&&!e.selector.findable_ancestor_uuid||e.selector.findable_ancestor_uuid===t.selector.uuid||d(e,t))}function f(e,t={}){const n={...t};for(const i of e)if((0,r.isSimpleElementSelectorCommonKeys)(i)){const e={...t[i]||{},intended:!0};n[i]=e}return n}function _(e,t){var n;const r=(null==t?void 0:t[e.selector.uuid])||[],i=null===(n=e.configuration)||void 0===n?void 0:n.propertyPreferences;return{...e,configuration:{...e.configuration,propertyPreferences:f(r,i)}}}!function(e){e.MISSING="missing",e.PRESENT="present"}(t.ElementExpectation||(t.ElementExpectation={})),t.isFindOptions=function(e){return e&&(void 0===e.waitUntil||function(e){return e&&void 0!==e.timeoutSeconds&&void 0!==e.properties}(e.waitUntil))},t.isFindElementDescriptor=function(e){return e&&a(e.findType)},function(e){e.FIND_ALL="find_all",e.FIND_ANY="find_any",e.FIND_COOKIE="find_cookie",e.FIND_EMAIL="find_email",e.FIND_FIRST="find_first",e.FIND_LAST="find_last",e.FIND_ONE="find_one",e.FIND_TAB="find_tab"}(i=t.FindType||(t.FindType={})),function(e){e.fromString=function(t){const n=t;if(!Object.values(e).includes(n))throw new Error("No FindType match found for value: "+t);return n}}(i=t.FindType||(t.FindType={})),t.isFindType=function(e){return!!Object.values(i).find(t=>t===e)},t.isFindElementType=a,function(e){e.EQUALS="equals",e.CONTAINS="contains"}(o=t.PropertyComparator||(t.PropertyComparator={})),function(e){e.LOW="low",e.MEDIUM="medium",e.HIGH="high",e.UNKNOWN="unknown"}(t.ConfidenceLevel||(t.ConfidenceLevel={})),t.isFindCustomDescriptor=function(e){return e&&"object"==typeof e&&"string"==typeof e.findType&&[i.FIND_ALL,i.FIND_FIRST,i.FIND_LAST,i.FIND_ANY,i.FIND_ALL].includes(e.findType)},t.getComparator=function(e,t){var n;return(null===(n=null==t?void 0:t[e])||void 0===n?void 0:n.comparator)||o.EQUALS},t.getEffectiveSelectorValue=function(e,t,n){const r=null==n?void 0:n[e],i=(null==r?void 0:r.intended)&&(null==r?void 0:r.value)?null==r?void 0:r.value:t[e];return"string"==typeof i?i:void 0},t.compareStrings=function(e,t,n){return!(!e||!t)&&(n&&n!==o.EQUALS?n===o.CONTAINS&&t.includes(e):e===t)},t.getWaitUntilTimeoutMs=function(e){var t,n,r,i;return(null===(n=null===(t=e.findOptions)||void 0===t?void 0:t.waitUntil)||void 0===n?void 0:n.timeoutSeconds)?1e3*(null===(i=null===(r=e.findOptions)||void 0===r?void 0:r.waitUntil)||void 0===i?void 0:i.timeoutSeconds):void 0},t.descriptorHasOrdinalPreference=l,t.findIsRepeatedElements=function(e){return l(e)||(e.auxiliaryDescriptors||[]).some(l)},t.descriptorHasWaitTimeout=c,t.descriptorHasIntendedProperties=u,t.findIsWaitUntil=function(e){return c(e)&&(u(e)||((null==e?void 0:e.auxiliaryDescriptors)||[]).some(u))},t.isRelativeXpath=s,t.computeRelativeXpath=function(e,t){if(e.startsWith(t)&&e.length>t.length)return"."+e.substring(t.length)},t.matchesAncestorXpath=d,t.isAncestor=E,t.getAncestorDescriptor=function(e){var t;if(e.auxiliaryDescriptors&&e.auxiliaryDescriptors.length>0){const n=e.auxiliaryDescriptors.filter(t=>E(e,t));if(n.length>0){const r=n[0],i=(e.auxiliaryDescriptors||[]).filter(e=>e!==r),o={...r},a=e.selector;return"#document-fragment"===(null===(t=a.currentContextNode)||void 0===t?void 0:t.nodeName)&&(o.selector.currentContextNode=a.currentContextNode),{...e.type?{type:e.type}:{},...e.findOptions?{findOptions:e.findOptions}:{},...o,auxiliaryDescriptors:i}}}},t.mapWaitUntilToPropertyPreferences=function(e){var t;return(null===(t=e.findOptions)||void 0===t?void 0:t.waitUntil)&&Object.keys(e.findOptions.waitUntil.properties).length?function(e,t){const n=_(e,t),r=(e.auxiliaryDescriptors||[]).map(e=>_(e,t));return r.length&&(n.auxiliaryDescriptors=r),n}(e,e.findOptions.waitUntil.properties):e},t.mapHintsToFindDescriptor=function(e){var t,n;if(null===(n=null===(t=e.findOptions)||void 0===t?void 0:t.hints)||void 0===n?void 0:n.selectorSubstitutions){const t=e.findOptions.hints.selectorSubstitutions[e.selector.uuid];if(t&&(e.selector={...e.selector,...t},e.overrides))for(const n of e.overrides)n.selector={...n.selector,...t}}return e},t.isNormalizedFindDescriptor=function(e){return"object"==typeof e&&(null==e?void 0:e.selector)&&(0,r.isStandardSelector)(e.selector)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCustomFindDescriptor=t.isFindOneDescriptor=void 0,t.isFindOneDescriptor=function(e){return e&&!e.foundElementSelectors&&!!e.selector},t.isCustomFindDescriptor=function(e){return!!(null==e?void 0:e.primarySelectors)}}])}));
|