@mablhq/mabl-cli 1.48.41 → 1.50.0
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 +8 -2
- package/api/mablApiClient.js +6 -8
- package/api/mablApiClientFactory.js +2 -1
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +4 -0
- package/commands/commandUtil/fileUtil.js +11 -3
- package/commands/constants.js +1 -0
- package/commands/flows/flows_cmds/export.js +1 -1
- package/commands/tests/tests_cmds/export.js +53 -22
- package/core/trainer/trainingSessions.js +1 -1
- package/domUtil/index.js +1 -1
- package/execution/index.js +1 -1
- package/functions/apiTest/utils.js +1 -1
- package/mablApi/index.js +1 -1
- package/mablscript/MablStep.js +0 -14
- package/mablscript/actions/ExtractAction.js +23 -4
- package/mablscript/actions/FindAction.js +0 -16
- package/mablscript/importer.js +1 -6
- package/mablscript/steps/AssertStep.js +4 -109
- package/mablscript/steps/ClickStep.js +0 -6
- package/mablscript/steps/CreateVariableStep.js +4 -47
- package/mablscript/steps/DoubleClickStep.js +0 -6
- package/mablscript/steps/EchoStep.js +0 -6
- package/mablscript/steps/EnterTextStep.js +0 -7
- package/mablscript/steps/HoverStep.js +0 -6
- package/mablscript/steps/IfConditionStep.js +4 -1
- package/mablscript/steps/NavigateStep.js +0 -6
- package/mablscript/steps/RightClickStep.js +0 -6
- package/mablscript/steps/SendKeyStep.js +0 -36
- package/mablscript/steps/SetViewportStep.js +0 -8
- package/mablscript/steps/SwitchContextStep.js +0 -21
- package/mablscript/steps/VisitUrlStep.js +0 -6
- package/mablscript/steps/WaitStep.js +0 -6
- package/mablscript/types/ExtractDescriptor.js +1 -0
- package/mablscriptFind/index.js +1 -1
- package/package.json +1 -1
- package/resources/mablFind.js +1 -1
- package/resources/pdf-viewer/EmbeddedPdfHandler.js +1 -1
- package/resources/pdf-viewer/libEmbeddedPdfHandler.js +62 -16
- package/configGenerators/flowConfigGenerator.js +0 -86
- package/configGenerators/selIdeGenerator.js +0 -47
- package/configGenerators/testConfigGenerator.js +0 -77
- package/mablscript/steps/SeleniumIdeStep.js +0 -32
package/api/basicApiClient.js
CHANGED
|
@@ -181,9 +181,15 @@ class BasicApiClient {
|
|
|
181
181
|
BasicApiClient.checkResponseStatusCode(response);
|
|
182
182
|
return response.data;
|
|
183
183
|
}
|
|
184
|
-
async makePatchRequest(path, requestBody, ifMatch) {
|
|
184
|
+
async makePatchRequest(path, requestBody, ifMatch, requestConfig) {
|
|
185
|
+
return this.patchRequest(path, requestBody, ifMatch, this.getNonRetryableRequestConfig(requestConfig));
|
|
186
|
+
}
|
|
187
|
+
async makePatchRequestWithRetries(path, requestBody, ifMatch, config) {
|
|
188
|
+
return this.retryWrappedRequest(`makePatchRequestWithRetries('${path}')`, () => this.patchRequest(path, requestBody, ifMatch, this.getRetryableRequestConfig(config)), config);
|
|
189
|
+
}
|
|
190
|
+
async patchRequest(path, requestBody, ifMatch, config) {
|
|
185
191
|
const extraConfig = ifMatch ? { headers: { 'If-Match': ifMatch } } : {};
|
|
186
|
-
const response = await this.debugRequest('PATCH', path, () => this.httpClient.patch(path, requestBody, extraConfig));
|
|
192
|
+
const response = await this.debugRequest('PATCH', path, () => this.httpClient.patch(path, requestBody, { ...config, ...extraConfig }));
|
|
187
193
|
BasicApiClient.checkResponseStatusCode(response);
|
|
188
194
|
return response.data;
|
|
189
195
|
}
|
package/api/mablApiClient.js
CHANGED
|
@@ -31,10 +31,6 @@ const cliConfigProvider_1 = require("../providers/cliConfigProvider");
|
|
|
31
31
|
const basicApiClient_1 = require("./basicApiClient");
|
|
32
32
|
const queryString = __importStar(require("query-string"));
|
|
33
33
|
const featureSet_1 = require("./featureSet");
|
|
34
|
-
const DEPLOYMENT_EVENT_RETRY_CONFIG = {
|
|
35
|
-
requestTimeoutMillis: 0,
|
|
36
|
-
maxRetryTimeMillis: 1000 * 60 * 60,
|
|
37
|
-
};
|
|
38
34
|
class MablApiClient extends basicApiClient_1.BasicApiClient {
|
|
39
35
|
constructor(options) {
|
|
40
36
|
var _a;
|
|
@@ -258,7 +254,7 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
|
|
|
258
254
|
}
|
|
259
255
|
async getDeploymentResults(deploymentEventId) {
|
|
260
256
|
try {
|
|
261
|
-
return await this.makeGetRequest(`${this.baseApiUrl}/execution/result/event/${deploymentEventId}
|
|
257
|
+
return await this.makeGetRequest(`${this.baseApiUrl}/execution/result/event/${deploymentEventId}`);
|
|
262
258
|
}
|
|
263
259
|
catch (error) {
|
|
264
260
|
throw toApiError(`Failed to get deployment results`, error);
|
|
@@ -575,7 +571,7 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
|
|
|
575
571
|
async postDeploymentEvent(options) {
|
|
576
572
|
try {
|
|
577
573
|
const requestBody = this.buildDeploymentRequestBody(options);
|
|
578
|
-
return await this.makePostRequestWithRetries(`${this.baseApiUrl}/events/deployment/`, requestBody
|
|
574
|
+
return await this.makePostRequestWithRetries(`${this.baseApiUrl}/events/deployment/`, requestBody);
|
|
579
575
|
}
|
|
580
576
|
catch (error) {
|
|
581
577
|
throw toApiError(`Failed to create deployment`, error);
|
|
@@ -745,9 +741,11 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
|
|
|
745
741
|
throw toApiError(`Failed to get journey run info`, error);
|
|
746
742
|
}
|
|
747
743
|
}
|
|
748
|
-
async updateJourneyRun(journeyRunId, journeyRunUpdate, ifMatch) {
|
|
744
|
+
async updateJourneyRun(journeyRunId, journeyRunUpdate, ifMatch, retry) {
|
|
749
745
|
try {
|
|
750
|
-
const response =
|
|
746
|
+
const response = retry
|
|
747
|
+
? await this.makePatchRequestWithRetries(`${this.baseApiUrl}/journeyRuns/${journeyRunId}`, journeyRunUpdate, ifMatch)
|
|
748
|
+
: await this.makePatchRequest(`${this.baseApiUrl}/journeyRuns/${journeyRunId}`, journeyRunUpdate, ifMatch);
|
|
751
749
|
return response;
|
|
752
750
|
}
|
|
753
751
|
catch (error) {
|
|
@@ -19,8 +19,9 @@ class MablApiClientFactory {
|
|
|
19
19
|
}
|
|
20
20
|
return MablApiClientFactory.createApiClient();
|
|
21
21
|
}
|
|
22
|
-
static createApiClientFromApiKey(apiKey) {
|
|
22
|
+
static createApiClientFromApiKey(apiKey, apiUrl) {
|
|
23
23
|
return MablApiClientFactory.createApiClient({
|
|
24
|
+
apiUrl,
|
|
24
25
|
authType: types_1.AuthType.ApiKey,
|
|
25
26
|
token: apiKey,
|
|
26
27
|
});
|
|
@@ -246,6 +246,10 @@ class PlaywrightElementHandle extends PlaywrightJsHandle {
|
|
|
246
246
|
const result = await this.element.evaluate((el, attributeName) => el.getAttribute(attributeName), attributeName);
|
|
247
247
|
return (0, pureUtil_1.isNullish)(result) ? undefined : result;
|
|
248
248
|
}
|
|
249
|
+
async getCSSProperty(propertyName) {
|
|
250
|
+
const result = await this.element.evaluate((el, propertyName) => globalThis.getComputedStyle(el).getPropertyValue(propertyName), propertyName);
|
|
251
|
+
return (0, pureUtil_1.isNullish)(result) ? undefined : result;
|
|
252
|
+
}
|
|
249
253
|
async getElementText() {
|
|
250
254
|
const innerText = await this.getInnerText();
|
|
251
255
|
return innerText ? innerText : this.getSlotText();
|
|
@@ -22,18 +22,26 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.writeExportedEntityToFile = void 0;
|
|
27
30
|
const fs = __importStar(require("fs"));
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
28
32
|
const loggingProvider_1 = require("../../providers/logging/loggingProvider");
|
|
29
33
|
const chalk = require('chalk');
|
|
30
|
-
function writeExportedEntityToFile(output, fileExtension, entityId) {
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
function writeExportedEntityToFile(output, fileExtension, entityId, fileName) {
|
|
35
|
+
fileName = fileName !== null && fileName !== void 0 ? fileName : `${entityId}.mabl.${fileExtension}`.replace(':', '-');
|
|
36
|
+
const filePath = path_1.default.resolve(fileName);
|
|
37
|
+
const dirname = path_1.default.dirname(filePath);
|
|
38
|
+
fs.mkdirSync(dirname, { recursive: true });
|
|
39
|
+
fs.writeFile(filePath, output, (err) => {
|
|
33
40
|
if (err) {
|
|
34
41
|
loggingProvider_1.logger.info(chalk.red.bold(`Error exporting flow to filesystem: ${err}`));
|
|
35
42
|
}
|
|
36
43
|
});
|
|
37
44
|
loggingProvider_1.logger.info(`Created file: ${fileName}`);
|
|
45
|
+
return fileName;
|
|
38
46
|
}
|
|
39
47
|
exports.writeExportedEntityToFile = writeExportedEntityToFile;
|
package/commands/constants.js
CHANGED
|
@@ -92,6 +92,7 @@ var OutputFormats;
|
|
|
92
92
|
OutputFormats["Csv"] = "csv";
|
|
93
93
|
OutputFormats["Json"] = "json";
|
|
94
94
|
OutputFormats["Markdown"] = "markdown";
|
|
95
|
+
OutputFormats["Playwright"] = "playwright";
|
|
95
96
|
OutputFormats["SeleniumIde"] = "side";
|
|
96
97
|
OutputFormats["Table"] = "table";
|
|
97
98
|
OutputFormats["Yaml"] = "yaml";
|
|
@@ -4,7 +4,7 @@ const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
|
4
4
|
const util_1 = require("../../commandUtil/util");
|
|
5
5
|
const js_yaml_1 = require("js-yaml");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
|
-
const flowConfigGenerator_1 = require("../../../
|
|
7
|
+
const flowConfigGenerator_1 = require("../../../execution/codeGenerators/seleniumConfigGenerators/flowConfigGenerator");
|
|
8
8
|
const fileUtil_1 = require("../../commandUtil/fileUtil");
|
|
9
9
|
const os = require('os');
|
|
10
10
|
const JSON_REPLACER = null;
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mablApi_1 = require("../../../mablApi");
|
|
4
4
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
5
|
-
const selIdeGenerator_1 = require("../../../configGenerators/selIdeGenerator");
|
|
6
5
|
const util_1 = require("../../commandUtil/util");
|
|
7
|
-
const testConfigGenerator_1 = require("../../../configGenerators/testConfigGenerator");
|
|
8
6
|
const js_yaml_1 = require("js-yaml");
|
|
9
7
|
const constants_1 = require("../../constants");
|
|
10
8
|
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
11
9
|
const fileUtil_1 = require("../../commandUtil/fileUtil");
|
|
10
|
+
const execution_1 = require("../../../execution");
|
|
12
11
|
const chalk = require('chalk');
|
|
13
12
|
const os = require('os');
|
|
14
13
|
const JSON_REPLACER = null;
|
|
@@ -28,6 +27,7 @@ exports.builder = (yargs) => {
|
|
|
28
27
|
constants_1.OutputFormats.Json,
|
|
29
28
|
constants_1.OutputFormats.Yaml,
|
|
30
29
|
constants_1.OutputFormats.Csv,
|
|
30
|
+
constants_1.OutputFormats.Playwright,
|
|
31
31
|
constants_1.OutputFormats.SeleniumIde,
|
|
32
32
|
],
|
|
33
33
|
})
|
|
@@ -41,14 +41,27 @@ exports.builder = (yargs) => {
|
|
|
41
41
|
describe: 'Which branch of the test to export',
|
|
42
42
|
nargs: 1,
|
|
43
43
|
type: 'string',
|
|
44
|
+
})
|
|
45
|
+
.option(constants_1.CommandArgEnvironmentId, {
|
|
46
|
+
alias: 'e',
|
|
47
|
+
describe: 'Generate selectors based on the find information learned in this environment (Playwright only)',
|
|
48
|
+
nargs: 1,
|
|
49
|
+
type: 'string',
|
|
50
|
+
})
|
|
51
|
+
.option(constants_1.CommandArgOutputFilePath, {
|
|
52
|
+
describe: 'Export to specific file, default: local path/export name',
|
|
53
|
+
nargs: 1,
|
|
54
|
+
type: 'string',
|
|
44
55
|
});
|
|
45
56
|
};
|
|
46
|
-
exports.handler = (0, util_1.failWrapper)(
|
|
47
|
-
async function
|
|
57
|
+
exports.handler = (0, util_1.failWrapper)(exportTest);
|
|
58
|
+
async function exportTest(parsed) {
|
|
48
59
|
var _a;
|
|
49
60
|
const testId = parsed.id;
|
|
50
61
|
const format = parsed.format;
|
|
62
|
+
const environmentId = parsed[constants_1.CommandArgEnvironmentId];
|
|
51
63
|
const detailLevel = parsed[constants_1.CommandArgDetailLevel];
|
|
64
|
+
const fileName = parsed[constants_1.CommandArgOutputFilePath];
|
|
52
65
|
const apiClient = await mablApiClientFactory_1.MablApiClientFactory.createApiClient();
|
|
53
66
|
const branchName = (_a = parsed['mabl-branch']) !== null && _a !== void 0 ? _a : constants_1.DefaultBranchName;
|
|
54
67
|
const journey = await apiClient.getJourney(testId, branchName, format);
|
|
@@ -62,43 +75,61 @@ async function pullJourney(parsed) {
|
|
|
62
75
|
}
|
|
63
76
|
switch (format) {
|
|
64
77
|
case constants_1.OutputFormats.Csv:
|
|
65
|
-
dumpToCsv(journey, flowArray);
|
|
66
|
-
break;
|
|
78
|
+
return dumpToCsv(journey, flowArray, fileName);
|
|
67
79
|
case constants_1.OutputFormats.SeleniumIde:
|
|
68
|
-
dumpToSeleniumIde(journey, flowArray);
|
|
69
|
-
|
|
80
|
+
return dumpToSeleniumIde(journey, flowArray, fileName);
|
|
81
|
+
case constants_1.OutputFormats.Playwright:
|
|
82
|
+
return dumpToPlaywrightTest(journey, flowArray, apiClient, fileName, environmentId);
|
|
70
83
|
case constants_1.OutputFormats.Json:
|
|
71
84
|
case constants_1.OutputFormats.Yaml:
|
|
72
85
|
default:
|
|
73
|
-
dumpYamlOrJsonToFile(format, journey, flowArray, detailLevel);
|
|
74
|
-
break;
|
|
86
|
+
return dumpYamlOrJsonToFile(format, journey, flowArray, detailLevel, fileName);
|
|
75
87
|
}
|
|
76
88
|
}
|
|
77
|
-
function dumpToSeleniumIde(journey, flows) {
|
|
78
|
-
const selIdeConfig = new
|
|
89
|
+
function dumpToSeleniumIde(journey, flows, fileName) {
|
|
90
|
+
const selIdeConfig = new execution_1.SelIdeConfigGenerator(journey, flows);
|
|
79
91
|
const configGenerated = selIdeConfig.generateConfigFile();
|
|
80
92
|
const jsonified = JSON.stringify(configGenerated, JSON_REPLACER, 2);
|
|
81
|
-
(0, fileUtil_1.writeExportedEntityToFile)(jsonified, 'side', journey.id);
|
|
93
|
+
return (0, fileUtil_1.writeExportedEntityToFile)(jsonified, 'side', journey.id, fileName);
|
|
94
|
+
}
|
|
95
|
+
async function dumpToPlaywrightTest(journey, flows, apiClient, fileName, environmentId) {
|
|
96
|
+
let findModel = [];
|
|
97
|
+
let findOverrides = [];
|
|
98
|
+
if (journey.test_type !== mablApi_1.TestTypeEnum.Browser) {
|
|
99
|
+
throw new Error('Playwright tests can only be generated for browser tests.');
|
|
100
|
+
}
|
|
101
|
+
if (!environmentId) {
|
|
102
|
+
loggingProvider_1.logger.warn(chalk.yellow('Warning: No', chalk.underline(constants_1.CommandArgEnvironmentId), `specified. XPath selectors will be generated.
|
|
103
|
+
You can take advantage of the find information learned in a specific environment by specifying the environment id with the --${constants_1.CommandArgEnvironmentId} flag.`));
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
findModel = await apiClient.getTestFindModels(journey.invariant_id, environmentId);
|
|
107
|
+
if (!findModel.length) {
|
|
108
|
+
loggingProvider_1.logger.warn(chalk.yellow('Warning: No find information was found on the environment', chalk.underline(environmentId), `XPath selectors will be generated.`));
|
|
109
|
+
}
|
|
110
|
+
findOverrides = await apiClient.getTestOverrides(journey.invariant_id, environmentId);
|
|
111
|
+
}
|
|
112
|
+
const generator = new execution_1.PlaywrightTestGenerator(journey, flows, findModel, findOverrides);
|
|
113
|
+
const test = generator.generateTest();
|
|
114
|
+
return (0, fileUtil_1.writeExportedEntityToFile)(test, 'spec.ts', journey.id, fileName);
|
|
82
115
|
}
|
|
83
|
-
function dumpYamlOrJsonToFile(type, journey, flows, detailLevel) {
|
|
84
|
-
const journeyConfig = new
|
|
116
|
+
function dumpYamlOrJsonToFile(type, journey, flows, detailLevel, fileName) {
|
|
117
|
+
const journeyConfig = new execution_1.JourneyConfig(journey, flows, false);
|
|
85
118
|
const configGenerated = detailLevel === constants_1.DetailLevelFormats.Full
|
|
86
119
|
? journeyConfig.generateConfigFile()
|
|
87
120
|
: journeyConfig.generateSimpleFormat();
|
|
88
121
|
switch (type) {
|
|
89
122
|
case constants_1.OutputFormats.Yaml:
|
|
90
123
|
const yaml = (0, js_yaml_1.dump)(configGenerated, { skipInvalid: false });
|
|
91
|
-
(0, fileUtil_1.writeExportedEntityToFile)(yaml, 'yml', journey.id);
|
|
92
|
-
break;
|
|
124
|
+
return (0, fileUtil_1.writeExportedEntityToFile)(yaml, 'yml', journey.id, fileName);
|
|
93
125
|
case constants_1.OutputFormats.Json:
|
|
94
|
-
(0, fileUtil_1.writeExportedEntityToFile)(JSON.stringify(configGenerated, JSON_REPLACER, 2), 'json', journey.id);
|
|
95
|
-
break;
|
|
126
|
+
return (0, fileUtil_1.writeExportedEntityToFile)(JSON.stringify(configGenerated, JSON_REPLACER, 2), 'json', journey.id, fileName);
|
|
96
127
|
default:
|
|
97
128
|
throw new Error(`Invalid Type supplied for exporting: ${type}`);
|
|
98
129
|
}
|
|
99
130
|
}
|
|
100
|
-
function dumpToCsv(journey, flows) {
|
|
101
|
-
const journeyConfig = new
|
|
131
|
+
function dumpToCsv(journey, flows, fileName) {
|
|
132
|
+
const journeyConfig = new execution_1.JourneyConfig(journey, flows, false);
|
|
102
133
|
const output = journeyConfig.generateSimpleCsv();
|
|
103
|
-
(0, fileUtil_1.writeExportedEntityToFile)(output.join(os.EOL), 'csv', journey.id);
|
|
134
|
+
return (0, fileUtil_1.writeExportedEntityToFile)(output.join(os.EOL), 'csv', journey.id, fileName);
|
|
104
135
|
}
|
|
@@ -109,7 +109,7 @@ async function editTest(trainingSessionOptions) {
|
|
|
109
109
|
planId: testRunIdConfig.fromPlanId,
|
|
110
110
|
sender: exports.SENDER,
|
|
111
111
|
testId,
|
|
112
|
-
testType: (_j = test.test_type) !== null && _j !== void 0 ? _j : mablApi_1.
|
|
112
|
+
testType: (_j = test.test_type) !== null && _j !== void 0 ? _j : mablApi_1.TestTypeEnum.Browser,
|
|
113
113
|
url: finalUrl,
|
|
114
114
|
width: (_k = trainingSessionOptions.width) !== null && _k !== void 0 ? _k : exports.DEFAULT_WIDTH,
|
|
115
115
|
workspaceId,
|
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=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)}}])}));
|
|
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.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.formatText=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=t.destroySelectionOverlay=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.formatText=R,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)}}])}));
|