diff --git a/app/client/.eslintrc.json b/app/client/.eslintrc.json index 714a99e8f3..31f98168e9 100644 --- a/app/client/.eslintrc.json +++ b/app/client/.eslintrc.json @@ -6,7 +6,6 @@ "extends": [ "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react "plugin:@typescript-eslint/recommended", - "prettier/@typescript-eslint", "plugin:cypress/recommended", // Note: Please keep this as the last config to make sure that this (and by extension our .prettierrc file) overrides all configuration above it // https://www.npmjs.com/package/eslint-plugin-prettier#recommended-configuration @@ -21,6 +20,8 @@ }, "rules": { "@typescript-eslint/no-explicit-any": 0, + // enforce `import type` for all type-only imports so the bundler knows to erase them + "@typescript-eslint/consistent-type-imports": "error", "react-hooks/rules-of-hooks": "error", "@typescript-eslint/no-use-before-define": 0, "@typescript-eslint/no-var-requires": 0, diff --git a/app/client/.prettierrc b/app/client/.prettierrc index 190c8dcecc..b42e33db11 100644 --- a/app/client/.prettierrc +++ b/app/client/.prettierrc @@ -5,6 +5,5 @@ "semi": true, "singleQuote": false, "trailingComma": "all", - "parser": "typescript", "arrowParens": "always" } diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/CommunityIssues_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/Application/CommunityIssues_Spec.ts index 05f90fd1c9..2c5d7f21fe 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/CommunityIssues_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/Application/CommunityIssues_Spec.ts @@ -11,8 +11,8 @@ let homePage = ObjectsRegistry.HomePage, deployMode = ObjectsRegistry.DeployMode, propPane = ObjectsRegistry.PropertyPane; -describe("AForce - Community Issues page validations", function() { - before(function() { +describe("AForce - Community Issues page validations", function () { + before(function () { agHelper.ClearLocalStorageCache(); }); @@ -66,8 +66,9 @@ describe("AForce - Community Issues page validations", function() { ee.SelectEntityByName("Table1", "Widgets"); agHelper.AssertExistingToggleState("serversidepagination", "checked"); - propPane.ValidatePropertyFieldValue("Default Selected Row", "0") - .then(($selectedRow: any) => { + propPane + .ValidatePropertyFieldValue("Default Selected Row", "0") + .then(($selectedRow: any) => { selectedRow = Number($selectedRow); table.AssertSelectedRow(selectedRow); }); @@ -237,20 +238,18 @@ describe("AForce - Community Issues page validations", function() { }); } cy.wrap(filterTitle).as("filterTitleText"); // alias it for later - cy.get("@filterTitleText") - .its("length") - .should("eq", 2); + cy.get("@filterTitleText").its("length").should("eq", 2); table.RemoveFilterNVerify("Question", true, false); //Two filters - AND table.OpenNFilterTable("Votes", "greater than", "2"); - table.ReadTableRowColumnData(0, 1,"v1", 3000).then(($cellData) => { + table.ReadTableRowColumnData(0, 1, "v1", 3000).then(($cellData) => { expect($cellData).to.eq("Combine queries from different datasources"); }); table.OpenNFilterTable("Title", "contains", "button", "AND", 1); - table.ReadTableRowColumnData(0, 1,"v1", 3000).then(($cellData) => { + table.ReadTableRowColumnData(0, 1, "v1", 3000).then(($cellData) => { expect($cellData).to.eq( "Change the video in the video player with a button click", ); @@ -262,9 +261,7 @@ describe("AForce - Community Issues page validations", function() { // agHelper.DeployApp() // table.WaitUntilTableLoad() - cy.get(table._addIcon) - .closest("div") - .click(); + cy.get(table._addIcon).closest("div").click(); agHelper.AssertElementVisible(locator._modal); agHelper.SelectFromDropDown("Suggestion", "t--modal-widget"); @@ -297,7 +294,7 @@ describe("AForce - Community Issues page validations", function() { table.SearchTable("Suggestion", 2); table.WaitUntilTableLoad(); - table.ReadTableRowColumnData(0, 0,"v1", 4000).then((cellData) => { + table.ReadTableRowColumnData(0, 0, "v1", 4000).then((cellData) => { expect(cellData).to.be.equal("Suggestion"); }); @@ -358,7 +355,7 @@ describe("AForce - Community Issues page validations", function() { ); agHelper.ClickButton("Save"); agHelper.Sleep(2000); - table.ReadTableRowColumnData(0, 0,"v1",2000).then((cellData) => { + table.ReadTableRowColumnData(0, 0, "v1", 2000).then((cellData) => { expect(cellData).to.be.equal("Troubleshooting"); }); @@ -376,9 +373,7 @@ describe("AForce - Community Issues page validations", function() { table.SelectTableRow(0); agHelper.AssertElementVisible(locator._widgetInDeployed("tabswidget")); agHelper.Sleep(); - cy.get(table._trashIcon) - .closest("div") - .click({ force: true }); + cy.get(table._trashIcon).closest("div").click({ force: true }); agHelper.WaitUntilEleDisappear(locator._widgetInDeployed("tabswidget")); agHelper.AssertElementAbsence(locator._widgetInDeployed("tabswidget")); table.WaitForTableEmpty(); diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js index 58337671f3..a93e9811ab 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/CurrencyInputIssue_Spec.js @@ -11,8 +11,8 @@ const widgetName = "currencyinputwidget"; const wiggetClass = `.t--widget-${widgetName}`; const widgetInput = `${wiggetClass} input`; -describe("Currency Input Issue", function() { - it("1. Import application json &should check that the widget input is not showing any error", function() { +describe("Currency Input Issue", function () { + it("1. Import application json &should check that the widget input is not showing any error", function () { cy.visit("/applications"); homePage.ImportApp("CurrencyInputIssueExport.json"); cy.wait("@importNewApplication").then((interception) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js index 7563bec88a..2629a298f2 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js @@ -1,7 +1,7 @@ import appPage from "../../../locators/CMSApplocators"; import * as _ from "../../../support/Objects/ObjectsCore"; -describe("Content Management System App", function() { +describe("Content Management System App", function () { before(() => { _.homePage.NavigateToHome(); _.agHelper.GenerateUUID(); @@ -15,7 +15,7 @@ describe("Content Management System App", function() { }); let repoName; - it("1.Create Get echo Api call", function() { + it("1.Create Get echo Api call", function () { cy.fixture("datasources").then((datasourceFormData) => { _.apiPage.CreateAndFillApi(datasourceFormData["echoApiUrl"], "get_data"); // creating get request using echo @@ -29,7 +29,7 @@ describe("Content Management System App", function() { }); }); - it("2. Create Post echo Api call", function() { + it("2. Create Post echo Api call", function () { cy.fixture("datasources").then((datasourceFormData) => { _.apiPage.CreateAndFillApi( datasourceFormData["echoApiUrl"], @@ -48,7 +48,7 @@ describe("Content Management System App", function() { }); }); - it("3. Create Delete echo Api call", function() { + it("3. Create Delete echo Api call", function () { cy.fixture("datasources").then((datasourceFormData) => { _.apiPage.CreateAndFillApi( datasourceFormData["echoApiUrl"], @@ -67,14 +67,12 @@ describe("Content Management System App", function() { }); }); - it("4. Send mail and verify post request body", function() { + it("4. Send mail and verify post request body", function () { // navigating to canvas cy.xpath(appPage.pagebutton).click(); cy.get(appPage.submitButton).should("be.visible"); cy.xpath("//span[text()='3']").click({ force: true }); - cy.get(appPage.mailButton) - .closest("div") - .click(); + cy.get(appPage.mailButton).closest("div").click(); // verifying the mail to send and asserting post call's response cy.xpath(appPage.sendMailText).should("be.visible"); cy.xpath("//input[@value='Curt50@gmail.com']").should("be.visible"); @@ -83,12 +81,8 @@ describe("Content Management System App", function() { .last() .find("textarea") .type("Task completed", { force: true }); - cy.get(appPage.confirmButton) - .closest("div") - .click({ force: true }); - cy.get(appPage.closeButton) - .closest("div") - .click({ force: true }); + cy.get(appPage.confirmButton).closest("div").click({ force: true }); + cy.get(appPage.closeButton).closest("div").click({ force: true }); cy.xpath(appPage.pagebutton).click({ force: true }); //cy.xpath(appPage.datasourcesbutton).click({ force: true }); cy.CheckAndUnfoldEntityItem("Queries/JS"); @@ -98,19 +92,15 @@ describe("Content Management System App", function() { cy.ResponseCheck("Curt50@gmail.com"); }); - it("5. Delete proposal and verify delete request body", function() { + it("5. Delete proposal and verify delete request body", function () { // navigating back to canvas cy.xpath(appPage.pagebutton).click({ force: true }); - cy.get(appPage.submitButton) - .closest("div") - .should("be.visible"); + cy.get(appPage.submitButton).closest("div").should("be.visible"); cy.xpath("//span[text()='Dan.Wyman@hotmail.com']").click({ force: true }); // deleting the proposal and asserting delete call's response cy.xpath(appPage.deleteButton).click({ force: true }); cy.xpath(appPage.deleteTaskText).should("be.visible"); - cy.get(appPage.confirmButton) - .closest("div") - .click({ force: true }); + cy.get(appPage.confirmButton).closest("div").click({ force: true }); cy.xpath(appPage.pagebutton).click({ force: true }); //cy.xpath(appPage.datasourcesbutton).click({ force: true }); cy.xpath(appPage.deleteApi).click({ force: true }); @@ -131,21 +121,15 @@ describe("Content Management System App", function() { cy.xpath("//span[text()='Curt50@gmail.com']") .should("be.visible") .click({ force: true }); - cy.get(appPage.mailButton) - .closest("div") - .click(); + cy.get(appPage.mailButton).closest("div").click(); cy.xpath(appPage.sendMailText).should("be.visible"); cy.xpath(appPage.subjectField).type("Test"); cy.get(appPage.contentField) .last() .find("textarea") .type("Task completed", { force: true }); - cy.get(appPage.confirmButton) - .closest("div") - .click({ force: true }); - cy.get(appPage.closeButton) - .closest("div") - .click({ force: true }); + cy.get(appPage.confirmButton).closest("div").click({ force: true }); + cy.get(appPage.closeButton).closest("div").click({ force: true }); _.deployMode.NavigateBacktoEditor(); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js index 17a5409e02..b1de318c84 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/ImportExportForkApplication_spec.js @@ -1,16 +1,14 @@ const homePage = require("../../../locators/HomePage"); const reconnectDatasourceModal = require("../../../locators/ReconnectLocators"); -describe("Import, Export and Fork application and validate data binding", function() { +describe("Import, Export and Fork application and validate data binding", function () { let workspaceId; let newWorkspaceName; let appName; - it("1. Import application from json and validate data on pageload", function() { + it("1. Import application from json and validate data on pageload", function () { // import application cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("forkedApp.json"); @@ -38,9 +36,7 @@ describe("Import, Export and Fork application and validate data binding", functi force: true, }); cy.wait(2000); - cy.get(homePage.applicationName) - .clear() - .type(appName); + cy.get(homePage.applicationName).clear().type(appName); cy.get("body").click(0, 0); cy.wait("@updateApplication").should( "have.nested.property", @@ -59,17 +55,13 @@ describe("Import, Export and Fork application and validate data binding", functi }); }); - it("2. Fork application and validate data binding for the widgets", function() { + it("2. Fork application and validate data binding for the widgets", function () { // fork application cy.get(homePage.homeIcon).click(); cy.get(homePage.searchInput).type(`${appName}`); cy.wait(3000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.forkAppFromMenu).click({ force: true }); cy.get(homePage.forkAppWorkspaceButton).click({ force: true }); cy.wait(4000); @@ -81,18 +73,12 @@ describe("Import, Export and Fork application and validate data binding", functi cy.xpath("//span[text()='due']").should("be.visible"); }); - it("3. Export and import application and validate data binding for the widgets", function() { + it("3. Export and import application and validate data binding for the widgets", function () { cy.NavigateToHome(); - cy.get(homePage.searchInput) - .clear() - .type(`${appName}`); + cy.get(homePage.searchInput).clear().type(`${appName}`); cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); // export application cy.get(homePage.exportAppFromMenu).click({ force: true }); cy.get(homePage.searchInput).clear(); diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/MongoDBShoppingCart_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/MongoDBShoppingCart_spec.js index 5703536860..10713db088 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/MongoDBShoppingCart_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/MongoDBShoppingCart_spec.js @@ -6,7 +6,7 @@ const formControls = require("../../../locators/FormControl.json"); import * as _ from "../../../support/Objects/ObjectsCore"; let repoName; -describe("Shopping cart App", function() { +describe("Shopping cart App", function () { let datasourceName; before(() => { @@ -21,7 +21,7 @@ describe("Shopping cart App", function() { }); }); - it("1. Create MongoDB datasource and add Insert, Find, Update and Delete queries", function() { + it("1. Create MongoDB datasource and add Insert, Find, Update and Delete queries", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MongoDB).click(); cy.fillMongoDatasourceForm(); @@ -32,19 +32,13 @@ describe("Shopping cart App", function() { cy.NavigateToQueryEditor(); cy.NavigateToActiveTab(); // GetProduct query to fetch all products - cy.get(queryLocators.createQuery) - .last() - .click(); + cy.get(queryLocators.createQuery).last().click(); cy.get(queryLocators.queryNameField).type("GetProduct"); - cy.get(".CodeEditorTarget") - .first() - .type("Productnames"); + cy.get(".CodeEditorTarget").first().type("Productnames"); cy.assertPageSave(); cy.get(appPage.dropdownChevronLeft).click(); // EditProducts query to update the cart - cy.get(queryLocators.createQuery) - .last() - .click(); + cy.get(queryLocators.createQuery).last().click(); cy.get(queryLocators.queryNameField).type("EditProducts"); // Clicking outside to trigger the save @@ -53,9 +47,7 @@ describe("Shopping cart App", function() { formControls.commandDropdown, "Update Document(s)", ); - cy.get(".CodeEditorTarget") - .first() - .type("Productnames"); + cy.get(".CodeEditorTarget").first().type("Productnames"); cy.get(".CodeEditorTarget") .eq(1) .type('{"title": "{{Table1.selectedRow.title}}"}', { @@ -75,9 +67,7 @@ describe("Shopping cart App", function() { cy.assertPageSave(); cy.get(appPage.dropdownChevronLeft).click(); // Add product query - cy.get(queryLocators.createQuery) - .last() - .click(); + cy.get(queryLocators.createQuery).last().click(); cy.wait(5000); cy.get(queryLocators.queryNameField).type("AddProduct"); // Clicking outside to trigger the save @@ -107,9 +97,7 @@ describe("Shopping cart App", function() { cy.assertPageSave(); cy.get(appPage.dropdownChevronLeft).click(); // delete product - cy.get(queryLocators.createQuery) - .last() - .click(); + cy.get(queryLocators.createQuery).last().click(); cy.wait(5000); cy.get(queryLocators.queryNameField).type("DeleteProduct"); // Clicking outside to trigger the save @@ -136,44 +124,27 @@ describe("Shopping cart App", function() { cy.get(appPage.dropdownChevronLeft).click(); }); - it("2. Perform CRUD operations and validate data", function() { + it("2. Perform CRUD operations and validate data", function () { // Adding the books to the Add cart form cy.xpath(appPage.bookname).type("Atomic habits"); cy.xpath(appPage.bookgenre).type("Self help"); cy.xpath(appPage.bookprice).type(200); cy.xpath(appPage.bookquantity).type(2); - cy.get("span:contains('Submit')") - .closest("div") - .eq(1) - .click(); + cy.get("span:contains('Submit')").closest("div").eq(1).click(); cy.assertPageSave(); cy.wait(8000); - cy.xpath(appPage.bookname) - .click() - .type("A man called ove"); - cy.xpath(appPage.bookgenre) - .click() - .type("Fiction"); - cy.xpath(appPage.bookprice) - .click() - .type(100); - cy.xpath(appPage.bookquantity) - .click() - .type(1); - cy.get("span:contains('Submit')") - .closest("div") - .eq(1) - .click(); + cy.xpath(appPage.bookname).click().type("A man called ove"); + cy.xpath(appPage.bookgenre).click().type("Fiction"); + cy.xpath(appPage.bookprice).click().type(100); + cy.xpath(appPage.bookquantity).click().type(1); + cy.get("span:contains('Submit')").closest("div").eq(1).click(); cy.assertPageSave(); cy.wait("@postExecute"); // Deleting the book from the cart cy.get(".tableWrap") .children() .within(() => { - cy.get("span:contains('Delete')") - .closest("div") - .eq(1) - .click(); + cy.get("span:contains('Delete')").closest("div").eq(1).click(); cy.wait("@postExecute"); cy.wait(5000); @@ -183,23 +154,15 @@ describe("Shopping cart App", function() { .should("have.length", 1); }); // Updating the book quantity from edit cart - cy.xpath(appPage.editbookquantity) - .clear() - .type("3"); - cy.get("span:contains('Submit')") - .closest("div") - .eq(0) - .click(); + cy.xpath(appPage.editbookquantity).clear().type("3"); + cy.get("span:contains('Submit')").closest("div").eq(0).click(); cy.assertPageSave(); cy.wait(5000); // validating updated value in the cart - cy.get(".selected-row") - .children() - .eq(3) - .should("have.text", "3"); + cy.get(".selected-row").children().eq(3).should("have.text", "3"); }); - it("3. Connect the appplication to git and validate data in deploy mode and edit mode", function() { + it("3. Connect the appplication to git and validate data in deploy mode and edit mode", function () { _.gitSync.CreateNConnectToGit(repoName); cy.get("@gitRepoName").then((repName) => { repoName = repName; diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js index 42591793b6..4a9d9c75db 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js @@ -4,7 +4,7 @@ const dsl = require("../../../fixtures/PgAdmindsl.json"); const widgetsPage = require("../../../locators/Widgets.json"); const appPage = require("../../../locators/PgAdminlocators.json"); -describe("PgAdmin Clone App", function() { +describe("PgAdmin Clone App", function () { let datasourceName, tableName; before("Add dsl and create datasource", () => { @@ -15,7 +15,7 @@ describe("PgAdmin Clone App", function() { }); }); - it("1. Create queries", function() { + it("1. Create queries", function () { // writing query to get all schema _.dataSources.CreateQueryAfterDSSaved( "SELECT schema_name FROM information_schema.schemata;", @@ -58,15 +58,13 @@ describe("PgAdmin Clone App", function() { ); }); - it("2. Add new table from app page, View and Delete table", function() { + it("2. Add new table from app page, View and Delete table", function () { _.deployMode.DeployApp(); // adding new table cy.xpath(appPage.addNewtable).click({ force: true }); cy.wait(500); cy.generateUUID().then((UUID) => { - cy.xpath(appPage.addTablename) - .clear() - .type(`table${UUID}`); + cy.xpath(appPage.addTablename).clear().type(`table${UUID}`); tableName = `table${UUID}`; }); // adding column to the table @@ -77,29 +75,19 @@ describe("PgAdmin Clone App", function() { _.agHelper.UpdateInput(appPage.addColumnName, "ID"); _.agHelper.SelectFromDropDown("Varchar", "", 1); // switching on the Primary Key toggle - cy.get(widgetsPage.switchWidgetInactive) - .first() - .click(); + cy.get(widgetsPage.switchWidgetInactive).first().click(); // switching on the Not Null toggle - cy.get(widgetsPage.switchWidgetInactive) - .last() - .click(); + cy.get(widgetsPage.switchWidgetInactive).last().click(); cy.xpath(appPage.submitButton).click({ force: true }); cy.xpath(appPage.addColumn).should("be.visible"); cy.wait(500); - cy.xpath(appPage.submitButton) - .first() - .click({ force: true }); + cy.xpath(appPage.submitButton).first().click({ force: true }); cy.xpath(appPage.closeButton).click({ force: true }); cy.xpath(appPage.addNewtable).should("be.visible"); // viewing the table's columns by clicking on view button - cy.xpath(appPage.viewButton) - .first() - .click({ force: true }); + cy.xpath(appPage.viewButton).first().click({ force: true }); // deleting the table through modal - cy.xpath(appPage.deleteButton) - .last() - .click({ force: true }); + cy.xpath(appPage.deleteButton).last().click({ force: true }); cy.xpath(appPage.confirmButton).click({ force: true }); cy.xpath(appPage.closeButton).click({ force: true }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js index e0eff613e3..659ce59c79 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/PromisesApp_spec.js @@ -3,7 +3,7 @@ const homePage = require("../../../locators/HomePage"); const dsl = require("../../../fixtures/promisesStoreValueDsl.json"); const commonlocators = require("../../../locators/commonlocators.json"); -describe("JSEditor tests", function() { +describe("JSEditor tests", function () { before(() => { cy.addDsl(dsl); }); @@ -68,9 +68,7 @@ describe("JSEditor tests", function() { // select an option from select widget cy.get(".bp3-button.select-button").click({ force: true }); - cy.get(".menu-item-text") - .eq(2) - .click({ force: true }); + cy.get(".menu-item-text").eq(2).click({ force: true }); cy.wait(2000); // verify text in the text widget cy.get(".t--draggable-textwidget span") diff --git a/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js index 71989b80ff..4d848027af 100644 --- a/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/Application/ReconnectDatasource_spec.js @@ -2,12 +2,12 @@ const homePage = require("../../../locators/HomePage"); const reconnectDatasourceModal = require("../../../locators/ReconnectLocators"); const datasource = require("../../../locators/DatasourcesEditor.json"); -describe("Reconnect Datasource Modal validation while importing application", function() { +describe("Reconnect Datasource Modal validation while importing application", function () { let workspaceId; let appid; let newWorkspaceName; let appName; - it("1. Import application from json with one postgres and success modal", function() { + it("1. Import application from json with one postgres and success modal", function () { cy.NavigateToHome(); // import application cy.generateUUID().then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/ClearStore_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/ClearStore_spec.ts index 92b475a243..3bfb35fb8b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/ClearStore_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/ClearStore_spec.ts @@ -1,4 +1,4 @@ -import * as _ from "../../../../support/Objects/ObjectsCore" +import * as _ from "../../../../support/Objects/ObjectsCore"; describe("clearStore Action test", () => { before(() => { @@ -6,7 +6,7 @@ describe("clearStore Action test", () => { _.entityExplorer.NavigateToSwitcher("explorer"); }); - it("1. Feature 11639 : Clear all store value", function() { + it("1. Feature 11639 : Clear all store value", function () { const JS_OBJECT_BODY = `export default { storeValue: async () => { let values = diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js index e2e987402d..679ed049ef 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js @@ -4,10 +4,10 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); let dataSet; -describe("Test Create Api and Bind to Button widget", function() { +describe("Test Create Api and Bind to Button widget", function () { before("Test_Add users api and execute api", () => { cy.addDsl(dsl); - cy.fixture("example").then(function(data) { + cy.fixture("example").then(function (data) { dataSet = data; cy.createAndFillApi(dataSet.userApi, "/random"); cy.RunAPI(); @@ -32,9 +32,7 @@ describe("Test Create Api and Bind to Button widget", function() { cy.PublishtheApp(); cy.wait(3000); - cy.get("span:contains('Submit')") - .closest("div") - .click(); + cy.get("span:contains('Submit')").closest("div").click(); cy.wait("@postExecute").should( "have.nested.property", @@ -59,9 +57,7 @@ describe("Test Create Api and Bind to Button widget", function() { cy.PublishtheApp(); cy.wait(3000); - cy.get("span:contains('Submit')") - .closest("div") - .click(); + cy.get("span:contains('Submit')").closest("div").click(); cy.wait("@postExecute").should( "have.nested.property", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/PostWindowMessage_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/PostWindowMessage_spec.ts index fddd0eecb0..ac247e601f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/PostWindowMessage_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/PostWindowMessage_spec.ts @@ -45,27 +45,19 @@ describe("Post window message", () => { deployMode.DeployApp(); cy.get("#iframe-Iframe1").then((element) => { - element - .contents() - .find("body") - .find("#iframe-button") - .click(); + element.contents().find("body").find("#iframe-button").click(); }); agHelper.ValidateToastMessage("I got a message from iframe"); cy.get("#iframe-Iframe1").then(($element) => { const $body = $element.contents().find("body"); - cy.wrap($body) - .find("#txtMsg") - .should("have.text", "Before postMessage"); + cy.wrap($body).find("#txtMsg").should("have.text", "Before postMessage"); }); agHelper.ClickButton("Submit"); cy.get("#iframe-Iframe1").then(($element) => { const $body = $element.contents().find("body"); - cy.wrap($body) - .find("#txtMsg") - .should("have.text", "After postMessage"); + cy.wrap($body).find("#txtMsg").should("have.text", "After postMessage"); }); deployMode.NavigateBacktoEditor(); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/RemoveValue_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/RemoveValue_spec.ts index 1283300b67..e014e9912d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/RemoveValue_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/RemoveValue_spec.ts @@ -14,7 +14,7 @@ describe("removeValue Action test", () => { ee.NavigateToSwitcher("explorer"); }); - it("1. Feature 11639 : Remove store value", function() { + it("1. Feature 11639 : Remove store value", function () { const JS_OBJECT_BODY = `export default { storeValue: async () => { await storeValue('val1', 'value 1'); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/StoreValue_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/StoreValue_spec.ts index bb69b24c1c..90ee0d2a7e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/StoreValue_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/StoreValue_spec.ts @@ -15,7 +15,7 @@ describe("storeValue Action test", () => { ee.NavigateToSwitcher("explorer"); }); - it("1. Bug 14653: Running consecutive storeValue actions and await", function() { + it("1. Bug 14653: Running consecutive storeValue actions and await", function () { const jsObjectBody = `export default { storeTest: () => { let values = @@ -66,7 +66,7 @@ describe("storeValue Action test", () => { deployMode.NavigateBacktoEditor(); }); - it("2. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key", function() { + it("2. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key", function () { const DEFAULT_STUDENT_OBJECT = { details: { isTopper: true, name: "Abhah", grade: 1 }, }; @@ -148,7 +148,7 @@ describe("storeValue Action test", () => { deployMode.NavigateBacktoEditor(); }); - it("3. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key - object keys", function() { + it("3. Bug 14827 : Accepts paths as keys and doesn't update paths in store but creates a new field with path as key - object keys", function () { const TEST_OBJECT = { a: 1, two: {} }; const JS_OBJECT_BODY = `export default { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/setInterval_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/setInterval_spec.js index 0c0eaba17e..f73c86e64e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/setInterval_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/setInterval_spec.js @@ -3,12 +3,12 @@ const dsl = require("../../../../fixtures/buttonApiDsl.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); -describe("Test Create Api and Bind to Button widget", function() { +describe("Test Create Api and Bind to Button widget", function () { let dataSet; before("Test_Add users api and execute api", () => { cy.addDsl(dsl); - cy.fixture("example").then(function(data) { + cy.fixture("example").then(function (data) { dataSet = data; cy.createAndFillApi(dataSet.userApi, "/users"); cy.RunAPI(); @@ -17,9 +17,7 @@ describe("Test Create Api and Bind to Button widget", function() { it("1. Selects set interval function, Fill setInterval action creator and test code generated ", () => { cy.SearchEntityandOpen("Button1"); - cy.get(widgetsPage.buttonOnClick) - .last() - .click({ force: true }); + cy.get(widgetsPage.buttonOnClick).last().click({ force: true }); cy.get(commonlocators.chooseAction) .children() .contains("Set interval") @@ -63,9 +61,7 @@ describe("Test Create Api and Bind to Button widget", function() { it("2. Works in the published version", () => { cy.PublishtheApp(); cy.wait(3000); - cy.get("span:contains('Submit')") - .closest("div") - .click(); + cy.get("span:contains('Submit')").closest("div").click(); cy.wait("@postExecute").should( "have.nested.property", "response.body.responseMeta.status", @@ -83,9 +79,7 @@ describe("Test Create Api and Bind to Button widget", function() { it("3. Selects clear interval function, Fill clearInterval action creator and test code generated", () => { cy.SearchEntityandOpen("Button1"); - cy.get(widgetsPage.buttonOnClick) - .last() - .click({ force: true }); + cy.get(widgetsPage.buttonOnClick).last().click({ force: true }); cy.get(commonlocators.chooseAction) .children() .contains("Clear interval") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AdminSettings/Admin_settings_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AdminSettings/Admin_settings_spec.js index 23f8360282..19bfeabb28 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AdminSettings/Admin_settings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/AdminSettings/Admin_settings_spec.js @@ -5,7 +5,7 @@ const { GOOGLE_SIGNUP_SETUP_DOC, } = require("../../../../../src/constants/ThirdPartyConstants"); -describe("Admin settings page", function() { +describe("Admin settings page", function () { beforeEach(() => { cy.intercept("GET", "/api/v1/admin/env", { body: { responseMeta: { status: 200, success: true }, data: {} }, @@ -119,9 +119,7 @@ describe("Admin settings page", function() { }; assertVisibilityAndDisabledState(); cy.get(adminsSettings.instanceName).should("be.visible"); - cy.get(adminsSettings.instanceName) - .clear() - .type("AppsmithInstance"); + cy.get(adminsSettings.instanceName).clear().type("AppsmithInstance"); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); cy.get(adminsSettings.resetButton).should("be.visible"); @@ -137,9 +135,7 @@ describe("Admin settings page", function() { let instanceName; cy.generateUUID().then((uuid) => { instanceName = uuid; - cy.get(adminsSettings.instanceName) - .clear() - .type(uuid); + cy.get(adminsSettings.instanceName).clear().type(uuid); }); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); @@ -165,9 +161,7 @@ describe("Admin settings page", function() { let instanceName; cy.generateUUID().then((uuid) => { instanceName = uuid; - cy.get(adminsSettings.instanceName) - .clear() - .type(uuid); + cy.get(adminsSettings.instanceName).clear().type(uuid); }); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); @@ -178,9 +172,7 @@ describe("Admin settings page", function() { let fromAddress; cy.generateUUID().then((uuid) => { fromAddress = uuid; - cy.get(adminsSettings.fromAddress) - .clear() - .type(`${uuid}@appsmith.com`); + cy.get(adminsSettings.fromAddress).clear().type(`${uuid}@appsmith.com`); }); cy.intercept("POST", "/api/v1/admin/restart", { body: { responseMeta: { status: 200, success: true }, data: true }, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_Spec.ts index e796eb6668..73569b5fbf 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/Autocomplete_Spec.ts @@ -8,8 +8,8 @@ const { PropertyPane: propPane, } = ObjectsRegistry; -describe("Autocomplete bug fixes", function() { - it("1. Bug #12790 Verifies if selectedRow is in best match", function() { +describe("Autocomplete bug fixes", function () { + it("1. Bug #12790 Verifies if selectedRow is in best match", function () { ee.DragDropWidgetNVerify(WIDGET.TABLE, 200, 200); ee.DragDropWidgetNVerify(WIDGET.TEXT, 200, 600); ee.SelectEntityByName("Text1"); @@ -24,7 +24,7 @@ describe("Autocomplete bug fixes", function() { ); }); - it("2. Bug #14990 Checks if copied widget show up on autocomplete suggestions", function() { + it("2. Bug #14990 Checks if copied widget show up on autocomplete suggestions", function () { ee.CopyPasteWidget("Text1"); ee.SelectEntityByName("Text1"); propPane.UpdatePropertyFieldValue("Text", ""); @@ -39,7 +39,7 @@ describe("Autocomplete bug fixes", function() { ); }); - it("3. Bug #14100 Custom columns name label change should reflect in autocomplete", function() { + it("3. Bug #14100 Custom columns name label change should reflect in autocomplete", function () { // select table widget ee.SelectEntityByName("Table1"); // add new column @@ -64,7 +64,7 @@ describe("Autocomplete bug fixes", function() { ); }); - it("4. feat #16426 Autocomplete for fast-xml-parser", function() { + it("4. feat #16426 Autocomplete for fast-xml-parser", function () { ee.SelectEntityByName("Text1"); propPane.TypeTextIntoField("Text", "{{xmlParser.j"); agHelper.GetNAssertElementText(locator._hints, "j2xParser"); @@ -73,7 +73,7 @@ describe("Autocomplete bug fixes", function() { agHelper.GetNAssertElementText(locator._hints, "parse"); }); - it("5. Installed library should show up in autocomplete", function() { + it("5. Installed library should show up in autocomplete", function () { ee.ExpandCollapseEntity("Libraries"); installer.openInstaller(); installer.installLibrary("uuidjs", "UUID"); @@ -83,7 +83,7 @@ describe("Autocomplete bug fixes", function() { agHelper.GetNAssertElementText(locator._hints, "UUID"); }); - it("6. No autocomplete for Removed libraries", function() { + it("6. No autocomplete for Removed libraries", function () { ee.RenameEntityFromExplorer("Text1Copy", "UUIDTEXT"); installer.uninstallLibrary("uuidjs"); propPane.TypeTextIntoField("Text", "{{UUID."); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/PropertyPaneSuggestion_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/PropertyPaneSuggestion_spec.ts index d56a47c99a..548c86b4e0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/PropertyPaneSuggestion_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Autocomplete/PropertyPaneSuggestion_spec.ts @@ -1,11 +1,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; -const { - AggregateHelper, - CommonLocators, - EntityExplorer, - PropertyPane, -} = ObjectsRegistry; +const { AggregateHelper, CommonLocators, EntityExplorer, PropertyPane } = + ObjectsRegistry; describe("Property Pane Suggestions", () => { before(() => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindApi_withPageload_Input_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindApi_withPageload_Input_spec.js index e8c1cd1c7a..4706135a8a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindApi_withPageload_Input_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindApi_withPageload_Input_spec.js @@ -4,12 +4,12 @@ const dsl = require("../../../../fixtures/MultipleInput.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); -describe("Binding the API with pageOnLoad and input Widgets", function() { +describe("Binding the API with pageOnLoad and input Widgets", function () { before(() => { cy.addDsl(dsl); }); - it("1. Will load an api on load", function() { + it("1. Will load an api on load", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("PageLoadApi"); cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods); @@ -20,7 +20,7 @@ describe("Binding the API with pageOnLoad and input Widgets", function() { cy.reload(); }); - it("2. Input widget updated with deafult data", function() { + it("2. Input widget updated with deafult data", function () { cy.selectEntityByName("Widgets"); cy.selectEntityByName("Input1"); cy.get(widgetsPage.defaultInput).type("3"); @@ -36,7 +36,7 @@ describe("Binding the API with pageOnLoad and input Widgets", function() { .should("contain", "3"); }); - it("3. Binding second input widget with API on PageLoad data and default data from input1 widget ", function() { + it("3. Binding second input widget with API on PageLoad data and default data from input1 widget ", function () { cy.selectEntityByName("Input3"); cy.get(widgetsPage.defaultInput).type(testdata.pageloadBinding, { parseSpecialCharSequences: false, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js index 902208c8ef..94d421cb6f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/BindButton_Text_WithRecaptcha_spec.js @@ -7,12 +7,12 @@ const locator = ObjectsRegistry.CommonLocators, agHelper = ObjectsRegistry.AggregateHelper, propPane = ObjectsRegistry.PropertyPane; -describe("Binding the Button widget with Text widget using Recpatcha v3", function() { +describe("Binding the Button widget with Text widget using Recpatcha v3", function () { before(() => { cy.addDsl(dsl); }); - it.only("1. Validate the Button binding with Text Widget with Recaptcha token with empty key", function() { + it.only("1. Validate the Button binding with Text Widget with Recaptcha token with empty key", function () { agHelper.ClickButton("Submit"); agHelper .GetText(locator._widgetInCanvas("textwidget") + " span") @@ -27,7 +27,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi }); //This test to be enabled once the product bug is fixed - it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function() { + it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key before using valid key", function () { cy.get("button") .contains("Submit") .should("be.visible") @@ -65,7 +65,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi }); }); - it.only("2. Validate the Button binding with Text Widget with Recaptcha Token with v2Key & upward compatibilty doesnt work", function() { + it.only("2. Validate the Button binding with Text Widget with Recaptcha Token with v2Key & upward compatibilty doesnt work", function () { ee.SelectEntityByName("Button1"); propPane.UpdatePropertyFieldValue("Google reCAPTCHA Key", testdata.v2Key); agHelper.ClickButton("Submit"); @@ -85,7 +85,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi agHelper.Sleep(); }); - it.only("3. Validate the Button binding with Text Widget with Recaptcha Token with v3Key & v2key for backward compatible", function() { + it.only("3. Validate the Button binding with Text Widget with Recaptcha Token with v3Key & v2key for backward compatible", function () { ee.SelectEntityByName("Button1"); propPane.UpdatePropertyFieldValue("Google reCAPTCHA Key", testdata.v3Key); agHelper.SelectDropdownList("Google reCAPTCHA Version", "reCAPTCHA v3"); @@ -104,7 +104,7 @@ describe("Binding the Button widget with Text widget using Recpatcha v3", functi }); //This test to be enabled once the product bug is fixed - it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function() { + it("Validate the Button binding with Text Widget with Recaptcha Token with invalid key", function () { cy.get("button") .contains("Submit") .should("be.visible") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_API_with_List_Widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_API_with_List_Widget_spec.js index 98e833d0dd..b29093cb91 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_API_with_List_Widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_API_with_List_Widget_spec.js @@ -4,13 +4,13 @@ const dsl = require("../../../../fixtures/listwidgetdsl.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to List widget", function() { +describe("Test Create Api and Bind to List widget", function () { let valueToTest; before(() => { cy.addDsl(dsl); }); - it("1. Test_Add users api and execute api", function() { + it("1. Test_Add users api and execute api", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.RunAPI(); cy.get(apiPage.jsonResponseTab).click(); @@ -28,7 +28,7 @@ describe("Test Create Api and Bind to List widget", function() { }); }); - it("2. Test_Validate the Api data is updated on List widget", function() { + it("2. Test_Validate the Api data is updated on List widget", function () { cy.SearchEntityandOpen("List1"); cy.testJsontext("items", "{{Api1.data}}"); cy.get(".t--draggable-textwidget span").should("have.length", 8); @@ -62,7 +62,7 @@ describe("Test Create Api and Bind to List widget", function() { }); }); - it("3. Test_Validate the list widget ", function() { + it("3. Test_Validate the list widget ", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait("@postExecute").then((interception) => { valueToTest = JSON.stringify( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Button_with_API_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Button_with_API_spec.js index b7ce082cf3..dc013a893d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Button_with_API_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Button_with_API_spec.js @@ -5,14 +5,14 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const testdata = require("../../../../fixtures/testdata.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Bind a button and Api usecase", function() { +describe("Bind a button and Api usecase", function () { let apiData; let valueToTest; before(() => { cy.addDsl(dsl); }); - it("1. Add an API by binding a button in its header", function() { + it("1. Add an API by binding a button in its header", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.get(apiwidget.headerKey) .first() @@ -39,7 +39,7 @@ describe("Bind a button and Api usecase", function() { }); }); - it("2. Button-Name updation", function() { + it("2. Button-Name updation", function () { cy.SearchEntityandOpen("Button1"); //changing the Button Name cy.widgetText( @@ -49,7 +49,7 @@ describe("Bind a button and Api usecase", function() { ); }); - it("3. API datasource binding with button name validation", function() { + it("3. API datasource binding with button name validation", function () { cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.SearchEntityandOpen("Api1"); cy.get(apiwidget.headerValue) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_DatePicker_Text_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_DatePicker_Text_spec.js index c5d3f029f3..481605d2ee 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_DatePicker_Text_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_DatePicker_Text_spec.js @@ -3,7 +3,7 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json"); const dsl = require("../../../../fixtures/uiBindDsl.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); -describe("Binding the Datepicker and Text Widget", function() { +describe("Binding the Datepicker and Text Widget", function () { let nextDay; let dateDp2; @@ -11,7 +11,7 @@ describe("Binding the Datepicker and Text Widget", function() { cy.addDsl(dsl); }); - it("DatePicker-Text, Validate selectedDate functionality", function() { + it("DatePicker-Text, Validate selectedDate functionality", function () { /** * Bind DatePicker1 to Text for "selectedDate" */ @@ -48,7 +48,7 @@ describe("Binding the Datepicker and Text Widget", function() { cy.get(commonlocators.backToEditor).click(); }); - it("DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function() { + it("DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function () { cy.openPropertyPane("textwidget"); /** @@ -86,7 +86,7 @@ describe("Binding the Datepicker and Text Widget", function() { }); }); - it("Validate the Date is not changed in DatePicker2", function() { + it("Validate the Date is not changed in DatePicker2", function () { cy.log("dateDp2:" + dateDp2); cy.get(formWidgetsPage.datepickerWidget + commonlocators.inputField) .eq(1) @@ -100,7 +100,7 @@ describe("Binding the Datepicker and Text Widget", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("DatePicker-Text, Validate Multiple Binding", function() { + it("DatePicker-Text, Validate Multiple Binding", function () { /** * Bind the DatePicker1 and DatePicker2 along with hard coded text to Text widget */ @@ -115,7 +115,7 @@ describe("Binding the Datepicker and Text Widget", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("Checks if on deselection of date triggers the onDateSelected action or not.", function() { + it("Checks if on deselection of date triggers the onDateSelected action or not.", function () { /** * bind datepicker to show a message "Hello" on date selected */ @@ -129,9 +129,7 @@ describe("Binding the Datepicker and Text Widget", function() { /** * checking if on selecting the date triggers the message */ - cy.get(formWidgetsPage.datepickerWidget) - .first() - .click(); + cy.get(formWidgetsPage.datepickerWidget).first().click(); cy.ClearDateFooter(); cy.SetDateToToday(); cy.get(commonlocators.toastmsg).contains("hello"); @@ -140,12 +138,8 @@ describe("Binding the Datepicker and Text Widget", function() { * checking if on deselecting the date triggers the message or not. * It should not trigger any message on deselection */ - cy.get(formWidgetsPage.datepickerWidget) - .first() - .click(); - cy.get(formWidgetsPage.datepickerFooter) - .contains("Clear") - .click(); + cy.get(formWidgetsPage.datepickerWidget).first().click(); + cy.get(formWidgetsPage.datepickerFooter).contains("Clear").click(); cy.get(commonlocators.toastmsg).should("not.exist"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_TableV2_Sorting_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_TableV2_Sorting_spec.js index 505ceb0993..aaee6dc26e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_TableV2_Sorting_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_TableV2_Sorting_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the Table and input Widget", function() { +describe("Binding the Table and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget", function() { + it("1. Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -18,12 +18,10 @@ describe("Binding the Table and input Widget", function() { ); }); - it("2. validation of data displayed in input widgets based on sorting", function() { + it("2. validation of data displayed in input widgets based on sorting", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultselectedrow", "0"); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); cy.readTableV2dataPublish("0", "0").then((tabData) => { const tabValue = tabData; @@ -34,9 +32,7 @@ describe("Binding the Table and input Widget", function() { .invoke("attr", "value") .should("contain", tabValue); }); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); cy.readTableV2dataPublish("0", "0").then((tabData) => { const tabValue = tabData; @@ -49,7 +45,7 @@ describe("Binding the Table and input Widget", function() { }); }); - it("3. validation of column id displayed in input widgets based on sorted column", function() { + it("3. validation of column id displayed in input widgets based on sorted column", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.sortedColumn + "}}"); cy.wait("@updateLayout").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_Table_Sorting_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_Table_Sorting_spec.js index 6c786ce588..9fd1730457 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_Table_Sorting_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_InputWidget_Table_Sorting_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the Table and input Widget", function() { +describe("Binding the Table and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget", function() { + it("1. Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -18,12 +18,10 @@ describe("Binding the Table and input Widget", function() { ); }); - it("2. Validation of data displayed in input widgets based on sorting", function() { + it("2. Validation of data displayed in input widgets based on sorting", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultselectedrow", "0"); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); cy.readTabledataPublish("0", "0").then((tabData) => { const tabValue = tabData; @@ -34,9 +32,7 @@ describe("Binding the Table and input Widget", function() { .invoke("attr", "value") .should("contain", tabValue); }); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); cy.wait(1000); cy.readTabledataPublish("0", "0").then((tabData) => { const tabValue = tabData; @@ -49,7 +45,7 @@ describe("Binding the Table and input Widget", function() { }); }); - it("3. Validation of column id displayed in input widgets based on sorted column", function() { + it("3. Validation of column id displayed in input widgets based on sorted column", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.sortedColumn + "}}"); cy.wait("@updateLayout").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js index 9af1a14006..752bed28c0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js @@ -7,7 +7,7 @@ const publish = require("../../../../locators/publishWidgetspage.json"); let datasourceName; let currentUrl; -describe("Addwidget from Query and bind with other widgets", function() { +describe("Addwidget from Query and bind with other widgets", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); @@ -34,9 +34,7 @@ describe("Addwidget from Query and bind with other widgets", function() { cy.get(queryEditor.suggestedTableWidget).click(); cy.createJSObject("return Query1.data;"); cy.CheckAndUnfoldEntityItem("Widgets"); - cy.get(".t--entity-name") - .contains("Table1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Table1").click({ force: true }); cy.testJsontext("tabledata", "{{JSObject1.myFun1()}}"); cy.isSelectRow(1); cy.readTableV2dataPublish("1", "0").then((tabData) => { @@ -52,9 +50,7 @@ describe("Addwidget from Query and bind with other widgets", function() { cy.url().then((url) => { currentUrl = url; cy.log("Published url is: " + currentUrl); - cy.get(publish.backToEditor) - .first() - .click(); + cy.get(publish.backToEditor).first().click(); cy.wait(2000); cy.visit(currentUrl); cy.wait("@getPagesForViewApp").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_MultiSelect_Button_Text_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_MultiSelect_Button_Text_spec.js index 87ada8a1db..22d9a5cd8d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_MultiSelect_Button_Text_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_MultiSelect_Button_Text_spec.js @@ -28,7 +28,7 @@ const widgetsToTest = { }; Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => { - describe(`${testConfig.widgetName} widget test for validating reset action`, function() { + describe(`${testConfig.widgetName} widget test for validating reset action`, function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -40,17 +40,15 @@ Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => { cy.addDsl(dsl); }); - it(`1. DragDrop Widget ${testConfig.widgetName}`, function() { + it(`1. DragDrop Widget ${testConfig.widgetName}`, function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas(widgetSelector, { x: 300, y: 200 }); cy.get(getWidgetSelector(widgetSelector)).should("exist"); }); - it("2. Bind Button on click and Text widget content", function() { + it("2. Bind Button on click and Text widget content", function () { cy.openPropertyPane(WIDGET.BUTTON); - cy.get(PROPERTY_SELECTOR.onClick) - .find(".t--js-toggle") - .click(); + cy.get(PROPERTY_SELECTOR.onClick).find(".t--js-toggle").click(); cy.updateCodeInput( PROPERTY_SELECTOR.onClick, `{{resetWidget("${testConfig.widgetPrefixName}",true).then(() => showAlert("success"))}}`, @@ -78,7 +76,7 @@ Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => { cy.wait(4000); }); - it("3. Publish the app and validate reset action", function() { + it("3. Publish the app and validate reset action", function () { cy.PublishtheApp(); cy.get(".rc-select-selection-overflow").click({ force: true }); cy.get(".rc-select-item-option:contains('Blue')").click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TabWidget_Input_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TabWidget_Input_spec.js index 43cd33bbf6..29cf71ed0c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TabWidget_Input_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TabWidget_Input_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/tabInputDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the input Widget with tab Widget", function() { +describe("Binding the input Widget with tab Widget", function () { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from tab widget", function() { + it("Input widget test with default value from tab widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.tabBinding + "}}"); @@ -18,7 +18,7 @@ describe("Binding the input Widget with tab Widget", function() { ); }); - it("validation of data displayed in input widgets based on tab selected", function() { + it("validation of data displayed in input widgets based on tab selected", function () { cy.PublishtheApp(); cy.get(publish.tabWidget) .contains("Tab 2") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableTextPagination_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableTextPagination_spec.js index 88b28c1bde..74bcc17483 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableTextPagination_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableTextPagination_spec.js @@ -4,18 +4,18 @@ const publishPage = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test_Add Paginate with Table Page No and Execute the Api", function() { + it("1. Test_Add Paginate with Table Page No and Execute the Api", function () { cy.wait(3000); /**Create an Api1 of Paginate with Table Page No */ cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Table-Text, Validate Server Side Pagination of Paginate with Table Page No", function() { + it("2. Table-Text, Validate Server Side Pagination of Paginate with Table Page No", function () { cy.SearchEntityandOpen("Table1"); cy.EnableAllCodeEditors(); /**Bind Api1 with Table widget */ @@ -44,7 +44,7 @@ describe("Test Create Api and Bind to Table widget", function() { //cy.ValidateTableData("11"); }); - it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table Page No", function() { + it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table Page No", function () { cy.PublishtheApp(); cy.wait(500); // Make sure onPageLoad action has run before validating the data @@ -64,22 +64,18 @@ describe("Test Create Api and Bind to Table widget", function() { }); }); - it("4. Table-Text, Validate Server Side Pagination of Paginate with Total Records Count", function() { + it("4. Table-Text, Validate Server Side Pagination of Paginate with Total Records Count", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait(3000); cy.CheckAndUnfoldEntityItem("Widgets"); - cy.get(".t--entity-name") - .contains("Table1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Table1").click({ force: true }); cy.testJsontext("totalrecordcount", 20); cy.PublishtheApp(); cy.wait(500); cy.wait("@postExecute"); cy.wait(500); cy.get(".show-page-items").should("contain", "20 Records"); - cy.get(".page-item") - .next() - .should("contain", "of 2"); + cy.get(".page-item").next().should("contain", "of 2"); cy.get(".t--table-widget-next-page").should("not.have.attr", "disabled"); cy.readTabledata("0", "4").then((tabData) => { @@ -92,7 +88,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.get(".t--table-widget-next-page").should("have.attr", "disabled"); }); - it("5. Test_Add Paginate with Response URL and Execute the Api", function() { + it("5. Test_Add Paginate with Response URL and Execute the Api", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait(3000); /** Create Api2 of Paginate with Response URL*/ @@ -122,7 +118,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.callApi("Api2"); }); - it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function() { + it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function () { /**Validate Response data with Table data in Text Widget */ cy.SearchEntityandOpen("Table1"); cy.ValidatePaginateResponseUrlData(apiPage.apiPaginationPrevTest, false); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2TextPagination_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2TextPagination_spec.js index e788b66f91..3cd6705da6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2TextPagination_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2TextPagination_spec.js @@ -4,19 +4,19 @@ const publishPage = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test_Add Paginate with Table Page No and Execute the Api", function() { + it("1. Test_Add Paginate with Table Page No and Execute the Api", function () { cy.wait(3000); /**Create an Api1 of Paginate with Table Page No */ cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Table-Text, Validate Server Side Pagination of Paginate with Table v2 Page No", function() { + it("2. Table-Text, Validate Server Side Pagination of Paginate with Table v2 Page No", function () { cy.SearchEntityandOpen("Table1"); /**Bind Api1 with Table widget */ cy.testJsontext("tabledata", "{{Api1.data}}"); @@ -48,7 +48,7 @@ describe("Test Create Api and Bind to Table widget", function() { //cy.ValidateTableData("11"); }); - it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table v2 Page No", function() { + it("3. Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table v2 Page No", function () { cy.PublishtheApp(); cy.wait(500); // Make sure onPageLoad action has run before validating the data @@ -68,22 +68,18 @@ describe("Test Create Api and Bind to Table widget", function() { }); }); - it("4. Table-Text, Validate Server Side Pagination of Paginate with Total v2 Records Count", function() { + it("4. Table-Text, Validate Server Side Pagination of Paginate with Total v2 Records Count", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait(3000); cy.CheckAndUnfoldEntityItem("Widgets"); - cy.get(".t--entity-name") - .contains("Table1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Table1").click({ force: true }); cy.testJsontext("totalrecords", 20); cy.PublishtheApp(); cy.wait(500); cy.wait("@postExecute"); cy.wait(500); cy.get(".show-page-items").should("contain", "20 Records"); - cy.get(".page-item") - .next() - .should("contain", "of 2"); + cy.get(".page-item").next().should("contain", "of 2"); cy.get(".t--table-widget-next-page").should("not.have.attr", "disabled"); cy.readTableV2data("0", "4").then((tabData) => { @@ -96,7 +92,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.get(".t--table-widget-next-page").should("have.attr", "disabled"); }); - it("5. Test_Add Paginate with Response URL and Execute the Api", function() { + it("5. Test_Add Paginate with Response URL and Execute the Api", function () { cy.get(publishPage.backToEditor).click({ force: true }); cy.wait(3000); /** Create Api2 of Paginate with Response URL*/ @@ -126,7 +122,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.callApi("Api2"); }); - it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function() { + it("6. Table-Text, Validate Server Side Pagination of Paginate with Response URL", function () { /**Validate Response data with Table data in Text Widget */ cy.SearchEntityandOpen("Table1"); cy.ValidatePaginateResponseUrlDataV2(apiPage.apiPaginationPrevTest, false); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2Widget_selectedRow_Input_widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2Widget_selectedRow_Input_widget_spec.js index 5a32de506d..85830b416a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2Widget_selectedRow_Input_widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2Widget_selectedRow_Input_widget_spec.js @@ -4,12 +4,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the table widget and input Widget", function() { +describe("Binding the table widget and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget v2", function() { + it("1. Input widget test with default value from table widget v2", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); cy.wait("@updateLayout").should( @@ -19,7 +19,7 @@ describe("Binding the table widget and input Widget", function() { ); }); - it("2. validation of data displayed in input widgets based on selected row", function() { + it("2. validation of data displayed in input widgets based on selected row", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultselectedrow", "2"); cy.readTableV2dataPublish("2", "0").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Derived_Column_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Derived_Column_spec.js index 13a8df8aba..d6cc2a5800 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Derived_Column_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Derived_Column_spec.js @@ -3,16 +3,16 @@ const dsl = require("../../../../fixtures/tableV2TextPaginationDsl.json"); const testdata = require("../../../../fixtures/testdata.json"); const widgetsPage = require("../../../../locators/Widgets.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with TableV2", function() { + it("1. Create an API and Execute the API and bind with TableV2", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate TableV2 with API data and then add a column", function() { + it("2. Validate TableV2 with API data and then add a column", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("tabledata", "{{Api1.data}}"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); @@ -41,7 +41,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.closePropertyPane(); }); - it("3. Check Image alignment is working as expected", function() { + it("3. Check Image alignment is working as expected", function () { cy.SearchEntityandOpen("Table1"); cy.editColumn("avatar"); cy.changeColumnType("Image"); @@ -49,34 +49,28 @@ describe("Test Create Api and Bind to Table widget", function() { cy.SearchEntityandOpen("Table1"); cy.backFromPropertyPanel(); cy.moveToStyleTab(); - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidgetv2 .tbody .image-cell-wrapper`) .first() .should("have.css", "justify-content", "center"); cy.SearchEntityandOpen("Table1"); cy.moveToStyleTab(); - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidgetv2 .tbody .image-cell-wrapper`) .first() .should("have.css", "justify-content", "flex-end"); cy.SearchEntityandOpen("Table1"); cy.moveToStyleTab(); - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidgetv2 .tbody .image-cell-wrapper`) .first() .should("have.css", "justify-content", "flex-start"); }); - it("4. Update table json data and check the derived column values after update", function() { + it("4. Update table json data and check the derived column values after update", function () { cy.SearchEntityandOpen("Table1"); cy.moveToContentTab(); cy.tableV2ColumnDataValidation("id"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Pagination_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Pagination_spec.js index ef04aeaaa0..4c4b60429a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Pagination_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableV2_Widget_API_Pagination_spec.js @@ -1,16 +1,16 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/tableV2TextPaginationDsl.json"); -describe("Test Create Api and Bind to Table widget V2", function() { +describe("Test Create Api and Bind to Table widget V2", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table", function() { + it("1. Create an API and Execute the API and bind with Table", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate Table V2 with API data and then add a column", function() { + it("2. Validate Table V2 with API data and then add a column", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("tabledata", "{{Api1.data}}"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableWidget_selectedRow_Input_widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableWidget_selectedRow_Input_widget_spec.js index 80cec9a7cb..1c9741c4e7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableWidget_selectedRow_Input_widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_TableWidget_selectedRow_Input_widget_spec.js @@ -4,12 +4,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the table widget and input Widget", function() { +describe("Binding the table widget and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from table widget", function() { + it("Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); cy.wait("@updateLayout").should( @@ -19,7 +19,7 @@ describe("Binding the table widget and input Widget", function() { ); }); - it("validation of data displayed in input widgets based on selected row", function() { + it("validation of data displayed in input widgets based on selected row", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultselectedrow", "2"); cy.readTabledataPublish("2", "0").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Derived_Column_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Derived_Column_spec.js index e2a344ce43..98752d5ade 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Derived_Column_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Derived_Column_spec.js @@ -3,17 +3,17 @@ const dsl = require("../../../../fixtures/tableTextPaginationDsl.json"); const testdata = require("../../../../fixtures/testdata.json"); const widgetsPage = require("../../../../locators/Widgets.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table", function() { + it("1. Create an API and Execute the API and bind with Table", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate Table with API data and then add a column", function() { + it("2. Validate Table with API data and then add a column", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("tabledata", "{{Api1.data}}"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); @@ -42,38 +42,32 @@ describe("Test Create Api and Bind to Table widget", function() { cy.closePropertyPane(); }); - it("3. Check Image alignment is working as expected", function() { + it("3. Check Image alignment is working as expected", function () { cy.SearchEntityandOpen("Table1"); cy.editColumn("avatar"); cy.changeColumnType("Image", false); cy.closePropertyPane(); cy.SearchEntityandOpen("Table1"); - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidget .tbody .image-cell`) .first() .should("have.css", "background-position", "50% 50%"); cy.SearchEntityandOpen("Table1"); - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidget .tbody .image-cell`) .first() .should("have.css", "background-position", "100% 50%"); cy.SearchEntityandOpen("Table1"); - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); cy.closePropertyPane(); cy.get(`.t--widget-tablewidget .tbody .image-cell`) .first() .should("have.css", "background-position", "0% 50%"); }); - it("4. Update table json data and check the derived column values after update", function() { + it("4. Update table json data and check the derived column values after update", function () { cy.SearchEntityandOpen("Table1"); cy.backFromPropertyPanel(); cy.tableColumnDataValidation("id"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Pagination_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Pagination_spec.js index 1ffccdf777..78ee8eecd0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Pagination_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_Table_Widget_API_Pagination_spec.js @@ -1,27 +1,23 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/tableTextPaginationDsl.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table", function() { + it("1. Create an API and Execute the API and bind with Table", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate Table with API data and then add a column", function() { + it("2. Validate Table with API data and then add a column", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("tabledata", "{{Api1.data.users}}"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); - cy.get(`.t--widget-tablewidget .page-item`) - .first() - .should("contain", "1"); + cy.get(`.t--widget-tablewidget .page-item`).first().should("contain", "1"); cy.intercept("/api/v1/actions/execute").as("getNextPage"); - cy.get(`.t--widget-tablewidget .t--table-widget-next-page`) - .first() - .click(); + cy.get(`.t--widget-tablewidget .t--table-widget-next-page`).first().click(); cy.wait("@getNextPage").then((interception) => { const hasPaginationField = interception.request.body.includes( '"paginationField":"NEXT"', @@ -29,9 +25,7 @@ describe("Test Create Api and Bind to Table widget", function() { expect(hasPaginationField).to.equal(true); }); cy.wait(2000); - cy.get(`.t--widget-tablewidget .page-item`) - .first() - .should("contain", "2"); + cy.get(`.t--widget-tablewidget .page-item`).first().should("contain", "2"); cy.closePropertyPane(); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableV2WithSnipingMode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableV2WithSnipingMode_spec.js index 381516c118..2ebf606a48 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableV2WithSnipingMode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableV2WithSnipingMode_spec.js @@ -1,18 +1,18 @@ const dsl = require("../../../../fixtures/tableV2WidgetDsl.json"); -describe("Test Create Api and Bind to Table widget V2", function() { +describe("Test Create Api and Bind to Table widget V2", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test_Add users api, execute it and go to sniping mode.", function() { + it("1. Test_Add users api, execute it and go to sniping mode.", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.RunAPI(); cy.get(".t--select-in-canvas").click(); cy.get(".t--sniping-mode-banner").should("be.visible"); }); - it("2. Click on table name controller to bind the data and exit sniping mode", function() { + it("2. Click on table name controller to bind the data and exit sniping mode", function () { cy.get(".t--draggable-tablewidgetv2").trigger("mouseover"); cy.get(".t--settings-sniping-control").click(); cy.get(".t--property-control-tabledata .CodeMirror").contains( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableWithSnipingMode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableWithSnipingMode_spec.js index 86b425dc31..23fcdd97f8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableWithSnipingMode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_dataToTableWithSnipingMode_spec.js @@ -1,18 +1,18 @@ const dsl = require("../../../../fixtures/tableWidgetDsl.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("Test_Add users api, execute it and go to sniping mode.", function() { + it("Test_Add users api, execute it and go to sniping mode.", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.RunAPI(); cy.get(".t--select-in-canvas").click(); cy.get(".t--sniping-mode-banner").should("be.visible"); }); - it("Click on table name controller to bind the data and exit sniping mode", function() { + it("Click on table name controller to bind the data and exit sniping mode", function () { cy.get(".t--draggable-tablewidget").trigger("mouseover"); cy.get(".t--settings-sniping-control").click(); cy.get(".t--property-control-tabledata .CodeMirror").contains( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableApi_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableApi_spec.js index fda61d4f58..0d79b1443e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableApi_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableApi_spec.js @@ -2,13 +2,13 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/tableWidgetDsl.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { let apiData; before(() => { cy.addDsl(dsl); }); - it("1. Test_Add users api and execute api", function() { + it("1. Test_Add users api and execute api", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=10"); cy.RunAPI(); cy.get(apiPage.jsonResponseTab).click(); @@ -25,7 +25,7 @@ describe("Test Create Api and Bind to Table widget", function() { }); }); - it("2. Test_Validate the Api data is updated on Table widget", function() { + it("2. Test_Validate the Api data is updated on Table widget", function () { cy.SearchEntityandOpen("Table1"); //cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", "{{ Api1.data}}"); @@ -47,14 +47,12 @@ describe("Test Create Api and Bind to Table widget", function() { cy.get(commonlocators.backToEditor).click(); }); - it("3. Validate onSearchTextChanged function is called when configured for search text", function() { + it("3. Validate onSearchTextChanged function is called when configured for search text", function () { cy.SearchEntityandOpen("Table1"); cy.togglebarDisable( ".t--property-control-enableclientsidesearch input[type='checkbox']", ); - cy.get(".t--widget-tablewidget .t--search-input") - .first() - .type("Currey"); + cy.get(".t--widget-tablewidget .t--search-input").first().type("Currey"); cy.wait("@postExecute").then((interception) => { apiData = JSON.stringify(interception.response.body.data.body[0].name); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableV2Api_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableV2Api_spec.js index 526355f0d0..5f3b7dbda1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableV2Api_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_tableV2Api_spec.js @@ -2,12 +2,12 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/tableV2WidgetDsl.json"); import apiPage from "../../../../locators/ApiEditor"; -describe("Test Create Api and Bind to Table widget V2", function() { +describe("Test Create Api and Bind to Table widget V2", function () { let apiData; before(() => { cy.addDsl(dsl); }); - it("1. Test_Add users api and execute api", function() { + it("1. Test_Add users api and execute api", function () { cy.createAndFillApi(this.data.userApi, "/mock-api?records=100"); cy.RunAPI(); cy.get(apiPage.jsonResponseTab).click(); @@ -24,7 +24,7 @@ describe("Test Create Api and Bind to Table widget V2", function() { }); }); - it("2. Test_Validate the Api data is updated on Table widget", function() { + it("2. Test_Validate the Api data is updated on Table widget", function () { cy.SearchEntityandOpen("Table1"); cy.openPropertyPane("tablewidgetv2"); cy.testJsontext("tabledata", "{{Api1.data}}"); @@ -46,15 +46,13 @@ describe("Test Create Api and Bind to Table widget V2", function() { cy.get(commonlocators.backToEditor).click(); }); - it("3. Validate onSearchTextChanged function is called when configured for search text", function() { + it("3. Validate onSearchTextChanged function is called when configured for search text", function () { cy.SearchEntityandOpen("Table1"); cy.openPropertyPane("tablewidgetv2"); cy.togglebarDisable( ".t--property-control-clientsidesearch input[type='checkbox']", ); - cy.get(".t--widget-tablewidgetv2 .t--search-input") - .first() - .type("Currey"); + cy.get(".t--widget-tablewidgetv2 .t--search-input").first().type("Currey"); cy.wait("@postExecute").then((interception) => { apiData = JSON.stringify(interception.response.body.data.body[0].name); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_TableV2_Widget_DefaultSearch_Input_widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_TableV2_Widget_DefaultSearch_Input_widget_spec.js index 698a944b6f..22d4c0aad0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_TableV2_Widget_DefaultSearch_Input_widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_TableV2_Widget_DefaultSearch_Input_widget_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the Table and input Widget", function() { +describe("Binding the Table and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget", function() { + it("1. Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -18,7 +18,7 @@ describe("Binding the Table and input Widget", function() { ); }); - it("2. validation of data displayed in input widgets based on search value set", function() { + it("2. validation of data displayed in input widgets based on search value set", function () { cy.SearchEntityandOpen("Table1"); cy.get(".t--property-control-allowsearching input").click({ force: true }); cy.testJsontext("defaultsearchtext", "2736212"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_Table_Widget_DefaultSearch_Input_widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_Table_Widget_DefaultSearch_Input_widget_spec.js index 8e3abd119a..fab1873ee0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_Table_Widget_DefaultSearch_Input_widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Binding_Table_Widget_DefaultSearch_Input_widget_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the Table and input Widget", function() { +describe("Binding the Table and input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from table widget", function() { + it("Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -18,7 +18,7 @@ describe("Binding the Table and input Widget", function() { ); }); - it("validation of data displayed in input widgets based on search value set", function() { + it("validation of data displayed in input widgets based on search value set", function () { cy.SearchEntityandOpen("Table1"); cy.testJsontext("defaultsearchtext", "2736212"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonGroup_binding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonGroup_binding_spec.js index 8f67f8fc57..b5124646c6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonGroup_binding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonGroup_binding_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/buttonGroupDsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Widget Grouping", function() { +describe("Widget Grouping", function () { before(() => { cy.addDsl(dsl); }); - it("Button widgets widget on click info message valdiation with font family", function() { + it("Button widgets widget on click info message valdiation with font family", function () { cy.get(".t--buttongroup-widget button") .contains("Add") .click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonWidgets_NavigateTo_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonWidgets_NavigateTo_validation_spec.js index 3b9d899551..1c67a451a3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonWidgets_NavigateTo_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ButtonWidgets_NavigateTo_validation_spec.js @@ -4,12 +4,12 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the button Widgets and validating NavigateTo Page functionality", function() { +describe("Binding the button Widgets and validating NavigateTo Page functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Button widget with action navigate to page", function() { + it("Button widget with action navigate to page", function () { cy.openPropertyPane("buttonwidget"); cy.get(widgetsPage.actionSelect).click(); cy.get(commonlocators.chooseAction) @@ -28,7 +28,7 @@ describe("Binding the button Widgets and validating NavigateTo Page functionalit cy.wait(300); }); - it("Button click should take the control to page link validation", function() { + it("Button click should take the control to page link validation", function () { cy.PublishtheApp(); cy.wait(2000); cy.get(publish.buttonWidget).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ChartText_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ChartText_spec.js index 52765346ac..5d610b2cf3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ChartText_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/ChartText_spec.js @@ -3,11 +3,11 @@ const viewWidgetsPage = require("../../../../locators/ViewWidgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/ChartTextDsl.json"); -describe("Text-Chart Binding Functionality", function() { +describe("Text-Chart Binding Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Text-Chart Binding Functionality View", function() { + it("Text-Chart Binding Functionality View", function () { cy.openPropertyPane("textwidget"); cy.testJsontext("text", JSON.stringify(this.data.chartInputValidate)); cy.get(commonlocators.TextInside).should( @@ -16,13 +16,8 @@ describe("Text-Chart Binding Functionality", function() { ); cy.closePropertyPane(); cy.openPropertyPane("chartwidget"); - cy.get(viewWidgetsPage.chartType) - .last() - .click({ force: true }); - cy.get(".t--dropdown-option") - .children() - .contains("Column Chart") - .click(); + cy.get(viewWidgetsPage.chartType).last().click({ force: true }); + cy.get(".t--dropdown-option").children().contains("Column Chart").click(); cy.get(" .t--property-control-charttype .bp3-popover-target") .last() .should("have.text", "Column Chart"); @@ -37,13 +32,11 @@ describe("Text-Chart Binding Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Text-Chart Binding Functionality Publish", function() { + it("Text-Chart Binding Functionality Publish", function () { cy.get(publish.chartCanvasVal).should("be.visible"); cy.get(publish.chartWidget).should("have.css", "opacity", "1"); const labels = [ @@ -52,12 +45,8 @@ describe("Text-Chart Binding Functionality", function() { this.data.Chartval[2], ]; [0, 1, 2].forEach((k) => { - cy.get(publish.rectChart) - .eq(k) - .trigger("mousemove", { force: true }); - cy.get(publish.chartLab) - .eq(k) - .should("have.text", labels[k]); + cy.get(publish.rectChart).eq(k).trigger("mousemove", { force: true }); + cy.get(publish.chartLab).eq(k).should("have.text", labels[k]); }); cy.get(commonlocators.TextInside).should( "have.text", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Entity_delete_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Entity_delete_spec.js index 66911556ba..66bed6a3d1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Entity_delete_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Entity_delete_spec.js @@ -1,19 +1,15 @@ const dsl = require("../../../../fixtures/SimpleBinding.json"); const widgetsPage = require("../../../../locators/Widgets.json"); -describe("Binding the multiple widgets and validating default data", function() { +describe("Binding the multiple widgets and validating default data", function () { before(() => { cy.addDsl(dsl); }); - it("Checks if delete will remove bindings", function() { - cy.get(widgetsPage.textWidget) - .first() - .click({ force: true }); + it("Checks if delete will remove bindings", function () { + cy.get(widgetsPage.textWidget).first().click({ force: true }); cy.get("body").type("{del}", { force: true }); - cy.get(widgetsPage.textWidget) - .first() - .should("not.have.text", "Label"); + cy.get(widgetsPage.textWidget).first().should("not.have.text", "Label"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/InputWidgets_NavigateTo_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/InputWidgets_NavigateTo_validation_spec.js index 06e0333029..f125c2b26d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/InputWidgets_NavigateTo_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/InputWidgets_NavigateTo_validation_spec.js @@ -10,7 +10,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Binding the multiple Widgets and validating NavigateTo Page", function() { +describe("Binding the multiple Widgets and validating NavigateTo Page", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -24,7 +24,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function cy.wait(5000); //dsl to settle! }); - it("1. Create MyPage and valdiate if its successfully created", function() { + it("1. Create MyPage and valdiate if its successfully created", function () { cy.Createpage(pageid); cy.addDsl(dsl2); cy.wait(5000); //dsl to settle! @@ -34,15 +34,13 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible"); }); - it("2. Input widget test with default value from table widget", function() { + it("2. Input widget test with default value from table widget", function () { cy.get(`.t--entity-name:contains("Page1")`) .should("be.visible") .click({ force: true }); cy.openPropertyPane("inputwidgetv2"); cy.get(widgetsPage.defaultInput).type(testdata.defaultInputWidget); - cy.get(widgetsPage.inputOnTextChange) - .first() - .click({ force: true }); + cy.get(widgetsPage.inputOnTextChange).first().click({ force: true }); cy.get(commonlocators.chooseAction) .children() .contains("Navigate to") @@ -54,7 +52,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function cy.assertPageSave(); }); - it("3. Validate NavigateTo Page functionality ", function() { + it("3. Validate NavigateTo Page functionality ", function () { cy.wait(4000); cy.isSelectRow(1); cy.readTabledataPublish("1", "0").then((tabData) => { @@ -66,10 +64,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function .invoke("attr", "value") .should("contain", tabValue); cy.get(widgetsPage.chartWidget).should("not.exist"); - cy.get(publish.inputGrp) - .first() - .type("123") - .wait(2000); + cy.get(publish.inputGrp).first().type("123").wait(2000); cy.waitUntil(() => cy.get(widgetsPage.chartWidget).should("be.visible"), { errorMsg: "Execute call did not complete evn after 20 secs", timeout: 20000, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Invalid_binding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Invalid_binding_spec.js index 669a9ff4e9..872f38656f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Invalid_binding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Invalid_binding_spec.js @@ -1,18 +1,18 @@ const dsl = require("../../../../fixtures/Invalid_binding_dsl.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple widgets and validating default data", function() { +describe("Binding the multiple widgets and validating default data", function () { before(() => { cy.addDsl(dsl); }); - it("Dropdown widget test with invalid binding value", function() { + it("Dropdown widget test with invalid binding value", function () { cy.openPropertyPane("selectwidget"); cy.testJsontext("options", JSON.stringify(testdata.defaultdataBinding)); cy.evaluateErrorMessage(testdata.dropdownErrorMsg); }); - it("Table widget test with invalid binding value", function() { + it("Table widget test with invalid binding value", function () { cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", JSON.stringify(testdata.defaultdataBinding)); cy.evaluateErrorMessage(testdata.tableWidgetErrorMsg); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts index 90c55f8029..ffc2c0dc9d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToInput_Spec.ts @@ -16,8 +16,9 @@ describe("Validate JSObjects binding to Input widget", () => { let jsOjbNameReceived: any; - it("1. Bind Input widget with JSObject", function() { - jsEditor.CreateJSObject(`export default { + it("1. Bind Input widget with JSObject", function () { + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: () => { @@ -26,12 +27,14 @@ describe("Validate JSObjects binding to Input widget", () => { myFun2: async () => { //use async-await or promises } - }`, { - paste: true, - completeReplace: true, - toRun: true, - shouldCreateNewJSObj: true, - }); + }`, + { + paste: true, + completeReplace: true, + toRun: true, + shouldCreateNewJSObj: true, + }, + ); ee.ExpandCollapseEntity("Widgets"); //to expand widgets ee.ExpandCollapseEntity("Form1"); ee.SelectEntityByName("Input2"); @@ -41,7 +44,10 @@ describe("Validate JSObjects binding to Input widget", () => { .should("equal", "Hello"); //Before mapping JSObject value of input cy.get("@jsObjName").then((jsObjName) => { jsOjbNameReceived = jsObjName; - propPane.UpdatePropertyFieldValue("Default Value", "{{" + jsObjName + ".myFun1()}}"); + propPane.UpdatePropertyFieldValue( + "Default Value", + "{{" + jsObjName + ".myFun1()}}", + ); }); cy.get(locator._inputWidget) .last() @@ -65,7 +71,7 @@ describe("Validate JSObjects binding to Input widget", () => { // }); }); - it("2. Bug 11529 - Verify autosave while editing JSObj & reference changes when JSObj is mapped", function() { + it("2. Bug 11529 - Verify autosave while editing JSObj & reference changes when JSObj is mapped", function () { const jsBody = `export default { myVar1: [], myVar2: {}, @@ -81,9 +87,16 @@ describe("Validate JSObjects binding to Input widget", () => { ee.ExpandCollapseEntity("Widgets"); ee.ExpandCollapseEntity("Form1"); ee.SelectEntityByName("Input2"); - cy.get(locator._inputWidget).last().invoke("attr", "value").should("equal", 'Success'); //Function is renamed & reference is checked if updated properly! - deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first().should('have.value', 'Hello') - cy.get(locator._widgetInputSelector("inputwidgetv2")).last().should('have.value', 'Success') + cy.get(locator._inputWidget) + .last() + .invoke("attr", "value") + .should("equal", "Success"); //Function is renamed & reference is checked if updated properly! + deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .should("have.value", "Hello"); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .should("have.value", "Success"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts index eabba472cb..5ce31f69c0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JSObjectToListWidget_Spec.ts @@ -1,22 +1,21 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let dataSet: any, valueToTest: any, jsName: any; - describe("Validate JSObj binding to Table widget", () => { before(() => { cy.fixture("listwidgetdsl").then((val: any) => { _.agHelper.AddDsl(val); }); - cy.fixture("example").then(function(data: any) { + cy.fixture("example").then(function (data: any) { dataSet = data; }); }); it("1. Add users api and bind to JSObject", () => { - cy.fixture("datasources").then((datasourceFormData : any) => { + cy.fixture("datasources").then((datasourceFormData: any) => { _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); - }) + }); _.apiPage.RunAPI(); _.agHelper.GetNClick(_.dataSources._queryResponse("JSON")); _.apiPage.ReadApiResponsebyKey("name"); @@ -38,7 +37,7 @@ describe("Validate JSObj binding to Table widget", () => { }); }); - it("2. Validate the Api data is updated on List widget + Bug 12438", function() { + it("2. Validate the Api data is updated on List widget + Bug 12438", function () { _.entityExplorer.SelectEntityByName("List1", "Widgets"); _.propPane.UpdatePropertyFieldValue( "Items", @@ -74,7 +73,7 @@ describe("Validate JSObj binding to Table widget", () => { _.deployMode.NavigateBacktoEditor(); }); - it("3. Validate the List widget + Bug 12438 ", function() { + it("3. Validate the List widget + Bug 12438 ", function () { _.entityExplorer.SelectEntityByName("List1", "Widgets"); _.propPane.moveToStyleTab(); _.propPane.UpdatePropertyFieldValue("Item Spacing (px)", "50"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JS_Toggle_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JS_Toggle_spec.js index 3a43812490..cf6985ba04 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JS_Toggle_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/JS_Toggle_spec.js @@ -7,9 +7,7 @@ describe("JS Toggle tests", () => { it("switches the toggle to Button widget", () => { cy.openPropertyPane("buttonwidget"); - cy.get(".t--property-control-visible") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-visible").find(".t--js-toggle").click(); cy.get(".t--property-control-visible") .find(".t--js-toggle") @@ -21,9 +19,7 @@ describe("JS Toggle tests", () => { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.get(".t--property-control-visible") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-visible").find(".t--js-toggle").click(); cy.get(".t--property-control-visible") .find(".t--js-toggle") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/LoadashBasic_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/LoadashBasic_Spec.ts index ecfabbfeac..5e46c731cb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/LoadashBasic_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/LoadashBasic_Spec.ts @@ -1,41 +1,50 @@ -import { ObjectsRegistry } from "../../../../support/Objects/Registry" +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSet: any; let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, - propPane = ObjectsRegistry.PropertyPane, - locator = ObjectsRegistry.CommonLocators, - deployMode = ObjectsRegistry.DeployMode; + ee = ObjectsRegistry.EntityExplorer, + propPane = ObjectsRegistry.PropertyPane, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; describe("Loadash basic test with input Widget", () => { - - before(() => { - cy.fixture('inputBindingdsl').then((val: any) => { - agHelper.AddDsl(val) - }); - - cy.fixture("testdata").then(function (data: any) { - dataSet = data; - }); + before(() => { + cy.fixture("inputBindingdsl").then((val: any) => { + agHelper.AddDsl(val); }); - it("1. Input widget test with default value for atob method", () => { - ee.SelectEntityByName("Input1", 'Widgets') - propPane.UpdatePropertyFieldValue("Default Value", dataSet.defaultInputBinding + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') + cy.fixture("testdata").then(function (data: any) { + dataSet = data; }); + }); - it("2. Input widget test with default value for btoa method", function () { - ee.SelectEntityByName("Input2") - propPane.UpdatePropertyFieldValue("Default Value", dataSet.loadashInput + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - }); + it("1. Input widget test with default value for atob method", () => { + ee.SelectEntityByName("Input1", "Widgets"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.defaultInputBinding + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + }); - it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () { - deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first().invoke("attr", "value") - .should("contain", "7") - cy.get(locator._widgetInputSelector("inputwidgetv2")).last().invoke("attr", "value") - .should("contain", "7"); - }); -}); \ No newline at end of file + it("2. Input widget test with default value for btoa method", function () { + ee.SelectEntityByName("Input2"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.loadashInput + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + }); + + it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () { + deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .invoke("attr", "value") + .should("contain", "7"); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .invoke("attr", "value") + .should("contain", "7"); + }); +}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/MomentBasic_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/MomentBasic_Spec.ts index fbb486d047..00adb1dcfc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/MomentBasic_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/MomentBasic_Spec.ts @@ -1,42 +1,49 @@ -import { ObjectsRegistry } from "../../../../support/Objects/Registry" +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSet: any; let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, - propPane = ObjectsRegistry.PropertyPane, - locator = ObjectsRegistry.CommonLocators, - deployMode = ObjectsRegistry.DeployMode; + ee = ObjectsRegistry.EntityExplorer, + propPane = ObjectsRegistry.PropertyPane, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; describe("Validate basic binding of Input widget to Input widget", () => { - - before(() => { - cy.fixture('inputBindingdsl').then((val: any) => { - agHelper.AddDsl(val) - }); - - cy.fixture("testdata").then(function (data: any) { - dataSet = data; - }); + before(() => { + cy.fixture("inputBindingdsl").then((val: any) => { + agHelper.AddDsl(val); }); - it("1. Input widget test with default value from another Input widget", () => { - ee.SelectEntityByName("Input1", 'Widgets') - propPane.UpdatePropertyFieldValue("Default Value", dataSet.defaultInputBinding + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') + cy.fixture("testdata").then(function (data: any) { + dataSet = data; }); + }); - it("2. Binding second input widget with first input widget and validating", function () { - ee.SelectEntityByName("Input2") - propPane.UpdatePropertyFieldValue("Default Value", dataSet.momentInput + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - }); + it("1. Input widget test with default value from another Input widget", () => { + ee.SelectEntityByName("Input1", "Widgets"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.defaultInputBinding + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + }); - it("3. Publish widget and validate the data displayed in input widgets", function () { - var currentTime = new Date(); - deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first() - .should("contain.value", currentTime.getFullYear()); - cy.get(locator._widgetInputSelector("inputwidgetv2")).last() - .should("contain.value", currentTime.getFullYear()); - }); -}); \ No newline at end of file + it("2. Binding second input widget with first input widget and validating", function () { + ee.SelectEntityByName("Input2"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.momentInput + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + }); + + it("3. Publish widget and validate the data displayed in input widgets", function () { + var currentTime = new Date(); + deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .should("contain.value", currentTime.getFullYear()); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .should("contain.value", currentTime.getFullYear()); + }); +}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/NavigateToFeatureValidation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/NavigateToFeatureValidation_spec.js index f3df118e75..0053805755 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/NavigateToFeatureValidation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/NavigateToFeatureValidation_spec.js @@ -8,7 +8,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget with Input Widget and Navigate to functionality validation", function() { +describe("Table Widget with Input Widget and Navigate to functionality validation", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -21,7 +21,7 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio cy.addDsl(dsl); }); - it("Table Widget Functionality with multiple page", function() { + it("Table Widget Functionality with multiple page", function () { cy.openPropertyPane("tablewidget"); cy.widgetText( "Table1", @@ -31,7 +31,7 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination)); }); - it("Create MyPage and valdiate if its successfully created", function() { + it("Create MyPage and valdiate if its successfully created", function () { cy.Createpage(pageid); cy.addDsl(dsl2); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -40,7 +40,7 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible"); }); - it("Validate NavigateTo Page functionality ", function() { + it("Validate NavigateTo Page functionality ", function () { cy.get(`.t--entity-name:contains("Page1")`) .should("be.visible") .click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/No_Binding_Prompt_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/No_Binding_Prompt_spec.js index 443ba2aabc..9ded57daf3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/No_Binding_Prompt_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/No_Binding_Prompt_spec.js @@ -2,7 +2,7 @@ const dsl = require("../../../../fixtures/inputdsl.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const dynamicInput = require("../../../../locators/DynamicInput.json"); -describe("Binding prompt", function() { +describe("Binding prompt", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SelectWidget_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SelectWidget_Spec.ts index 1fed36743f..8a88279a3c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SelectWidget_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SelectWidget_Spec.ts @@ -11,7 +11,7 @@ describe("Validate basic binding of Input widget to Input widget", () => { }); }); - it("1. Validation of default displayed in Select widget based on row selected", function() { + it("1. Validation of default displayed in Select widget based on row selected", function () { deployMode.DeployApp(); //Verify Default selected row is selected by default @@ -46,7 +46,7 @@ describe("Validate basic binding of Input widget to Input widget", () => { }); //Till bug fixed - it.skip("2. Validation of default displayed in Select widget based on row selected + Bug 12531", function() { + it.skip("2. Validation of default displayed in Select widget based on row selected + Bug 12531", function () { table.SelectTableRow(1); agHelper.ReadSelectedDropDownValue().then(($selectedValue) => { expect($selectedValue).to.eq("#2"); @@ -75,8 +75,8 @@ describe("Validate basic binding of Input widget to Input widget", () => { }); it("3. Verify Selecting the already selected row deselects it", () => { - table.SelectTableRow(0);//select here - table.SelectTableRow(0, 0, false);//deselect here + table.SelectTableRow(0); //select here + table.SelectTableRow(0, 0, false); //deselect here agHelper.ReadSelectedDropDownValue().then(($selectedValue) => { expect($selectedValue).to.eq("Select option"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SmartSubstitutionWidgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SmartSubstitutionWidgets_spec.js index 4de0dc193d..04ce197546 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SmartSubstitutionWidgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/SmartSubstitutionWidgets_spec.js @@ -3,7 +3,7 @@ const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/tableAndChart.json"); const viewWidgetsPage = require("../../../../locators/ViewWidgets.json"); -describe("Text-Table Binding Functionality", function() { +describe("Text-Table Binding Functionality", function () { const updateData = `[ { "x": "Product1", @@ -22,7 +22,7 @@ describe("Text-Table Binding Functionality", function() { cy.addDsl(dsl); }); - it("1. Update table data and assert", function() { + it("1. Update table data and assert", function () { cy.openPropertyPane("tablewidget"); cy.get(widgetLocators.tabedataField).then(($el) => { cy.updateCodeInput($el, updateData); @@ -32,7 +32,7 @@ describe("Text-Table Binding Functionality", function() { }); }); - it("2. Update chart data and assert", function() { + it("2. Update chart data and assert", function () { cy.openPropertyPane("chartwidget"); cy.get(".t--property-control-chart-series-data-control").then(($el) => { cy.updateCodeInput($el, updateData); @@ -48,7 +48,7 @@ describe("Text-Table Binding Functionality", function() { }); }); - it("3. Publish and assert", function() { + it("3. Publish and assert", function () { cy.PublishtheApp(false); cy.readTabledata("1", "0").then((cellData) => { cy.wrap(cellData).should("equal", "Product2"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2Widgets_NavigateTo_Validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2Widgets_NavigateTo_Validation_spec.js index e07cd71c22..e6f0892551 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2Widgets_NavigateTo_Validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2Widgets_NavigateTo_Validation_spec.js @@ -8,7 +8,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget V2 and Navigate to functionality validation", function() { +describe("Table Widget V2 and Navigate to functionality validation", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -22,7 +22,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function() cy.wait(2000); //dsl to settle! }); - it("1. Create MyPage and validate if its successfully created", function() { + it("1. Create MyPage and validate if its successfully created", function () { cy.Createpage(pageid); cy.addDsl(dsl2); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -31,7 +31,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function() cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible"); }); - it("2. Table Widget V2 Functionality with multiple page", function() { + it("2. Table Widget V2 Functionality with multiple page", function () { cy.get(`.t--entity-name:contains("Page1")`) .should("be.visible") .click({ force: true }); @@ -43,9 +43,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function() ); cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination)); cy.focused().blur(); - cy.get(widgetsPage.tableOnRowSelect) - .scrollIntoView() - .should("be.visible"); + cy.get(widgetsPage.tableOnRowSelect).scrollIntoView().should("be.visible"); cy.get(widgetsPage.tableOnRowSelect).click(); cy.get(commonlocators.chooseAction) .children() @@ -58,7 +56,7 @@ describe("Table Widget V2 and Navigate to functionality validation", function() cy.assertPageSave(); }); - it("3. Validate NavigateTo Page functionality ", function() { + it("3. Validate NavigateTo Page functionality ", function () { cy.wait(2000); cy.PublishtheApp(); cy.get(widgetsPage.chartWidget).should("not.exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_ClientSide_Search_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_ClientSide_Search_spec.js index 31418ffde4..5910b81cb8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_ClientSide_Search_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_ClientSide_Search_spec.js @@ -1,16 +1,14 @@ const dsl = require("../../../../fixtures/TableV2ClientSearch.json"); -describe("Test Create Api and Bind to Table widget V2", function() { +describe("Test Create Api and Bind to Table widget V2", function () { before(() => { cy.addDsl(dsl); }); - it("1. Validate onSearchTextChanged function is called when configured for search text", function() { + it("1. Validate onSearchTextChanged function is called when configured for search text", function () { cy.wait(5000); // input text in search bar - cy.get(".t--widget-tablewidgetv2 .t--search-input input") - .first() - .type("2"); + cy.get(".t--widget-tablewidgetv2 .t--search-input input").first().type("2"); cy.wait(5000); // Verify it filtered the table cy.readTableV2dataPublish("0", "0").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Property_ToggleJs_With_Binding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Property_ToggleJs_With_Binding_spec.js index c1016424ab..8383efb7ad 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Property_ToggleJs_With_Binding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Property_ToggleJs_With_Binding_spec.js @@ -4,18 +4,16 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const dsl = require("../../../../fixtures/tableV2NewDsl.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Table Widget V2 property pane feature validation", function() { +describe("Table Widget V2 property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget V2 toggle test for text alignment", function() { + it("1. Table widget V2 toggle test for text alignment", function () { cy.openPropertyPane("tablewidgetv2"); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleTextAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextAlign).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingAlign); @@ -24,20 +22,16 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-end"); }); - it("2. Table widget V2 change text size and validate", function() { + it("2. Table widget V2 change text size and validate", function () { cy.readTableV2dataValidateCSS("0", "0", "font-size", "14px"); cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleTextAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextAlign).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.get(widgetsPage.textSize) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSize).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.selectTxtSize("XL"); @@ -45,14 +39,12 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("0", "0", "font-size", "30px"); }); - it("3. Table widget toggle test for text size", function() { + it("3. Table widget toggle test for text size", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleTextSize) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextSize).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingNewSize, 0); @@ -61,19 +53,15 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "font-size", "24px"); }); - it("4. Table widget toggle test for vertical Alignment", function() { + it("4. Table widget toggle test for vertical Alignment", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleTextSize) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextSize).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.get(widgetsPage.toggleVerticalAlig) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleVerticalAlig).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingVerticalAlig, 2); @@ -82,7 +70,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-end"); }); - it("5. Table widget V2 toggle test for style Alignment", function() { + it("5. Table widget V2 toggle test for style Alignment", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); @@ -94,9 +82,7 @@ describe("Table Widget V2 property pane feature validation", function() { */ // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.get(widgetsPage.toggleTextStyle) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextStyle).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingStyle, 1); @@ -105,19 +91,15 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "font-style", "italic"); }); - it("6. Table widget toggle test for text color", function() { + it("6. Table widget toggle test for text color", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleVerticalAlig) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleVerticalAlig).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.get(widgetsPage.toggleJsColor) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleJsColor).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor); @@ -127,19 +109,15 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "color", "rgb(255, 0, 0)"); }); - it("7. Table widget toggle test for background color", function() { + it("7. Table widget toggle test for background color", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.editColumn("id"); cy.moveToStyleTab(); - cy.get(widgetsPage.toggleJsColor) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleJsColor).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); - cy.get(widgetsPage.toggleJsBcgColor) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleJsBcgColor).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.toggleJsAndUpdateWithIndex("tabledata", testdata.bindingTextColor, 4); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Style_ToggleJS_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Style_ToggleJS_spec.js index c05f8cc99d..af09e966a1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Style_ToggleJS_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Style_ToggleJS_spec.js @@ -9,12 +9,12 @@ const propPane = ObjectsRegistry.PropertyPane, ee = ObjectsRegistry.EntityExplorer, agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget V2 property pane feature validation", function() { +describe("Table Widget V2 property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget V2 toggle test for text alignment", function() { + it("1. Table widget V2 toggle test for text alignment", function () { ee.SelectEntityByName("Table1"); cy.editColumn("id"); cy.moveToStyleTab(); @@ -25,18 +25,16 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-end"); }); - it("2. Table widget V2 change text size and validate", function() { + it("2. Table widget V2 change text size and validate", function () { cy.readTableV2dataValidateCSS("0", "0", "font-size", "14px"); //cy.movetoStyleTab(); - cy.get(widgetsPage.textSize) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSize).last().click({ force: true }); agHelper.Sleep(); cy.selectTxtSize("XL"); cy.readTableV2dataValidateCSS("0", "0", "font-size", "30px"); }); - it("3. Table widget toggle test for vertical Alignment", function() { + it("3. Table widget toggle test for vertical Alignment", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Vertical Alignment", testdata.bindingVerticalAlig); @@ -45,7 +43,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-end"); }); - it("4. Table widget toggle test for text size", function() { + it("4. Table widget toggle test for text size", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Text Size", testdata.bindingNewSize); @@ -54,7 +52,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "font-size", "24px"); }); - it("5. Table widget V2 toggle test for style Alignment", function() { + it("5. Table widget V2 toggle test for style Alignment", function () { agHelper.Sleep(); propPane.EnterJSContext("Emphasis", testdata.bindingStyle); cy.wait("@updateLayout"); @@ -62,7 +60,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "font-style", "italic"); }); - it("6. Table widget toggle test for text color", function() { + it("6. Table widget toggle test for text color", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Text Color", testdata.bindingTextColor); @@ -71,7 +69,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "color", "rgb(255, 0, 0)"); }); - it("7. Table widget toggle test for background color", function() { + it("7. Table widget toggle test for background color", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Cell Background", testdata.bindingTextColor); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Widget__CondtionalFormatting_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Widget__CondtionalFormatting_spec.js index 4f97a87c3f..b8605cd561 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Widget__CondtionalFormatting_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2_Widget__CondtionalFormatting_spec.js @@ -1,12 +1,12 @@ /* eslint-disable cypress/no-unnecessary-waiting */ const dsl = require("../../../../fixtures/tableV2WidgetCondnFormatDsl.json"); -describe("Table Widget V2 condtional formatting to remain consistent", function() { +describe("Table Widget V2 condtional formatting to remain consistent", function () { before(() => { cy.addDsl(dsl); }); - it("1. check the cell styles before and after sorting", function() { + it("1. check the cell styles before and after sorting", function () { cy.openPropertyPane("tablewidgetv2"); //Check Font weight, font style, and text color before sorting cy.readTableV2dataValidateCSS("0", "1", "font-weight", "700"); @@ -15,9 +15,7 @@ describe("Table Widget V2 condtional formatting to remain consistent", function( cy.readTableV2dataValidateCSS("1", "1", "font-weight", "400"); cy.readTableV2dataValidateCSS("1", "1", "font-style", "italic"); cy.readTableV2dataValidateCSS("1", "1", "color", "rgb(255, 0, 0)"); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); //Check Font weight, font style, and text color after sorting cy.readTableV2dataValidateCSS("3", "1", "font-weight", "700"); cy.readTableV2dataValidateCSS("3", "1", "font-style", "normal"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableWidgets_NavigateTo_Validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableWidgets_NavigateTo_Validation_spec.js index d50e17dcfc..e407a53a7a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableWidgets_NavigateTo_Validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableWidgets_NavigateTo_Validation_spec.js @@ -7,7 +7,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget and Navigate to functionality validation", function() { +describe("Table Widget and Navigate to functionality validation", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -21,7 +21,7 @@ describe("Table Widget and Navigate to functionality validation", function() { cy.wait(2000); //dsl to settle! }); - it("Create MyPage and valdiate if its successfully created", function() { + it("Create MyPage and valdiate if its successfully created", function () { cy.Createpage(pageid); cy.addDsl(dsl2); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -30,7 +30,7 @@ describe("Table Widget and Navigate to functionality validation", function() { cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible"); }); - it("Table Widget Functionality with multiple page", function() { + it("Table Widget Functionality with multiple page", function () { cy.get(`.t--entity-name:contains("Page1")`) .should("be.visible") .click({ force: true }); @@ -42,9 +42,7 @@ describe("Table Widget and Navigate to functionality validation", function() { ); cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination)); cy.focused().blur(); - cy.get(widgetsPage.tableOnRowSelect) - .scrollIntoView() - .click(); + cy.get(widgetsPage.tableOnRowSelect).scrollIntoView().click(); cy.get(commonlocators.chooseAction) .children() .contains("Navigate to") @@ -56,7 +54,7 @@ describe("Table Widget and Navigate to functionality validation", function() { cy.assertPageSave(); }); - it("Validate NavigateTo Page functionality ", function() { + it("Validate NavigateTo Page functionality ", function () { cy.wait(2000); cy.PublishtheApp(); cy.get(widgetsPage.chartWidget).should("not.exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_ClientSide_Search_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_ClientSide_Search_spec.js index 3b899b814f..d31b003c6d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_ClientSide_Search_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_ClientSide_Search_spec.js @@ -1,16 +1,14 @@ const dsl = require("../../../../fixtures/TableClientSearch.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("Validate onSearchTextChanged function is called when configured for search text", function() { + it("Validate onSearchTextChanged function is called when configured for search text", function () { cy.wait(5000); // input text in search bar - cy.get(".t--widget-tablewidget .t--search-input input") - .first() - .type("2"); + cy.get(".t--widget-tablewidget .t--search-input input").first().type("2"); cy.wait(5000); // Verify it filtered the table cy.readTabledataPublish("0", "0").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Style_ToggleJS_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Style_ToggleJS_spec.js index f704687065..fc86b73ac5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Style_ToggleJS_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Style_ToggleJS_spec.js @@ -9,12 +9,12 @@ const propPane = ObjectsRegistry.PropertyPane, ee = ObjectsRegistry.EntityExplorer, agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget toggle test for text alignment", function() { + it("1. Table widget toggle test for text alignment", function () { ee.SelectEntityByName("Table1"); cy.editColumn("id"); //cy.movetoStyleTab(); @@ -25,18 +25,16 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-end"); }); - it("2. Table widget change text size and validate", function() { + it("2. Table widget change text size and validate", function () { cy.readTabledataValidateCSS("0", "0", "font-size", "14px"); //cy.movetoStyleTab(); - cy.get(widgetsPage.textSize) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSize).last().click({ force: true }); agHelper.Sleep(); cy.selectTxtSize("XL"); cy.readTabledataValidateCSS("0", "0", "font-size", "30px"); }); - it("3. Table widget toggle test for vertical Alignment", function() { + it("3. Table widget toggle test for vertical Alignment", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Vertical Alignment", testdata.bindingVerticalAlig); @@ -45,7 +43,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "align-items", "flex-end"); }); - it("4. Table widget toggle test for text size", function() { + it("4. Table widget toggle test for text size", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Text Size", testdata.bindingSize); @@ -54,7 +52,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "font-size", "24px"); }); - it("5. Table widget toggle test for style Alignment", function() { + it("5. Table widget toggle test for style Alignment", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Font Style", testdata.bindingStyle); @@ -63,7 +61,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "font-style", "italic"); }); - it("6. Table widget toggle test for text color", function() { + it("6. Table widget toggle test for text color", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Text Color", testdata.bindingTextColor); @@ -72,7 +70,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "color", "rgb(255, 0, 0)"); }); - it("7. Table widget toggle test for background color", function() { + it("7. Table widget toggle test for background color", function () { //cy.movetoStyleTab(); agHelper.Sleep(); propPane.EnterJSContext("Cell Background", testdata.bindingTextColor); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Widget__CondtionalFormatting_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Widget__CondtionalFormatting_spec.js index 8e6810b6fb..ebc6ba6615 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Widget__CondtionalFormatting_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Table_Widget__CondtionalFormatting_spec.js @@ -1,12 +1,12 @@ /* eslint-disable cypress/no-unnecessary-waiting */ const dsl = require("../../../../fixtures/tableWidgetCondnFormatDsl.json"); -describe("Table Widget condtional formatting to remain consistent", function() { +describe("Table Widget condtional formatting to remain consistent", function () { before(() => { cy.addDsl(dsl); }); - it("check the cell styles before and after sorting", function() { + it("check the cell styles before and after sorting", function () { cy.openPropertyPane("tablewidget"); //Check Font weight, font style, and text color before sorting @@ -18,9 +18,7 @@ describe("Table Widget condtional formatting to remain consistent", function() { cy.readTabledataValidateCSS("1", "1", "font-style", "italic"); cy.readTabledataValidateCSS("1", "1", "color", "rgb(255, 0, 0)"); - cy.get(".draggable-header") - .contains("id") - .click({ force: true }); + cy.get(".draggable-header").contains("id").click({ force: true }); //Check Font weight, font style, and text color after sorting cy.readTabledataValidateCSS("3", "1", "font-weight", "700"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTableV2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTableV2_spec.js index 20885e339c..8a979d3718 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTableV2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTableV2_spec.js @@ -2,7 +2,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/TextTableV2dsl.json"); -describe("Text-Table v2 Binding Functionality", function() { +describe("Text-Table v2 Binding Functionality", function () { Cypress.on("uncaught:exception", (err, runnable) => { // returning false here prevents Cypress from // failing the test @@ -13,7 +13,7 @@ describe("Text-Table v2 Binding Functionality", function() { cy.addDsl(dsl); }); - it("1. Text-Table Binding Functionality For Id", function() { + it("1. Text-Table Binding Functionality For Id", function () { cy.openPropertyPane("tablewidgetv2"); /** * @param(Index) Provide index value to select the row. @@ -40,7 +40,7 @@ describe("Text-Table v2 Binding Functionality", function() { }); }); - it("2. Text-Table Binding Functionality For Email", function() { + it("2. Text-Table Binding Functionality For Email", function () { cy.get(publish.backToEditor).click(); cy.isSelectRow(2); cy.openPropertyPane("textwidget"); @@ -64,7 +64,7 @@ describe("Text-Table v2 Binding Functionality", function() { }); }); - it("3. Text-Table Binding Functionality For Total Length", function() { + it("3. Text-Table Binding Functionality For Total Length", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("textwidget"); cy.testJsontext("text", "{{Table1.pageSize}}"); @@ -87,7 +87,7 @@ describe("Text-Table v2 Binding Functionality", function() { }); }); - it("4. Table Widget Functionality To Verify Default Row Selection is working", function() { + it("4. Table Widget Functionality To Verify Default Row Selection is working", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("tablewidgetv2"); cy.testJsontext("defaultselectedrow", "2"); @@ -107,7 +107,7 @@ describe("Text-Table v2 Binding Functionality", function() { }); }); - it("5. Text-Table Binding Functionality For Username", function() { + it("5. Text-Table Binding Functionality For Username", function () { cy.get(publish.backToEditor).click(); /** * @param(Index) Provide index value to select the row. diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTable_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTable_spec.js index 50adeef01c..559c0a4030 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTable_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TextTable_spec.js @@ -2,7 +2,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/TextTabledsl.json"); -describe("Text-Table Binding Functionality", function() { +describe("Text-Table Binding Functionality", function () { Cypress.on("uncaught:exception", (err, runnable) => { // returning false here prevents Cypress from // failing the test @@ -12,7 +12,7 @@ describe("Text-Table Binding Functionality", function() { before(() => { cy.addDsl(dsl); }); - it("Text-Table Binding Functionality For Id", function() { + it("Text-Table Binding Functionality For Id", function () { cy.openPropertyPane("tablewidget"); /** * @param(Index) Provide index value to select the row. @@ -38,7 +38,7 @@ describe("Text-Table Binding Functionality", function() { }); }); }); - it("Text-Table Binding Functionality For Email", function() { + it("Text-Table Binding Functionality For Email", function () { cy.get(publish.backToEditor).click(); cy.isSelectRow(2); cy.openPropertyPane("textwidget"); @@ -61,7 +61,7 @@ describe("Text-Table Binding Functionality", function() { }); }); }); - it("Text-Table Binding Functionality For Total Length", function() { + it("Text-Table Binding Functionality For Total Length", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("textwidget"); cy.testJsontext("text", "{{Table1.pageSize}}"); @@ -82,7 +82,7 @@ describe("Text-Table Binding Functionality", function() { }); }); }); - it("Table Widget Functionality To Verify Default Row Selection is working", function() { + it("Table Widget Functionality To Verify Default Row Selection is working", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("tablewidget"); cy.testJsontext("defaultselectedrow", "2"); @@ -101,7 +101,7 @@ describe("Text-Table Binding Functionality", function() { cy.get(commonlocators.TextInside).should("have.text", tabValueP); }); }); - it("Text-Table Binding Functionality For Username", function() { + it("Text-Table Binding Functionality For Username", function () { cy.get(publish.backToEditor).click(); /** * @param(Index) Provide index value to select the row. diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widget_loading_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widget_loading_spec.js index 298d3999aa..56d478463f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widget_loading_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widget_loading_spec.js @@ -9,12 +9,12 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const dataSources = ObjectsRegistry.DataSources; let datasourceName; -describe("Binding the multiple widgets and validating default data", function() { +describe("Binding the multiple widgets and validating default data", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create a postgres datasource", function() { + it("1. Create a postgres datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); cy.fillPostgresDatasourceForm(); @@ -34,7 +34,7 @@ describe("Binding the multiple widgets and validating default data", function() dataSources.RunQuery(); }); - it("3. Button widget test with on action query run", function() { + it("3. Button widget test with on action query run", function () { cy.SearchEntityandOpen("Button1"); cy.executeDbQuery("Query1"); cy.wait("@updateLayout").should( @@ -44,7 +44,7 @@ describe("Binding the multiple widgets and validating default data", function() ); }); - it("4. Input widget test with default value update with query data", function() { + it("4. Input widget test with default value update with query data", function () { cy.SearchEntityandOpen("Input1"); cy.get(widgetsPage.defaultInput).type(testdata.defaultInputQuery); cy.wait("@updateLayout").should( @@ -54,13 +54,11 @@ describe("Binding the multiple widgets and validating default data", function() ); }); - it("5. Publish App and validate loading functionalty", function() { + it("5. Publish App and validate loading functionalty", function () { cy.PublishtheApp(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(widgetsPage.widgetBtn) - .first() - .click({ force: true }); + cy.get(widgetsPage.widgetBtn).first().click({ force: true }); cy.wait("@postExecute").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Default_data_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Default_data_validation_spec.js index c4fb2f5833..296a421580 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Default_data_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Default_data_validation_spec.js @@ -3,12 +3,12 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple widgets and validating default data", function() { +describe("Binding the multiple widgets and validating default data", function () { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from table widget", function() { + it("Input widget test with default value from table widget", function () { cy.openPropertyPane("inputwidgetv2"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -20,7 +20,7 @@ describe("Binding the multiple widgets and validating default data", function() }); //To be enabled once the single select multi select issues are resolved - it("Dropdown widget test with default value from table widget", function() { + it("Dropdown widget test with default value from table widget", function () { cy.openPropertyPane("selectwidget"); cy.testJsontext("options", JSON.stringify(testdata.deafultDropDownWidget)); @@ -31,7 +31,7 @@ describe("Binding the multiple widgets and validating default data", function() ); }); - it("validation of default data displayed in all widgets based on row selected", function() { + it("validation of default data displayed in all widgets based on row selected", function () { cy.isSelectRow(1); cy.readTabledataPublish("1", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Dependancy_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Dependancy_validation_spec.js index f508a7cdd6..d9048a6799 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Dependancy_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Dependancy_validation_spec.js @@ -3,7 +3,7 @@ const dsl = require("../../../../fixtures/MultipleInput.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple input Widget", function() { +describe("Binding the multiple input Widget", function () { before(() => { cy.addDsl(dsl); }); @@ -14,7 +14,7 @@ describe("Binding the multiple input Widget", function() { return false; }); - it("1. Cyclic depedancy error message validation", function() { + it("1. Cyclic depedancy error message validation", function () { cy.openPropertyPane("inputwidgetv2"); cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}"); @@ -26,7 +26,7 @@ describe("Binding the multiple input Widget", function() { cy.get(commonlocators.toastmsg).contains("Cyclic dependency"); }); - it("2. Binding input widget1 and validating", function() { + it("2. Binding input widget1 and validating", function () { cy.openPropertyPane("inputwidgetv2"); cy.testJsontext("defaultvalue", testdata.defaultdata); @@ -41,7 +41,7 @@ describe("Binding the multiple input Widget", function() { .should("contain", testdata.defaultdata); }); - it("3. Binding second input widget with first input widget and validating", function() { + it("3. Binding second input widget with first input widget and validating", function () { cy.selectEntityByName("Input2"); cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}"); @@ -64,7 +64,7 @@ describe("Binding the multiple input Widget", function() { cy.get(publish.backToEditor).click(); }); - it("4. Binding third input widget with first input widget and validating", function() { + it("4. Binding third input widget with first input widget and validating", function () { cy.CheckAndUnfoldWidgets(); cy.selectEntityByName("Input3"); cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_tableV2_default_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_tableV2_default_validation_spec.js index 2117b41d71..427c2c883b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_tableV2_default_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_tableV2_default_validation_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableV2Dsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple input Widget", function() { +describe("Binding the multiple input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget v2", function() { + it("1. Input widget test with default value from table widget v2", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -19,7 +19,7 @@ describe("Binding the multiple input Widget", function() { ); }); - it("2. Validation of data displayed in all widgets based on row selected", function() { + it("2. Validation of data displayed in all widgets based on row selected", function () { cy.isSelectRow(1); cy.readTableV2dataPublish("1", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation_spec.js index 48de1f0067..794419b4f7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/formInputTableDsl.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Binding the multiple input Widget", function() { +describe("Binding the multiple input Widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Input widget test with default value from table widget", function() { + it("1. Input widget test with default value from table widget", function () { cy.SearchEntityandOpen("Input1"); cy.testJsontext("defaultvalue", testdata.defaultInputWidget + "}}"); @@ -19,7 +19,7 @@ describe("Binding the multiple input Widget", function() { ); }); - it("2. Validation of data displayed in all widgets based on row selected", function() { + it("2. Validation of data displayed in all widgets based on row selected", function () { cy.isSelectRow(1); cy.readTabledataPublish("1", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/aTobAndbToaBasic_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/aTobAndbToaBasic_Spec.ts index e5b05093e4..f62935fbdb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/aTobAndbToaBasic_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/aTobAndbToaBasic_Spec.ts @@ -1,43 +1,58 @@ -import { ObjectsRegistry } from "../../../../support/Objects/Registry" +import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSet: any; let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, - propPane = ObjectsRegistry.PropertyPane, - locator = ObjectsRegistry.CommonLocators, - deployMode = ObjectsRegistry.DeployMode; + ee = ObjectsRegistry.EntityExplorer, + propPane = ObjectsRegistry.PropertyPane, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; describe("Validate basic binding of Input widget to Input widget", () => { - - before(() => { - cy.fixture('inputBindingdsl').then((val: any) => { - agHelper.AddDsl(val) - }); - - cy.fixture("testdata").then(function (data: any) { - dataSet = data; - }); + before(() => { + cy.fixture("inputBindingdsl").then((val: any) => { + agHelper.AddDsl(val); }); - it("1. Input widget test with default value for atob method", () => { - ee.SelectEntityByName("Input1", 'Widgets') - propPane.UpdatePropertyFieldValue("Default Value", dataSet.atobInput + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - cy.get(locator._inputWidget).first().invoke("attr", "value").should("equal", 'A');//Before mapping JSObject value of input + cy.fixture("testdata").then(function (data: any) { + dataSet = data; }); + }); - it("2. Input widget test with default value for btoa method", function () { - ee.SelectEntityByName("Input2") - propPane.UpdatePropertyFieldValue("Default Value", dataSet.btoaInput + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - cy.get(locator._inputWidget).last().invoke("attr", "value").should("equal", 'QQ==');//Before mapping JSObject value of input - }); + it("1. Input widget test with default value for atob method", () => { + ee.SelectEntityByName("Input1", "Widgets"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.atobInput + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + cy.get(locator._inputWidget) + .first() + .invoke("attr", "value") + .should("equal", "A"); //Before mapping JSObject value of input + }); - it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () { - deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first().invoke("attr", "value") - .should("contain", "A") - cy.get(locator._widgetInputSelector("inputwidgetv2")).last().invoke("attr", "value") - .should("contain", "QQ=="); - }); -}); \ No newline at end of file + it("2. Input widget test with default value for btoa method", function () { + ee.SelectEntityByName("Input2"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.btoaInput + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + cy.get(locator._inputWidget) + .last() + .invoke("attr", "value") + .should("equal", "QQ=="); //Before mapping JSObject value of input + }); + + it("3. Publish and validate the data displayed in input widgets value for aToB and bToa", function () { + deployMode.DeployApp(locator._widgetInputSelector("inputwidgetv2")); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .invoke("attr", "value") + .should("contain", "A"); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .invoke("attr", "value") + .should("contain", "QQ=="); + }); +}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/xmlParser_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/xmlParser_spec.js index 32d6e3d223..09b520c3f1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/xmlParser_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Binding/xmlParser_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/xmlParser.json"); const publish = require("../../../../locators/publishWidgetspage.json"); -describe("xml2json text", function() { +describe("xml2json text", function () { before(() => { cy.addDsl(dsl); }); - it("publish widget and validate the data displayed in text widget from xmlParser function", function() { + it("publish widget and validate the data displayed in text widget from xmlParser function", function () { cy.PublishtheApp(); cy.get(publish.textWidget) .first() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Branding/Branding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Branding/Branding_spec.js index fbdbe38307..7a52cf4f90 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Branding/Branding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Branding/Branding_spec.js @@ -40,10 +40,7 @@ describe("Branding", () => { it("2. Should test that changing logo,favicon and color changes the preview", () => { // branding color - cy.get(locators.AdminSettingsColorInput) - .focus() - .clear() - .type("red"); + cy.get(locators.AdminSettingsColorInput).focus().clear().type("red"); cy.get(".t--branding-bg").should( "have.css", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AbortAction_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AbortAction_Spec.ts index a4313fac1b..5a69436d4d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AbortAction_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AbortAction_Spec.ts @@ -8,8 +8,8 @@ import { const largeResponseApiUrl = "https://api.publicapis.org/entries"; //"https://jsonplaceholder.typicode.com/photos";//Commenting since this is faster sometimes & case is failing -describe("Abort Action Execution", function() { - it("1. Bug #14006, #16093 - Cancel Request button should abort API action execution", function() { +describe("Abort Action Execution", function () { + it("1. Bug #14006, #16093 - Cancel Request button should abort API action execution", function () { _.apiPage.CreateAndFillApi(largeResponseApiUrl, "AbortApi", 0); _.apiPage.RunAPI(false, 0); _.agHelper.GetNClick(_.locators._cancelActionExecution, 0, true); @@ -23,7 +23,7 @@ describe("Abort Action Execution", function() { // Queries were resolving quicker than we could cancel them // Commenting this out till we can find a query that resolves slow enough for us to cancel its execution. - it("2. Bug #14006, #16093 Cancel Request button should abort Query action execution", function() { + it("2. Bug #14006, #16093 Cancel Request button should abort Query action execution", function () { _.dataSources.CreateDataSource("MySql"); cy.get("@dsName").then(($dsName) => { _.dataSources.CreateQueryAfterDSSaved( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AllWidgets_Reset_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AllWidgets_Reset_Spec.ts index c27ba5f627..43cddb48c8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AllWidgets_Reset_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AllWidgets_Reset_Spec.ts @@ -187,7 +187,7 @@ function selectTabAndReset() { } function selectTableAndReset() { - table.SelectTableRow(1,0, true, "v2"); + table.SelectTableRow(1, 0, true, "v2"); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, "#2", @@ -202,9 +202,7 @@ function selectTableAndReset() { } function selectSwitchGroupAndReset() { - cy.get(".bp3-control-indicator") - .last() - .click({ force: true }); + cy.get(".bp3-control-indicator").last().click({ force: true }); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, "RED", @@ -219,9 +217,7 @@ function selectSwitchGroupAndReset() { } function selectSwitchAndReset() { - cy.get(".bp3-control-indicator") - .last() - .click({ force: true }); + cy.get(".bp3-control-indicator").last().click({ force: true }); cy.get(".t--switch-widget-active").should("not.exist"); agHelper.ClickButton("Submit"); cy.get(".t--switch-widget-active").should("be.visible"); @@ -229,9 +225,7 @@ function selectSwitchAndReset() { function selectAndReset() { cy.get(".select-button").click({ force: true }); - cy.get(".menu-item-text") - .contains("Blue") - .click({ force: true }); + cy.get(".menu-item-text").contains("Blue").click({ force: true }); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, @@ -247,9 +241,7 @@ function selectAndReset() { } function selectCurrencyInputAndReset() { - cy.get(".bp3-input") - .click({ force: true }) - .type("123"); + cy.get(".bp3-input").click({ force: true }).type("123"); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, @@ -284,9 +276,7 @@ function multiTreeSelectAndReset() { } function radiogroupAndReset() { - cy.get("input") - .last() - .click({ force: true }); + cy.get("input").last().click({ force: true }); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, @@ -320,9 +310,7 @@ function listwidgetAndReset() { } function ratingwidgetAndReset() { - cy.get(".bp3-icon-star svg") - .last() - .click({ force: true }); + cy.get(".bp3-icon-star svg").last().click({ force: true }); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, @@ -358,9 +346,7 @@ function checkboxGroupAndReset() { } function checkboxAndReset() { - cy.get("input") - .last() - .click({ force: true }); + cy.get("input").last().click({ force: true }); cy.wait(1000); agHelper.GetNAssertElementText( locator._textWidgetInDeployed, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14002_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14002_Spec.ts index 166a1eb62d..ad679a4159 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14002_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14002_Spec.ts @@ -1,7 +1,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Invalid JSObject export statement", function() { - it("Shows error toast for invalid js object export statement", function() { +describe("Invalid JSObject export statement", function () { + it("Shows error toast for invalid js object export statement", function () { const JSObjectWithInvalidExport = `{ myFun1: ()=>{ return (name)=>name diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14037_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14037_Spec.ts index 69489e5c77..85e1d5dfaa 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14037_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14037_Spec.ts @@ -1,14 +1,14 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Error logged when adding a suggested table widget", function() { - it("Bug 14037: User gets an error even when table widget is added from the API page successfully", function() { - cy.fixture("datasources").then((datasourceFormData : any) => { - _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "Api1"); - _.apiPage.RunAPI(); +describe("Error logged when adding a suggested table widget", function () { + it("Bug 14037: User gets an error even when table widget is added from the API page successfully", function () { + cy.fixture("datasources").then((datasourceFormData: any) => { + _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "Api1"); + _.apiPage.RunAPI(); - _.apiPage.AddSuggestedWidget("TABLE_WIDGET_V2"); + _.apiPage.AddSuggestedWidget("TABLE_WIDGET_V2"); - _.debuggerHelper.AssertErrorCount(0); + _.debuggerHelper.AssertErrorCount(0); }); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14987_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14987_spec.js index e11b798927..56405135ee 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14987_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug14987_spec.js @@ -6,19 +6,19 @@ let guid, datasourceName; let dataSources = ObjectsRegistry.DataSources, agHelper = ObjectsRegistry.AggregateHelper; -describe("Verify setting tab form controls not to have tooltip and tooltip (underline) styles", function() { +describe("Verify setting tab form controls not to have tooltip and tooltip (underline) styles", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Creates a new Mongo datasource", function() { + it("1. Creates a new Mongo datasource", function () { dataSources.CreateDataSource("Mongo"); cy.get("@dsName").then(($dsName) => { datasourceName = $dsName; }); }); - it("2. We make sure the label in the settings tab does not have any underline styles", function() { + it("2. We make sure the label in the settings tab does not have any underline styles", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.get(queryLocators.querySettingsTab).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15056_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15056_Spec.ts index a0098ebdcf..b8fe99dddc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15056_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15056_Spec.ts @@ -6,12 +6,12 @@ const jsEditor = ObjectsRegistry.JSEditor; const apiPage = ObjectsRegistry.ApiPage; const ee = ObjectsRegistry.EntityExplorer; -describe("JS data update on button click", function() { +describe("JS data update on button click", function () { before(() => { agHelper.AddDsl(dsl); }); - it("Populates js function data when triggered via button click", function() { + it("Populates js function data when triggered via button click", function () { apiPage.CreateAndFillApi( "https://jsonplaceholder.typicode.com/posts", "Api1", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15909_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15909_Spec.ts index 2585cbcfac..92e24d5356 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15909_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug15909_Spec.ts @@ -7,11 +7,11 @@ const jsEditor = ObjectsRegistry.JSEditor, propPane = ObjectsRegistry.PropertyPane, CommonLocators = ObjectsRegistry.CommonLocators; -describe("JS Function Execution", function() { +describe("JS Function Execution", function () { before(() => { ee.DragDropWidgetNVerify(WIDGET.BUTTON, 200, 200); }); - it("1. Shows js function data as part of autocompletion hints", function() { + it("1. Shows js function data as part of autocompletion hints", function () { jsEditor.CreateJSObject( `export default { myFun1: ()=>{ diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16377_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16377_spec.ts index a7b3c0e395..89f6e8a473 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16377_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16377_spec.ts @@ -8,8 +8,8 @@ const locator = ObjectsRegistry.CommonLocators, apiPage = ObjectsRegistry.ApiPage, agHelper = ObjectsRegistry.AggregateHelper; -describe("Binding Expressions should not be truncated in Url and path extraction", function() { - it("Bug 16377, When Api url has dynamic binding expressions, ensure the url and path derived is not corrupting Api execution", function() { +describe("Binding Expressions should not be truncated in Url and path extraction", function () { + it("Bug 16377, When Api url has dynamic binding expressions, ensure the url and path derived is not corrupting Api execution", function () { //Since the specified expression always returns true - it will never run mock-apis - which actually doesn't exist const apiUrl = `http://host.docker.internal:5001/v1/{{true ? 'mock-api' : 'mock-apis'}}?records=10`; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16683_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16683_Spec.ts index a03f82c45a..04ce76d32e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16683_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16683_Spec.ts @@ -8,8 +8,8 @@ const locator = ObjectsRegistry.CommonLocators, apiPage = ObjectsRegistry.ApiPage, agHelper = ObjectsRegistry.AggregateHelper; -describe("Binding Expressions should not be truncated in Url Query Param", function() { - it("Bug 16683, When Api url has dynamic binding expressions, ensures the query params is not truncated", function() { +describe("Binding Expressions should not be truncated in Url Query Param", function () { + it("Bug 16683, When Api url has dynamic binding expressions, ensures the query params is not truncated", function () { const apiUrl = `https://echo.hoppscotch.io/v6/deployments?limit=4{{Math.random() > 0.5 ? '¶m1=5' : '¶m2=6'}}`; apiPage.CreateAndFillApi(apiUrl, "BindingExpressions"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16702_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16702_Spec.ts index 6c3ef23871..e4d95a6451 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16702_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug16702_Spec.ts @@ -23,8 +23,8 @@ const GRAPHQL_RESPONSE = { mission_name: "Sentinel-6 Michael Freilich", }; -describe("Binding Expressions should not be truncated in Url and path extraction", function() { - it.skip("Bug 16702, Moustache+Quotes formatting goes wrong in graphql body resulting in autocomplete failure", function() { +describe("Binding Expressions should not be truncated in Url and path extraction", function () { + it.skip("Bug 16702, Moustache+Quotes formatting goes wrong in graphql body resulting in autocomplete failure", function () { const jsObjectBody = `export default { limitValue: 1, offsetValue: 1, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18035_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18035_Spec.ts index 9ffa187f56..2f703ead36 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18035_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18035_Spec.ts @@ -3,8 +3,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const dataSources = ObjectsRegistry.DataSources, agHelper = ObjectsRegistry.AggregateHelper; -describe("Bug 18035: Updates save button text on datasource discard popup", function() { - it("1. Create gsheet datasource, click on back button, discard popup should contain save and authorize", function() { +describe("Bug 18035: Updates save button text on datasource discard popup", function () { + it("1. Create gsheet datasource, click on back button, discard popup should contain save and authorize", function () { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("Google Sheets"); agHelper.GoBack(); @@ -16,7 +16,7 @@ describe("Bug 18035: Updates save button text on datasource discard popup", func cy.get(dataSources._datasourceModalDoNotSave).click(); }); - it("2. Create any other datasource, click on back button, discard popup should contain save", function() { + it("2. Create any other datasource, click on back button, discard popup should contain save", function () { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("PostgreSQL"); agHelper.GoBack(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18369_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18369_Spec.ts index fe08cc629e..5cd143a502 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18369_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18369_Spec.ts @@ -4,7 +4,7 @@ const ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, agHelper = ObjectsRegistry.AggregateHelper; -describe("JS Function Execution", function() { +describe("JS Function Execution", function () { before(() => { cy.fixture("formWithtabdsl.json").then((val: any) => { agHelper.AddDsl(val); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18876_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18876_Spec.ts index 966649b331..5b8738d9c9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18876_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug18876_Spec.ts @@ -12,9 +12,7 @@ describe("Application crashes when saving datasource", () => { "POST", ); apiPage.SelectPaneTab("Authentication"); - cy.get(apiPage._saveAsDS) - .last() - .click({ force: true }); + cy.get(apiPage._saveAsDS).last().click({ force: true }); cy.get(".t--close-editor").click({ force: true }); cy.get(datasource._datasourceModalSave).click(); // ensures app does not crash and datasource is saved. diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19426_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19426_spec.ts index 8290a60bcd..a981012b4e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19426_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19426_spec.ts @@ -2,8 +2,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const dataSources = ObjectsRegistry.DataSources; -describe("Testing empty datasource without saving should not throw 404", function() { - it("Bug 19426: Create empty S3 datasource, test it", function() { +describe("Testing empty datasource without saving should not throw 404", function () { + it("Bug 19426: Create empty S3 datasource, test it", function () { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("S3"); dataSources.TestDatasource(false); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19893_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19893_spec.ts index 83c8602ff2..4cb4be84ed 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19893_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19893_spec.ts @@ -5,8 +5,8 @@ let dsName: any; const agHelper = ObjectsRegistry.AggregateHelper, dataSources = ObjectsRegistry.DataSources; -describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function() { - it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function() { +describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function () { + it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function () { dataSources.NavigateToDSCreateNew(); agHelper.GenerateUUID(); cy.get("@guid").then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19933_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19933_spec.ts index 69a8ce15dd..6ea7fffd85 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19933_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19933_spec.ts @@ -4,8 +4,8 @@ let dsName: string; const testString = "test"; -describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function() { - it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function() { +describe("Bug 19933: Authenticated API DS in case of OAuth2, should have save and authorise button enabled all the times", function () { + it("1. Create Auth API DS, save i, now edit again and check the save and authorise button state", function () { _.dataSources.NavigateToDSCreateNew(); _.agHelper.GenerateUUID(); cy.get("@guid").then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19982_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19982_Spec.ts index ed990e89d7..6e77eb62af 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19982_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug19982_Spec.ts @@ -3,8 +3,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const jsEditor = ObjectsRegistry.JSEditor, agHelper = ObjectsRegistry.AggregateHelper; -describe("JS Execution of Higher-order-functions", function() { - it("Completes execution properly", function() { +describe("JS Execution of Higher-order-functions", function () { + it("Completes execution properly", function () { const JSObjectWithHigherOrderFunction = `export default{ myFun1: ()=>{ return (name)=>name diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20275_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20275_Spec.js index 5eba7d7220..b45fbb53f7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20275_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20275_Spec.js @@ -8,8 +8,8 @@ const jsEditor = ObjectsRegistry.JSEditor, ee = ObjectsRegistry.EntityExplorer, propPane = ObjectsRegistry.PropertyPane; -describe("Testing if user.email is avaible on page load", function() { - it("Bug: 20275: {{appsmith.user.email}} is not available on page load", function() { +describe("Testing if user.email is avaible on page load", function () { + it("Bug: 20275: {{appsmith.user.email}} is not available on page load", function () { const JS_OBJECT_BODY = `export default{ myFun1: ()=>{ showAlert(appsmith.user.email) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20841_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20841_Spec.ts index 0474ad057b..2e43e33d1c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20841_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug20841_Spec.ts @@ -1,8 +1,8 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; import { WIDGET } from "../../../../locators/WidgetLocators"; -describe("Evaluations causing error when page is cloned", function() { - it("Bug: 20841: JSObjects | Sync methods | Not run consistently when Page is cloned", function() { +describe("Evaluations causing error when page is cloned", function () { + it("Bug: 20841: JSObjects | Sync methods | Not run consistently when Page is cloned", function () { const JS_OBJECT_BODY = `export default{ myFun1: ()=>{ return "Default text"; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug9334_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug9334_Spec.ts index 2e036062de..3c0c61a183 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug9334_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Bug9334_Spec.ts @@ -8,12 +8,12 @@ const agHelper = ObjectsRegistry.AggregateHelper, table = ObjectsRegistry.Table, appSettings = ObjectsRegistry.AppSettings; -describe("Bug 9334: The Select widget value is sent as null when user switches between the pages", function() { +describe("Bug 9334: The Select widget value is sent as null when user switches between the pages", function () { before(() => { appSettings.OpenPaneAndChangeTheme("Pampas"); }); - it("1. Create Postgress DS", function() { + it("1. Create Postgress DS", function () { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/CatchBlock_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/CatchBlock_Spec.ts index 4765cd1051..654f006346 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/CatchBlock_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/CatchBlock_Spec.ts @@ -4,7 +4,7 @@ const { AggregateHelper: agHelper, ApiPage: apiPage, JSEditor: jsEditor, - EntityExplorer : ee + EntityExplorer: ee, } = ObjectsRegistry; describe("Bug #15372 Catch block was not triggering in Safari/firefox", () => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DSDiscardBugs_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DSDiscardBugs_spec.ts index 824c41287c..bbffd5dbeb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DSDiscardBugs_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DSDiscardBugs_spec.ts @@ -7,7 +7,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, const testString = "test"; -describe("datasource unsaved changes popup shows even without changes", function() { +describe("datasource unsaved changes popup shows even without changes", function () { // In case of postgres and other plugins, host address and port key values are initialized by default making form dirty it("1. Bug 18664: Create postgres datasource, save it and edit it and go back, now unsaved changes popup should not be shown", () => { dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DatasourceSchema_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DatasourceSchema_spec.ts index 440384bec9..5368651420 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DatasourceSchema_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/DatasourceSchema_spec.ts @@ -6,7 +6,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, let guid; let dataSourceName: string; -describe("Datasource form related tests", function() { +describe("Datasource form related tests", function () { it("1. Bug - 17238 Verify datasource structure refresh on save - invalid datasource", () => { agHelper.GenerateUUID(); cy.get("@guid").then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/GitBugs_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/GitBugs_Spec.ts index 7bffb13d58..ea1f22a1a4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/GitBugs_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/GitBugs_Spec.ts @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; import { WIDGET } from "../../../../locators/WidgetLocators"; let repoName: any; -describe("Git Bugs", function() { +describe("Git Bugs", function () { before(() => { _.homePage.NavigateToHome(); _.agHelper.GenerateUUID(); @@ -12,7 +12,7 @@ describe("Git Bugs", function() { }); }); - it("1. Bug 16248, When GitSync modal is open, block shortcut action execution", function() { + it("1. Bug 16248, When GitSync modal is open, block shortcut action execution", function () { const largeResponseApiUrl = "https://jsonplaceholder.typicode.com/users"; const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; _.apiPage.CreateAndFillApi(largeResponseApiUrl, "GitSyncTest"); @@ -24,7 +24,7 @@ describe("Git Bugs", function() { _.agHelper.ValidateNetworkStatus("@postExecute"); }); - it("2. Bug 18665 : Creates a new Git branch, Create datasource, discard it and check current branch", function() { + it("2. Bug 18665 : Creates a new Git branch, Create datasource, discard it and check current branch", function () { _.gitSync.CreateNConnectToGit(); _.gitSync.CreateGitBranch(); _.dataSources.NavigateToDSCreateNew(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/InputTruncateCheck_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/InputTruncateCheck_Spec.ts index aa4904b07a..c31f6cc88c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/InputTruncateCheck_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/InputTruncateCheck_Spec.ts @@ -80,7 +80,7 @@ const widgetsToTest = { function configureApi() { cy.fixture("datasources").then((datasourceFormData) => { - apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "FirstAPI"); + apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "FirstAPI"); }); apiPage.EnterHeader("value", "{{this.params.value}}"); } diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Moment_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Moment_Spec.ts index 4704bad50a..cc8299d8cd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Moment_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/Moment_Spec.ts @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let dsName: any, query: string; -describe("Bug #14299 - The data from the query does not show up on the widget", function() { +describe("Bug #14299 - The data from the query does not show up on the widget", function () { before("Create Postgress DS & set theme", () => { cy.fixture("/Bugs/14299dsl").then((val: any) => { _.agHelper.AddDsl(val); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/MultipleOnPageLoadConfirmation_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/MultipleOnPageLoadConfirmation_Spec.ts index e6b3ab311d..4465e79bb0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/MultipleOnPageLoadConfirmation_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/MultipleOnPageLoadConfirmation_Spec.ts @@ -6,11 +6,11 @@ const jsEditor = ObjectsRegistry.JSEditor, locator = ObjectsRegistry.CommonLocators, deployMode = ObjectsRegistry.DeployMode; -describe("Multiple rejection of confirmation for onPageLoad function execution", function() { +describe("Multiple rejection of confirmation for onPageLoad function execution", function () { before(() => { ee.DragDropWidgetNVerify("buttonwidget", 300, 300); }); - it("Works properly", function() { + it("Works properly", function () { const FUNCTIONS_SETTINGS_DEFAULT_DATA = [ { name: "myFun1", @@ -29,9 +29,10 @@ describe("Multiple rejection of confirmation for onPageLoad function execution", }, ]; - const numOfOnLoadAndConfirmExecutionActions = FUNCTIONS_SETTINGS_DEFAULT_DATA.filter( - (setting) => setting.confirmBeforeExecute && setting.onPageLoad, - ).length; + const numOfOnLoadAndConfirmExecutionActions = + FUNCTIONS_SETTINGS_DEFAULT_DATA.filter( + (setting) => setting.confirmBeforeExecute && setting.onPageLoad, + ).length; jsEditor.CreateJSObject( `export default { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/formHasChanged_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/formHasChanged_Spec.ts index 57396c1be7..d2c9b4f3d7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/formHasChanged_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/formHasChanged_Spec.ts @@ -4,7 +4,7 @@ const ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, agHelper = ObjectsRegistry.AggregateHelper; -describe("JS Function Execution", function() { +describe("JS Function Execution", function () { before(() => { cy.fixture("formChangeDSL.json").then((val: any) => { agHelper.AddDsl(val); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/CodeComment/PropertyPaneCodeComment_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/CodeComment/PropertyPaneCodeComment_spec.ts index a95f952f64..b949879bab 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/CodeComment/PropertyPaneCodeComment_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/CodeComment/PropertyPaneCodeComment_spec.ts @@ -23,5 +23,4 @@ describe("Property Pane Code Commenting", () => { PropertyPane.ValidatePropertyFieldValue("Label", "{{appsmith}}"); }); - }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_Limit_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_Limit_spec.js index 9db436727e..c54699cf8e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_Limit_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_Limit_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/dynamicHeightContainerdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation with limits", function() { - it("Validate change in auto height with limits width for widgets and highlight section validation", function() { +describe("Dynamic Height Width validation with limits", function () { + it("Validate change in auto height with limits width for widgets and highlight section validation", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("containerwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_spec.js index a10b132484..45b1fefa28 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Auto_Height_spec.js @@ -6,7 +6,7 @@ const widgetsPage = require("../../../../locators/Widgets.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Dynamic Height Width validation", function() { +describe("Dynamic Height Width validation", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -14,7 +14,7 @@ describe("Dynamic Height Width validation", function() { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); - it("Validate change with auto height width for widgets", function() { + it("Validate change with auto height width for widgets", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("containerwidget"); @@ -91,7 +91,7 @@ describe("Dynamic Height Width validation", function() { }); }); - it("Validate container with auto height and child widgets with fixed height", function() { + it("Validate container with auto height and child widgets with fixed height", function () { cy.addDsl(cdsl); cy.wait(3000); //for dsl to settle //cy.openPropertyPane("containerwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_CanvasHeight_resize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_CanvasHeight_resize_spec.js index e1684a2378..ea9401592f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_CanvasHeight_resize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_CanvasHeight_resize_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Dynamic Height Width validation with multiple containers and text widget", function() { +describe("Dynamic Height Width validation with multiple containers and text widget", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -11,7 +11,7 @@ describe("Dynamic Height Width validation with multiple containers and text widg beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); - it("Validate change with auto height width for widgets", function() { + it("Validate change with auto height width for widgets", function () { const textMsg = "Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height"; cy.addDsl(dsl); @@ -54,11 +54,9 @@ describe("Dynamic Height Width validation with multiple containers and text widg .type(`{${modifierKey}}a`) .then(($cm) => { if ($cm.val() !== "") { - cy.get(".CodeMirror textarea") - .first() - .clear({ - force: true, - }); + cy.get(".CodeMirror textarea").first().clear({ + force: true, + }); } }); cy.wait("@updateLayout"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_Scroll_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_Scroll_spec.js index 5a3d589db9..e9b5519440 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_Scroll_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_Scroll_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/dynamicHeightContainerScrolldsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { - it("Validate change with auto height width for widgets", function() { +describe("Dynamic Height Width validation", function () { + it("Validate change with auto height width for widgets", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("containerwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_collapse_undo_redoSpec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_collapse_undo_redoSpec.js index 4fe9e47dd0..b569193f3e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_collapse_undo_redoSpec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Container_collapse_undo_redoSpec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/DynamicHeightDefaultHeightdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { - it("Validate change with auto height width for widgets", function() { +describe("Dynamic Height Width validation", function () { + it("Validate change with auto height width for widgets", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; cy.addDsl(dsl); cy.wait(3000); //for dsl to settle diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Form_With_SwitchGroup_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Form_With_SwitchGroup_spec.js index 1d98ca2d30..f3548760a4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Form_With_SwitchGroup_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Form_With_SwitchGroup_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/dynamicHeightFormSwitchdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { - it("Validate change with auto height width for Form/Switch", function() { +describe("Dynamic Height Width validation", function () { + it("Validate change with auto height width for Form/Switch", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("formwidget"); @@ -82,9 +82,7 @@ describe("Dynamic Height Width validation", function() { .click({ force: true }); cy.wait(3000); cy.get(".t--modal-widget").should("have.length", 1); - cy.get(".t--widget-propertypane-toggle") - .first() - .click({ force: true }); + cy.get(".t--widget-propertypane-toggle").first().click({ force: true }); //cy.changeLayoutHeight(commonlocators.autoHeightWithLimits); //cy.checkMinDefaultValue(commonlocators.minHeight,"4") //cy.checkMaxDefaultValue(commonlocators.maxHeight,"24") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_JsonForm_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_JsonForm_spec.js index 9f9abe5573..d7bfe0bd70 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_JsonForm_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_JsonForm_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/jsonFormDynamicHeightDsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { - it("Validate change with auto height width for JsonForm", function() { +describe("Dynamic Height Width validation", function () { + it("Validate change with auto height width for JsonForm", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("jsonformwidget"); @@ -15,15 +15,9 @@ describe("Dynamic Height Width validation", function() { .invoke("css", "height") .then((newformheight) => { expect(formheight).to.not.equal(newformheight); - cy.get(".t--show-column-btn") - .eq(0) - .click({ force: true }); - cy.get(".t--show-column-btn") - .eq(1) - .click({ force: true }); - cy.get(".t--show-column-btn") - .eq(2) - .click({ force: true }); + cy.get(".t--show-column-btn").eq(0).click({ force: true }); + cy.get(".t--show-column-btn").eq(1).click({ force: true }); + cy.get(".t--show-column-btn").eq(2).click({ force: true }); // cy.get("[data-cy='t--resizable-handle-TOP']") // .within(($el) => { // cy.window().then((win) => { @@ -38,12 +32,8 @@ describe("Dynamic Height Width validation", function() { .invoke("css", "height") .then((updatedformheight) => { expect(newformheight).to.not.equal(updatedformheight); - cy.get(".t--show-column-btn") - .eq(2) - .click({ force: true }); - cy.get(".t--show-column-btn") - .eq(1) - .click({ force: true }); + cy.get(".t--show-column-btn").eq(2).click({ force: true }); + cy.get(".t--show-column-btn").eq(1).click({ force: true }); // cy.get("[data-cy='t--resizable-handle-TOP']").should("exist"); // cy.get("[data-cy='t--resizable-handle-BOTTOM']").should("exist"); cy.changeLayoutHeight(commonlocators.autoHeight); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_TextWidget_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_TextWidget_Spec.js index 8b68a4d299..fb3d6de32a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_TextWidget_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_TextWidget_Spec.js @@ -6,7 +6,7 @@ const explorer = require("../../../../locators/explorerlocators.json"); const agHelper = ObjectsRegistry.AggregateHelper; -describe("Dynamic Height Width validation list widget", function() { +describe("Dynamic Height Width validation list widget", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -14,7 +14,7 @@ describe("Dynamic Height Width validation list widget", function() { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); - it("Validate change with auto height width for list widgets", function() { + it("Validate change with auto height width for list widgets", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; const textMsg = "Dynamic panel validation for text widget wrt height"; cy.addDsl(dsl); @@ -84,9 +84,7 @@ describe("Dynamic Height Width validation list widget", function() { cy.selectEntityByName("Text3CopyCopy"); cy.wait(2000); cy.get(commonlocators.generalSectionHeight).should("be.visible"); - cy.get(".t--widget-textwidget") - .first() - .click({ force: true }); + cy.get(".t--widget-textwidget").first().click({ force: true }); cy.get(".t--widget-textwidget") .first() .invoke("css", "height") @@ -99,9 +97,7 @@ describe("Dynamic Height Width validation list widget", function() { 200, ); cy.wait(3000); - cy.get(".t--widget-textwidget") - .first() - .click({ force: true }); + cy.get(".t--widget-textwidget").first().click({ force: true }); cy.get(".t--widget-textwidget") .first() .wait(1000) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_spec.js index 61294085f0..17667df68b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_List_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Dynamic Height Width validation", function() { +describe("Dynamic Height Width validation", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -11,7 +11,7 @@ describe("Dynamic Height Width validation", function() { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); - it("Validate change with auto height width for widgets", function() { + it("Validate change with auto height width for widgets", function () { const textMsg = "Dynamic panel validation for text widget wrt height"; cy.addDsl(dsl); cy.wait(3000); //for dsl to settle diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Modal_Widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Modal_Widget_spec.js index cab83daf3d..c5dcf36f93 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Modal_Widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Modal_Widget_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../fixtures/DynamicHeightModalDsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation with limits", function() { - it("Validate change in auto height with limits width for widgets and highlight section validation", function() { +describe("Dynamic Height Width validation with limits", function () { + it("Validate change in auto height with limits width for widgets and highlight section validation", function () { const textMsg = "Dynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt height Dynamic panel validation for text widget Dynamic panel validation for text widget Dynamic panel validation for text widget"; cy.addDsl(dsl); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Multiple_Container_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Multiple_Container_spec.js index e62feac13b..3f268e8892 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Multiple_Container_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Multiple_Container_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/multipleContainerdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation for multiple container", function() { +describe("Dynamic Height Width validation for multiple container", function () { before(() => { cy.addDsl(dsl); }); - it("Validate change in auto height width with multiple containers", function() { + it("Validate change in auto height width with multiple containers", function () { cy.wait(3000); //for dsl to settle cy.openPropertyPaneWithIndex("containerwidget", 0); cy.changeLayoutHeight(commonlocators.fixed); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Tab_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Tab_spec.js index c8f030199c..b5ce55dd5d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Tab_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Tab_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Dynamic Height Width validation for Tab widget", function() { +describe("Dynamic Height Width validation for Tab widget", function () { before(() => { cy.addDsl(dsl); }); @@ -30,7 +30,7 @@ describe("Dynamic Height Width validation for Tab widget", function() { }); }); } - it("Tab widget validation of height with dynamic height feature with publish mode", function() { + it("Tab widget validation of height with dynamic height feature with publish mode", function () { //changing the Text Name and verifying cy.wait(3000); cy.openPropertyPane("tabswidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_Widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_Widget_spec.js index 362b004650..be20f1764a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_Widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_Widget_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/textWidgetDynamicdsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation for text widget", function() { +describe("Dynamic Height Width validation for text widget", function () { before(() => { cy.addDsl(dsl); }); - it("Text widget validation of height with dynamic height feature", function() { + it("Text widget validation of height with dynamic height feature", function () { const textMsg = "Dynamic panel validation for text widget wrt height"; //changing the Text Name and verifying cy.openPropertyPane("textwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_With_Different_Size_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_With_Different_Size_spec.js index 40e5278db2..76d1e6e19e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_With_Different_Size_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Text_With_Different_Size_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../../fixtures/alignmentWithDynamicHeightDsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Dynamic Height Width validation", function() { +describe("Dynamic Height Width validation", function () { function validateCssProperties(property) { cy.get("button:contains('Small')").click({ force: true }); cy.wait(3000); @@ -128,7 +128,7 @@ describe("Dynamic Height Width validation", function() { }); }); } - it("Validate change with auto height width for text widgets", function() { + it("Validate change with auto height width for text widgets", function () { cy.addDsl(dsl); cy.wait(30000); //for dsl to settled validateCssProperties("height"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Visibility_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Visibility_spec.js index 17c2fac37c..f373652fe1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Visibility_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_Visibility_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/invisibleWidgetdsl.json"); -describe("Dynamic Height Width validation for Visibility", function() { +describe("Dynamic Height Width validation for Visibility", function () { before(() => { cy.addDsl(dsl); }); - it("Validating visbility/invisiblity of widget with dynamic height feature", function() { + it("Validating visbility/invisiblity of widget with dynamic height feature", function () { //changing the Text Name and verifying cy.wait(3000); cy.openPropertyPane("containerwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/EmbedSettings/EmbedSettings_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/EmbedSettings/EmbedSettings_spec.js index 2f5116b9c6..2826bb3be7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/EmbedSettings/EmbedSettings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/EmbedSettings/EmbedSettings_spec.js @@ -1,7 +1,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; import adminSettings from "../../../../locators/AdminsSettings"; -describe("Embed settings options", function() { +describe("Embed settings options", function () { const { AggregateHelper: agHelper, DeployMode: deployMode, @@ -38,9 +38,7 @@ describe("Embed settings options", function() { ee.DragDropWidgetNVerify("buttonwidget", 100, 100); deployMode.DeployApp(); cy.get("[data-cy='viewmode-share']").click(); - cy.get("[data-cy='copy-application-url']") - .last() - .click(); + cy.get("[data-cy='copy-application-url']").last().click(); agHelper.GiveChromeCopyPermission(); cy.window() .its("navigator.clipboard") @@ -56,18 +54,11 @@ describe("Embed settings options", function() { // cy.testJsontext("url", this.embeddedAppUrl); deployMode.DeployApp(); cy.get("[data-cy='viewmode-share']").click(); - cy.get("[data-cy='copy-application-url']") - .last() - .click(); - cy.window() - .its("navigator.clipboard") - .invoke("readText") - .as("deployUrl"); + cy.get("[data-cy='copy-application-url']").last().click(); + cy.window().its("navigator.clipboard").invoke("readText").as("deployUrl"); cy.enablePublicAccess(); cy.wait(6000); - getIframeBody() - .contains("Submit") - .should("exist"); + getIframeBody().contains("Submit").should("exist"); deployMode.NavigateBacktoEditor(); }); @@ -80,15 +71,13 @@ describe("Embed settings options", function() { }); describe("Wrapper to get access to the alias in all tests", () => { - it("1. Allow embedding everywhere", function() { + it("1. Allow embedding everywhere", function () { cy.log(this.deployUrl); homePage.NavigateToHome(); cy.get(".admin-settings-menu-option").click(); cy.get(".t--admin-settings-APPSMITH_ALLOWED_FRAME_ANCESTORS").within( () => { - cy.get("input") - .eq(0) - .click(); + cy.get("input").eq(0).click(); }, ); cy.get(adminSettings.saveButton).click(); @@ -102,51 +91,37 @@ describe("Embed settings options", function() { // }); cy.get(adminSettings.restartNotice).should("not.exist"); cy.visit(this.deployUrl); - getIframeBody() - .contains("Submit") - .should("exist"); + getIframeBody().contains("Submit").should("exist"); ValidateEditModeSetting(embedSettings.locators._allowAllText); }); - it("2. Limit embedding", function() { + it("2. Limit embedding", function () { cy.log(this.deployUrl); homePage.NavigateToHome(); cy.get(".admin-settings-menu-option").click(); cy.get(".t--admin-settings-APPSMITH_ALLOWED_FRAME_ANCESTORS").within( () => { - cy.get("input") - .eq(1) - .click(); - cy.get(".bp3-tag-remove") - .eq(1) - .click(); - cy.get(".bp3-tag-remove") - .eq(0) - .click(); - cy.get(".bp3-input-ghost") - .type(window.location.origin) - .blur(); + cy.get("input").eq(1).click(); + cy.get(".bp3-tag-remove").eq(1).click(); + cy.get(".bp3-tag-remove").eq(0).click(); + cy.get(".bp3-input-ghost").type(window.location.origin).blur(); }, ); cy.get(adminSettings.saveButton).click(); cy.waitForServerRestart(); cy.get(adminSettings.restartNotice).should("not.exist"); cy.visit(this.deployUrl); - getIframeBody() - .contains("Submit") - .should("exist"); + getIframeBody().contains("Submit").should("exist"); ValidateEditModeSetting(embedSettings.locators._restrictedText); }); - it("3. Disable everywhere", function() { + it("3. Disable everywhere", function () { cy.log(this.deployUrl); homePage.NavigateToHome(); cy.get(".admin-settings-menu-option").click(); cy.get(".t--admin-settings-APPSMITH_ALLOWED_FRAME_ANCESTORS").within( () => { - cy.get("input") - .last() - .click(); + cy.get("input").last().click(); }, ); cy.get(adminSettings.saveButton).click(); @@ -160,9 +135,7 @@ describe("Embed settings options", function() { // } = interception[1].response.body.data; // expect(APPSMITH_ALLOWED_FRAME_ANCESTORS).to.equal("'none'"); // }); - getIframeBody() - .contains("Submit") - .should("not.exist"); + getIframeBody().contains("Submit").should("not.exist"); ValidateEditModeSetting(embedSettings.locators._disabledText); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Admin_settings_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Admin_settings_spec.js index b031c700c8..9b9bc32af9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Admin_settings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Admin_settings_spec.js @@ -20,7 +20,7 @@ const routes = { VERSION: "/settings/version", }; -describe("Admin settings page", function() { +describe("Admin settings page", function () { beforeEach(() => { cy.intercept("GET", "/api/v1/admin/env", { body: { responseMeta: { status: 200, success: true }, data: {} }, @@ -105,9 +105,7 @@ describe("Admin settings page", function() { }; assertVisibilityAndDisabledState(); cy.get(adminsSettings.instanceName).should("be.visible"); - cy.get(adminsSettings.instanceName) - .clear() - .type("AppsmithInstance"); + cy.get(adminsSettings.instanceName).clear().type("AppsmithInstance"); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); cy.get(adminsSettings.resetButton).should("be.visible"); @@ -123,9 +121,7 @@ describe("Admin settings page", function() { let instanceName; cy.generateUUID().then((uuid) => { instanceName = uuid; - cy.get(adminsSettings.instanceName) - .clear() - .type(uuid); + cy.get(adminsSettings.instanceName).clear().type(uuid); }); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); @@ -151,9 +147,7 @@ describe("Admin settings page", function() { let instanceName; cy.generateUUID().then((uuid) => { instanceName = uuid; - cy.get(adminsSettings.instanceName) - .clear() - .type(uuid); + cy.get(adminsSettings.instanceName).clear().type(uuid); }); cy.get(adminsSettings.saveButton).should("be.visible"); cy.get(adminsSettings.saveButton).should("not.be.disabled"); @@ -164,9 +158,7 @@ describe("Admin settings page", function() { let fromAddress; cy.generateUUID().then((uuid) => { fromAddress = uuid; - cy.get(adminsSettings.fromAddress) - .clear() - .type(`${uuid}@appsmith.com`); + cy.get(adminsSettings.fromAddress).clear().type(`${uuid}@appsmith.com`); }); cy.intercept("POST", "/api/v1/admin/restart", { body: { responseMeta: { status: 200, success: true }, data: true }, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_API_Pane_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_API_Pane_spec.js index cabc9032cd..8325088415 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_API_Pane_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_API_Pane_spec.js @@ -9,8 +9,8 @@ let ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, homePage = ObjectsRegistry.HomePage; -describe("Entity explorer API pane related testcases", function() { - it("1. Empty Message validation for Widgets/API/Queries", function() { +describe("Entity explorer API pane related testcases", function () { + it("1. Empty Message validation for Widgets/API/Queries", function () { homePage.NavigateToHome(); homePage.CreateNewWorkspace("EmptyMsgCheck"); homePage.CreateAppInWorkspace("EmptyMsgCheck"); @@ -33,7 +33,7 @@ describe("Entity explorer API pane related testcases", function() { agHelper.AssertElementVisible(locator._visibleTextDiv("NEW DATASOURCE")); }); - it("2. Move to page / edit API name /properties validation", function() { + it("2. Move to page / edit API name /properties validation", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("FirstAPI"); cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods); @@ -47,7 +47,7 @@ describe("Entity explorer API pane related testcases", function() { cy.ResponseStatusCheck(testdata.successStatusCode); ee.ExpandCollapseEntity("Queries/JS"); ee.ActionContextMenuByEntityName("FirstAPI", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(5); expect($lis.eq(0)).to.contain("{{FirstAPI.isLoading}}"); expect($lis.eq(1)).to.contain("{{FirstAPI.data}}"); @@ -55,9 +55,7 @@ describe("Entity explorer API pane related testcases", function() { expect($lis.eq(3)).to.contain("{{FirstAPI.run()}}"); expect($lis.eq(4)).to.contain("{{FirstAPI.clear()}}"); }); - cy.get(apiwidget.actionlist) - .contains(testdata.Get) - .should("be.visible"); + cy.get(apiwidget.actionlist).contains(testdata.Get).should("be.visible"); cy.Createpage(pageid); ee.SelectEntityByName("Page1"); agHelper.Sleep(); //for the selected entity to settle loading! @@ -75,7 +73,7 @@ describe("Entity explorer API pane related testcases", function() { ee.ExpandCollapseEntity("Queries/JS"); ee.AssertEntityPresenceInExplorer("SecondAPI"); ee.ActionContextMenuByEntityName("SecondAPI", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(5); expect($lis.eq(0)).to.contain("{{SecondAPI.isLoading}}"); expect($lis.eq(1)).to.contain("{{SecondAPI.data}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_CopyQuery_RenameDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_CopyQuery_RenameDatasource_spec.js index 266e428348..ff9967d24c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_CopyQuery_RenameDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_CopyQuery_RenameDatasource_spec.js @@ -9,7 +9,7 @@ const pageid = "MyPage"; let updatedName; let datasourceName; -describe("Entity explorer tests related to copy query", function() { +describe("Entity explorer tests related to copy query", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); @@ -20,7 +20,7 @@ describe("Entity explorer tests related to copy query", function() { // } // }); - it("1. Create a query with dataSource in explorer, Create new Page", function() { + it("1. Create a query with dataSource in explorer, Create new Page", function () { cy.Createpage(pageid); ee.SelectEntityByName("Page1"); cy.NavigateToDatasourceEditor(); @@ -41,10 +41,7 @@ describe("Entity explorer tests related to copy query", function() { ); cy.get(queryLocators.templateMenu).click(); - cy.get(".CodeMirror textarea") - .first() - .focus() - .type("select * from users"); + cy.get(".CodeMirror textarea").first().focus().type("select * from users"); cy.EvaluateCurrentValue("select * from users"); cy.get(".t--action-name-edit-field").click({ force: true }); @@ -52,7 +49,7 @@ describe("Entity explorer tests related to copy query", function() { datasourceName = httpResponse.response.body.data.name; ee.ExpandCollapseEntity("Queries/JS"); ee.ActionContextMenuByEntityName("Query1", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(5); expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); expect($lis.eq(1)).to.contain("{{Query1.data}}"); @@ -63,14 +60,14 @@ describe("Entity explorer tests related to copy query", function() { }); }); - it("2. Copy query in explorer to new page & verify Bindings are copied too", function() { + it("2. Copy query in explorer to new page & verify Bindings are copied too", function () { ee.SelectEntityByName("Query1", "Queries/JS"); ee.ActionContextMenuByEntityName("Query1", "Copy to page", pageid); ee.ExpandCollapseEntity("Queries/JS"); ee.SelectEntityByName("Query1"); cy.runQuery(); ee.ActionContextMenuByEntityName("Query1", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); expect($lis.eq(1)).to.contain("{{Query1.data}}"); expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}"); @@ -79,7 +76,7 @@ describe("Entity explorer tests related to copy query", function() { }); }); - it("3. Rename datasource in explorer, Delete query and try to Delete datasource", function() { + it("3. Rename datasource in explorer, Delete query and try to Delete datasource", function () { ee.SelectEntityByName("Page1"); cy.generateUUID().then((uid) => { updatedName = uid; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Datasource_Structure_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Datasource_Structure_spec.js index 438dc83a39..7f3d5830cd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Datasource_Structure_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Datasource_Structure_spec.js @@ -8,7 +8,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let ee = ObjectsRegistry.EntityExplorer; let datasourceName; -describe("Entity explorer datasource structure", function() { +describe("Entity explorer datasource structure", function () { beforeEach(() => { //cy.ClearSearch(); cy.startRoutesForDatasource(); @@ -18,7 +18,7 @@ describe("Entity explorer datasource structure", function() { }); }); - it("1. Entity explorer datasource structure", function() { + it("1. Entity explorer datasource structure", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.wait("@createNewApi").should( "have.nested.property", @@ -50,9 +50,7 @@ describe("Entity explorer datasource structure", function() { // .click(); // cy.get(".bp3-popover-content").should("be.visible"); - cy.get(explorer.templateMenuIcon) - .first() - .click({ force: true }); + cy.get(explorer.templateMenuIcon).first().click({ force: true }); cy.get(".t--structure-template-menu-popover") .last() .contains("SELECT") @@ -66,9 +64,7 @@ describe("Entity explorer datasource structure", function() { cy.deleteQueryUsingContext(); cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.GlobalSearchEntity("MyQuery"); - cy.get(`.t--entity-name:contains(MyQuery)`) - .scrollIntoView() - .click(); + cy.get(`.t--entity-name:contains(MyQuery)`).scrollIntoView().click(); cy.deleteQueryUsingContext(); cy.get(commonlocators.entityExplorersearch).clear({ force: true }); @@ -76,7 +72,7 @@ describe("Entity explorer datasource structure", function() { cy.deleteDatasource(datasourceName); }); - it("2. Refresh datasource structure", function() { + it("2. Refresh datasource structure", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.get(queryLocators.templateMenu).click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_DragAndDropWidget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_DragAndDropWidget_spec.js index 3d203aa682..590f72f8b4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_DragAndDropWidget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_DragAndDropWidget_spec.js @@ -5,15 +5,13 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const widgetsPage = require("../../../../locators/Widgets.json"); -describe("Entity explorer Drag and Drop widgets testcases", function() { - it("Drag and drop form widget and validate", function() { +describe("Entity explorer Drag and Drop widgets testcases", function () { + it("Drag and drop form widget and validate", function () { cy.log("Login Successful"); cy.reload(); // To remove the rename tooltip cy.get(explorer.addWidget).click({ force: true }); cy.get(commonlocators.entityExplorersearch).should("be.visible"); - cy.get(commonlocators.entityExplorersearch) - .clear() - .type("form"); + cy.get(commonlocators.entityExplorersearch).clear().type("form"); cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 }); cy.get(formWidgetsPage.formD).click(); /** @@ -43,14 +41,12 @@ describe("Entity explorer Drag and Drop widgets testcases", function() { .should("be.visible"); cy.get(explorer.explorerSwitchId).click(); cy.PublishtheApp(); - cy.get(publish.backToEditor) - .first() - .click(); + cy.get(publish.backToEditor).first().click(); cy.CheckAndUnfoldEntityItem("Widgets"); cy.get(`.t--entity-name:contains(FormTest)`).trigger("mouseover"); cy.hoverAndClickParticularIndex(1); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(3); expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); expect($lis.eq(1)).to.contain("{{FormTest.data}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js index 22bd258bbd..9048c5055e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js @@ -1,14 +1,14 @@ const dsl = require("../../../../fixtures/basicTabledsl.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json"); -describe("Tab widget test", function() { +describe("Tab widget test", function () { const apiName = "Table1"; const tableName = "Table"; before(() => { cy.addDsl(dsl); }); - it("Rename API with table widget name validation test", function() { + it("Rename API with table widget name validation test", function () { cy.log("Login Successful"); cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); @@ -19,7 +19,7 @@ describe("Tab widget test", function() { .should("have.value", tableName); }); - it("Rename Table widget with api name validation test", function() { + it("Rename Table widget with api name validation test", function () { cy.GlobalSearchEntity("Table1"); cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.RenameEntity(apiName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js index 480adbfae2..eed7881bef 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js @@ -5,8 +5,8 @@ let ee = ObjectsRegistry.EntityExplorer; const firstApiName = "First"; const secondApiName = "Second"; -describe("Api Naming conflict on a page test", function() { - it("1. Expects actions on the same page cannot have identical names", function() { +describe("Api Naming conflict on a page test", function () { + it("1. Expects actions on the same page cannot have identical names", function () { cy.log("Login Successful"); // create an API cy.NavigateToAPI_Panel(); @@ -22,9 +22,7 @@ describe("Api Naming conflict on a page test", function() { }); cy.selectAction("Edit Name"); //cy.RenameEntity(tabname); - cy.get(explorer.editEntity) - .last() - .type(firstApiName, { force: true }); + cy.get(explorer.editEntity).last().type(firstApiName, { force: true }); //cy.RenameEntity(firstApiName); cy.validateMessage(firstApiName); cy.ClearSearch(); @@ -39,8 +37,8 @@ describe("Api Naming conflict on a page test", function() { }); }); -describe("Api Naming conflict on different pages test", function() { - it("2. It expects actions on different pages can have identical names", function() { +describe("Api Naming conflict on different pages test", function () { + it("2. It expects actions on different pages can have identical names", function () { cy.log("Login Successful"); // create a new API cy.CreateAPI(firstApiName); @@ -49,9 +47,7 @@ describe("Api Naming conflict on different pages test", function() { cy.Createpage("Page2"); cy.CreateAPI(firstApiName); ee.ExpandCollapseEntity("Queries/JS", true); - cy.get(".t--entity-name") - .contains(firstApiName) - .should("exist"); + cy.get(".t--entity-name").contains(firstApiName).should("exist"); cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => { cy.get(".t--context-menu").click({ force: true }); }); @@ -68,8 +64,8 @@ describe("Api Naming conflict on different pages test", function() { }); }); -describe("Entity Naming conflict test", function() { - it("3. Expects JS objects and actions to not have identical names on the same page.", function() { +describe("Entity Naming conflict test", function () { + it("3. Expects JS objects and actions to not have identical names on the same page.", function () { cy.log("Login Successful"); ee.ExpandCollapseEntity("Queries/JS", true); // create JS object and name it @@ -92,9 +88,7 @@ describe("Entity Naming conflict test", function() { }); cy.selectAction("Edit Name"); - cy.get(explorer.editEntity) - .last() - .type(firstApiName, { force: true }); + cy.get(explorer.editEntity).last().type(firstApiName, { force: true }); cy.VerifyPopOverMessage(firstApiName + " is already being used.", true); cy.get("body").click(0, 0); cy.wait(2000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Long_Name_Tooltip_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Long_Name_Tooltip_spec.js index 53790a71d6..08a39c19ce 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Long_Name_Tooltip_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Long_Name_Tooltip_spec.js @@ -6,8 +6,8 @@ const shortName = "shortName"; const longName = "AVeryLongNameThatOverflows"; const alternateName = "AlternateName"; -describe("Entity Explorer showing tooltips on long names", function() { - it("Expect tooltip on long names only", function() { +describe("Entity Explorer showing tooltips on long names", function () { + it("Expect tooltip on long names only", function () { // create an API with a short name cy.NavigateToAPI_Panel(); cy.CreateAPI(shortName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Multiple_Widgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Multiple_Widgets_spec.js index 3cb739fea6..ecc4625711 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Multiple_Widgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Multiple_Widgets_spec.js @@ -9,7 +9,7 @@ const pageid = "MyPage"; import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper; -describe("Entity explorer tests related to widgets and validation", function() { +describe("Entity explorer tests related to widgets and validation", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -18,20 +18,18 @@ describe("Entity explorer tests related to widgets and validation", function() { agHelper.SaveLocalStorageCache(); }); - it("Add a widget to default page and verify the properties", function() { + it("Add a widget to default page and verify the properties", function () { cy.addDsl(dsl); cy.OpenBindings("Text1"); - cy.get(explorer.property) - .last() - .click({ force: true }); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(explorer.property).last().click({ force: true }); + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(2); expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); expect($lis.eq(1)).to.contain("{{Text1.text}}"); }); }); - it("Create another page and add another widget and verify properties", function() { + it("Create another page and add another widget and verify properties", function () { cy.Createpage(pageid); cy.addDsl(tdsl); cy.openPropertyPane("tablewidget"); @@ -42,10 +40,8 @@ describe("Entity explorer tests related to widgets and validation", function() { ); cy.GlobalSearchEntity("Table1"); cy.OpenBindings("Table1"); - cy.get(explorer.property) - .last() - .click({ force: true }); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(explorer.property).last().click({ force: true }); + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(13); expect($lis.eq(0)).to.contain("{{Table1.selectedRow}}"); expect($lis.eq(1)).to.contain("{{Table1.selectedRows}}"); @@ -63,18 +59,14 @@ describe("Entity explorer tests related to widgets and validation", function() { }); }); - it("Toggle between widgets in different pages using search functionality", function() { + it("Toggle between widgets in different pages using search functionality", function () { cy.CheckAndUnfoldEntityItem("Pages"); - cy.get(".t--entity-name") - .contains("Page1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Page1").click({ force: true }); cy.wait(2000); cy.SearchEntityandOpen("Text1"); cy.OpenBindings("Text1"); - cy.get(explorer.property) - .last() - .click({ force: true }); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(explorer.property).last().click({ force: true }); + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(2); expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); expect($lis.eq(1)).to.contain("{{Text1.text}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Pin_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Pin_spec.js index 27e6a6db73..a026f49c1b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Pin_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Pin_spec.js @@ -6,12 +6,12 @@ const ee = ObjectsRegistry.EntityExplorer, agHelper = ObjectsRegistry.AggregateHelper, locator = ObjectsRegistry.CommonLocators; -describe("Entity explorer tests related to pinning and unpinning", function() { +describe("Entity explorer tests related to pinning and unpinning", function () { before(() => { cy.addDsl(dsl); }); - it("checks entity explorer visibility on unpin", function() { + it("checks entity explorer visibility on unpin", function () { cy.wait(5000); cy.get(".t--entity-explorer").should("be.visible"); cy.get(".t--pin-entity-explorer").click(); @@ -21,12 +21,12 @@ describe("Entity explorer tests related to pinning and unpinning", function() { cy.get(".t--entity-explorer").should("not.be.visible"); }); - it("checks entity explorer visibility on pin", function() { + it("checks entity explorer visibility on pin", function () { cy.get(".t--pin-entity-explorer").click(); cy.get(".t--entity-explorer").should("be.visible"); }); - it("Widgets visibility in widget pane", function() { + it("Widgets visibility in widget pane", function () { ee.NavigateToSwitcher("widgets"); agHelper.ScrollTo(locator._widgetPane, "bottom"); agHelper.AssertElementVisible(ee.locator._widgetPageIcon(WIDGET.VIDEO)); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Query_Datasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Query_Datasource_spec.js index 085d86b332..3f0cb422e7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Query_Datasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Query_Datasource_spec.js @@ -11,7 +11,7 @@ let ee = ObjectsRegistry.EntityExplorer; const pageid = "MyPage"; let datasourceName; -describe("Entity explorer tests related to query and datasource", function() { +describe("Entity explorer tests related to query and datasource", function () { before(() => { cy.generateUUID().then((uid) => { datasourceName = uid; @@ -22,12 +22,10 @@ describe("Entity explorer tests related to query and datasource", function() { cy.startRoutesForDatasource(); }); - it("1. Create a page/moveQuery/rename/delete in explorer", function() { + it("1. Create a page/moveQuery/rename/delete in explorer", function () { cy.Createpage(pageid); cy.wait(2000); - cy.get(".t--entity-name") - .contains("Page1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Page1").click({ force: true }); cy.wait(2000); cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); @@ -84,16 +82,13 @@ describe("Entity explorer tests related to query and datasource", function() { ); // cy.get(queryLocators.templateMenu).click(); - cy.get(".CodeMirror textarea") - .first() - .focus() - .type("select * from users"); + cy.get(".CodeMirror textarea").first().focus().type("select * from users"); cy.EvaluateCurrentValue("select * from users"); cy.get(".t--action-name-edit-field").click({ force: true }); ee.ActionContextMenuByEntityName("Query1", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(5); expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); expect($lis.eq(1)).to.contain("{{Query1.data}}"); @@ -104,9 +99,7 @@ describe("Entity explorer tests related to query and datasource", function() { ee.ActionContextMenuByEntityName("Query1", "Edit Name"); cy.EditApiNameFromExplorer("MyQuery"); ee.ActionContextMenuByEntityName("MyQuery", "Move to page", pageid); - cy.get(".t--entity-name") - .contains("MyQuery") - .click(); + cy.get(".t--entity-name").contains("MyQuery").click(); cy.wait(2000); cy.runQuery(); @@ -120,9 +113,7 @@ describe("Entity explorer tests related to query and datasource", function() { .click({ force: true }); cy.contains(".t--datasource-name", datasourceName).click(); cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); cy.wait("@deleteDatasource").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Tab_rename_Delete_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Tab_rename_Delete_spec.js index 560c7b48c8..cd8a23d299 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Tab_rename_Delete_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Tab_rename_Delete_spec.js @@ -4,24 +4,22 @@ const explorer = require("../../../../locators/explorerlocators.json"); const dsl = require("../../../../fixtures/tabdsl.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json"); -describe("Tab widget test", function() { +describe("Tab widget test", function () { const tabname = "UpdatedTab"; before(() => { cy.addDsl(dsl); }); - it("Tab Widget Functionality To rename Tabs from entity explorer", function() { + it("Tab Widget Functionality To rename Tabs from entity explorer", function () { cy.GlobalSearchEntity("Tab1"); cy.hoverAndClickParticularIndex(2); cy.selectAction("Edit Name"); //cy.RenameEntity(tabname); - cy.get(explorer.editEntity) - .last() - .type(tabname, { force: true }); + cy.get(explorer.editEntity).last().type(tabname, { force: true }); //cy.RenameEntity(tabname); }); - it("Tab name validation in properties and widget ", function() { + it("Tab name validation in properties and widget ", function () { cy.openPropertyPane("tabswidget"); cy.closePropertyPane(); cy.get(Layoutpage.tabWidget) @@ -30,14 +28,12 @@ describe("Tab widget test", function() { .should("be.visible"); }); - it("Tab Widget Functionality To delete Tabs from entity explorer", function() { + it("Tab Widget Functionality To delete Tabs from entity explorer", function () { cy.GlobalSearchEntity("Tab2"); cy.hoverAndClickParticularIndex(3); cy.selectAction("Edit Name"); //cy.RenameEntity(tabname); - cy.get(explorer.editEntity) - .last() - .type(tabname, { force: true }); + cy.get(explorer.editEntity).last().type(tabname, { force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); cy.validateMessage(tabname); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Delete_Undo_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Delete_Undo_spec.js index 404c1862ca..74dfe06192 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Delete_Undo_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Delete_Undo_spec.js @@ -8,10 +8,10 @@ before(() => { cy.addDsl(dsl); }); -describe("Test Suite to validate copy/delete/undo functionalites", function() { +describe("Test Suite to validate copy/delete/undo functionalites", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - it("Drag and drop form widget and validate copy widget via toast message", function() { + it("Drag and drop form widget and validate copy widget via toast message", function () { cy.openPropertyPane("formwidget"); cy.widgetText( "FormTest", @@ -21,27 +21,21 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { cy.get(commonlocators.copyWidget).click(); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); - cy.get(commonlocators.toastBody) - .first() - .contains("Copied"); + cy.get(commonlocators.toastBody).first().contains("Copied"); }); - it("Delete Widget from sidebar and Undo action validation", function() { + it("Delete Widget from sidebar and Undo action validation", function () { cy.GlobalSearchEntity("Widgets"); - cy.get(".t--entity-name") - .contains("FormTest") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("FormTest").trigger("mouseover"); cy.hoverAndClickParticularIndex(1); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(3); expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); expect($lis.eq(1)).to.contain("{{FormTest.data}}"); expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}"); }); - cy.get(".t--entity-name") - .contains("FormTest") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("FormTest").trigger("mouseover"); cy.hoverAndClickParticularIndex(1); cy.selectAction("Delete"); //cy.DeleteWidgetFromSideBar(); @@ -62,12 +56,10 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { ); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); - cy.get(".t--entity-name") - .contains("FormTest") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("FormTest").trigger("mouseover"); cy.hoverAndClickParticularIndex(1); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(3); expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); expect($lis.eq(1)).to.contain("{{FormTest.data}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js index 767f747bca..95629303ab 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js @@ -10,8 +10,8 @@ before(() => { cy.addDsl(dsl); }); -describe("Test Suite to validate copy/delete/undo functionalites", function() { - it.only("Drag and drop form widget and validate copy widget via toast message", function() { +describe("Test Suite to validate copy/delete/undo functionalites", function () { + it.only("Drag and drop form widget and validate copy widget via toast message", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; cy.openPropertyPane("formwidget"); @@ -24,10 +24,7 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { cy.get("body").type(`{${modifierKey}}c`); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); - cy.get(commonlocators.toastBody) - .first() - .contains("Copied") - .click(); + cy.get(commonlocators.toastBody).first().contains("Copied").click(); cy.get("body").type(`{${modifierKey}}v`, { force: true }); cy.wait("@updateLayout").should( "have.nested.property", @@ -44,7 +41,7 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { ee.ExpandCollapseEntity("Widgets"); ee.ExpandCollapseEntity("FormTest"); ee.ActionContextMenuByEntityName("FormTestCopy", "Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(3); expect($lis.eq(0)).to.contain("{{FormTestCopy.isVisible}}"); expect($lis.eq(1)).to.contain("{{FormTestCopy.data}}"); @@ -53,12 +50,8 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() { cy.get($lis.eq(1)) .contains("{{FormTestCopy.data}}") .click({ force: true }); - cy.get(".bp3-input") - .first() - .click({ force: true }); - cy.get(".bp3-input") - .first() - .type(`{${modifierKey}}v`, { force: true }); + cy.get(".bp3-input").first().click({ force: true }); + cy.get(".bp3-input").first().type(`{${modifierKey}}v`, { force: true }); }); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_spec.js index 5dd1cc931a..d34a6b2034 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Widgets_spec.js @@ -1,39 +1,31 @@ const dsl = require("../../../../fixtures/displayWidgetDsl.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json"); -describe("Entity explorer tests related to widgets and validation", function() { +describe("Entity explorer tests related to widgets and validation", function () { before(() => { cy.addDsl(dsl); }); - it("Widget edit/delete/copy to clipboard validation", function() { + it("Widget edit/delete/copy to clipboard validation", function () { cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("Container4"); - cy.get(".t--entity-collapse-toggle") - .eq(4) - .click({ force: true }); - cy.get(".t--entity-name") - .contains("Text1") - .trigger("mouseover"); + cy.get(".t--entity-collapse-toggle").eq(4).click({ force: true }); + cy.get(".t--entity-name").contains("Text1").trigger("mouseover"); cy.hoverAndClickParticularIndex(4); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(2); expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); expect($lis.eq(1)).to.contain("{{Text1.text}}"); }); - cy.get(".t--entity-name") - .contains("Text1") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("Text1").trigger("mouseover"); cy.hoverAndClickParticularIndex(4); cy.selectAction("Edit Name"); cy.EditApiNameFromExplorer("TextUpdated"); - cy.get(".t--entity-name") - .contains("TextUpdated") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("TextUpdated").trigger("mouseover"); cy.hoverAndClickParticularIndex(4); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(2); expect($lis.eq(0)).to.contain("{{TextUpdated.isVisible}}"); expect($lis.eq(1)).to.contain("{{TextUpdated.text}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Hide_Page_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Hide_Page_spec.js index 01b4f20686..b17433d613 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Hide_Page_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Hide_Page_spec.js @@ -4,13 +4,11 @@ const publish = require("../../../../locators/publishWidgetspage.json"); const pageOne = "MyPage1"; const pageTwo = "MyPage2"; -describe("Hide / Show page test functionality", function() { - it("Hide page test ", function() { +describe("Hide / Show page test functionality", function () { + it("Hide page test ", function () { cy.Createpage(pageOne); cy.Createpage(pageTwo); - cy.get(".t--entity-name") - .contains("Page1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Page1").click({ force: true }); cy.get(`.t--entity-item:contains('MyPage2')`).within(() => { cy.get(".t--context-menu").click({ force: true }); }); @@ -20,7 +18,7 @@ describe("Hide / Show page test functionality", function() { cy.get(".t--page-switch-tab").should("have.length", 2); }); - it("Show page test ", function() { + it("Show page test ", function () { cy.get(publish.backToEditor).click(); cy.get(`.t--entity-name:contains('MyPage2')`).trigger("mouseover"); cy.hoverAndClick(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts index c9b0031f94..6f80d98059 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/JSEditorContextMenu_Spec.ts @@ -13,13 +13,13 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = jsEditor.ValidateDefaultJSObjProperties("JSObject1"); }); - it("2. Validate Rename JSObject from Form Header", function() { + it("2. Validate Rename JSObject from Form Header", function () { jsEditor.RenameJSObjFromPane("RenamedJSObject"); ee.AssertEntityPresenceInExplorer("RenamedJSObject"); jsEditor.ValidateDefaultJSObjProperties("RenamedJSObject"); }); - it("3. Validate Copy JSObject", function() { + it("3. Validate Copy JSObject", function () { ee.ActionContextMenuByEntityName("RenamedJSObject", "Copy to page", pageId); cy.wait("@createNewJSCollection").should( "have.nested.property", @@ -30,13 +30,13 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); }); - it("4. Validate Rename JSObject from Entity Explorer", function() { + it("4. Validate Rename JSObject from Entity Explorer", function () { jsEditor.RenameJSObjFromExplorer("RenamedJSObject", "ExplorerRenamed"); ee.AssertEntityPresenceInExplorer("ExplorerRenamed"); jsEditor.ValidateDefaultJSObjProperties("ExplorerRenamed"); }); - it("5. Validate Move JSObject", function() { + it("5. Validate Move JSObject", function () { const newPageId = "Page2"; ee.AddNewPage(); ee.AssertEntityPresenceInExplorer(newPageId); @@ -52,7 +52,7 @@ describe("Validate basic operations on Entity explorer JSEditor structure", () = jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); }); - it("6. Validate Deletion of JSObject", function() { + it("6. Validate Deletion of JSObject", function () { ee.SelectEntityByName(pageId); ee.ActionContextMenuByEntityName( "ExplorerRenamed", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Page_Load_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Page_Load_Spec.js index fdc54a0ead..403077b0e4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Page_Load_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Page_Load_Spec.js @@ -59,9 +59,7 @@ describe("Page Load tests", () => { "This is Page 2", ); // Switch page - cy.get(".t--page-switch-tab") - .contains("Page1") - .click({ force: true }); + cy.get(".t--page-switch-tab").contains("Page1").click({ force: true }); // Assert active page tab cy.get(".t--page-switch-tab") .contains("Page1") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Pages_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Pages_spec.js index 77055ab4f9..f51c6fd9f8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Pages_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Pages_spec.js @@ -4,11 +4,11 @@ const locators = { errorPageTitle: ".t--error-page-title", }; -describe("Pages", function() { +describe("Pages", function () { let veryLongPageName = `abcdefghijklmnopqrstuvwxyz1234`; let apiName = "someApi"; - it("1. Clone page", function() { + it("1. Clone page", function () { //cy.NavigateToAPI_Panel(); _.apiPage.CreateApi(apiName); _.entityExplorer.SelectEntityByName("Page1", "Pages"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Scrolling_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Scrolling_Spec.ts index ef7ca68e9a..46ba2331d8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Scrolling_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Scrolling_Spec.ts @@ -1,8 +1,8 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let mockDBNameUsers: string, mockDBNameMovies: string; -describe("Entity explorer context menu should hide on scrolling", function() { - it("1. Bug #15474 - Entity explorer menu must close on scroll", function() { +describe("Entity explorer context menu should hide on scrolling", function () { + it("1. Bug #15474 - Entity explorer menu must close on scroll", function () { // Setup to make the explorer scrollable _.entityExplorer.ExpandCollapseEntity("Queries/JS"); _.entityExplorer.ExpandCollapseEntity("Datasources"); @@ -32,8 +32,16 @@ describe("Entity explorer context menu should hide on scrolling", function() { after(() => { //clean up - _.entityExplorer.ActionContextMenuByEntityName("Query1", "Delete", "Are you sure?"); - _.entityExplorer.ActionContextMenuByEntityName("Query2", "Delete", "Are you sure?"); + _.entityExplorer.ActionContextMenuByEntityName( + "Query1", + "Delete", + "Are you sure?", + ); + _.entityExplorer.ActionContextMenuByEntityName( + "Query2", + "Delete", + "Are you sure?", + ); _.dataSources.DeleteDatasouceFromActiveTab(mockDBNameMovies); //Since sometimes after Queries are deleted, ds is no more visible in EE tr_.ee _.dataSources.DeleteDatasouceFromActiveTab(mockDBNameUsers); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/UpdateUsersName_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/UpdateUsersName_spec.js index 10ca612df4..e661a658f8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/UpdateUsersName_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/UpdateUsersName_spec.js @@ -1,10 +1,10 @@ import homePage from "../../../../locators/HomePage"; import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Update a user's name", function() { +describe("Update a user's name", function () { let username; - it("1. Update a user's name", function() { + it("1. Update a user's name", function () { _.homePage.NavigateToHome(); cy.get(homePage.profileMenu).click(); cy.get(".t--edit-profile").click({ force: true }); @@ -12,9 +12,7 @@ describe("Update a user's name", function() { cy.generateUUID().then((uid) => { username = uid; cy.get("[data-cy=t--display-name]").clear(); - cy.get("[data-cy=t--display-name]") - .click() - .type(username); + cy.get("[data-cy=t--display-name]").click().type(username); // Waiting as the input onchange has a debounce // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); @@ -25,7 +23,7 @@ describe("Update a user's name", function() { }); }); - it("2. Validate email address and Reset pwd", function() { + it("2. Validate email address and Reset pwd", function () { cy.intercept("POST", "/api/v1/users/forgotPassword", { fixture: "resetPassword.json", }).as("resetPwd"); @@ -41,10 +39,7 @@ describe("Update a user's name", function() { const someText = text; expect(someText).to.equal(Cypress.env("USERNAME")); }); - cy.get(".react-tabs a") - .last() - .contains("Reset Password") - .click(); + cy.get(".react-tabs a").last().contains("Reset Password").click(); cy.wait("@resetPwd").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormLogin/EnableFormLogin_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormLogin/EnableFormLogin_spec.js index 9e81453ece..48e0a4c0ea 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormLogin/EnableFormLogin_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormLogin/EnableFormLogin_spec.js @@ -1,8 +1,8 @@ import adminSettings from "../../../../locators/AdminsSettings"; import homePage from "../../../../locators/HomePage"; -describe("Form Login test functionality", function() { - it("1. Go to admin settings and disable Form Signup", function() { +describe("Form Login test functionality", function () { + it("1. Go to admin settings and disable Form Signup", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -66,7 +66,7 @@ describe("Form Login test functionality", function() { }); }); - it("2. Go to admin settings and disable Form Login", function() { + it("2. Go to admin settings and disable Form Login", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormNativeToRawTests/Mongo_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormNativeToRawTests/Mongo_spec.ts index 88f516b75d..5c4460da46 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormNativeToRawTests/Mongo_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/FormNativeToRawTests/Mongo_spec.ts @@ -27,21 +27,33 @@ describe("Mongo Form to Native conversion works", () => { formControls.mongoFindProjection, ); - _.dataSources.ValidateNSelectDropdown("Commands", "Find Document(s)", "Raw"); + _.dataSources.ValidateNSelectDropdown( + "Commands", + "Find Document(s)", + "Raw", + ); _.agHelper.VerifyCodeInputValue(formControls.rawBody, expectedOutput); // then we test to check if the conversion is only done once. // and then we ensure that upon switching between another command and Raw, the Template menu does not show up. - _.dataSources.ValidateNSelectDropdown("Commands", "Raw", "Find Document(s)"); + _.dataSources.ValidateNSelectDropdown( + "Commands", + "Raw", + "Find Document(s)", + ); _.agHelper.TypeDynamicInputValueNValidate( "modifyCollection", formControls.mongoCollection, ); - _.dataSources.ValidateNSelectDropdown("Commands", "Find Document(s)", "Raw"); + _.dataSources.ValidateNSelectDropdown( + "Commands", + "Find Document(s)", + "Raw", + ); // make sure template menu no longer reappears _.agHelper.AssertElementAbsence(_.dataSources._templateMenu); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js index 97670350ef..a03b4eb7ea 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js @@ -5,7 +5,7 @@ const queryLocators = require("../../../../../locators/QueryEditor.json"); const dynamicInputLocators = require("../../../../../locators/DynamicInput.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("Git discard changes:", function() { +describe("Git discard changes:", function () { let datasourceName; let repoName; const query1 = "get_users"; @@ -39,9 +39,7 @@ describe("Git discard changes:", function() { }); // Create new postgres query cy.get(queryLocators.queryNameField).type(`${query1}`); - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); cy.get(queryLocators.templateMenu).click(); cy.get(queryLocators.query).click({ force: true }); cy.get(".CodeMirror textarea") @@ -56,9 +54,7 @@ describe("Git discard changes:", function() { cy.CheckAndUnfoldEntityItem("Pages"); cy.wait(1000); - cy.get(".t--entity-item:contains(Page1)") - .first() - .click(); + cy.get(".t--entity-item:contains(Page1)").first().click(); cy.wait("@getPage"); // bind input widget to postgres query on page1 cy.get(explorer.addWidget).click(); @@ -75,9 +71,7 @@ describe("Git discard changes:", function() { cy.CheckAndUnfoldEntityItem("Pages"); cy.Createpage(page2); cy.wait(1000); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); cy.wait("@getPage"); cy.createJSObject('return "Success";'); cy.get(explorer.addWidget).click(); @@ -102,9 +96,7 @@ describe("Git discard changes:", function() { }); it("2. Add new datasource query, discard changes, verify query is deleted", () => { - cy.get(`.t--entity-item:contains("Page1")`) - .first() - .click(); + cy.get(`.t--entity-item:contains("Page1")`).first().click(); cy.wait("@getPage"); // create new postgres query cy.NavigateToQueryEditor(); @@ -118,9 +110,7 @@ describe("Git discard changes:", function() { cy.get(datasource.createQuery).click(); }); cy.get(queryLocators.queryNameField).type(`${query2}`); - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); cy.get(queryLocators.templateMenu).click(); cy.get(queryLocators.query).click({ force: true }); cy.get(".CodeMirror textarea") @@ -133,9 +123,7 @@ describe("Git discard changes:", function() { cy.WaitAutoSave(); cy.runQuery(); // navoigate to Page1 - cy.get(`.t--entity-item:contains(Page1)`) - .first() - .click(); + cy.get(`.t--entity-item:contains(Page1)`).first().click(); cy.wait("@getPage"); // discard changes cy.gitDiscardChanges(); @@ -167,9 +155,7 @@ describe("Git discard changes:", function() { cy.wait(5000); // verify page2 is recovered back cy.get(`.t--entity-name:contains(${page2})`).should("be.visible"); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); cy.wait("@getPage"); // verify data binding on page2 cy.get(".bp3-input").should("have.value", "Success"); @@ -195,9 +181,7 @@ describe("Git discard changes:", function() { it("6. Delete JSObject1 and trigger discard flow, JSObject1 should be active again", () => { // navigate to page2 cy.CheckAndUnfoldEntityItem("Pages"); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); cy.wait("@getPage"); cy.wait(3000); /* create and save jsObject */ @@ -214,9 +198,7 @@ describe("Git discard changes:", function() { cy.gitDiscardChanges(); cy.wait(5000); cy.CheckAndUnfoldEntityItem("Pages"); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); cy.wait("@getPage"); cy.wait(3000); //verify JSObject is recovered @@ -227,9 +209,7 @@ describe("Git discard changes:", function() { it("7. Add new page i.e page3, go to page2 & discard changes, verify page3 is removed", () => { // create new page page3 and move to page1 cy.Createpage(page3); - cy.get(`.t--entity-item:contains(${page2})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${page2})`).first().click(); // discard changes cy.gitDiscardChanges(); cy.wait(5000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js index 0724e06a6a..378b401fb3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js @@ -9,7 +9,7 @@ const mainBranch = "master"; let repoName, newWorkspaceName; import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Git import flow ", function() { +describe("Git import flow ", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -20,9 +20,7 @@ describe("Git import flow ", function() { }); it("1. Import an app from JSON with Postgres, MySQL, Mongo db & then connect it to Git", () => { cy.NavigateToHome(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.wait(1000); @@ -82,13 +80,9 @@ describe("Git import flow ", function() { cy.CreateAppForWorkspace(newWorkspaceName, "gitImport"); }); cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(".t--import-json-card") - .next() - .click(); + cy.get(".t--import-json-card").next().click(); cy.importAppFromGit(repoName); cy.wait(5000); cy.get(reconnectDatasourceModal.Modal).should("be.visible"); @@ -137,13 +131,9 @@ describe("Git import flow ", function() { it("3. Verfiy imported app should have all the data binding visible in view and edit mode", () => { // verify postgres data binded to table - cy.get(".tbody") - .first() - .should("contain.text", "Test user 7"); + cy.get(".tbody").first().should("contain.text", "Test user 7"); //verify MySQL data binded to table - cy.get(".tbody") - .last() - .should("contain.text", "New Config"); + cy.get(".tbody").last().should("contain.text", "New Config"); // verify api response binded to input widget cy.xpath("//input[@value='this is a test']").should("be.visible"); // verify js object binded to input widget @@ -157,13 +147,9 @@ describe("Git import flow ", function() { newBranch = branName; cy.log("newBranch is " + newBranch); }); - cy.get(".tbody") - .first() - .should("contain.text", "Test user 7"); + cy.get(".tbody").first().should("contain.text", "Test user 7"); // verify MySQL data binded to table - cy.get(".tbody") - .last() - .should("contain.text", "New Config"); + cy.get(".tbody").last().should("contain.text", "New Config"); // verify api response binded to input widget cy.xpath("//input[@value='this is a test']"); // verify js object binded to input widget @@ -199,9 +185,7 @@ describe("Git import flow ", function() { // verify js object binded to input widget cy.xpath("//input[@value='Success']"); // navigate to Page1 and verify data - cy.get(".t--page-switch-tab") - .contains("Page1") - .click({ force: true }); + cy.get(".t--page-switch-tab").contains("Page1").click({ force: true }); _.table.AssertTableLoaded(); // verify api response binded to input widget cy.xpath("//input[@value='this is a test']"); @@ -216,18 +200,12 @@ describe("Git import flow ", function() { cy.wait(2000); // validate data binding in edit and deploy mode cy.latestDeployPreview(); - cy.get(".tbody") - .first() - .should("contain.text", "Test user 7"); + cy.get(".tbody").first().should("contain.text", "Test user 7"); cy.xpath("//input[@value='this is a test']"); cy.xpath("//input[@value='Success']"); // navigate to Page1 and verify data - cy.get(".t--page-switch-tab") - .contains("Page1 Copy") - .click({ force: true }); - cy.get(".tbody") - .first() - .should("contain.text", "Test user 7"); + cy.get(".t--page-switch-tab").contains("Page1 Copy").click({ force: true }); + cy.get(".tbody").first().should("contain.text", "Test user 7"); cy.xpath("//input[@value='this is a test']"); cy.xpath("//input[@value='Success']"); cy.get(commonlocators.backToEditor).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/ImportEmptyRepo_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/ImportEmptyRepo_spec.js index 2169a749c6..dc34409296 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/ImportEmptyRepo_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/ImportEmptyRepo_spec.js @@ -2,7 +2,7 @@ import homePage from "../../../../../locators/HomePage"; import gitSyncLocators from "../../../../../locators/gitSyncLocators"; import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Git import empty repository", function() { +describe("Git import empty repository", function () { let repoName; const assertConnectFailure = true; const failureMessage = @@ -23,13 +23,9 @@ describe("Git import empty repository", function() { it("Bug #12749 Git Import - Empty Repo NullPointerException", () => { cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(".t--import-json-card") - .next() - .click(); + cy.get(".t--import-json-card").next().click(); cy.generateUUID().then((uid) => { repoName = uid; //cy.createTestGithubRepo(repoName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Connection_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Connection_spec.js index 0337555bb2..708727e0d5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Connection_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Connection_spec.js @@ -16,7 +16,7 @@ let repoName; let generatedKey; let windowOpenSpy; const owner = Cypress.env("TEST_GITHUB_USER_NAME"); -describe("Git sync modal: connect tab", function() { +describe("Git sync modal: connect tab", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -31,7 +31,7 @@ describe("Git sync modal: connect tab", function() { }); }); - it("1. validates repo URL", function() { + it("1. validates repo URL", function () { // open gitSync modal cy.get(homePage.deployPopupOptionTrigger).click({ force: true }); cy.get(homePage.connectToGitBtn).click({ force: true }); @@ -90,11 +90,9 @@ describe("Git sync modal: connect tab", function() { cy.xpath(gitSyncLocators.learnMoreDeployKey).click({ force: true }); }); - it("2. validates copy key and validates repo url input after key generation", function() { + it("2. validates copy key and validates repo url input after key generation", function () { cy.window().then((win) => { - cy.stub(win, "prompt") - .returns(win.prompt) - .as("copyToClipboardPrompt"); + cy.stub(win, "prompt").returns(win.prompt).as("copyToClipboardPrompt"); }); cy.get(gitSyncLocators.copySshKey).click(); @@ -115,7 +113,7 @@ describe("Git sync modal: connect tab", function() { cy.get(gitSyncLocators.connectSubmitBtn).should("not.be.disabled"); }); - it("3. validates git user config", function() { + it("3. validates git user config", function () { cy.get(gitSyncLocators.useGlobalGitConfig).click(); // name empty invalid @@ -183,7 +181,7 @@ describe("Git sync modal: connect tab", function() { }); }); - it("4. validates submit errors", function() { + it("4. validates submit errors", function () { cy.get(gitSyncLocators.useGlobalGitConfig).click(); cy.get(gitSyncLocators.gitConfigNameInput) .scrollIntoView() @@ -209,9 +207,7 @@ describe("Git sync modal: connect tab", function() { force: true, }, ); - cy.get(gitSyncLocators.connectSubmitBtn) - .scrollIntoView() - .click(); + cy.get(gitSyncLocators.connectSubmitBtn).scrollIntoView().click(); cy.get(gitSyncLocators.connetStatusbar).should("exist"); cy.wait("@connectGitLocalRepo").then((interception) => { const status = interception.response.body.responseMeta.status; @@ -256,9 +252,7 @@ describe("Git sync modal: connect tab", function() { }, }); - cy.get(gitSyncLocators.connectSubmitBtn) - .scrollIntoView() - .click(); + cy.get(gitSyncLocators.connectSubmitBtn).scrollIntoView().click(); cy.get(gitSyncLocators.connetStatusbar).should("exist"); cy.wait("@connectGitLocalRepo").then((interception) => { const status = interception.response.body.responseMeta.status; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Deploy_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Deploy_spec.js index 05c4480956..5f3dab8d01 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Deploy_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Deploy_spec.js @@ -3,7 +3,7 @@ import homePage from "../../../../../locators/HomePage"; import * as _ from "../../../../../support/Objects/ObjectsCore"; let repoName; -describe("Git sync modal: deploy tab", function() { +describe("Git sync modal: deploy tab", function () { before(() => { _.homePage.NavigateToHome(); cy.createWorkspace(); @@ -18,7 +18,7 @@ describe("Git sync modal: deploy tab", function() { }); }); - it("1. Validate commit comment inputbox and last deployed preview", function() { + it("1. Validate commit comment inputbox and last deployed preview", function () { // last deployed preview // The deploy preview Link should be displayed only after the first commit done cy.get(gitSyncLocators.bottomBarCommitButton).click(); @@ -31,7 +31,7 @@ describe("Git sync modal: deploy tab", function() { cy.get(gitSyncLocators.closeGitSyncModal).click(); }); - it("2. Post connection app name deploy menu", function() { + it("2. Post connection app name deploy menu", function () { // deploy _.agHelper.GetNClick(_.locators._publishButton); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/DisconnectGit_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/DisconnectGit_spec.js index bb211c1a23..2ffeef3045 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/DisconnectGit_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/DisconnectGit_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; let repoName; let windowOpenSpy; -describe("Git disconnect modal:", function() { +describe("Git disconnect modal:", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -17,7 +17,7 @@ describe("Git disconnect modal:", function() { }); }); - it("1. should be opened with proper components", function() { + it("1. should be opened with proper components", function () { _.gitSync.AuthorizeKeyToGitea(repoName); cy.get(gitSyncLocators.bottomBarCommitButton).click(); cy.get("[data-cy=t--tab-GIT_CONNECTION]").click(); @@ -59,7 +59,7 @@ describe("Git disconnect modal:", function() { cy.wait(2000); }); - it("2. should have disconnect repo button", function() { + it("2. should have disconnect repo button", function () { cy.get(gitSyncLocators.bottomBarCommitButton).click(); cy.get("[data-cy=t--tab-GIT_CONNECTION]").click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js index 3f97a97f8a..0a6cb9b8e8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js @@ -15,7 +15,7 @@ const jsObject = "JSObject1"; let repoName; -describe("Git sync Bug #10773", function() { +describe("Git sync Bug #10773", function () { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); }); @@ -126,9 +126,7 @@ describe("Git sync Bug #10773", function() { "be.visible", ); // switch to Page1 and validate data binding - cy.get(".t--page-switch-tab") - .contains("Page1") - .click({ force: true }); + cy.get(".t--page-switch-tab").contains("Page1").click({ force: true }); cy.xpath("//input[@class='bp3-input' and @value='Success']").should( "be.visible", ); @@ -172,7 +170,7 @@ describe("Git sync Bug #10773", function() { _.gitSync.DeleteTestGithubRepo(repoName); }); - it("4. Create an app with JSObject, connect it to git and verify its data in edit and deploy mode", function() { + it("4. Create an app with JSObject, connect it to git and verify its data in edit and deploy mode", function () { cy.NavigateToHome(); cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js index 6aa3feadb5..16d609e64a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js @@ -21,7 +21,7 @@ const mainBranch = "master"; let datasourceName; let repoName; -describe("Git sync apps", function() { +describe("Git sync apps", function () { before(() => { // cy.NavigateToHome(); // cy.createWorkspace(); @@ -31,9 +31,7 @@ describe("Git sync apps", function() { }); it("1. Generate postgreSQL crud page , connect to git, clone the page, rename page with special character in it", () => { cy.NavigateToHome(); - cy.get(homePage.createNew) - .first() - .click({ force: true }); + cy.get(homePage.createNew).first().click({ force: true }); cy.wait("@createNewApplication").should( "have.nested.property", @@ -72,9 +70,7 @@ describe("Git sync apps", function() { cy.get(generatePage.selectTableDropdown).click(); - cy.get(generatePage.dropdownOption) - .contains("public.configs") - .click(); + cy.get(generatePage.dropdownOption).contains("public.configs").click(); // skip optional search column selection. cy.get(generatePage.generatePageFormSubmitBtn).click(); @@ -217,9 +213,7 @@ describe("Git sync apps", function() { .find(".bp3-input") .invoke("val") .should("be.oneOf", ["morpheus", "This is a test"]); - cy.get(`.t--entity-item:contains(${newPage})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${newPage})`).first().click(); cy.wait("@getPage"); cy.get(".t--draggable-inputwidgetv2") .first() @@ -235,9 +229,7 @@ describe("Git sync apps", function() { cy.readTabledataPublish("0", "1").then((cellData) => { expect(cellData).to.be.equal("New Config"); }); - cy.get(`.t--entity-item:contains(${pageName})`) - .first() - .click(); + cy.get(`.t--entity-item:contains(${pageName})`).first().click(); cy.wait("@getPage"); cy.readTabledataPublish("0", "1").then((cellData) => { expect(cellData).to.be.equal("New Config"); @@ -256,9 +248,7 @@ describe("Git sync apps", function() { cy.readTabledataPublish("0", "1").then((cellData) => { expect(cellData).to.be.equal("New Config"); }); - cy.get(".t--page-switch-tab") - .contains(`${newPage}`) - .click({ force: true }); + cy.get(".t--page-switch-tab").contains(`${newPage}`).click({ force: true }); cy.get(".bp3-input") .first() .invoke("val") @@ -304,9 +294,7 @@ describe("Git sync apps", function() { cy.get(datasource.createQuery).click(); }); cy.get(queryLocators.queryNameField).type("get_users"); - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); cy.get(queryLocators.templateMenu).click(); cy.get(queryLocators.query).click({ force: true }); // writing query to get the schema @@ -395,9 +383,7 @@ describe("Git sync apps", function() { cy.readTabledataPublish("0", "1").then((cellData) => { expect(cellData).to.be.equal("New Config"); }); - cy.get(".t--page-switch-tab") - .contains(`${newPage}`) - .click({ force: true }); + cy.get(".t--page-switch-tab").contains(`${newPage}`).click({ force: true }); cy.wait(2000); cy.get(".bp3-input") .first() @@ -530,33 +516,19 @@ describe("Git sync apps", function() { }); it("10. Import app from git and verify page order should not change", () => { cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); - cy.get(".t--import-json-card") - .next() - .click(); + cy.get(".t--import-json-card").next().click(); // import application from git cy.importAppFromGit(repoName); cy.wait(2000); // verify page order remains same as in orignal app cy.CheckAndUnfoldEntityItem("Pages"); - cy.get(".t--entity-item") - .eq(1) - .contains("crudpage_1"); - cy.get(".t--entity-item") - .eq(2) - .contains("crudpage_1 Copy"); - cy.get(".t--entity-item") - .eq(3) - .contains("ApiCalls_1"); - cy.get(".t--entity-item") - .eq(4) - .contains("ApiCalls_1 Copy"); - cy.get(".t--entity-item") - .eq(5) - .contains("Child_Page"); + cy.get(".t--entity-item").eq(1).contains("crudpage_1"); + cy.get(".t--entity-item").eq(2).contains("crudpage_1 Copy"); + cy.get(".t--entity-item").eq(3).contains("ApiCalls_1"); + cy.get(".t--entity-item").eq(4).contains("ApiCalls_1 Copy"); + cy.get(".t--entity-item").eq(5).contains("Child_Page"); }); after(() => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Git_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Git_spec.js index 73983eba5c..db152c5172 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Git_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Git_spec.js @@ -26,7 +26,7 @@ let applicationId = null; let applicationName = null; let repoName; -describe.skip("Git sync:", function() { +describe.skip("Git sync:", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -52,7 +52,7 @@ describe.skip("Git sync:", function() { }); }); - it("1. Shows remote is ahead warning and conflict error during commit and push", function() { + it("1. Shows remote is ahead warning and conflict error during commit and push", function () { _.gitSync.CreateGitBranch(tempBranch, false); cy.get("@gitbranchName").then((branName) => { tempBranch = branName; @@ -104,7 +104,7 @@ describe.skip("Git sync:", function() { cy.get(gitSyncLocators.closeGitSyncModal).click(); }); - it("2. Detect conflicts when merging head to base branch", function() { + it("2. Detect conflicts when merging head to base branch", function () { cy.switchGitBranch(mainBranch); cy.get(explorerLocators.widgetSwitchId).click(); cy.wait(2000); // wait for transition @@ -130,15 +130,13 @@ describe.skip("Git sync:", function() { cy.get(gitSyncLocators.bottomBarMergeButton).click(); cy.wait(5000); // wait for git status call to finish cy.get(gitSyncLocators.mergeBranchDropdownDestination).click(); - cy.get(commonlocators.dropdownmenu) - .contains(mainBranch) - .click(); + cy.get(commonlocators.dropdownmenu).contains(mainBranch).click(); // assert conflicting status cy.contains(Cypress.env("MESSAGES").GIT_CONFLICTING_INFO()); cy.get(gitSyncLocators.closeGitSyncModal).click(); }); - it("3. Supports merging head to base branch", function() { + it("3. Supports merging head to base branch", function () { cy.switchGitBranch(mainBranch); cy.createGitBranch(tempBranch2); cy.get(explorerLocators.explorerSwitchId).click({ force: true }); @@ -153,7 +151,7 @@ describe.skip("Git sync:", function() { cy.contains("NewPage"); }); - it("4. Enables pulling remote changes from bottom bar", function() { + it("4. Enables pulling remote changes from bottom bar", function () { _.gitSync.CreateGitBranch(tempBranch3, false); cy.get(explorerLocators.widgetSwitchId).click(); cy.wait(2000); // wait for transition @@ -217,7 +215,7 @@ describe.skip("Git sync:", function() { cy.xpath("//span[@name='close-modal']").click({ force: true }); }); - it("5. Clicking '+' icon on bottom bar should open deploy popup", function() { + it("5. Clicking '+' icon on bottom bar should open deploy popup", function () { cy.get(gitSyncLocators.bottomBarCommitButton).click({ force: true }); cy.get(gitSyncLocators.gitSyncModal).should("exist"); cy.get("[data-cy=t--tab-DEPLOY]").should("exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Merge_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Merge_spec.js index 02151f26d9..72b4cfd957 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Merge_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/Merge_spec.js @@ -5,7 +5,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; let repoName; let childBranchKey = "ChildBranch"; let mainBranch = "master"; -describe("Git sync modal: merge tab", function() { +describe("Git sync modal: merge tab", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -20,7 +20,7 @@ describe("Git sync modal: merge tab", function() { }); }); - it("1. Verify the functionality of the default dropdown under merge tab", function() { + it("1. Verify the functionality of the default dropdown under merge tab", function () { cy.get(commonLocators.canvas).click({ force: true }); _.gitSync.CreateGitBranch(childBranchKey); cy.get(gitSyncLocators.bottomBarMergeButton).click(); @@ -33,9 +33,7 @@ describe("Git sync modal: merge tab", function() { cy.get(gitSyncLocators.mergeButton).should("be.disabled"); cy.wait(3000); cy.get(gitSyncLocators.mergeBranchDropdownDestination).click(); - cy.get(commonLocators.dropdownmenu) - .contains(mainBranch) - .click(); + cy.get(commonLocators.dropdownmenu).contains(mainBranch).click(); _.agHelper.AssertElementAbsence(_.gitSync._checkMergeability, 30000); cy.wait("@mergeStatus", { timeout: 35000 }).should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/PreconnectionAppNameDeployMenu_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/PreconnectionAppNameDeployMenu_spec.ts index 7f7a6bdd95..ae2cfb5827 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/PreconnectionAppNameDeployMenu_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/PreconnectionAppNameDeployMenu_spec.ts @@ -2,7 +2,7 @@ import homePage from "../../../../../locators/HomePage"; import * as _ from "../../../../../support/Objects/ObjectsCore"; import gitSyncLocators from "../../../../../locators/gitSyncLocators"; -describe("Pre git connection spec:", function() { +describe("Pre git connection spec:", function () { it("1. Deploy menu at the application dropdown menu", () => { // create new app cy.NavigateToHome(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RegenerateSSHKey_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RegenerateSSHKey_spec.js index ad04d5733e..001ee0fafd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RegenerateSSHKey_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RegenerateSSHKey_spec.js @@ -1,7 +1,7 @@ import gitSyncLocators from "../../../../../locators/gitSyncLocators"; import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Git regenerate SSH key flow", function() { +describe("Git regenerate SSH key flow", function () { let repoName; it("1. Verify SSH key regeneration flow ", () => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RepoLimitExceededErrorModal_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RepoLimitExceededErrorModal_spec.js index afd345dea4..73537fc1da 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RepoLimitExceededErrorModal_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/RepoLimitExceededErrorModal_spec.js @@ -3,7 +3,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; import { REPO, CURRENT_REPO } from "../../../../../fixtures/REPO"; let repoName1, repoName2, repoName3, repoName4, windowOpenSpy; -describe("Repo Limit Exceeded Error Modal", function() { +describe("Repo Limit Exceeded Error Modal", function () { before(() => { cy.generateUUID().then((uid) => { cy.Signup(`${uid}@appsmithtest.com`, uid); @@ -16,7 +16,7 @@ describe("Repo Limit Exceeded Error Modal", function() { _.agHelper.ClickButton("Build on my own"); }); - it("1. Modal should be opened with proper components", function() { + it("1. Modal should be opened with proper components", function () { _.homePage.NavigateToHome(); _.homePage.CreateNewApplication(); _.gitSync.CreateNConnectToGit(repoName1, true, true); @@ -75,9 +75,7 @@ describe("Repo Limit Exceeded Error Modal", function() { cy.get(gitSyncLocators.learnMoreOnRepoLimitModal).click(); cy.get(gitSyncLocators.connectedApplication).should("have.length", 3); - cy.get(gitSyncLocators.diconnectLink) - .first() - .click(); + cy.get(gitSyncLocators.diconnectLink).first().click(); cy.get(gitSyncLocators.repoLimitExceededErrorModal).should("not.exist"); cy.get(gitSyncLocators.disconnectGitModal).should("exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js index eeb8adeb2e..e9290ad502 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js @@ -12,7 +12,7 @@ let parentBranchKey = "ParentBranch", branchQueryKey = "branch"; let repoName; -describe("Git sync:", function() { +describe("Git sync:", function () { before(() => { cy.NavigateToHome(); cy.createWorkspace(); @@ -28,7 +28,7 @@ describe("Git sync:", function() { cy.wait(3000); }); - it("1. create branch input", function() { + it("1. create branch input", function () { cy.get(commonLocators.canvas).click({ force: true }); cy.get(gitSyncLocators.branchButton).click(); @@ -56,7 +56,7 @@ describe("Git sync:", function() { cy.get(gitSyncLocators.closeBranchList).click(); }); - it("2. creates a new branch and create branch specific resources", function() { + it("2. creates a new branch and create branch specific resources", function () { cy.get(commonLocators.canvas).click({ force: true }); //cy.createGitBranch(parentBranchKey); _.gitSync.CreateGitBranch(parentBranchKey, true); @@ -121,7 +121,7 @@ describe("Git sync:", function() { }); // rename entities - it("3. makes branch specific resource updates", function() { + it("3. makes branch specific resource updates", function () { cy.switchGitBranch(childBranchKey); cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.CheckAndUnfoldEntityItem("Pages"); @@ -235,7 +235,7 @@ describe("Git sync:", function() { }); // Validate the error faced when user switches between the branches - it("6. error faced when user switches branch with new page", function() { + it("6. error faced when user switches branch with new page", function () { cy.goToEditFromPublish(); //Adding since skipping 6th case cy.generateUUID().then((uuid) => { _.gitSync.CreateGitBranch(childBranchKey, true); @@ -245,9 +245,7 @@ describe("Git sync:", function() { cy.get(gitSyncLocators.branchButton).click({ force: true }); cy.get(gitSyncLocators.branchSearchInput).type("{selectall}master"); cy.wait(400); - cy.get(gitSyncLocators.branchListItem) - .contains("master") - .click(); + cy.get(gitSyncLocators.branchListItem).contains("master").click(); cy.wait(4000); cy.contains("Page not found"); }); @@ -255,7 +253,7 @@ describe("Git sync:", function() { cy.reload(); }); - it("7. branch list search", function() { + it("7. branch list search", function () { cy.get(".bp3-spinner").should("not.exist"); cy.get(commonLocators.canvas).click({ force: true }); let parentBKey, childBKey; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitWithTheming/GitWithTheming_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitWithTheming/GitWithTheming_spec.js index 15171de89c..fbc221ff17 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitWithTheming/GitWithTheming_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitWithTheming/GitWithTheming_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; const commonlocators = require("../../../../../locators/commonlocators.json"); -describe("Git with Theming:", function() { +describe("Git with Theming:", function () { const backgroudColorMaster = "rgb(85, 61, 233)"; const backgroudColorChildBranch = "rgb(100, 116, 139)"; const tempBranch = "tempBranch"; @@ -34,15 +34,13 @@ describe("Git with Theming:", function() { // cy.connectToGitRepo(repoName); //}); }); - it("Bug #13860 Theming is not getting applied on view mode when the app is connected to Git", function() { + it("Bug #13860 Theming is not getting applied on view mode when the app is connected to Git", function () { _.appSettings.OpenAppSettings(); _.appSettings.GoToThemeSettings(); // apply theme on master branch and deploy cy.get(commonlocators.changeThemeBtn).click({ force: true }); - cy.get(commonlocators.themeCard) - .eq(1) - .click({ force: true }); + cy.get(commonlocators.themeCard).eq(1).click({ force: true }); // check for alert cy.get(`${commonlocators.themeCard}`) @@ -74,9 +72,7 @@ describe("Git with Theming:", function() { cy.get(commonlocators.changeThemeBtn).click({ force: true }); // select a theme - cy.get(commonlocators.themeCard) - .last() - .click({ force: true }); + cy.get(commonlocators.themeCard).last().click({ force: true }); // check for alert cy.get(`${commonlocators.themeCard}`) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Github/EnableGithub_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Github/EnableGithub_spec.js index e31a75c508..1e73b364e1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Github/EnableGithub_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Github/EnableGithub_spec.js @@ -2,8 +2,8 @@ import adminSettings from "../../../../locators/AdminsSettings"; const commonlocators = require("../../../../locators/commonlocators.json"); import homePage from "../../../../locators/HomePage"; -describe("SSO with Github test functionality", function() { - it("1. Go to admin settings and enable Github with not all mandatory fields filled", function() { +describe("SSO with Github test functionality", function () { + it("1. Go to admin settings and enable Github with not all mandatory fields filled", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -27,7 +27,7 @@ describe("SSO with Github test functionality", function() { ); }); - it("2. Go to admin settings and enable Github", function() { + it("2. Go to admin settings and enable Github", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -60,7 +60,7 @@ describe("SSO with Github test functionality", function() { ); }); - it("3. Go to admin settings and disable Github", function() { + it("3. Go to admin settings and disable Github", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Google/EnableGoogle_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Google/EnableGoogle_spec.js index eee356fae2..6067c96daf 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Google/EnableGoogle_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Google/EnableGoogle_spec.js @@ -2,8 +2,8 @@ import adminSettings from "../../../../locators/AdminsSettings"; const commonlocators = require("../../../../locators/commonlocators.json"); import homePage from "../../../../locators/HomePage"; -describe("SSO with Google test functionality", function() { - it("1. Go to admin settings and enable Google with not all mandatory fields filled", function() { +describe("SSO with Google test functionality", function () { + it("1. Go to admin settings and enable Google with not all mandatory fields filled", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -27,7 +27,7 @@ describe("SSO with Google test functionality", function() { ); }); - it("2. Go to admin settings and enable Google", function() { + it("2. Go to admin settings and enable Google", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); @@ -60,7 +60,7 @@ describe("SSO with Google test functionality", function() { ); }); - it("3. Go to admin settings and disable Google", function() { + it("3. Go to admin settings and disable Google", function () { cy.LogOut(); cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Bug_Fixes.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Bug_Fixes.js index c4137779c4..9ca1ce9910 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Bug_Fixes.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Bug_Fixes.js @@ -1,6 +1,6 @@ const dsl = require("../../../../fixtures/Bugs/CheckboxGroupInListWidgetDsl.json"); -describe("Canvas context Property Pane", function() { +describe("Canvas context Property Pane", function () { it("Bug Fix: Unable to delete checkbox child when it is inside list widget #18191", () => { cy.addDsl(dsl); cy.openPropertyPane("checkboxgroupwidget"); @@ -29,9 +29,7 @@ describe("Canvas context Property Pane", function() { "not.exist", ); - cy.get(".t--widget-imagewidget") - .eq(0) - .click(); + cy.get(".t--widget-imagewidget").eq(0).click(); //check if the entities are not expanded cy.get(`[data-guided-tour-id="explorer-entity-Image1"]`).should("exist"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Property_Pane_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Property_Pane_spec.js index 2197d28f15..f2b8e60012 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Property_Pane_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Property_Pane_spec.js @@ -9,7 +9,7 @@ const api1 = "API1"; const agHelper = ObjectsRegistry.AggregateHelper; const ee = ObjectsRegistry.EntityExplorer; -describe("Canvas context Property Pane", function() { +describe("Canvas context Property Pane", function () { before(() => { cy.addDsl(dsl); cy.Createpage(page2); @@ -24,7 +24,7 @@ describe("Canvas context Property Pane", function() { agHelper.RefreshPage(); }); - it("1. Code Editor should have focus while switching between widgets, pages and Editor Panes", function() { + it("1. Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = ".t--property-control-label"; verifyPropertyPaneContext( () => { @@ -37,7 +37,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("2. Action Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("2. Action Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = ".t--property-control-onclick .t--open-dropdown-Select-Action"; verifyPropertyPaneContext( @@ -51,7 +51,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("3. Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("3. Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = `.t--property-control-animateloading input[type="checkbox"]`; verifyPropertyPaneContext( () => { @@ -64,16 +64,14 @@ describe("Canvas context Property Pane", function() { ); }); - it("4. DropDown Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("4. DropDown Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlClickSelector = `.t--property-control-googlerecaptchaversion div:nth-child(2) .bp3-popover-target div`; const propertyControlVerifySelector = ".t--property-control-googlerecaptchaversion .ur--has-border"; verifyPropertyPaneContext( () => { - cy.get(propertyControlClickSelector) - .eq(0) - .click({ force: true }); + cy.get(propertyControlClickSelector).eq(0).click({ force: true }); }, () => { cy.get(propertyControlVerifySelector).should("be.focused"); @@ -82,7 +80,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("5. Icon Button Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("5. Icon Button Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlClickSelector = `.t--property-control-borderradius div[aria-selected="true"]`; const propertyControlVerifySelector = `.t--property-control-borderradius div[role="tablist"]`; verifyPropertyPaneContext( @@ -97,7 +95,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("6. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("6. ColorPicker Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = `.t--property-control-buttoncolor input[type="text"]`; verifyPropertyPaneContext( () => { @@ -111,7 +109,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("7. Property Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("7. Property Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { basic: false, general: true, @@ -130,7 +128,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("8. Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("8. Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { general: true, icon: false, @@ -140,9 +138,7 @@ describe("Canvas context Property Pane", function() { verifyPropertyPaneContext( () => { - cy.get(`.tab-title:contains("STYLE")`) - .eq(0) - .click(); + cy.get(`.tab-title:contains("STYLE")`).eq(0).click(); setPropertyPaneSectionState(propertySectionState); }, () => { @@ -152,7 +148,7 @@ describe("Canvas context Property Pane", function() { ); }); - it("9. Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function() { + it("9. Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = ".t--property-control-computedvalue"; verifyPropertyPaneContext( () => { @@ -169,7 +165,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("10. Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("10. Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = `.t--property-control-cellwrapping input[type="checkbox"]`; verifyPropertyPaneContext( () => { @@ -186,7 +182,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("11. Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("11. Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { data: false, general: true, @@ -208,7 +204,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("12. Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("12. Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { textformatting: true, color: false, @@ -217,9 +213,7 @@ describe("Canvas context Property Pane", function() { verifyPropertyPaneContext( () => { cy.editColumn("step"); - cy.get(`.tab-title:contains("STYLE")`) - .eq(0) - .click(); + cy.get(`.tab-title:contains("STYLE")`).eq(0).click(); setPropertyPaneSectionState(propertySectionState); }, () => { @@ -232,7 +226,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("13. Multi Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function() { + it("13. Multi Layered PropertyPane - Code Editor should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = ".t--property-control-text"; verifyPropertyPaneContext( () => { @@ -254,7 +248,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("14. Multi Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function() { + it("14. Multi Layered PropertyPane - Toggle Property controls should have focus while switching between widgets, pages and Editor Panes", function () { const propertyControlSelector = `.t--property-control-visible input[type="checkbox"]`; verifyPropertyPaneContext( () => { @@ -276,7 +270,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("15. Multi Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("15. Multi Layered PropertyPane - Property Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { basic: false, general: true, @@ -303,7 +297,7 @@ describe("Canvas context Property Pane", function() { cy.get(".t--property-pane-title").should("contain", "Table1"); }); - it("16. Multi Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function() { + it("16. Multi Layered PropertyPane - Property Tabs and Sections should retain state while switching between widgets, pages and Editor Panes", function () { const propertySectionState = { icon: true, color: false, @@ -313,9 +307,7 @@ describe("Canvas context Property Pane", function() { () => { cy.editColumn("status"); cy.editColumn("menuIteme63irwbvnd", false); - cy.get(`.tab-title:contains("STYLE")`) - .eq(0) - .click(); + cy.get(`.tab-title:contains("STYLE")`).eq(0).click(); setPropertyPaneSectionState(propertySectionState); }, () => { @@ -379,9 +371,7 @@ function verifyPropertyPaneContext( cy.get(".t--property-pane-title").should("contain", widgetName); if (isStyleTab) { - cy.get(`.tab-title:contains("STYLE")`) - .eq(0) - .click(); + cy.get(`.tab-title:contains("STYLE")`).eq(0).click(); } //Focus Callback diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Selected_Widgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Selected_Widgets_spec.js index f550bd6daf..c5efc99270 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Selected_Widgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Canvas_Context_Selected_Widgets_spec.js @@ -10,7 +10,7 @@ const api1 = "API1"; const agHelper = ObjectsRegistry.AggregateHelper; const ee = ObjectsRegistry.EntityExplorer; -describe("Canvas context widget selection", function() { +describe("Canvas context widget selection", function () { before(() => { cy.addDsl(dsl); cy.Createpage(page2); @@ -30,7 +30,7 @@ describe("Canvas context widget selection", function() { }); }); - it("1. Widget should be selected while switching back and forth between pages", function() { + it("1. Widget should be selected while switching back and forth between pages", function () { //select widget in page1 ee.SelectEntityByName("Camera1", "Widgets"); @@ -59,7 +59,7 @@ describe("Canvas context widget selection", function() { cy.isInViewport(`//*[@id="${dsl.dsl.children[0].widgetId}"]`); }); - it("2. Widget should be selected while switching back to page from API pane", function() { + it("2. Widget should be selected while switching back to page from API pane", function () { //select widget in page1 ee.SelectEntityByName("Camera1", "Widgets"); @@ -82,7 +82,7 @@ describe("Canvas context widget selection", function() { //cy.isInViewport(`//*[@id="${dsl.dsl.children[0].widgetId}"]`); }); - it("3. Multiple widgets should be selected while switching back and forth between pages", function() { + it("3. Multiple widgets should be selected while switching back and forth between pages", function () { //select widgets in page1 ee.SelectEntityByName("Camera1", "Widgets", true); ee.SelectEntityByName("Button1", "Widgets", true); @@ -108,7 +108,7 @@ describe("Canvas context widget selection", function() { cy.get(`.t--multi-selection-box`).should("have.length", 1); }); - it("4. Multiple widgets should be selected while switching back to page from API pane", function() { + it("4. Multiple widgets should be selected while switching back to page from API pane", function () { //select widgets in page1 ee.SelectEntityByName("Camera1", "Widgets", true); ee.SelectEntityByName("Button1", "Widgets", true); @@ -129,7 +129,7 @@ describe("Canvas context widget selection", function() { cy.get(`.t--multi-selection-box`).should("have.length", 1); }); - it("5. Modal widget should be selected and open while switching back and forth between pages", function() { + it("5. Modal widget should be selected and open while switching back and forth between pages", function () { //select widget in page1 ee.SelectEntityByName("Modal1", "Widgets"); @@ -154,7 +154,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Modal1"); }); - it("6. Modal widget should be selected and open while switching back to page from API pane", function() { + it("6. Modal widget should be selected and open while switching back to page from API pane", function () { //select widget in page1 ee.SelectEntityByName("Modal1", "Widgets"); @@ -175,7 +175,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Modal1"); }); - it("7. Widget inside modal should be selected and modal should be open while switching back and forth between pages", function() { + it("7. Widget inside modal should be selected and modal should be open while switching back and forth between pages", function () { //select widget in page1 ee.SelectEntityInModal("Modal1", "Widgets"); @@ -202,7 +202,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Text1"); }); - it("8. Widget inside modal should be selected and modal should be open while switching back to page from API pane", function() { + it("8. Widget inside modal should be selected and modal should be open while switching back to page from API pane", function () { //select widget in page1 ee.SelectEntityInModal("Modal1", "Widgets"); @@ -225,7 +225,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Text1"); }); - it.skip("9. Widget inside non default tab in tab widget should be selected and the given tab should be open while switching back and forth between pages", function() { + it.skip("9. Widget inside non default tab in tab widget should be selected and the given tab should be open while switching back and forth between pages", function () { //switch to tab 2 and select widget a button inside tab 2 in page1 cy.get(".t--tabid-tab2").click({ force: true }); cy.SearchEntityandOpen("Button4", "Widgets"); @@ -251,7 +251,7 @@ describe("Canvas context widget selection", function() { cy.get(".t--property-pane-title").should("contain", "Button4"); }); - it.skip("10. Widget inside non default tab in tab widget should be selected and the given tab should be open while switching back to page from API pane", function() { + it.skip("10. Widget inside non default tab in tab widget should be selected and the given tab should be open while switching back to page from API pane", function () { //switch to tab 2 and select widget a button inside tab 2 in page1 cy.get(".t--tabid-tab2").click({ force: true }); cy.SearchEntityandOpen("Button4", "Widgets"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js index 573a4e5fce..bc78db3691 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js @@ -28,7 +28,7 @@ const JSInput2TestCode = let repoName; -describe("1. CommandClickNavigation", function() { +describe("1. CommandClickNavigation", function () { it("1. Import the test application", () => { homePage.NavigateToHome(); cy.reload(); @@ -185,9 +185,7 @@ describe("1. CommandClickNavigation", function() { }); it.skip("Will work with string arguments in framework functions", () => { - cy.get(PROPERTY_SELECTOR.onClick) - .find(".t--js-toggle") - .click(); + cy.get(PROPERTY_SELECTOR.onClick).find(".t--js-toggle").click(); cy.updateCodeInput( PROPERTY_SELECTOR.onClick, "{{ resetWidget('Input1') }}", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js index 9f728ed732..be83bda197 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js @@ -10,7 +10,7 @@ const dataSources = ObjectsRegistry.DataSources; const ee = ObjectsRegistry.EntityExplorer; const apiPage = ObjectsRegistry.ApiPage; -describe("MaintainContext&Focus", function() { +describe("MaintainContext&Focus", function () { it("1. Import the test application", () => { homePage.NavigateToHome(); cy.intercept("GET", "/api/v1/users/features", { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/BasicLint_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/BasicLint_spec.ts index 62698701f1..3d9765a6b5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/BasicLint_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/BasicLint_spec.ts @@ -55,7 +55,7 @@ describe("Linting", () => { ee.NavigateToSwitcher("explorer"); dataSources.CreateDataSource("MySql"); cy.get("@dsName").then(($dsName) => { - dsName = ($dsName as unknown) as string; + dsName = $dsName as unknown as string; }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/ErrorReporting_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/ErrorReporting_spec.ts index 81f53dea54..34fbc8c2e1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/ErrorReporting_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Linting/ErrorReporting_spec.ts @@ -307,11 +307,7 @@ describe("Lint error reporting", () => { const element = isError ? cy.get(locator._lintErrorElement) : cy.get(locator._lintWarningElement); - element - .contains(lintOn) - .should("exist") - .first() - .trigger("mouseover"); + element.contains(lintOn).should("exist").first().trigger("mouseover"); agHelper.AssertContains(debugMsg); } diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/CreateNewApp_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/CreateNewApp_spec.js index f7c9d04720..4dfc9bfe46 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/CreateNewApp_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/CreateNewApp_spec.js @@ -4,8 +4,8 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const homePage = require("../../../../locators/HomePage"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Creating new app after discontinuing guided tour should not start the same", function() { - it("1. Creating new app after discontinuing guided tour should not start the same", function() { +describe("Creating new app after discontinuing guided tour should not start the same", function () { + it("1. Creating new app after discontinuing guided tour should not start the same", function () { // Start guided tour _.homePage.NavigateToHome(); cy.get(guidedTourLocators.welcomeTour).click(); @@ -14,9 +14,7 @@ describe("Creating new app after discontinuing guided tour should not start the cy.get(guidedTourLocators.startBuilding).should("be.visible"); // Go back to applications page cy.get(commonlocators.homeIcon).click({ force: true }); - cy.get(homePage.createNewAppButton) - .first() - .click(); + cy.get(homePage.createNewAppButton).first().click(); // Check if explorer is visible, explorer is collapsed initialy in guided tour cy.get(explorerLocators.entityExplorer).should("be.visible"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec.js index 9995c27142..03fee50dea 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec.js @@ -1,14 +1,14 @@ const OnboardingLocator = require("../../../../locators/FirstTimeUserOnboarding.json"); const _ = require("lodash"); -describe("FirstTimeUserOnboarding", function() { +describe("FirstTimeUserOnboarding", function () { beforeEach(() => { cy.generateUUID().then((uid) => { cy.Signup(`${uid}@appsmithtest.com`, uid); }); }); - it("1. onboarding flow - should check page entity selection in explorer", function() { + it("1. onboarding flow - should check page entity selection in explorer", function () { cy.get(OnboardingLocator.introModal).should("be.visible"); cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.introModal).should("not.exist"); @@ -18,7 +18,7 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.dropTarget).should("be.visible"); }); - it("2. onboarding flow - should check the checklist page actions", function() { + it("2. onboarding flow - should check the checklist page actions", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.statusbar).click(); @@ -30,9 +30,7 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.checklistDatasourceBtn).should("not.be.disabled"); cy.get(OnboardingLocator.checklistDatasourceBtn).click(); cy.get(OnboardingLocator.datasourcePage).should("be.visible"); - cy.get(OnboardingLocator.datasourceMock) - .first() - .click(); + cy.get(OnboardingLocator.datasourceMock).first().click(); cy.wait(1000); cy.get(OnboardingLocator.statusbar).click(); cy.get(OnboardingLocator.checklistStatus).should("contain", "1 of 5"); @@ -80,7 +78,7 @@ describe("FirstTimeUserOnboarding", function() { }); }); - it("3. onboarding flow - should check the tasks page actions", function() { + it("3. onboarding flow - should check the tasks page actions", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("be.visible"); @@ -89,9 +87,7 @@ describe("FirstTimeUserOnboarding", function() { ); cy.get(OnboardingLocator.taskDatasourceBtn).click(); cy.get(OnboardingLocator.datasourcePage).should("be.visible"); - cy.get(OnboardingLocator.datasourceMock) - .first() - .click(); + cy.get(OnboardingLocator.datasourceMock).first().click(); cy.wait(1000); cy.get(OnboardingLocator.datasourceBackBtn).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("not.exist"); @@ -102,9 +98,7 @@ describe("FirstTimeUserOnboarding", function() { ); cy.get(OnboardingLocator.taskActionBtn).click(); cy.get(OnboardingLocator.datasourcePage).should("be.visible"); - cy.get(OnboardingLocator.createQuery) - .first() - .click(); + cy.get(OnboardingLocator.createQuery).first().click(); cy.wait(1000); cy.get(OnboardingLocator.statusbar).click(); cy.get(OnboardingLocator.checklistBack).click(); @@ -122,7 +116,7 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.taskWidgetBtn).should("not.exist"); }); - it("4. onboarding flow - should check the tasks page datasource action alternate widget action", function() { + it("4. onboarding flow - should check the tasks page datasource action alternate widget action", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("be.visible"); @@ -133,15 +127,13 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.textWidgetName).should("be.visible"); }); - it("5. onboarding flow - should check the tasks page query action alternate widget action", function() { + it("5. onboarding flow - should check the tasks page query action alternate widget action", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("be.visible"); cy.get(OnboardingLocator.taskDatasourceBtn).click(); cy.get(OnboardingLocator.datasourcePage).should("be.visible"); - cy.get(OnboardingLocator.datasourceMock) - .first() - .click(); + cy.get(OnboardingLocator.datasourceMock).first().click(); cy.wait(1000); cy.get(OnboardingLocator.datasourceBackBtn).click(); @@ -153,16 +145,14 @@ describe("FirstTimeUserOnboarding", function() { cy.get(OnboardingLocator.textWidgetName).should("be.visible"); }); - it("6. onboarding flow - should check directly opening widget pane", function() { + it("6. onboarding flow - should check directly opening widget pane", function () { cy.get(OnboardingLocator.introModalBuild).click(); cy.get(OnboardingLocator.taskDatasourceBtn).should("be.visible"); cy.get(OnboardingLocator.widgetPaneTrigger).click(); cy.get(OnboardingLocator.widgetSidebar).should("be.visible"); cy.get(OnboardingLocator.dropTarget).should("be.visible"); cy.dragAndDropToCanvas("textwidget", { x: 400, y: 400 }); - cy.get(OnboardingLocator.textWidgetName) - .should("be.visible") - .wait(800); + cy.get(OnboardingLocator.textWidgetName).should("be.visible").wait(800); cy.reload(); cy.wait("@getPage").should( "have.nested.property", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js index 2932a66ae5..24cec99379 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Onboarding/GuidedTour_spec.js @@ -4,8 +4,8 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const explorerLocators = require("../../../../locators/explorerlocators.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Guided Tour", function() { - it("1. Guided tour should work when started from the editor", function() { +describe("Guided Tour", function () { + it("1. Guided tour should work when started from the editor", function () { cy.generateUUID().then((uid) => { cy.Signup(`${uid}@appsmith.com`, uid); }); @@ -14,7 +14,7 @@ describe("Guided Tour", function() { cy.get(onboardingLocators.welcomeTourBtn).should("be.visible"); }); - it("2. Guided Tour", function() { + it("2. Guided Tour", function () { // Start guided tour cy.get(commonlocators.homeIcon).click({ force: true }); cy.get(guidedTourLocators.welcomeTour).click(); @@ -71,9 +71,7 @@ describe("Guided Tour", function() { "Default Value", "{{CustomersTable.selectedRow.email}}", ); - cy.get(".t--entity-name") - .contains("CountryInput") - .click({ force: true }); + cy.get(".t--entity-name").contains("CountryInput").click({ force: true }); cy.wait(1000); cy.get(guidedTourLocators.inputfields) .eq(2) @@ -83,9 +81,7 @@ describe("Guided Tour", function() { "Default Value", "{{CustomersTable.selectedRow.country}}", ); - cy.get(".t--entity-name") - .contains("DisplayImage") - .click({ force: true }); + cy.get(".t--entity-name").contains("DisplayImage").click({ force: true }); cy.get(guidedTourLocators.successButton).click(); // Step 6: Drag and drop a widget cy.dragAndDropToCanvas("buttonwidget", { @@ -116,9 +112,7 @@ describe("Guided Tour", function() { // Step 9: Deploy cy.PublishtheApp(); cy.get(guidedTourLocators.rating).should("be.visible"); - cy.get(guidedTourLocators.rating) - .eq(4) - .click(); + cy.get(guidedTourLocators.rating).eq(4).click(); cy.get(guidedTourLocators.startBuilding).should("be.visible"); cy.get(guidedTourLocators.startBuilding).click(); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Analytics_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Analytics_spec.js index 54b8fc1e75..e9750379c5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Analytics_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Analytics_spec.js @@ -2,8 +2,8 @@ import User from "../../../../fixtures/user.json"; let appId; -describe("Checks for analytics initialization", function() { - it("Should check analytics is not initialised when enableTelemtry is false", function() { +describe("Checks for analytics initialization", function () { + it("Should check analytics is not initialised when enableTelemtry is false", function () { cy.visit("/applications"); cy.reload(); cy.wait(3000); @@ -33,7 +33,7 @@ describe("Checks for analytics initialization", function() { }); }); - it("Should check smartlook is not initialised when enableTelemtry is false", function() { + it("Should check smartlook is not initialised when enableTelemtry is false", function () { cy.visit("/applications"); cy.reload(); cy.wait(3000); @@ -57,7 +57,7 @@ describe("Checks for analytics initialization", function() { }); }); - it("Should check Sentry is not initialised when enableTelemtry is false", function() { + it("Should check Sentry is not initialised when enableTelemtry is false", function () { cy.visit("/applications"); cy.reload(); cy.wait(3000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ApplicationURL_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ApplicationURL_spec.js index 1259aa6a1d..022ec9234f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ApplicationURL_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ApplicationURL_spec.js @@ -6,18 +6,12 @@ describe("Slug URLs", () => { it("Checks URL redirection from legacy URLs to slug URLs", () => { applicationId = localStorage.getItem("applicationId"); cy.location("pathname").then((pathname) => { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); cy.visit(`/applications/${applicationId}/pages/${pageId}/edit`).then( () => { cy.wait(10000); cy.location("pathname").then((pathname) => { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); const appName = localStorage.getItem("AppName"); expect(pathname).to.be.equal( `/app/${appName}/page1-${pageId}/edit`, @@ -39,10 +33,7 @@ describe("Slug URLs", () => { 200, ); cy.location("pathname").then((pathname) => { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); expect(pathname).to.be.equal(`/app/${appName}/page1-${pageId}/edit`); }); }); @@ -55,9 +46,7 @@ describe("Slug URLs", () => { cy.get(".t--context-menu").click({ force: true }); }); cy.selectAction("Edit Name"); - cy.get(explorer.editEntity) - .last() - .type("Page renamed", { force: true }); + cy.get(explorer.editEntity).last().type("Page renamed", { force: true }); cy.get("body").click(0, 0); cy.wait("@updatePage").should( "have.nested.property", @@ -65,10 +54,7 @@ describe("Slug URLs", () => { 200, ); cy.location("pathname").then((pathname) => { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); expect(pathname).to.be.equal( `/app/${applicationName}/page-renamed-${pageId}/edit`, ); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DuplicateApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DuplicateApplication_spec.js index 7dc372f9a5..0ddff0b139 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DuplicateApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DuplicateApplication_spec.js @@ -4,12 +4,12 @@ import homePage from "../../../../locators/HomePage"; let duplicateApplicationDsl; let parentApplicationDsl; -describe("Duplicate application", function() { +describe("Duplicate application", function () { before(() => { cy.addDsl(dsl); }); - it("Check whether the duplicate application has the same dsl as the original", function() { + it("Check whether the duplicate application has the same dsl as the original", function () { const appname = localStorage.getItem("AppName"); cy.SearchEntityandOpen("Input1"); cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("inputUpdate"); @@ -23,12 +23,8 @@ describe("Duplicate application", function() { cy.get(homePage.searchInput).type(appname); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.duplicateApp).click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DynamicLayout_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DynamicLayout_spec.js index 880006c100..053ab689fc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DynamicLayout_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/DynamicLayout_spec.js @@ -1,22 +1,14 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const pages = require("../../../../locators/Pages.json"); -describe("Dynamic Layout Functionality", function() { - it("Dynamic Layout - Change Layout", function() { - cy.get(commonlocators.layoutControls) - .last() - .click(); - cy.get(commonlocators.canvas) - .invoke("width") - .should("be.eq", 450); +describe("Dynamic Layout Functionality", function () { + it("Dynamic Layout - Change Layout", function () { + cy.get(commonlocators.layoutControls).last().click(); + cy.get(commonlocators.canvas).invoke("width").should("be.eq", 450); }); - it("Dynamic Layout - New Page should have selected Layout", function() { - cy.get(pages.AddPage) - .first() - .click(); + it("Dynamic Layout - New Page should have selected Layout", function () { + cy.get(pages.AddPage).first().click(); - cy.get(commonlocators.canvas) - .invoke("width") - .should("be.eq", 450); + cy.get(commonlocators.canvas).invoke("width").should("be.eq", 450); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ExportApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ExportApplication_spec.js index 4e001dccb3..5e35cf6500 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ExportApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ExportApplication_spec.js @@ -4,7 +4,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const commonlocators = require("../../../../locators/commonlocators.json"); let HomePage = ObjectsRegistry.HomePage; -describe("Export application as a JSON file", function() { +describe("Export application as a JSON file", function () { let workspaceId; let appid; let newWorkspaceName; @@ -15,19 +15,15 @@ describe("Export application as a JSON file", function() { cy.wait(5000); }); - it("Check if exporting app flow works as expected", function() { + it("Check if exporting app flow works as expected", function () { cy.get(commonlocators.homeIcon).click({ force: true }); appname = localStorage.getItem("AppName"); cy.get(homePage.searchInput).type(appname); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.exportAppFromMenu).click({ force: true }); cy.get(homePage.toastMessage).should("contain", "Successfully exported"); // fetching the exported app file manually to be verified. @@ -44,7 +40,7 @@ describe("Export application as a JSON file", function() { cy.LogOut(); }); - it("User with admin access,should be able to export the app", function() { + it("User with admin access,should be able to export the app", function () { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.generateUUID().then((uid) => { workspaceId = uid; @@ -77,27 +73,19 @@ describe("Export application as a JSON file", function() { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.exportAppFromMenu).should("be.visible"); cy.get("body").click(50, 40); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appEditIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appEditIcon).first().click({ force: true }); cy.get(homePage.applicationName).click({ force: true }); cy.contains("Export Application").should("be.visible"); }); cy.LogOut(); }); - it("User with developer access,should not be able to export the app", function() { + it("User with developer access,should not be able to export the app", function () { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.generateUUID().then((uid) => { workspaceId = uid; @@ -130,27 +118,19 @@ describe("Export application as a JSON file", function() { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.exportAppFromMenu).should("not.exist"); cy.get("body").click(50, 40); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appEditIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appEditIcon).first().click({ force: true }); cy.get(homePage.applicationName).click({ force: true }); cy.contains("Export Application").should("not.exist"); }); cy.LogOut(); }); - it("User with viewer access,should not be able to export the app", function() { + it("User with viewer access,should not be able to export the app", function () { cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.generateUUID().then((uid) => { workspaceId = uid; @@ -183,9 +163,7 @@ describe("Export application as a JSON file", function() { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); + cy.get(homePage.applicationCard).first().trigger("mouseover"); cy.get(homePage.appEditIcon).should("not.exist"); }); cy.LogOut(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js index b652b9ddff..df4936f681 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js @@ -10,12 +10,12 @@ let forkedApplicationDsl; let parentApplicationDsl; let forkableAppUrl; -describe("Fork application across workspaces", function() { +describe("Fork application across workspaces", function () { before(() => { cy.addDsl(dsl); }); - it("Check if the forked application has the same dsl as the original", function() { + it("Check if the forked application has the same dsl as the original", function () { const appname = localStorage.getItem("AppName"); cy.SearchEntityandOpen("Input1"); cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("inputUpdate"); @@ -29,12 +29,8 @@ describe("Fork application across workspaces", function() { cy.get(homePage.searchInput).type(appname); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.forkAppFromMenu).click({ force: true }); cy.get(homePage.forkAppWorkspaceButton).click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -54,12 +50,10 @@ describe("Fork application across workspaces", function() { }); }); - it("Non signed user should be able to fork a public forkable app", function() { + it("Non signed user should be able to fork a public forkable app", function () { cy.NavigateToHome(); cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo).attachFile("forkNonSignedInUser.json"); @@ -74,9 +68,7 @@ describe("Fork application across workspaces", function() { cy.PublishtheApp(); agHelper.Sleep(2000); - cy.get("button:contains('Share')") - .first() - .click({ force: true }); + cy.get("button:contains('Share')").first().click({ force: true }); // agHelper.Sleep(1000); // cy.get("body").then(($ele) => { // if ($ele.find(homePage.enablePublicAccess).length <= 0) { @@ -97,9 +89,7 @@ describe("Fork application across workspaces", function() { //cy.reload(); //cy.visit(forkableAppUrl); cy.wait(4000); - cy.get(applicationLocators.forkButton) - .first() - .click({ force: true }); + cy.get(applicationLocators.forkButton).first().click({ force: true }); cy.get(loginPageLocators.signupLink).click(); cy.generateUUID().then((uid) => { @@ -107,9 +97,7 @@ describe("Fork application across workspaces", function() { cy.get(signupPageLocators.password).type(uid); cy.get(signupPageLocators.submitBtn).click(); cy.wait(10000); - cy.get(applicationLocators.forkButton) - .first() - .click({ force: true }); + cy.get(applicationLocators.forkButton).first().click({ force: true }); cy.get(homePage.forkAppWorkspaceButton).should("be.visible"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/GlobalSearch_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/GlobalSearch_spec.js index 444e1aef0b..ef67ff6099 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/GlobalSearch_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/GlobalSearch_spec.js @@ -5,7 +5,7 @@ const globalSearchLocators = require("../../../../locators/GlobalSearch.json"); const datasourceHomeLocators = require("../../../../locators/apiWidgetslocator.json"); const datasourceLocators = require("../../../../locators/DatasourcesEditor.json"); -describe("GlobalSearch", function() { +describe("GlobalSearch", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Inspect_Element_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Inspect_Element_spec.js index 926941b2cb..29fccb41fb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Inspect_Element_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Inspect_Element_spec.js @@ -1,10 +1,10 @@ const dsl = require("../../../../fixtures/debuggerDependencyDsl.json"); -describe("Inspect Entity", function() { +describe("Inspect Entity", function () { before(() => { cy.addDsl(dsl); }); - it("Check whether depedencies and references are shown correctly", function() { + it("Check whether depedencies and references are shown correctly", function () { cy.openPropertyPane("inputwidgetv2"); cy.testJsontext("defaultvalue", "{{Button1.text}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Logs_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Logs_spec.ts index eb7ec2a91a..7cce926639 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Logs_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Logs_spec.ts @@ -21,9 +21,9 @@ const generateTestLogString = () => { return logString; }; -describe("Debugger logs", function() { +describe("Debugger logs", function () { before(() => { - cy.fixture("testdata").then(function(data) { + cy.fixture("testdata").then(function (data) { dataSet = data; }); }); @@ -31,7 +31,7 @@ describe("Debugger logs", function() { logString = generateTestLogString(); }); - it("1. Modifying widget properties should log the same", function() { + it("1. Modifying widget properties should log the same", function () { ee.DragDropWidgetNVerify("buttonwidget", 200, 200); propPane.UpdatePropertyFieldValue("Label", "Test"); debuggerHelper.ClickDebuggerIcon(0, true, 0); @@ -39,10 +39,8 @@ describe("Debugger logs", function() { debuggerHelper.LogStateContains("Test"); }); - it("2. Reset debugger state", function() { - cy.get(".t--property-control-visible") - .find(".t--js-toggle") - .click(); + it("2. Reset debugger state", function () { + cy.get(".t--property-control-visible").find(".t--js-toggle").click(); cy.testJsontext("visible", "Test"); cy.get(commonlocators.homeIcon).click({ force: true }); cy.generateUUID().then((id) => { @@ -51,7 +49,7 @@ describe("Debugger logs", function() { }); }); - it("3. Console log on button click with normal moustache binding", function() { + it("3. Console log on button click with normal moustache binding", function () { ee.DragDropWidgetNVerify("buttonwidget", 200, 200); // Testing with normal log in moustache binding propPane.EnterJSContext("onClick", `{{console.log("${logString}")}}`); @@ -62,7 +60,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("4. Console log on button click with arrow function IIFE", function() { + it("4. Console log on button click with arrow function IIFE", function () { debuggerHelper.ClearLogs(); ee.SelectEntityByName("Button1"); // Testing with normal log in iifee @@ -76,7 +74,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("5. Console log on button click with function keyword IIFE", function() { + it("5. Console log on button click with function keyword IIFE", function () { debuggerHelper.ClearLogs(); ee.SelectEntityByName("Button1"); // Testing with normal log in iifee @@ -90,7 +88,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("6. Console log on button click with async function IIFE", function() { + it("6. Console log on button click with async function IIFE", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -104,7 +102,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("7. Console log on button click with mixed function IIFE", function() { + it("7. Console log on button click with mixed function IIFE", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -121,7 +119,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logStringChild); }); - it("8. Console log grouping on button click", function() { + it("8. Console log grouping on button click", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -140,7 +138,7 @@ describe("Debugger logs", function() { debuggerHelper.Assert_Consecutive_Console_Log_Count(5); }); - it("9. Console log grouping on button click with different log in between", function() { + it("9. Console log grouping on button click with different log in between", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -159,7 +157,7 @@ describe("Debugger logs", function() { debuggerHelper.Assert_Consecutive_Console_Log_Count(2); }); - it("10. Console log grouping on button click from different source", function() { + it("10. Console log grouping on button click from different source", function () { debuggerHelper.ClearLogs(); // Testing with normal log in iifee ee.SelectEntityByName("Button1"); @@ -175,7 +173,7 @@ describe("Debugger logs", function() { debuggerHelper.Assert_Consecutive_Console_Log_Count(0); }); - it("11. Console log on text widget with normal moustache binding", function() { + it("11. Console log on text widget with normal moustache binding", function () { ee.DragDropWidgetNVerify("textwidget", 400, 400); propPane.UpdatePropertyFieldValue( "Text", @@ -194,7 +192,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("12. Console log in sync function", function() { + it("12. Console log in sync function", function () { ee.NavigateToSwitcher("explorer"); jsEditor.CreateJSObject( `export default { @@ -218,7 +216,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("13. Console log in async function", function() { + it("13. Console log in async function", function () { ee.NavigateToSwitcher("explorer"); jsEditor.CreateJSObject( `export default { @@ -257,7 +255,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(logString); }); - it("14. Console log after API succedes", function() { + it("14. Console log after API succedes", function () { ee.NavigateToSwitcher("explorer"); apiPage.CreateAndFillApi(dataSet.baseUrl + dataSet.methods, "Api1"); const returnText = "success"; @@ -289,7 +287,7 @@ describe("Debugger logs", function() { agHelper.WaitUntilAllToastsDisappear(); cy.get("@jsObjName").then((jsObjName) => { - agHelper.Sleep(2000) + agHelper.Sleep(2000); agHelper.GetNClick(jsEditor._runButton); agHelper.GetNClick(jsEditor._logsTab); debuggerHelper.DoesConsoleLogExist(`${logString} Started`); @@ -305,7 +303,7 @@ describe("Debugger logs", function() { }); }); - it("15. Console log after API execution fails", function() { + it("15. Console log after API execution fails", function () { ee.NavigateToSwitcher("explorer"); apiPage.CreateAndFillApi(dataSet.baseUrl + dataSet.methods + "xyz", "Api2"); jsEditor.CreateJSObject( @@ -338,7 +336,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(`${logString} Failed`); }); - it("16. Console log source inside nested function", function() { + it("16. Console log source inside nested function", function () { jsEditor.CreateJSObject( `export default { myFun1: async () => { @@ -363,7 +361,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist(`Child ${logString}`); }); - it("17. Console log grouping", function() { + it("17. Console log grouping", function () { jsEditor.CreateJSObject( `export default { myFun1: async () => { @@ -391,7 +389,7 @@ describe("Debugger logs", function() { debuggerHelper.Assert_Consecutive_Console_Log_Count(5); }); - it("18. Console log should not mutate the passed object", function() { + it("18. Console log should not mutate the passed object", function () { ee.NavigateToSwitcher("explorer"); jsEditor.CreateJSObject( `export default { @@ -420,7 +418,7 @@ describe("Debugger logs", function() { debuggerHelper.DoesConsoleLogExist("end: [0,1,2,3,4]"); }); - it("6. Bug #19115 - Objects that start with an underscore `_JSObject1` fail to be navigated from the debugger", function() { + it("6. Bug #19115 - Objects that start with an underscore `_JSObject1` fail to be navigated from the debugger", function () { const JSOBJECT_WITH_UNNECCESARY_SEMICOLON = `export default { myFun1: () => { //write code here diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js index 4b315383b6..9170f485f3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js @@ -13,7 +13,7 @@ describe("Omnibar functionality test cases", () => { cy.addDsl(dsl); }); - it("1. Bug #15104 The Data is not displayed in Omnibar after clicking on learn more link from property pane", function() { + it("1. Bug #15104 The Data is not displayed in Omnibar after clicking on learn more link from property pane", function () { cy.dragAndDropToCanvas("audiowidget", { x: 300, y: 500 }); cy.xpath('//span[text()="Learn more"]').click(); cy.get(locators._omnibarDescription).scrollTo("top"); @@ -21,7 +21,7 @@ describe("Omnibar functionality test cases", () => { cy.get("body").click(0, 0); }); - it("2.Verify omnibar is present across all pages and validate its fields", function() { + it("2.Verify omnibar is present across all pages and validate its fields", function () { cy.get(omnibar.globalSearch) .trigger("mouseover") .should("have.css", "background-color", "rgba(0, 0, 0, 0)"); @@ -56,14 +56,10 @@ describe("Omnibar functionality test cases", () => { cy.get("body").type("{esc}"); }); - it("3. Verify when user clicks on a debugging error, related documentation should open in omnibar", function() { + it("3. Verify when user clicks on a debugging error, related documentation should open in omnibar", function () { // click on debugger icon - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); - cy.get(commonlocators.errorTab) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); + cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); cy.wait(1000); // click on open documention from error tab cy.get(commonlocators.debuggerContextMenu).click({ multiple: true }); @@ -80,62 +76,42 @@ describe("Omnibar functionality test cases", () => { // cy.get(omnibar.globalSearchClose).click(); }); - it("4. Verify Create New section and its data, also create a new api, new js object and new cURL import from omnibar ", function() { + it("4. Verify Create New section and its data, also create a new api, new js object and new cURL import from omnibar ", function () { cy.intercept("POST", "/api/v1/actions").as("createNewApi"); cy.intercept("POST", "/api/v1/collections/actions").as( "createNewJSCollection", ); - cy.get(omnibar.categoryTitle) - .eq(1) - .click(); + cy.get(omnibar.categoryTitle).eq(1).click(); // create new api, js object and cURL import from omnibar - cy.get(omnibar.createNew) - .eq(0) - .should("have.text", "New Blank API"); + cy.get(omnibar.createNew).eq(0).should("have.text", "New Blank API"); // 2 is the index value of the JS Object in omnibar ui - cy.get(omnibar.createNew) - .eq(2) - .should("have.text", "New JS Object"); + cy.get(omnibar.createNew).eq(2).should("have.text", "New JS Object"); // 3 is the index value of the Curl import in omnibar ui - cy.get(omnibar.createNew) - .eq(3) - .should("have.text", "New cURL Import"); - cy.get(omnibar.createNew) - .eq(0) - .click(); + cy.get(omnibar.createNew).eq(3).should("have.text", "New cURL Import"); + cy.get(omnibar.createNew).eq(0).click(); cy.wait(1000); cy.wait("@createNewApi"); cy.renameWithInPane(apiName); cy.get(omnibar.globalSearch).click({ force: true }); - cy.get(omnibar.categoryTitle) - .eq(1) - .click(); + cy.get(omnibar.categoryTitle).eq(1).click(); // 2 is the index value of the JS Object in omnibar ui - cy.get(omnibar.createNew) - .eq(2) - .click(); + cy.get(omnibar.createNew).eq(2).click(); cy.wait(1000); cy.wait("@createNewJSCollection"); cy.wait(1000); - cy.get(".t--js-action-name-edit-field") - .type(jsObjectName) - .wait(1000); + cy.get(".t--js-action-name-edit-field").type(jsObjectName).wait(1000); cy.get(omnibar.globalSearch).click({ force: true }); - cy.get(omnibar.categoryTitle) - .eq(1) - .click(); + cy.get(omnibar.categoryTitle).eq(1).click(); cy.wait(1000); // 3 is the index value of the JS Object in omnibar ui - cy.get(omnibar.createNew) - .eq(3) - .click(); + cy.get(omnibar.createNew).eq(3).click(); cy.wait(1000); cy.url().should("include", "curl-import?"); cy.get('p:contains("Import from CURL")').should("be.visible"); }); - it("5. On an invalid search, discord link should be displayed and on clicking that link, should open discord in new tab", function() { + it("5. On an invalid search, discord link should be displayed and on clicking that link, should open discord in new tab", function () { // typing a random string in search bar cy.get(omnibar.globalSearch).click({ force: true }); cy.wait(1000); @@ -157,17 +133,13 @@ describe("Omnibar functionality test cases", () => { cy.wait(2000); }); - it("6. Verify Navigate section shows recently opened widgets and datasources", function() { + it("6. Verify Navigate section shows recently opened widgets and datasources", function () { cy.get(".bp3-icon-chevron-left").click({ force: true }); cy.openPropertyPane("buttonwidget"); cy.get(omnibar.globalSearch).click({ force: true }); - cy.get(omnibar.categoryTitle) - .eq(0) - .click(); + cy.get(omnibar.categoryTitle).eq(0).click(); // verify recently opened items with their subtext i.e page name - cy.xpath(omnibar.recentlyopenItem) - .eq(0) - .should("have.text", "Page1"); + cy.xpath(omnibar.recentlyopenItem).eq(0).should("have.text", "Page1"); cy.xpath(omnibar.recentlyopenItem) .eq(1) .should("have.text", "Audio1") @@ -190,12 +162,10 @@ describe("Omnibar functionality test cases", () => { .should("have.text", "Page1"); }); - it("7. Verify documentation should open in new tab, on clicking open documentation", function() { + it("7. Verify documentation should open in new tab, on clicking open documentation", function () { //cy.get(omnibar.category).click() cy.get(omnibar.globalSearch).click({ force: true }); - cy.get(omnibar.categoryTitle) - .eq(3) - .click({ force: true }); + cy.get(omnibar.categoryTitle).eq(3).click({ force: true }); cy.get(omnibar.openDocumentationLink) .invoke("removeAttr", "target") .click() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PageOnLoad_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PageOnLoad_spec.ts index 4d3720bcab..7a5188b3d3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PageOnLoad_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PageOnLoad_spec.ts @@ -5,11 +5,11 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const debuggerHelper = ObjectsRegistry.DebuggerHelper; -describe("Check debugger logs state when there are onPageLoad actions", function() { +describe("Check debugger logs state when there are onPageLoad actions", function () { before(() => { cy.addDsl(dsl); }); - it("Check debugger logs state when there are onPageLoad actions", function() { + it("Check debugger logs state when there are onPageLoad actions", function () { cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", "{{TestApi.data.users}}"); cy.NavigateToAPI_Panel(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PreviewMode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PreviewMode_spec.js index a5847aea9a..fb973b04fd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PreviewMode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/PreviewMode_spec.js @@ -3,34 +3,31 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const publishPage = require("../../../../locators/publishWidgetspage.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Preview mode functionality", function() { +describe("Preview mode functionality", function () { before(() => { cy.addDsl(dsl); }); - it("checks entity explorer and property pane visiblity", function() { + it("checks entity explorer and property pane visiblity", function () { _.agHelper.GetNClick(_.locators._previewModeToggle("edit")); // in preview mode, entity explorer and property pane are not visible cy.get(".t--entity-explorer").should("not.be.visible"); cy.get(".t--property-pane-sidebar").should("not.be.visible"); }); - it("checks if widgets can be selected or not", function() { + it("checks if widgets can be selected or not", function () { // in preview mode, entity explorer and property pane are not visible // Also, draggable and resizable components are not available. const selector = `.t--draggable-buttonwidget`; cy.wait(500); - cy.get(selector) - .first() - .trigger("mouseover", { force: true }) - .wait(500); + cy.get(selector).first().trigger("mouseover", { force: true }).wait(500); cy.get( `${selector}:first-of-type .t--widget-propertypane-toggle > .t--widget-name`, ).should("not.exist"); }); - it("check invisible widget should not show in proview mode and should show in edit mode", function() { + it("check invisible widget should not show in proview mode and should show in edit mode", function () { _.agHelper.GetNClick(_.locators._previewModeToggle("preview")); cy.openPropertyPane("buttonwidget"); cy.UncheckWidgetProperties(commonlocators.visibleCheckbox); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ProductUpdates_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ProductUpdates_spec.js index 263bfa2083..a4e01207d0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ProductUpdates_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ProductUpdates_spec.js @@ -1,7 +1,7 @@ const commonlocators = require("../../../../locators/commonlocators.json"); -describe("Check for product updates button and modal", function() { - it("Check if we should show the product updates button and it opens the updates modal", function() { +describe("Check for product updates button and modal", function () { + it("Check if we should show the product updates button and it opens the updates modal", function () { cy.get(commonlocators.homeIcon).click({ force: true }); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Redirects_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Redirects_spec.js index 8549786ad3..f216433038 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Redirects_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Redirects_spec.js @@ -1,5 +1,5 @@ -describe("Check for redirects associated with auth pages", function() { - it("Should redirect away from auth pages if already logged in", function() { +describe("Check for redirects associated with auth pages", function () { + it("Should redirect away from auth pages if already logged in", function () { const loginPageRoute = "/user/login"; cy.visit(loginPageRoute); // eslint-disable-next-line cypress/no-unnecessary-waiting diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js index 796f77ddd8..364f11370f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js @@ -5,7 +5,7 @@ const datasourceEditor = require("../../../../locators/DatasourcesEditor.json"); const datasourceFormData = require("../../../../fixtures/datasources.json"); const queryLocators = require("../../../../locators/QueryEditor.json"); -describe("Undo/Redo functionality", function() { +describe("Undo/Redo functionality", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; let postgresDatasourceName; @@ -29,24 +29,20 @@ describe("Undo/Redo functionality", function() { cy.get(datasourceEditor.password).type( datasourceFormData["postgres-password"], ); - cy.get(datasourceEditor.sectionAuthentication) - .trigger("click") - .wait(1000); + cy.get(datasourceEditor.sectionAuthentication).trigger("click").wait(1000); cy.get("body").type(`{${modifierKey}}z`); cy.get( `${datasourceEditor.sectionAuthentication} .bp3-icon-chevron-up`, ).should("exist"); cy.get(".t--application-name").click({ force: true }); - cy.get("li:contains(Edit)") - .eq(1) - .trigger("mouseover"); + cy.get("li:contains(Edit)").eq(1).trigger("mouseover"); cy.get("li:contains(Undo)").click({ multiple: true }); cy.get(datasourceEditor.username).should("be.empty"); cy.get(datasourceEditor.saveBtn).click({ force: true }); }); - it("2. Checks undo/redo for Api pane", function() { + it("2. Checks undo/redo for Api pane", function () { cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); cy.CreateAPI("FirstAPI"); @@ -88,13 +84,10 @@ describe("Undo/Redo functionality", function() { it("3. Checks undo/redo in query editor", () => { cy.NavigateToActiveDSQueryPane(postgresDatasourceName); cy.get(queryLocators.templateMenu).click(); - cy.get(".CodeMirror textarea") - .first() - .focus() - .type("{{FirstAPI}}", { - force: true, - parseSpecialCharSequences: false, - }); + cy.get(".CodeMirror textarea").first().focus().type("{{FirstAPI}}", { + force: true, + parseSpecialCharSequences: false, + }); cy.get("body").click(0, 0); // verifying Relationships is visible on dynamic binding cy.get(".icon-text") @@ -120,9 +113,7 @@ describe("Undo/Redo functionality", function() { cy.get(".CodeMirror-code").should("have.text", "{{FirstAPI}}"); // undo/redo through app menu cy.get(".t--application-name").click({ force: true }); - cy.get("li:contains(Edit)") - .eq(1) - .trigger("mouseover"); + cy.get("li:contains(Edit)").eq(1).trigger("mouseover"); cy.get("li:contains(Undo)").click({ multiple: true }); cy.get(".CodeMirror-code").should("not.have.text", "{{FirstAPI}}"); }); @@ -145,9 +136,7 @@ describe("Undo/Redo functionality", function() { cy.contains("testJSFunction").should("exist"); // performing undo from app menu cy.get(".t--application-name").click({ force: true }); - cy.get("li:contains(Edit)") - .eq(1) - .trigger("mouseover"); + cy.get("li:contains(Edit)").eq(1).trigger("mouseover"); cy.get("li:contains(Undo)").click({ multiple: true }); // cy.get(".function-name").should("not.contain.text", "test"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_spec.js index 493dde7f49..25c15440a4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_spec.js @@ -5,14 +5,14 @@ const explorer = require("../../../../locators/explorerlocators.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/replay.json"); -describe("Undo/Redo functionality", function() { +describe("Undo/Redo functionality", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; before(() => { cy.addDsl(dsl); }); - it("checks undo/redo for new widgets", function() { + it("checks undo/redo for new widgets", function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("checkboxwidget", { x: 200, y: 200 }); @@ -74,7 +74,7 @@ describe("Undo/Redo functionality", function() { // }); // }); - it("checks undo/redo for toggle control in property pane", function() { + it("checks undo/redo for toggle control in property pane", function () { cy.openPropertyPane("checkboxwidget"); cy.CheckWidgetProperties(commonlocators.disableCheckbox); @@ -92,7 +92,7 @@ describe("Undo/Redo functionality", function() { cy.get(widgetLocators.checkboxWidget + " " + "input").should("be.disabled"); }); - it("checks undo/redo for input control in property pane", function() { + it("checks undo/redo for input control in property pane", function () { cy.get(widgetsPage.inputLabelControl).type("1"); cy.get(widgetsPage.inputLabelControl).contains("Label1"); @@ -107,7 +107,7 @@ describe("Undo/Redo functionality", function() { cy.get(`${publish.checkboxWidget} label`).should("have.text", "Label1"); }); - it("checks undo/redo for deletion of widgets", function() { + it("checks undo/redo for deletion of widgets", function () { cy.deleteWidget(widgetsPage.checkboxWidget); cy.get(widgetsPage.checkboxWidget).should("not.exist"); @@ -120,7 +120,7 @@ describe("Undo/Redo functionality", function() { // cy.get(widgetsPage.checkboxWidget).should("not.exist"); }); - it("checks if property Pane is open on undo/redo property changes", function() { + it("checks if property Pane is open on undo/redo property changes", function () { cy.dragAndDropToCanvas("textwidget", { x: 400, y: 400 }); cy.wait(100); @@ -142,35 +142,25 @@ describe("Undo/Redo functionality", function() { cy.deleteWidget(widgetsPage.textWidget); }); - it("checks if toast is shown while undo/redo widget deletion or creation only the first time", function() { + it("checks if toast is shown while undo/redo widget deletion or creation only the first time", function () { cy.dragAndDropToCanvas("textwidget", { x: 400, y: 400 }); localStorage.removeItem("undoToastShown"); localStorage.removeItem("redoToastShown"); cy.focused().blur(); cy.get("body").type(`{${modifierKey}}z`); - cy.get(commonlocators.toastmsg) - .eq(0) - .contains("is removed"); - cy.get(commonlocators.toastmsg) - .eq(1) - .contains("REDO"); - cy.get(commonlocators.toastBody) - .first() - .click(); + cy.get(commonlocators.toastmsg).eq(0).contains("is removed"); + cy.get(commonlocators.toastmsg).eq(1).contains("REDO"); + cy.get(commonlocators.toastBody).first().click(); cy.wait(100); cy.get("body").type(`{${modifierKey}}{shift}z`); - cy.get(commonlocators.toastmsg) - .eq(0) - .contains("is added back"); - cy.get(commonlocators.toastmsg) - .eq(1) - .contains("UNDO"); + cy.get(commonlocators.toastmsg).eq(0).contains("is added back"); + cy.get(commonlocators.toastmsg).eq(1).contains("UNDO"); cy.deleteWidget(widgetsPage.textWidget); }); - it("checks undo/redo for color picker", function() { + it("checks undo/redo for color picker", function () { cy.dragAndDropToCanvas("textwidget", { x: 100, y: 100 }); cy.moveToStyleTab(); cy.selectColor("textcolor"); @@ -180,9 +170,7 @@ describe("Undo/Redo functionality", function() { cy.wait("@updateLayout"); cy.readTextDataValidateCSS("color", "rgb(126, 34, 206)"); - cy.get("body") - .click({ force: true }) - .type(`{${modifierKey}}z`); + cy.get("body").click({ force: true }).type(`{${modifierKey}}z`); cy.get(widgetsPage.textColor) .first() .invoke("attr", "value") @@ -196,16 +184,12 @@ describe("Undo/Redo functionality", function() { .should("contain", "#7e22ce"); }); - it("checks undo/redo for option control for radio button", function() { + it("checks undo/redo for option control for radio button", function () { cy.dragAndDropToCanvas("radiogroupwidget", { x: 200, y: 600 }); - cy.get(widgetsPage.RadioInput) - .first() - .type("1"); + cy.get(widgetsPage.RadioInput).first().type("1"); - cy.get(widgetsPage.RadioInput) - .first() - .blur(); + cy.get(widgetsPage.RadioInput).first().blur(); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Resize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Resize_spec.js index 5253bc47b1..46e21e9ae7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Resize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Resize_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../locators/commonlocators.json"); const dsl = require("../../../../fixtures/CanvasResizeDsl.json"); -describe("Canvas Resize", function() { +describe("Canvas Resize", function () { before(() => { cy.addDsl(dsl); }); - it("Deleting bottom widget should resize canvas", function() { + it("Deleting bottom widget should resize canvas", function () { const InitHeight = "2950px"; cy.get(commonlocators.dropTarget).should("have.css", "height", InitHeight); cy.openPropertyPane("textwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/TriggerErrors_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/TriggerErrors_spec.ts index 9f8a1b73ae..06dd5e1f3e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/TriggerErrors_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/TriggerErrors_spec.ts @@ -2,17 +2,15 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const dsl = require("../../../../fixtures/debuggerTableDsl.json"); const debuggerHelper = ObjectsRegistry.DebuggerHelper; -describe("Trigger errors in the debugger", function() { +describe("Trigger errors in the debugger", function () { before(() => { cy.addDsl(dsl); }); - it("Trigger errors need to be shown in the errors tab", function() { + it("Trigger errors need to be shown in the errors tab", function () { cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", `[{"name": 1}, {"name": 2}]`); cy.focused().blur(); - cy.get(".t--property-control-onrowselected") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-onrowselected").find(".t--js-toggle").click(); cy.EnableAllCodeEditors(); cy.testJsontext("onrowselected", "{{console.logs('test')}}"); // Click on a row of the table widget diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Unique_key_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Unique_key_spec.js index 37b1943ebc..fd65e68485 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Unique_key_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Unique_key_spec.js @@ -9,7 +9,7 @@ const agHelper = ObjectsRegistry.AggregateHelper; // Since we cannot test the root cause as it does not show up on the DOM, we are testing the sideEffects // the root cause is when widget has same keys, which are not visible in DOM but confuses React when the list is modified. // please refer to issue, https://github.com/appsmithorg/appsmith/issues/7415 for more details. -describe("Unique react keys", function() { +describe("Unique react keys", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -19,7 +19,7 @@ describe("Unique react keys", function() { cy.addDsl(dsl); }); - it("Should not create duplicate versions of widget on drop from explorer", function() { + it("Should not create duplicate versions of widget on drop from explorer", function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("chartwidget", { x: 200, y: 200 }); cy.dragAndDropToCanvas("selectwidget", { x: 200, y: 600 }); @@ -31,7 +31,7 @@ describe("Unique react keys", function() { cy.get(widgetsPage.selectwidget).should("have.length", 2); }); - it("Should not create duplicate versions of widget on widget copy", function() { + it("Should not create duplicate versions of widget on widget copy", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("chartwidget", { x: 200, y: 200 }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js index 1aa024de88..465f9b5317 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js @@ -18,12 +18,8 @@ describe("Update Application", () => { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.applicationName).type(`${appname} updated` + "{enter}"); cy.wait("@updateApplication").should( "have.nested.property", @@ -34,9 +30,7 @@ describe("Update Application", () => { }); it("Open the application menu and update icon and then check whether update is reflected in the application card", () => { - cy.get(homePage.applicationIconSelector) - .first() - .click(); + cy.get(homePage.applicationIconSelector).first().click(); cy.wait("@updateApplication") .then((xhr) => { iconname = xhr.response.body.data.icon; @@ -45,9 +39,7 @@ describe("Update Application", () => { cy.get(homePage.applicationCard) .first() .within(() => { - cy.get("a") - .invoke("attr", "name") - .should("equal", iconname); + cy.get("a").invoke("attr", "name").should("equal", iconname); }); }); @@ -57,12 +49,8 @@ describe("Update Application", () => { cy.get(homePage.searchInput).type(appname); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appEditIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appEditIcon).first().click({ force: true }); cy.get("#loading").should("not.exist"); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); @@ -89,12 +77,8 @@ describe("Update Application", () => { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.applicationName).type(veryLongAppName + "{enter}"); cy.get(homePage.appsContainer).click({ force: true }); cy.wait("@updateApplication").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ViewMode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ViewMode_spec.js index aceee97879..a37ac59367 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ViewMode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ViewMode_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../fixtures/previewMode.json"); const BASE_URL = Cypress.config().baseUrl; -describe("Preview mode functionality", function() { +describe("Preview mode functionality", function () { before(() => { cy.addDsl(dsl); }); - it("on click of apps on header, it should take to application home page", function() { + it("on click of apps on header, it should take to application home page", function () { cy.PublishtheApp(); cy.get(".t--back-to-home").click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Widget_Error_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Widget_Error_spec.js index a568c70879..71207cec2c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Widget_Error_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Widget_Error_spec.js @@ -3,19 +3,17 @@ const widgetLocators = require("../../../../locators/Widgets.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; import { WIDGET } from "../../../../locators/WidgetLocators"; -describe("Widget error state", function() { +describe("Widget error state", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; before(() => { cy.addDsl(dsl); }); - it("1. Check widget error state", function() { + it("1. Check widget error state", function () { cy.openPropertyPane("buttonwidget"); - cy.get(".t--property-control-visible") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-visible").find(".t--js-toggle").click(); cy.EnableAllCodeEditors(); cy.testJsontext("visible", "Test"); @@ -23,18 +21,16 @@ describe("Widget error state", function() { cy.contains(".t--widget-error-count", 1); }); - it("2. Check if the current value is shown in the debugger", function() { + it("2. Check if the current value is shown in the debugger", function () { _.debuggerHelper.ClickDebuggerIcon(); cy.contains(".react-tabs__tab", "Errors").click(); //This feature is disabled in updated error log - epic 17720 // _.debuggerHelper.LogStateContains("Test"); }); - it("3. Switch to error tab when clicked on the debug button", function() { + it("3. Switch to error tab when clicked on the debug button", function () { cy.get("[data-cy=t--tab-LOGS_TAB]").click(); - cy.get(".t--property-control-onclick") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-onclick").find(".t--js-toggle").click(); cy.EnableAllCodeEditors(); cy.testJsontext("onclick", "{{testApi.run()}}"); cy.get(widgetLocators.buttonWidget).click(); @@ -43,12 +39,12 @@ describe("Widget error state", function() { cy.contains(".react-tabs__tab--selected", "Errors"); }); - it("4. All errors should be expanded by default", function() { + it("4. All errors should be expanded by default", function () { //Updated count to 1 as the decision not to show triggerexecution/uncaughtpromise error in - epic 17720 _.debuggerHelper.AssertVisibleErrorMessagesCount(1); }); - it("5. Recent errors are shown at the top of the list", function() { + it("5. Recent errors are shown at the top of the list", function () { cy.testJsontext("label", "{{[]}}"); //This feature is disabled in updated error log - epic 17720 // _.debuggerHelper.LogStateContains("text", 0); @@ -60,14 +56,14 @@ describe("Widget error state", function() { // _.debuggerHelper.AssertContextMenuItemVisible(); // }); - it("7. Undoing widget deletion should show errors if present", function() { + it("7. Undoing widget deletion should show errors if present", function () { cy.deleteWidget(); _.debuggerHelper.AssertVisibleErrorMessagesCount(0); cy.get("body").type(`{${modifierKey}}z`); _.debuggerHelper.AssertVisibleErrorMessagesCount(2); }); - it("8. Bug-2760: Error log on a widget property not clearing out when the widget property is deleted", function() { + it("8. Bug-2760: Error log on a widget property not clearing out when the widget property is deleted", function () { _.entityExplorer.DragDropWidgetNVerify(WIDGET.TABLE, 150, 300); _.entityExplorer.SelectEntityByName("Table1", "Widgets"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PeekOverlay/PeekOverlay_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PeekOverlay/PeekOverlay_Spec.ts index 96a6de5c07..f62faa7dbf 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PeekOverlay/PeekOverlay_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PeekOverlay/PeekOverlay_Spec.ts @@ -2,13 +2,13 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; describe("peek overlay", () => { it("main test", () => { - cy.fixture("datasources").then((datasourceFormData : any) => { - _.entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 500, 100); - _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); - _.apiPage.RunAPI(); - _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); - _.jsEditor.CreateJSObject( - `export default { + cy.fixture("datasources").then((datasourceFormData: any) => { + _.entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 500, 100); + _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); + _.apiPage.RunAPI(); + _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); + _.jsEditor.CreateJSObject( + `export default { numArray: [1, 2, 3], objectArray: [ {x: 123}, { y: "123"} ], objectData: { x: 123, y: "123" }, @@ -26,101 +26,101 @@ describe("peek overlay", () => { return Api1.run() } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - lineNumber: 0, - prettify: true, - }, - ); - _.jsEditor.SelectFunctionDropdown("myFun2"); - _.jsEditor.RunJSObj(); - _.agHelper.Sleep(); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + lineNumber: 0, + prettify: true, + }, + ); + _.jsEditor.SelectFunctionDropdown("myFun2"); + _.jsEditor.RunJSObj(); + _.agHelper.Sleep(); - // check number array - _.peekOverlay.HoverCode("JSObject1.numArray"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("array"); - _.peekOverlay.CheckPrimitveArrayInOverlay([1, 2, 3]); - _.peekOverlay.ResetHover(); + // check number array + _.peekOverlay.HoverCode("JSObject1.numArray"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("array"); + _.peekOverlay.CheckPrimitveArrayInOverlay([1, 2, 3]); + _.peekOverlay.ResetHover(); - // check basic object - _.peekOverlay.HoverCode("JSObject1.objectData"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("object"); - _.peekOverlay.CheckBasicObjectInOverlay({ x: 123, y: "123" }); - _.peekOverlay.ResetHover(); + // check basic object + _.peekOverlay.HoverCode("JSObject1.objectData"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("object"); + _.peekOverlay.CheckBasicObjectInOverlay({ x: 123, y: "123" }); + _.peekOverlay.ResetHover(); - // check null - with this keyword - _.peekOverlay.HoverCode("JSObject1.nullData"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("null"); - _.peekOverlay.CheckPrimitiveValue("null"); - _.peekOverlay.ResetHover(); + // check null - with this keyword + _.peekOverlay.HoverCode("JSObject1.nullData"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("null"); + _.peekOverlay.CheckPrimitiveValue("null"); + _.peekOverlay.ResetHover(); - // check number - _.peekOverlay.HoverCode("JSObject1.numberData"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("number"); - _.peekOverlay.CheckPrimitiveValue("1"); - _.peekOverlay.ResetHover(); + // check number + _.peekOverlay.HoverCode("JSObject1.numberData"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("number"); + _.peekOverlay.CheckPrimitiveValue("1"); + _.peekOverlay.ResetHover(); - // check undefined - _.peekOverlay.HoverCode("Api2.data"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("undefined"); - _.peekOverlay.CheckPrimitiveValue("undefined"); - _.peekOverlay.ResetHover(); + // check undefined + _.peekOverlay.HoverCode("Api2.data"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("undefined"); + _.peekOverlay.CheckPrimitiveValue("undefined"); + _.peekOverlay.ResetHover(); - // check boolean - _.peekOverlay.HoverCode("Api1.isLoading"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("boolean"); - _.peekOverlay.CheckPrimitiveValue("false"); - _.peekOverlay.ResetHover(); + // check boolean + _.peekOverlay.HoverCode("Api1.isLoading"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("boolean"); + _.peekOverlay.CheckPrimitiveValue("false"); + _.peekOverlay.ResetHover(); - // TODO: handle this function failure on CI tests -> "function(){}" - // check function - // _.peekOverlay.HoverCode("Api1.run"); - // _.peekOverlay.IsOverlayOpen(); - // _.peekOverlay.VerifyDataType("function"); - // _.peekOverlay.CheckPrimitiveValue("function () {}"); - // _.peekOverlay.ResetHover(); + // TODO: handle this function failure on CI tests -> "function(){}" + // check function + // _.peekOverlay.HoverCode("Api1.run"); + // _.peekOverlay.IsOverlayOpen(); + // _.peekOverlay.VerifyDataType("function"); + // _.peekOverlay.CheckPrimitiveValue("function () {}"); + // _.peekOverlay.ResetHover(); - // check string - _.peekOverlay.HoverCode("appsmith.mode"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("string"); - _.peekOverlay.CheckPrimitiveValue("EDIT"); - _.peekOverlay.ResetHover(); + // check string + _.peekOverlay.HoverCode("appsmith.mode"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("string"); + _.peekOverlay.CheckPrimitiveValue("EDIT"); + _.peekOverlay.ResetHover(); - // check if overlay closes - _.peekOverlay.HoverCode("appsmith.store"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.ResetHover(); - _.peekOverlay.IsOverlayOpen(false); + // check if overlay closes + _.peekOverlay.HoverCode("appsmith.store"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.ResetHover(); + _.peekOverlay.IsOverlayOpen(false); - // widget object - _.peekOverlay.HoverCode("Table1"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("object"); - _.peekOverlay.ResetHover(); + // widget object + _.peekOverlay.HoverCode("Table1"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("object"); + _.peekOverlay.ResetHover(); - // widget property - _.peekOverlay.HoverCode("Table1.pageNo"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("number"); - _.peekOverlay.CheckPrimitiveValue("1"); - _.peekOverlay.ResetHover(); + // widget property + _.peekOverlay.HoverCode("Table1.pageNo"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("number"); + _.peekOverlay.CheckPrimitiveValue("1"); + _.peekOverlay.ResetHover(); - // widget property - _.peekOverlay.HoverCode("Table1.tableData"); - _.peekOverlay.IsOverlayOpen(); - _.peekOverlay.VerifyDataType("array"); - _.peekOverlay.CheckObjectArrayInOverlay([{}, {}, {}]); - _.peekOverlay.ResetHover(); + // widget property + _.peekOverlay.HoverCode("Table1.tableData"); + _.peekOverlay.IsOverlayOpen(); + _.peekOverlay.VerifyDataType("array"); + _.peekOverlay.CheckObjectArrayInOverlay([{}, {}, {}]); + _.peekOverlay.ResetHover(); }); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneCTA_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneCTA_spec.js index ea0356579b..ce855d8246 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneCTA_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneCTA_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/TextTabledsl.json"); -describe("Property pane CTA to add an action", function() { +describe("Property pane CTA to add an action", function () { before(() => { cy.addDsl(dsl); }); - it("Check if CTA is shown when there is no action", function() { + it("Check if CTA is shown when there is no action", function () { cy.openPropertyPane("tablewidget"); cy.get(".t--propertypane-connect-cta") @@ -13,7 +13,7 @@ describe("Property pane CTA to add an action", function() { .should("be.visible"); }); - it("Check if CTA does not exist when there is an action", function() { + it("Check if CTA does not exist when there is an action", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("FirstAPI"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneJsEnabledVisible_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneJsEnabledVisible_spec.js index 94ca062476..fe86b71f8b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneJsEnabledVisible_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPaneJsEnabledVisible_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/jsonFormDslWithSchema.json"); -describe("Property pane js enabled field", function() { +describe("Property pane js enabled field", function () { before(() => { cy.addDsl(dsl); }); - it("Ensure text is visible for js enabled field when a section is collapsed by default", function() { + it("Ensure text is visible for js enabled field when a section is collapsed by default", function () { cy.openPropertyPane("jsonformwidget"); cy.moveToStyleTab(); cy.wait(500); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Connections_Error_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Connections_Error_spec.js index 049d34a597..6ddb46ed7c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Connections_Error_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Connections_Error_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/TextTabledsl.json"); -describe("Property pane connections error state", function() { +describe("Property pane connections error state", function () { before(() => { cy.addDsl(dsl); }); - it("Check if the connection shows an error state when a connection has an error", function() { + it("Check if the connection shows an error state when a connection has an error", function () { cy.openPropertyPane("tablewidget"); cy.testJsontext("tabledata", "{{error}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Search_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Search_spec.ts index 515c126dfb..baed5c7945 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Search_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/PropertyPane/PropertyPane_Search_spec.ts @@ -4,14 +4,14 @@ const agHelper = ObjectsRegistry.AggregateHelper, ee = ObjectsRegistry.EntityExplorer, propPane = ObjectsRegistry.PropertyPane; -describe("Property Pane Search", function() { +describe("Property Pane Search", function () { before(() => { cy.fixture("swtchTableV2Dsl").then((val: any) => { agHelper.AddDsl(val); }); }); - it("1. Verify if the search Input is getting focused when a widget is selected", function() { + it("1. Verify if the search Input is getting focused when a widget is selected", function () { ee.SelectEntityByName("Table1", "Widgets"); // Initially the search input will only be soft focused @@ -38,7 +38,7 @@ describe("Property Pane Search", function() { agHelper.AssertElementFocus(propPane._propertyPaneSearchInputWrapper); }); - it("2. Search for Properties", function() { + it("2. Search for Properties", function () { // Search for a property inside content tab propPane.Search("visible"); propPane.AssertIfPropertyOrSectionExists("general", "CONTENT", "visible"); @@ -60,7 +60,7 @@ describe("Property Pane Search", function() { propPane.AssertIfPropertyOrSectionExists("sorting", "CONTENT", "onsort"); }); - it("3. Search for Sections", function() { + it("3. Search for Sections", function () { // Search for a section inside content tab propPane.Search("general"); propPane.AssertIfPropertyOrSectionExists("general", "CONTENT"); @@ -73,7 +73,7 @@ describe("Property Pane Search", function() { propPane.Search(""); }); - it("4. Search for Properties inside a panel", function() { + it("4. Search for Properties inside a panel", function () { propPane.OpenTableColumnSettings("name"); // Search for a property inside content tab @@ -85,7 +85,7 @@ describe("Property Pane Search", function() { propPane.AssertIfPropertyOrSectionExists("color", "STYLE", "textcolor"); }); - it("5. Search for Sections inside a panel", function() { + it("5. Search for Sections inside a panel", function () { // Search for a section inside content tab propPane.Search("DATA"); propPane.AssertIfPropertyOrSectionExists("data", "CONTENT"); @@ -95,7 +95,7 @@ describe("Property Pane Search", function() { propPane.AssertIfPropertyOrSectionExists("color", "STYLE"); }); - it("6. Search for gibberish and verify if empty results message is shown", function() { + it("6. Search for gibberish and verify if empty results message is shown", function () { // Searching Gibberish inside a panel propPane.Search("pigglywiggly"); agHelper.AssertElementExist(propPane._propertyPaneEmptySearchResult); @@ -106,7 +106,7 @@ describe("Property Pane Search", function() { agHelper.AssertElementExist(propPane._propertyPaneEmptySearchResult); }); - it("7. Verify behaviour with Dynamically hidden properties inside search results", function() { + it("7. Verify behaviour with Dynamically hidden properties inside search results", function () { // Search for a Section with Dynamically hidden properties propPane.Search("pagination"); propPane.AssertIfPropertyOrSectionExists("pagination", "CONTENT"); @@ -125,7 +125,7 @@ describe("Property Pane Search", function() { agHelper.AssertElementAbsence(".t--property-control-onpagechange"); }); - it("8. Verify the search works even if the section is collapsed initially", function() { + it("8. Verify the search works even if the section is collapsed initially", function () { ee.SelectEntityByName("Switch1", "Widgets"); // Collapse All the sections both in CONTENT and STYLE tabs propPane.ToggleSection("label"); @@ -153,7 +153,7 @@ describe("Property Pane Search", function() { ); }); - it("9. Verify the search input clears when another widget is selected", function() { + it("9. Verify the search input clears when another widget is selected", function () { propPane.Search("visible"); propPane.AssertSearchInputValue("visible"); @@ -162,7 +162,7 @@ describe("Property Pane Search", function() { }); // Ensuring a bug won't come back - it("10. Verify searching for properties inside the same section one after the other works", function() { + it("10. Verify searching for properties inside the same section one after the other works", function () { // Search for a property propPane.Search("onsort"); propPane.AssertIfPropertyOrSectionExists("sorting", "CONTENT", "onsort"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts index dbe8201883..65f660fe45 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts @@ -37,17 +37,20 @@ describe("Validate JS Object Refactoring does not affect the comments & variable }); it("1. Selecting paintings table from MySQL DS", () => { - cy.fixture("datasources").then((datasourceFormData : any) => { - //Initialize new JSObject with custom code - _.jsEditor.CreateJSObject(jsCode); - //Initialize new Query entity with custom query - _.entityExplorer.CreateNewDsQuery(dsName); - _.agHelper.RenameWithInPane(refactorInput.query.oldName); - _.agHelper.GetNClick(_.dataSources._templateMenu); - _.dataSources.EnterQuery(query); - //Initialize new API entity with custom header - _.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], refactorInput.api.oldName); - _.apiPage.EnterHeader("key1", `{{\tJSObject1.myVar1}}`); + cy.fixture("datasources").then((datasourceFormData: any) => { + //Initialize new JSObject with custom code + _.jsEditor.CreateJSObject(jsCode); + //Initialize new Query entity with custom query + _.entityExplorer.CreateNewDsQuery(dsName); + _.agHelper.RenameWithInPane(refactorInput.query.oldName); + _.agHelper.GetNClick(_.dataSources._templateMenu); + _.dataSources.EnterQuery(query); + //Initialize new API entity with custom header + _.apiPage.CreateAndFillApi( + datasourceFormData["mockApiUrl"], + refactorInput.api.oldName, + ); + _.apiPage.EnterHeader("key1", `{{\tJSObject1.myVar1}}`); }); }); @@ -170,7 +173,8 @@ describe("Validate JS Object Refactoring does not affect the comments & variable _.entityExplorer.ActionContextMenuByEntityName( "JSObject1Renamed", "Delete", - "Are you sure?", true + "Are you sure?", + true, ); _.entityExplorer.ActionContextMenuByEntityName( "RefactorAPIRenamed", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/ForkTemplateToGitConnectedApp.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/ForkTemplateToGitConnectedApp.js index a7d67e1205..96a7b22941 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/ForkTemplateToGitConnectedApp.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/ForkTemplateToGitConnectedApp.js @@ -23,7 +23,7 @@ describe("Fork a template to the current app", () => { _.agHelper.Sleep(2000); }); - it("1.Bug #17002 Forking a template into an existing app which is connected to git makes the application go into a bad state ", function() { + it("1.Bug #17002 Forking a template into an existing app which is connected to git makes the application go into a bad state ", function () { cy.get(template.startFromTemplateCard).click(); cy.wait("@fetchTemplate", { timeout: 30000 }).should( "have.nested.property", @@ -60,7 +60,7 @@ describe("Fork a template to the current app", () => { cy.commitAndPush(); }); - it("2. Bug #17262 On forking template to a child branch of git connected app is throwing Page not found error ", function() { + it("2. Bug #17262 On forking template to a child branch of git connected app is throwing Page not found error ", function () { _.gitSync.CreateGitBranch(branchName, true); cy.get("@gitbranchName").then((branName) => { branchName = branName; @@ -69,14 +69,9 @@ describe("Fork a template to the current app", () => { cy.get(template.templateDialogBox).should("be.visible"); cy.xpath("//div[text()='Marketing Dashboard']").click(); cy.wait(10000); // for templates page to load fully - cy.xpath(template.selectAllPages) - .next() - .click(); + cy.xpath(template.selectAllPages).next().click(); cy.wait(1000); - cy.xpath("//span[text()='SEND MESSAGES']") - .parent() - .next() - .click(); + cy.xpath("//span[text()='SEND MESSAGES']").parent().next().click(); // [Bug]: On forking selected pages from a template, resource not found error is shown #17270 cy.get(template.templateViewForkButton).click(); cy.wait(5000); @@ -88,16 +83,10 @@ describe("Fork a template to the current app", () => { cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.get(`.t--entity-name:contains(${jsObject})`).should("have.length", 1); cy.NavigateToHome(); - cy.get(homePage.searchInput) - .clear() - .type(newWorkspaceName); + cy.get(homePage.searchInput).clear().type(newWorkspaceName); cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appEditIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appEditIcon).first().click({ force: true }); cy.wait(5000); cy.switchGitBranch(branchName); cy.get(homePage.publishButton).click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_Existing_app_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_Existing_app_spec.js index 503bd12b06..c7e55ad571 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_Existing_app_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_Existing_app_spec.js @@ -62,13 +62,8 @@ describe("Fork a template to the current app from new page popover", () => { "response.body.responseMeta.status", 200, ); - cy.xpath(template.selectAllPages) - .next() - .click(); - cy.xpath("//span[text()='CALENDAR MOBILE']") - .parent() - .next() - .click(); + cy.xpath(template.selectAllPages).next().click(); + cy.xpath("//span[text()='CALENDAR MOBILE']").parent().next().click(); cy.get(template.templateViewForkButton).click(); cy.wait("@fetchTemplate").should( "have.nested.property", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js index 885f2b6ad3..dcfcb7cf5a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js @@ -87,14 +87,9 @@ describe("Fork a template to the current app", () => { "response.body.responseMeta.status", 200, ); - cy.xpath(template.selectAllPages) - .next() - .click(); + cy.xpath(template.selectAllPages).next().click(); cy.wait(1000); - cy.xpath("//span[text()='2 APPLICATION UPLOAD']") - .parent() - .next() - .click(); + cy.xpath("//span[text()='2 APPLICATION UPLOAD']").parent().next().click(); // [Bug]: On forking selected pages from a template, resource not found error is shown #17270 cy.get(template.templateViewForkButton).click(); cy.wait("@fetchTemplate").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js index 936a537b91..b8f16dacd4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js @@ -27,9 +27,7 @@ describe("Fork a template to an workspace", () => { it("2. Update query param on opening fork modal in template detailed view", () => { cy.NavigateToHome(); cy.get(templateLocators.templatesTab).click(); - cy.get(templateLocators.templateCard) - .first() - .click(); + cy.get(templateLocators.templateCard).first().click(); AggregateHelper.CheckForErrorToast("INTERNAL_SERVER_ERROR"); cy.get(templateLocators.templateViewForkButton).click(); cy.location().should((location) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js index 48bd350156..da81c15caf 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js @@ -10,7 +10,7 @@ const ee = ObjectsRegistry.EntityExplorer, const containerShadowElement = `${widgetsPage.containerWidget} [data-testid^="container-wrapper-"]`; -describe("App Theming funtionality", function() { +describe("App Theming funtionality", function () { before(() => { cy.addDsl(dsl); }); @@ -27,15 +27,13 @@ describe("App Theming funtionality", function() { let themesDeletebtn = (sectionName, themeName) => themesSection(sectionName, themeName) + "/following-sibling::button"; - it("1. Checks if theme can be changed to one of the existing themes", function() { + it("1. Checks if theme can be changed to one of the existing themes", function () { appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); cy.get(commonlocators.changeThemeBtn).click({ force: true }); // select a theme - cy.get(commonlocators.themeCard) - .last() - .click({ force: true }); + cy.get(commonlocators.themeCard).last().click({ force: true }); // check for alert cy.get(`${commonlocators.themeCard}`) @@ -60,7 +58,7 @@ describe("App Theming funtionality", function() { }); }); - it("2. Checks if theme can be edited", function() { + it("2. Checks if theme can be edited", function () { cy.get(commonlocators.selectThemeBackBtn).click({ force: true }); appSettings.ClosePane(); @@ -69,9 +67,7 @@ describe("App Theming funtionality", function() { cy.dragAndDropToCanvas("buttonwidget", { x: 200, y: 200 }); cy.dragAndDropToCanvas("containerwidget", { x: 200, y: 50 }); cy.assertPageSave(); - cy.get("canvas") - .first(0) - .trigger("click", { force: true }); + cy.get("canvas").first(0).trigger("click", { force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); @@ -85,9 +81,7 @@ describe("App Theming funtionality", function() { // .wait(500); // change app border radius - cy.get(commonlocators.themeAppBorderRadiusBtn) - .eq(1) - .click({ force: true }); + cy.get(commonlocators.themeAppBorderRadiusBtn).eq(1).click({ force: true }); // check if border radius is changed on button cy.get(commonlocators.themeAppBorderRadiusBtn) @@ -113,9 +107,7 @@ describe("App Theming funtionality", function() { //cy.contains("Color").click({ force: true }); //Change the primary color: - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2Color) .eq(-3) .then(($elem) => { @@ -128,13 +120,9 @@ describe("App Theming funtionality", function() { }); //Change the background color: - cy.get(".border-2") - .last() - .click({ force: true }); + cy.get(".border-2").last().click({ force: true }); cy.wait(500); - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2Color) .first() .then(($elem) => { @@ -147,9 +135,7 @@ describe("App Theming funtionality", function() { }); // Change the shadow - cy.get(commonlocators.themeAppBoxShadowBtn) - .eq(3) - .click({ force: true }); + cy.get(commonlocators.themeAppBoxShadowBtn).eq(3).click({ force: true }); cy.get(commonlocators.themeAppBoxShadowBtn) .eq(3) .invoke("css", "box-shadow") @@ -175,10 +161,7 @@ describe("App Theming funtionality", function() { cy.get(widgetsPage.widgetBtn).should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); }); }); @@ -218,9 +201,7 @@ describe("App Theming funtionality", function() { cy.get(explorer.widgetSwitchId).click(); cy.dragAndDropToCanvas("iconbuttonwidget", { x: 200, y: 300 }); cy.assertPageSave(); - cy.get("canvas") - .first(0) - .trigger("click", { force: true }); + cy.get("canvas").first(0).trigger("click", { force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); @@ -239,18 +220,12 @@ describe("App Theming funtionality", function() { cy.get(widgetsPage.iconWidgetBtn).should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); cy.get(widgetsPage.widgetBtn).should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); }); }); @@ -262,9 +237,7 @@ describe("App Theming funtionality", function() { // cy.contains("Color") // .click({ force: true }) // .wait(200); - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2Color) .eq(-15) .then(($elem) => { @@ -282,13 +255,9 @@ describe("App Theming funtionality", function() { }); //Change the background color: - cy.get(".border-2") - .last() - .click({ force: true }); + cy.get(".border-2").last().click({ force: true }); cy.wait(500); - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2TailwindColor) .eq(23) .then(($elem) => { @@ -306,9 +275,7 @@ describe("App Theming funtionality", function() { // cy.contains("Border") // .click({ force: true }) // .wait(200); - cy.get(commonlocators.themeAppBorderRadiusBtn) - .eq(2) - .click({ force: true }); + cy.get(commonlocators.themeAppBorderRadiusBtn).eq(2).click({ force: true }); cy.get(`${commonlocators.themeAppBorderRadiusBtn}`) .eq(2) .invoke("css", "border-top-left-radius") @@ -328,9 +295,7 @@ describe("App Theming funtionality", function() { //#endregion //#region Change the shadow & verify widgets - cy.get(commonlocators.themeAppBoxShadowBtn) - .eq(3) - .click({ force: true }); + cy.get(commonlocators.themeAppBoxShadowBtn).eq(3).click({ force: true }); cy.get(commonlocators.themeAppBoxShadowBtn) .eq(3) .invoke("css", "box-shadow") @@ -385,9 +350,7 @@ describe("App Theming funtionality", function() { cy.get("input[placeholder='My theme']").type("testtheme"); cy.contains("Name must be unique"); - cy.get("input[placeholder='My theme']") - .clear() - .type("VioletYellowTheme"); + cy.get("input[placeholder='My theme']").clear().type("VioletYellowTheme"); //Click on save theme button cy.xpath("//span[text()='Save theme']/parent::a").click({ force: true }); @@ -781,9 +744,7 @@ describe("App Theming funtionality", function() { .closest("div") .should("have.css", "font-family", "Montserrat"); //Font - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(3000); + cy.get(publish.backToEditor).click({ force: true }).wait(3000); }); it("9. Verify Adding new Individual widgets & it can change Color, Border radius, Shadow & can revert [Color/Border Radius] to already selected theme", () => { @@ -792,9 +753,7 @@ describe("App Theming funtionality", function() { cy.assertPageSave(); cy.moveToStyleTab(); //Change Color & verify - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2TailwindColor) .eq(33) .then(($elem) => { @@ -914,9 +873,7 @@ describe("App Theming funtionality", function() { "none", ); - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(1000); + cy.get(publish.backToEditor).click({ force: true }).wait(1000); //Resetting back to theme ee.NavigateToSwitcher("explorer"); @@ -1020,15 +977,11 @@ describe("App Theming funtionality", function() { .closest("div") .should("have.css", "font-family", "Montserrat"); //Font - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(2000); + cy.get(publish.backToEditor).click({ force: true }).wait(2000); }); it("10. Verify Chainging theme should not affect Individual widgets with changed Color, Border radius, Shadow & can revert to newly selected theme", () => { - cy.get("canvas") - .first(0) - .trigger("click", { force: true }); + cy.get("canvas").first(0).trigger("click", { force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); @@ -1047,9 +1000,7 @@ describe("App Theming funtionality", function() { cy.moveToStyleTab(); //Change Color & verify - cy.get(widgetsPage.colorPickerV2Popover) - .click({ force: true }) - .click(); + cy.get(widgetsPage.colorPickerV2Popover).click({ force: true }).click(); cy.get(widgetsPage.colorPickerV2TailwindColor) .eq(13) .then(($elem) => { @@ -1074,9 +1025,7 @@ describe("App Theming funtionality", function() { //Change Border & verify - cy.get(".t--button-group-0\\.375rem") - .click() - .wait(500); + cy.get(".t--button-group-0\\.375rem").click().wait(500); cy.get(".t--button-group-0\\.375rem div") .eq(0) .invoke("css", "border-top-left-radius") @@ -1099,9 +1048,7 @@ describe("App Theming funtionality", function() { }); //Change Shadow & verify - cy.get(".t--button-group-0.1px") - .click() - .wait(500); + cy.get(".t--button-group-0.1px").click().wait(500); cy.get(".t--button-group-0.1px div") .invoke("css", "box-shadow") .then((boxshadow) => { @@ -1174,9 +1121,7 @@ describe("App Theming funtionality", function() { "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px", ); - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(1000); + cy.get(publish.backToEditor).click({ force: true }).wait(1000); //Resetting back to theme ee.NavigateToSwitcher("explorer"); @@ -1282,8 +1227,6 @@ describe("App Theming funtionality", function() { .closest("div") .should("have.css", "font-family", "Rubik"); //Font - cy.get(publish.backToEditor) - .click({ force: true }) - .wait(1000); + cy.get(publish.backToEditor).click({ force: true }).wait(1000); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/ThemeReset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/ThemeReset_spec.js index dc5a8f3eac..21ac2ad34f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/ThemeReset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/ThemeReset_spec.js @@ -5,8 +5,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; const appSettings = ObjectsRegistry.AppSettings; -describe("Theme validation usecases", function() { - it("Drag and drop button widget, change value and check reset flow", function() { +describe("Theme validation usecases", function () { + it("Drag and drop button widget, change value and check reset flow", function () { // drop button widget cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 300 }); @@ -16,10 +16,7 @@ describe("Theme validation usecases", function() { cy.openPropertyPane("buttonwidget"); cy.moveToStyleTab(); // change color to red - cy.get(widgetsPage.buttonColor) - .click({ force: true }) - .clear() - .type("red"); + cy.get(widgetsPage.buttonColor).click({ force: true }).clear().type("red"); // click on canvas to see the theming pane cy.get("#canvas-selection-0").click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_Default_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_Default_spec.js index 0e3fb0bb03..a35c352c51 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_Default_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_Default_spec.js @@ -10,15 +10,13 @@ const appSettings = ObjectsRegistry.AppSettings; let themeBackgroudColor; -describe("Theme validation for default data", function() { - it("Drag and drop form widget and validate Default color/font/shadow/border and list of font validation", function() { +describe("Theme validation for default data", function () { + it("Drag and drop form widget and validate Default color/font/shadow/border and list of font validation", function () { cy.log("Login Successful"); cy.reload(); // To remove the rename tooltip cy.get(explorer.addWidget).click(); cy.get(commonlocators.entityExplorersearch).should("be.visible"); - cy.get(commonlocators.entityExplorersearch) - .clear() - .type("form"); + cy.get(commonlocators.entityExplorersearch).clear().type("form"); cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 }); cy.wait("@updateLayout").should( "have.nested.property", @@ -70,7 +68,7 @@ describe("Theme validation for default data", function() { appSettings.ClosePane(); }); - it("Validate Default Theme change across application", function() { + it("Validate Default Theme change across application", function () { cy.get(formWidgetsPage.formD).click(); cy.widgetText( "FormTest", @@ -78,12 +76,8 @@ describe("Theme validation for default data", function() { widgetsPage.widgetNameSpan, ); cy.moveToStyleTab(); - cy.get(widgetsPage.backgroundcolorPickerNew) - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']") - .last() - .click(); + cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); cy.wait(2000); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") @@ -108,7 +102,7 @@ describe("Theme validation for default data", function() { }); }); - it("Publish the App and validate Default Theme across the app", function() { + it("Publish the App and validate Default Theme across the app", function () { cy.PublishtheApp(); cy.get(".bp3-button:contains('Submit')") .invoke("css", "background-color") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js index 4fe1b5452d..f736c78c2e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js @@ -11,15 +11,13 @@ const appSettings = ObjectsRegistry.AppSettings; let themeBackgroudColor; let themeFont; -describe("Theme validation usecases", function() { - it("1. Drag and drop form widget and validate Default font and list of font validation", function() { +describe("Theme validation usecases", function () { + it("1. Drag and drop form widget and validate Default font and list of font validation", function () { cy.log("Login Successful"); cy.reload(); // To remove the rename tooltip cy.get(explorer.addWidget).click(); cy.get(commonlocators.entityExplorersearch).should("be.visible"); - cy.get(commonlocators.entityExplorersearch) - .clear() - .type("form"); + cy.get(commonlocators.entityExplorersearch).clear().type("form"); cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 }); cy.wait("@updateLayout").should( "have.nested.property", @@ -38,9 +36,7 @@ describe("Theme validation usecases", function() { cy.borderMouseover(0, "none"); cy.borderMouseover(1, "M"); cy.borderMouseover(2, "L"); - cy.get(themelocator.border) - .eq(2) - .click({ force: true }); + cy.get(themelocator.border).eq(2).click({ force: true }); cy.wait("@updateTheme").should( "have.nested.property", "response.body.responseMeta.status", @@ -55,9 +51,7 @@ describe("Theme validation usecases", function() { cy.shadowMouseover(1, "S"); cy.shadowMouseover(2, "M"); cy.shadowMouseover(3, "L"); - cy.get(themelocator.shadow) - .eq(3) - .click({ force: true }); + cy.get(themelocator.shadow).eq(3).click({ force: true }); cy.wait("@updateTheme").should( "have.nested.property", "response.body.responseMeta.status", @@ -70,7 +64,7 @@ describe("Theme validation usecases", function() { cy.get("span[name='expand-more']").then(($elem) => { cy.get($elem).click({ force: true }); cy.wait(250); - cy.fixture("fontData").then(function(testdata) { + cy.fixture("fontData").then(function (testdata) { this.testdata = testdata; }); @@ -86,15 +80,9 @@ describe("Theme validation usecases", function() { cy.get(".t--draggable-buttonwidget button :contains('Sub')").should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); - themeFont = $childElem - .children() - .last() - .text(); + themeFont = $childElem.children().last().text(); }); }); cy.contains("Font").click({ force: true }); @@ -117,30 +105,22 @@ describe("Theme validation usecases", function() { cy.get(themelocator.inputColor).should("have.value", "red"); cy.wait(2000); - cy.get(themelocator.inputColor) - .eq(0) - .click({ force: true }); + cy.get(themelocator.inputColor).eq(0).click({ force: true }); cy.get(themelocator.inputColor).click({ force: true }); - cy.get('[data-testid="color-picker"]') - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']") - .last() - .click(); + cy.get('[data-testid="color-picker"]').first().click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); cy.wait(2000); cy.get(themelocator.inputColor).should("have.value", "#15803d"); cy.get(themelocator.inputColor).clear({ force: true }); cy.wait(2000); - cy.get(themelocator.inputColor) - .click() - .type("Black"); + cy.get(themelocator.inputColor).click().type("Black"); cy.get(themelocator.inputColor).should("have.value", "Black"); cy.wait(2000); cy.contains("Color").click({ force: true }); appSettings.ClosePane(); }); - it("2. Publish the App and validate Font across the app", function() { + it("2. Publish the App and validate Font across the app", function () { cy.PublishtheApp(); cy.get(".bp3-button:contains('Sub')").should( "have.css", @@ -164,7 +144,7 @@ describe("Theme validation usecases", function() { ); }); - it("3. Validate Default Theme change across application", function() { + it("3. Validate Default Theme change across application", function () { cy.goToEditFromPublish(); cy.get(formWidgetsPage.formD).click(); cy.widgetText( @@ -173,12 +153,8 @@ describe("Theme validation usecases", function() { widgetsPage.widgetNameSpan, ); cy.moveToStyleTab(); - cy.get(widgetsPage.backgroundcolorPickerNew) - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']") - .last() - .click(); + cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); cy.wait(2000); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") @@ -205,7 +181,7 @@ describe("Theme validation usecases", function() { }); }); - it("4. Publish the App and validate Default Theme across the app", function() { + it("4. Publish the App and validate Default Theme across the app", function () { cy.PublishtheApp(); /* Bug Form backgroud colour reset in Publish mode cy.get(formWidgetsPage.formD) @@ -225,7 +201,7 @@ describe("Theme validation usecases", function() { }); }); - it("5. Validate Theme change across application", function() { + it("5. Validate Theme change across application", function () { cy.goToEditFromPublish(); cy.get(formWidgetsPage.formD).click(); cy.widgetText( @@ -234,12 +210,8 @@ describe("Theme validation usecases", function() { widgetsPage.widgetNameSpan, ); cy.moveToStyleTab(); - cy.get(widgetsPage.backgroundcolorPickerNew) - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(21, 128, 61);']") - .last() - .click(); + cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); + cy.get("[style='background-color: rgb(21, 128, 61);']").last().click(); cy.wait(2000); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") @@ -252,9 +224,7 @@ describe("Theme validation usecases", function() { //Change the Theme cy.get(commonlocators.changeThemeBtn).click({ force: true }); // select a theme - cy.get(commonlocators.themeCard) - .last() - .click({ force: true }); + cy.get(commonlocators.themeCard).last().click({ force: true }); // check for alert cy.get(`${commonlocators.themeCard}`) @@ -306,19 +276,15 @@ describe("Theme validation usecases", function() { widgetsPage.widgetNameSpan, ); cy.moveToStyleTab(); - cy.get(widgetsPage.backgroundcolorPickerNew) - .first() - .click({ force: true }); - cy.get("[style='background-color: rgb(126, 34, 206);']") - .first() - .click(); + cy.get(widgetsPage.backgroundcolorPickerNew).first().click({ force: true }); + cy.get("[style='background-color: rgb(126, 34, 206);']").first().click(); cy.wait(2000); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") .and("eq", "rgb(126, 34, 206)"); }); - it("6. Publish the App and validate Theme across the app", function() { + it("6. Publish the App and validate Theme across the app", function () { cy.PublishtheApp(); //Bug Form backgroud colour reset in Publish mode cy.get(formWidgetsPage.formD) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js index 4e56d4bea8..8d24662d59 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js @@ -10,8 +10,8 @@ let propPane = ObjectsRegistry.PropertyPane, ee = ObjectsRegistry.EntityExplorer, appSettings = ObjectsRegistry.AppSettings; -describe("Theme validation usecase for multi-select widget", function() { - it("1. Drag and drop multi-select widget and validate Default font and list of font validation + Bug 15007", function() { +describe("Theme validation usecase for multi-select widget", function () { + it("1. Drag and drop multi-select widget and validate Default font and list of font validation + Bug 15007", function () { //cy.reload(); // To remove the rename tooltip ee.DragDropWidgetNVerify("multiselectwidgetv2", 300, 80); cy.get(themelocator.canvas).click({ force: true }); @@ -25,9 +25,7 @@ describe("Theme validation usecase for multi-select widget", function() { cy.borderMouseover(0, "none"); cy.borderMouseover(1, "M"); cy.borderMouseover(2, "L"); - cy.get(themelocator.border) - .eq(1) - .click({ force: true }); + cy.get(themelocator.border).eq(1).click({ force: true }); cy.wait("@updateTheme").should( "have.nested.property", "response.body.responseMeta.status", @@ -43,9 +41,7 @@ describe("Theme validation usecase for multi-select widget", function() { cy.shadowMouseover(1, "S"); cy.shadowMouseover(2, "M"); cy.shadowMouseover(3, "L"); - cy.get(themelocator.shadow) - .eq(3) - .click({ force: true }); + cy.get(themelocator.shadow).eq(3).click({ force: true }); cy.wait("@updateTheme").should( "have.nested.property", "response.body.responseMeta.status", @@ -58,7 +54,7 @@ describe("Theme validation usecase for multi-select widget", function() { cy.get("span[name='expand-more']").then(($elem) => { cy.get($elem).click({ force: true }); cy.wait(250); - cy.fixture("fontData").then(function(testdata) { + cy.fixture("fontData").then(function (testdata) { this.testdata = testdata; }); @@ -74,15 +70,9 @@ describe("Theme validation usecase for multi-select widget", function() { cy.get(".t--draggable-multiselectwidgetv2:contains('more')").should( "have.css", "font-family", - $childElem - .children() - .last() - .text(), + $childElem.children().last().text(), ); - themeFont = $childElem - .children() - .last() - .text(); + themeFont = $childElem.children().last().text(); }); }); cy.contains("Font").click({ force: true }); @@ -100,7 +90,7 @@ describe("Theme validation usecase for multi-select widget", function() { appSettings.ClosePane(); }); - it.skip("2. Publish the App and validate Font across the app + Bug 15007", function() { + it.skip("2. Publish the App and validate Font across the app + Bug 15007", function () { //Skipping due to mentioned bug cy.PublishtheApp(); cy.get(".rc-select-selection-item > .rc-select-selection-item-content") @@ -122,7 +112,7 @@ describe("Theme validation usecase for multi-select widget", function() { cy.goToEditFromPublish(); }); - it("3. Validate current theme feature", function() { + it("3. Validate current theme feature", function () { cy.get("#canvas-selection-0").click({ force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); @@ -145,7 +135,7 @@ describe("Theme validation usecase for multi-select widget", function() { }); }); - it("4. Publish the App and validate change of Theme across the app in publish mode", function() { + it("4. Publish the App and validate change of Theme across the app in publish mode", function () { cy.PublishtheApp(); cy.get(".rc-select-selection-item > .rc-select-selection-item-content") .first() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/AppPageLayout_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/AppPageLayout_spec.js index 8c09243f10..bc10d3805c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/AppPageLayout_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/AppPageLayout_spec.js @@ -11,9 +11,7 @@ describe("Visual regression tests", () => { cy.visit("/applications"); cy.wait(3000); cy.get(".t--applications-container .createnew").should("be.visible"); - cy.get(".t--applications-container .createnew") - .first() - .click(); + cy.get(".t--applications-container .createnew").first().click(); cy.wait(3000); // taking screenshot of app home page in edit mode cy.get("#root").matchImageSnapshot("apppage"); @@ -54,16 +52,10 @@ describe("Visual regression tests", () => { cy.wait(500); // validating all the fields on login page cy.xpath("//h1").should("have.text", "Sign in"); - cy.get(".bp3-label") - .first() - .should("have.text", "Email "); - cy.get(".bp3-label") - .last() - .should("have.text", "Password "); + cy.get(".bp3-label").first().should("have.text", "Email "); + cy.get(".bp3-label").last().should("have.text", "Password "); cy.xpath('//span[text()="sign in"]').should("be.visible"); - cy.get(".bp3-label") - .first() - .click(); + cy.get(".bp3-label").first().click(); cy.matchImageSnapshot("loginpage"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/JSEditorIndent_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/JSEditorIndent_spec.js index de222f8c38..c611d0d31d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/JSEditorIndent_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/JSEditorIndent_spec.js @@ -319,9 +319,7 @@ myFun2: async () => { agHelper.GetNClick("[name='expand-more']", 1, true, 100); cy.get("div.CodeMirror").matchImageSnapshot("jsObjBeforePrettify4"); - cy.get("div.CodeMirror") - .type("{shift+cmd+p}") - .wait(1000); + cy.get("div.CodeMirror").type("{shift+cmd+p}").wait(1000); cy.get("div.CodeMirror").matchImageSnapshot("jsObjAfterPrettify4"); // taking a snap after clicking inside the editor to make sure prettify has not reverted diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/AudioRecorder_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/AudioRecorder_spec.js index 0c7d06fc20..5b4162a8fa 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/AudioRecorder_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/AudioRecorder_spec.js @@ -19,16 +19,12 @@ describe("AudioRecorder Widget", () => { // Check if isDirty is false for the first time cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(`.t--widget-${widgetName} button`) - .first() - .click(); + cy.get(`.t--widget-${widgetName} button`).first().click(); cy.get(`.t--widget-${widgetName} .status`) .should("have.text", "Press to start recording") .should("exist"); // Start recording and recorder for 3 seconds - cy.get(`.t--widget-${widgetName} button`) - .first() - .click(); + cy.get(`.t--widget-${widgetName} button`).first().click(); cy.wait(3000); // Stop recording cy.get(`.t--widget-${widgetName} button span.bp3-icon-symbol-square`) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/audio_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/audio_spec.js index 124b19b1ba..df7e3131d5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/audio_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Audio/audio_spec.js @@ -3,12 +3,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/audioWidgetDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); -describe("Audio Widget Functionality", function() { +describe("Audio Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Audio Widget play functionality validation", function() { + it("Audio Widget play functionality validation", function () { cy.openPropertyPane("audiowidget"); cy.widgetText( "Audio1", @@ -26,7 +26,7 @@ describe("Audio Widget Functionality", function() { ); }); - it("Audio widget pause functionality validation", function() { + it("Audio widget pause functionality validation", function () { cy.get(commonlocators.onPause).click(); cy.selectShowMsg(); cy.addSuccessMessage("Pause success"); @@ -38,11 +38,9 @@ describe("Audio Widget Functionality", function() { ); }); - it("Update audio url and check play and pause functionality validation", function() { + it("Update audio url and check play and pause functionality validation", function () { cy.testCodeMirror(testdata.audioUrl); - cy.get(".CodeMirror textarea") - .first() - .blur(); + cy.get(".CodeMirror textarea").first().blur(); cy.get(widgetsPage.autoPlay).click({ force: true }); cy.wait("@updateLayout").should( "have.nested.property", @@ -57,7 +55,7 @@ describe("Audio Widget Functionality", function() { ); }); - it("Checks if audio widget is reset on button click", function() { + it("Checks if audio widget is reset on button click", function () { cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 300 }); cy.openPropertyPane("buttonwidget"); cy.widgetText( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js index 566a078274..b4db1aa33e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js @@ -1,6 +1,6 @@ const dsl = require("../../../../../fixtures/ButtonGroup_MenuButton_Width_dsl.json"); -describe("In a button group widget, menu button width", function() { +describe("In a button group widget, menu button width", function () { before(() => { cy.addDsl(dsl); }); @@ -88,9 +88,7 @@ describe("In a button group widget, menu button width", function() { const widgetId = "t5l24fccio"; cy.get(".t--property-pane-back-btn").click(); // Change the first button text - cy.get(".t--property-control-buttons input") - .first() - .type("increase width"); + cy.get(".t--property-control-buttons input").first().type("increase width"); cy.wait("@updateLayout").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_spec.js index ce45898c1d..f2c53755e6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_spec.js @@ -5,7 +5,7 @@ const firstButton = ".t--buttongroup-widget > div > button > div"; const menuButton = ".t--buttongroup-widget .bp3-popover2-target > div > button > div"; -describe("Button Group Widget Functionality", function() { +describe("Button Group Widget Functionality", function () { before(() => { // no dsl required }); @@ -15,23 +15,17 @@ describe("Button Group Widget Functionality", function() { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("buttongroupwidget", { x: 300, y: 300 }); cy.get(".t--buttongroup-widget").should("exist"); - cy.get(".t--buttongroup-widget") - .children() - .should("have.length", 3); + cy.get(".t--buttongroup-widget").children().should("have.length", 3); }); - it("ButtonGroup Widget Functionality on undo after delete", function() { + it("ButtonGroup Widget Functionality on undo after delete", function () { // Delete the first Button - cy.get(".t--property-control-buttons .t--delete-column-btn") - .eq(0) - .click({ - force: true, - }); + cy.get(".t--property-control-buttons .t--delete-column-btn").eq(0).click({ + force: true, + }); // Check if the Button got deleted - cy.get(".t--buttongroup-widget") - .children() - .should("have.length", 2); + cy.get(".t--buttongroup-widget").children().should("have.length", 2); // Check the first button cy.get(firstButton).contains("Add"); @@ -40,19 +34,15 @@ describe("Button Group Widget Functionality", function() { cy.get("body").type(`{${modifierKey}+z}`); // Check if the button is back - cy.get(".t--buttongroup-widget") - .children() - .should("have.length", 3); + cy.get(".t--buttongroup-widget").children().should("have.length", 3); // Check the first button cy.get(firstButton).contains("Favorite"); // Navigate to the first button property pane - cy.get(".t--property-control-buttons .t--edit-column-btn") - .eq(0) - .click({ - force: true, - }); + cy.get(".t--property-control-buttons .t--edit-column-btn").eq(0).click({ + force: true, + }); cy.wait(1000); // check the title cy.get(".t--property-pane-title").contains("Favorite"); @@ -60,7 +50,7 @@ describe("Button Group Widget Functionality", function() { cy.get(".t--property-pane-back-btn").click(); }); - it("Verify buttons alignments", function() { + it("Verify buttons alignments", function () { // check first button placement cy.editColumn("groupButton2"); cy.moveToStyleTab(); @@ -73,7 +63,7 @@ describe("Button Group Widget Functionality", function() { cy.get(menuButton).should("have.css", "justify-content", "center"); }); - it("Update Placement and Verify buttons alignments", function() { + it("Update Placement and Verify buttons alignments", function () { // check first button placement cy.selectDropdownValue( ".t--property-control-placement .bp3-popover-target", @@ -88,23 +78,19 @@ describe("Button Group Widget Functionality", function() { ".t--property-control-placement .bp3-popover-target", "Start", ); - cy.get(firstButton) - .last() - .should("have.css", "justify-content", "start"); + cy.get(firstButton).last().should("have.css", "justify-content", "start"); // other button style stay same cy.get(menuButton).should("have.css", "justify-content", "center"); }); - it("Update icon alignment and Verify buttons alignments", function() { + it("Update icon alignment and Verify buttons alignments", function () { // align right cy.get(".t--property-control-position .t--button-group-left") .first() .click(); cy.wait(200); // 1st btn - cy.get(firstButton) - .eq(1) - .should("have.css", "flex-direction", "row"); + cy.get(firstButton).eq(1).should("have.css", "flex-direction", "row"); // align left cy.get(".t--property-control-position .t--button-group-right") .last() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonLintErrorValidation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonLintErrorValidation_spec.js index efd12627be..5f50a823cb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonLintErrorValidation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonLintErrorValidation_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/buttonLintErrorDsl.json"); -describe("Linting warning validation with button widget", function() { +describe("Linting warning validation with button widget", function () { before(() => { cy.addDsl(dsl); }); - it("Linting Error validation on mouseover and errorlog tab", function() { + it("Linting Error validation on mouseover and errorlog tab", function () { cy.openPropertyPane("buttonwidget"); /** * @param{Text} Random Text @@ -19,12 +19,8 @@ describe("Linting warning validation with button widget", function() { .wait(500); //lint mark validation - cy.get(commonlocators.lintError) - .first() - .should("be.visible"); - cy.get(commonlocators.lintError) - .last() - .should("be.visible"); + cy.get(commonlocators.lintError).first().should("be.visible"); + cy.get(commonlocators.lintError).last().should("be.visible"); cy.get(commonlocators.lintError) .first() @@ -44,13 +40,9 @@ describe("Linting warning validation with button widget", function() { .should("be.visible") .contains("'lintError' is not defined."); - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); - cy.get(commonlocators.errorTab) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); cy.get(commonlocators.debugErrorMsg).should("have.length", 3); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_onClickAction_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_onClickAction_spec.js index 74cd0a59bf..6511a0bd10 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_onClickAction_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_onClickAction_spec.js @@ -5,7 +5,7 @@ const modalWidgetPage = require("../../../../../locators/ModalWidget.json"); const datasource = require("../../../../../locators/DatasourcesEditor.json"); import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Button Widget Functionality", function() { +describe("Button Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -14,7 +14,7 @@ describe("Button Widget Functionality", function() { cy.openPropertyPane("buttonwidget"); }); - it("1. Button-Modal Validation", function() { + it("1. Button-Modal Validation", function () { //creating the Modal and verify Modal name cy.createModal(this.data.ModalName); cy.PublishtheApp(); @@ -31,7 +31,7 @@ describe("Button Widget Functionality", function() { ); }); - it("2. Button-CallAnApi Validation", function() { + it("2. Button-CallAnApi Validation", function () { //creating an api and calling it from the onClickAction of the button widget. // Creating the api cy.NavigateToAPI_Panel(); @@ -69,7 +69,7 @@ describe("Button Widget Functionality", function() { cy.get(widgetsPage.apiCallToast).should("have.text", "Success"); }); - it("3. Button-Call-Query Validation", function() { + it("3. Button-Call-Query Validation", function () { //creating a query and calling it from the onClickAction of the button widget. // Creating a mock query // cy.CreateMockQuery("Query1"); @@ -117,7 +117,7 @@ describe("Button Widget Functionality", function() { cy.get(widgetsPage.apiCallToast).should("have.text", "Success"); }); - it("4. Toggle JS - Button-CallAnApi Validation", function() { + it("4. Toggle JS - Button-CallAnApi Validation", function () { //creating an api and calling it from the onClickAction of the button widget. // calling the existing api cy.get(widgetsPage.toggleOnClick).click({ force: true }); @@ -138,7 +138,7 @@ describe("Button Widget Functionality", function() { cy.get(widgetsPage.apiCallToast).should("have.text", "Success"); }); - it("5. Toggle JS - Button-Call-Query Validation", function() { + it("5. Toggle JS - Button-Call-Query Validation", function () { //creating a query and calling it from the onClickAction of the button widget. // Creating a mock query _.propPane.UpdatePropertyFieldValue( @@ -159,7 +159,7 @@ describe("Button Widget Functionality", function() { cy.get(widgetsPage.apiCallToast).should("have.text", "Success"); }); - it("6. Toggle JS - Button-Call-SetTimeout Validation", function() { + it("6. Toggle JS - Button-Call-SetTimeout Validation", function () { //creating a query and calling it from the onClickAction of the button widget. // Creating a mock query _.propPane.UpdatePropertyFieldValue( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_spec.js index f25869cb4d..0a17a79736 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_spec.js @@ -5,7 +5,7 @@ const publishPage = require("../../../../../locators/publishWidgetspage.json"); const iconAlignmentProperty = ".t--property-control-position"; -describe("Button Widget Functionality", function() { +describe("Button Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -22,20 +22,16 @@ describe("Button Widget Functionality", function() { force: true, }); - cy.get(".bp3-icon-add") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-add").first().click({ + force: true, + }); // Assert if the icon exists cy.get(`${widgetsPage.buttonWidget} .bp3-icon-add`).should("exist"); // Change icon alignment to right - cy.get(`${iconAlignmentProperty} .t--button-group-right`) - .last() - .click({ - force: true, - }); + cy.get(`${iconAlignmentProperty} .t--button-group-right`).last().click({ + force: true, + }); cy.wait(200); // Assert if the icon appears on the right hand side of the button text cy.get(widgetsPage.buttonWidget) @@ -49,11 +45,9 @@ describe("Button Widget Functionality", function() { cy.get(".t--property-control-selecticon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-airplane") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-airplane").first().click({ + force: true, + }); // Assert if the icon changes // Assert if the icon still exists on the right side of the text cy.get(`${widgetsPage.buttonWidget} .bp3-icon-airplane`) @@ -62,12 +56,12 @@ describe("Button Widget Functionality", function() { .should("have.text", "Submit"); }); - it("Button-Color Validation", function() { + it("Button-Color Validation", function () { // Change button color cy.changeButtonColor("rgb(255, 0, 0)"); }); - it("Button default variant validation", function() { + it("Button default variant validation", function () { // Checks whether the default variant is PRIMARY or not cy.get(widgetsPage.widgetBtn).should( "have.attr", @@ -76,7 +70,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Button-Name validation", function() { + it("Button-Name validation", function () { //changing the Button Name cy.widgetText( this.data.ButtonName, @@ -102,7 +96,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Button-Disable Validation", function() { + it("Button-Disable Validation", function () { //Check the disableed checkbox and Validate cy.CheckWidgetProperties(commonlocators.disableCheckbox); cy.validateDisableWidget( @@ -116,7 +110,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Button-Enable Validation", function() { + it("Button-Enable Validation", function () { //Uncheck the disabled checkbox and validate cy.UncheckWidgetProperties(commonlocators.disableCheckbox); cy.validateEnableWidget( @@ -130,7 +124,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Toggle JS - Button-Disable Validation", function() { + it("Toggle JS - Button-Disable Validation", function () { //Check the disabled checkbox by using JS widget and Validate cy.get(widgetsPage.toggleDisable).click({ force: true }); cy.testJsontext("disabled", "true"); @@ -145,7 +139,7 @@ describe("Button Widget Functionality", function() { ); }); - it("Toggle JS - Button-Enable Validation", function() { + it("Toggle JS - Button-Enable Validation", function () { //Uncheck the disabled checkbox and validate cy.testJsontext("disabled", "false"); cy.validateEnableWidget( @@ -159,21 +153,21 @@ describe("Button Widget Functionality", function() { ); }); - it("Button-Unckeck Visible field Validation", function() { + it("Button-Unckeck Visible field Validation", function () { //Uncheck the disabled checkbox and validate cy.UncheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.buttonWidget).should("not.exist"); }); - it("Button-Check Visible field Validation", function() { + it("Button-Check Visible field Validation", function () { //Check the disableed checkbox and Validate cy.CheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.buttonWidget).should("be.visible"); }); - it("Toggle JS - Button-Unckeck Visible field Validation", function() { + it("Toggle JS - Button-Unckeck Visible field Validation", function () { //Uncheck the disabled checkbox using JS and validate cy.get(widgetsPage.toggleVisible).click({ force: true }); cy.EnableAllCodeEditors(); @@ -182,7 +176,7 @@ describe("Button Widget Functionality", function() { cy.get(publishPage.buttonWidget).should("not.exist"); }); - it("Toggle JS - Button-Check Visible field Validation", function() { + it("Toggle JS - Button-Check Visible field Validation", function () { //Check the disabled checkbox using JS and Validate cy.EnableAllCodeEditors(); cy.testJsontext("visible", "true"); @@ -190,21 +184,21 @@ describe("Button Widget Functionality", function() { cy.get(publishPage.buttonWidget).should("be.visible"); }); - it("Button-Check recaptcha type can be selected", function() { + it("Button-Check recaptcha type can be selected", function () { cy.selectDropdownValue(commonlocators.recaptchaVersion, "reCAPTCHA v2"); cy.get(commonlocators.recaptchaVersion) .last() .should("have.text", "reCAPTCHA v2"); }); - it("Button-Copy Verification", function() { + it("Button-Copy Verification", function () { //Copy button and verify all properties cy.copyWidget("buttonwidget", widgetsPage.buttonWidget); // cy.PublishtheApp(); }); - it("Button-Delete Verification", function() { + it("Button-Delete Verification", function () { // Delete the button widget cy.deleteWidget(widgetsPage.buttonWidget); cy.PublishtheApp(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_tooltip_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_tooltip_spec.js index 368c1f8110..9f392d6cf0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_tooltip_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/Button_tooltip_spec.js @@ -3,12 +3,12 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Button Widget Functionality - Validate tooltip visibility", function() { +describe("Button Widget Functionality - Validate tooltip visibility", function () { before(() => { cy.addDsl(dsl); }); - it("Validate show/hide tooltip feature on normal button", function() { + it("Validate show/hide tooltip feature on normal button", function () { cy.openPropertyPane("buttonwidget"); // Add tooltip cy.testJsontext( @@ -32,7 +32,7 @@ describe("Button Widget Functionality - Validate tooltip visibility", function() .should("not.exist"); }); - it("Validate show/hide tooltip feature for a disabled button on deploy", function() { + it("Validate show/hide tooltip feature for a disabled button on deploy", function () { // Disable the button cy.get(".t--property-control-disabled .bp3-switch").click({ force: true }); cy.validateDisableWidget( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/ChartDataPoint_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/ChartDataPoint_Spec.ts index 8be1c6405d..4c0e97a18c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/ChartDataPoint_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/ChartDataPoint_Spec.ts @@ -1,48 +1,57 @@ -import { ObjectsRegistry } from "../../../../../support/Objects/Registry" +import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; let dataSet: any, dsl: any; let agHelper = ObjectsRegistry.AggregateHelper, - ee = ObjectsRegistry.EntityExplorer, - propPane = ObjectsRegistry.PropertyPane, - locator = ObjectsRegistry.CommonLocators, - deployMode = ObjectsRegistry.DeployMode; + ee = ObjectsRegistry.EntityExplorer, + propPane = ObjectsRegistry.PropertyPane, + locator = ObjectsRegistry.CommonLocators, + deployMode = ObjectsRegistry.DeployMode; describe("Input widget test with default value from chart datapoint", () => { - - //beforeEach - becasuse to enable re-attempt passing! - beforeEach(() => { - cy.fixture('ChartDsl').then((val: any) => { - agHelper.AddDsl(val) - dsl = val; - }); - cy.fixture("testdata").then(function (data: any) { - dataSet = data; - }); + //beforeEach - becasuse to enable re-attempt passing! + beforeEach(() => { + cy.fixture("ChartDsl").then((val: any) => { + agHelper.AddDsl(val); + dsl = val; }); - - it("1. Chart widget - Input widget test with default value from another Input widget", () => { - ee.SelectEntityByName("Input1", 'Widgets') - propPane.UpdatePropertyFieldValue("Default Value", dataSet.bindChartData + "}}"); - agHelper.ValidateNetworkStatus('@updateLayout') - ee.SelectEntityByName("Chart1") - propPane.SelectPropertiesDropDown("ondatapointclick", "Show message") - agHelper.EnterActionValue("Message", dataSet.bindingDataPoint) - ee.SelectEntityByName("Input2") - propPane.UpdatePropertyFieldValue("Default Value", dataSet.bindingSeriesTitle + "}}"); - deployMode.DeployApp() - agHelper.Sleep(1500)//waiting for chart to load! - agHelper.GetNClick("//*[local-name()='rect']", 13) - cy.get(locator._widgetInputSelector("inputwidgetv2")).first().invoke('val').then($value => { - let inputVal = ($value as string).replace(/\s/g, "")//removing space here - //cy.get(locator._toastMsg).invoke('text').then(toastTxt => expect(toastTxt.trim()).to.eq(inputVal)) - cy.get(locator._toastMsg).should('have.text', inputVal) - }) - cy.get(locator._widgetInputSelector("inputwidgetv2")).last().should("have.value", dsl.dsl.children[0].chartData[0].seriesName); + cy.fixture("testdata").then(function (data: any) { + dataSet = data; }); + }); - afterEach(() => { - //this is to enable re-attempt passing! - deployMode.NavigateBacktoEditor() - }) + it("1. Chart widget - Input widget test with default value from another Input widget", () => { + ee.SelectEntityByName("Input1", "Widgets"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.bindChartData + "}}", + ); + agHelper.ValidateNetworkStatus("@updateLayout"); + ee.SelectEntityByName("Chart1"); + propPane.SelectPropertiesDropDown("ondatapointclick", "Show message"); + agHelper.EnterActionValue("Message", dataSet.bindingDataPoint); + ee.SelectEntityByName("Input2"); + propPane.UpdatePropertyFieldValue( + "Default Value", + dataSet.bindingSeriesTitle + "}}", + ); + deployMode.DeployApp(); + agHelper.Sleep(1500); //waiting for chart to load! + agHelper.GetNClick("//*[local-name()='rect']", 13); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .first() + .invoke("val") + .then(($value) => { + let inputVal = ($value as string).replace(/\s/g, ""); //removing space here + //cy.get(locator._toastMsg).invoke('text').then(toastTxt => expect(toastTxt.trim()).to.eq(inputVal)) + cy.get(locator._toastMsg).should("have.text", inputVal); + }); + cy.get(locator._widgetInputSelector("inputwidgetv2")) + .last() + .should("have.value", dsl.dsl.children[0].chartData[0].seriesName); + }); -}); \ No newline at end of file + afterEach(() => { + //this is to enable re-attempt passing! + deployMode.NavigateBacktoEditor(); + }); +}); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_Widget_Loading_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_Widget_Loading_spec.js index 4ee2319d02..f4a7ab69e6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_Widget_Loading_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_Widget_Loading_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../../fixtures/ChartLoadingDsl.json"); const datasource = require("../../../../../locators/DatasourcesEditor.json"); const queryLocators = require("../../../../../locators/QueryEditor.json"); -describe("Chart Widget Skeleton Loading Functionality", function() { +describe("Chart Widget Skeleton Loading Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test case while reloading and on submission", function() { + it("1. Test case while reloading and on submission", function () { /** * Use case: * 1. Open Datasource editor @@ -47,9 +47,7 @@ describe("Chart Widget Skeleton Loading Functionality", function() { cy.get(queryLocators.queryNameField).type("Query1"); // switching off Use Prepared Statement toggle - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); //Step 6.1: Click on Write query area cy.get(queryLocators.templateMenu).click(); @@ -74,9 +72,7 @@ describe("Chart Widget Skeleton Loading Functionality", function() { cy.wait(1000); //Step9: - cy.get(".bp3-button-text") - .first() - .click({ force: true }); + cy.get(".bp3-button-text").first().click({ force: true }); //Step10: cy.get(".t--widget-chartwidget div[class*='bp3-skeleton']").should("exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js index 6bcb22e588..94d4bd720e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js @@ -5,7 +5,7 @@ const dsl = require("../../../../../fixtures/chartUpdatedDsl.json"); const modalWidgetPage = require("../../../../../locators/ModalWidget.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Chart Widget Functionality", function() { +describe("Chart Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -14,7 +14,7 @@ describe("Chart Widget Functionality", function() { cy.openPropertyPane("chartwidget"); }); - it("Fill the Chart Widget Properties.", function() { + it("Fill the Chart Widget Properties.", function () { //changing the Chart Name /** * @param{Text} Random Text @@ -66,7 +66,7 @@ describe("Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Pie Chart Widget Functionality", function() { + it("Pie Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Pie Chart"); @@ -84,7 +84,7 @@ describe("Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Line Chart Widget Functionality", function() { + it("Line Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Line Chart"); @@ -95,14 +95,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .last() .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Bar Chart Widget Functionality", function() { + it("Bar Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Bar Chart"); @@ -113,14 +111,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Area Chart Widget Functionality", function() { + it("Area Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Area Chart"); @@ -131,14 +127,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .last() .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Column Chart Widget Functionality", function() { + it("Column Chart Widget Functionality", function () { //changing the Chart type cy.UpdateChartType("Column Chart"); @@ -149,14 +143,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Toggle JS - Pie Chart Widget Functionality", function() { + it("Toggle JS - Pie Chart Widget Functionality", function () { //changing the Chart type cy.get(widgetsPage.toggleChartType).click({ force: true }); cy.testJsontext("charttype", "PIE_CHART"); @@ -175,7 +167,7 @@ describe("Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Toggle JS - Line Chart Widget Functionality", function() { + it("Toggle JS - Line Chart Widget Functionality", function () { //changing the Chart type cy.testJsontext("charttype", "LINE_CHART"); @@ -186,14 +178,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .last() .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Toggle JS - Bar Chart Widget Functionality", function() { + it("Toggle JS - Bar Chart Widget Functionality", function () { //changing the Chart type cy.testJsontext("charttype", "BAR_CHART"); @@ -204,14 +194,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Toggle JS - Area Chart Widget Functionality", function() { + it("Toggle JS - Area Chart Widget Functionality", function () { //changing the Chart type cy.testJsontext("charttype", "AREA_CHART"); @@ -222,14 +210,12 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .last() .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Toggle JS - Column Chart Widget Functionality", function() { + it("Toggle JS - Column Chart Widget Functionality", function () { //changing the Chart type cy.testJsontext("charttype", "COLUMN_CHART"); @@ -240,42 +226,37 @@ describe("Chart Widget Functionality", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("Chart - Modal", function() { + it("Chart - Modal", function () { //creating the Modal and verify Modal name cy.createModal(this.data.ModalName); cy.PublishtheApp(); - cy.get(widgetsPage.chartPlotGroup) - .children() - .first() - .click(); + cy.get(widgetsPage.chartPlotGroup).children().first().click(); cy.get(modalWidgetPage.modelTextField).should( "have.text", this.data.ModalName, ); }); - it("Chart-Unckeck Visible field Validation", function() { + it("Chart-Unckeck Visible field Validation", function () { // Making the widget invisible cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.chartWidget).should("not.exist"); }); - it("Chart-Check Visible field Validation", function() { + it("Chart-Check Visible field Validation", function () { // Making the widget visible cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.chartWidget).should("be.visible"); }); - it("Toggle JS - Chart-Unckeck Visible field Validation", function() { + it("Toggle JS - Chart-Unckeck Visible field Validation", function () { //Uncheck the disabled checkbox using JS and validate cy.get(widgetsPage.toggleVisible).click({ force: true }); cy.testJsontext("visible", "false"); @@ -283,28 +264,26 @@ describe("Chart Widget Functionality", function() { cy.get(publish.chartWidget).should("not.exist"); }); - it("Toggle JS - Chart-Check Visible field Validation", function() { + it("Toggle JS - Chart-Check Visible field Validation", function () { //Check the disabled checkbox using JS and Validate cy.testJsontext("visible", "true"); cy.PublishtheApp(); cy.get(publish.chartWidget).should("be.visible"); }); - it("Chart Widget Functionality To Uncheck Horizontal Scroll Visible", function() { + it("Chart Widget Functionality To Uncheck Horizontal Scroll Visible", function () { cy.togglebarDisable(commonlocators.allowScroll); cy.PublishtheApp(); cy.get(publish.horizontalTab).should("not.exist"); }); - it("Chart Widget Functionality To Check Horizontal Scroll Visible", function() { + it("Chart Widget Functionality To Check Horizontal Scroll Visible", function () { cy.togglebar(commonlocators.allowScroll); cy.PublishtheApp(); - cy.get(publish.horizontalTab) - .eq(1) - .should("exist"); + cy.get(publish.horizontalTab).eq(1).should("exist"); }); - it("Check Chart widget reskinning config", function() { + it("Check Chart widget reskinning config", function () { cy.get(widgetsPage.toggleChartType).click({ force: true }); cy.UpdateChartType("Column Chart"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_Data_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_Data_spec.js index faad199ccc..397dd72710 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_Data_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_Data_spec.js @@ -1,16 +1,16 @@ const dsl = require("../../../../../fixtures/chartCustomDataDsl.json"); -describe("Chart Widget Functionality around custom chart data", function() { +describe("Chart Widget Functionality around custom chart data", function () { before(() => { cy.addDsl(dsl); }); - it("1. change chart type to custom chart", function() { + it("1. change chart type to custom chart", function () { cy.openPropertyPane("chartwidget"); cy.UpdateChartType("Custom Chart"); }); - it("2. change chart value via input widget and validate", function() { + it("2. change chart value via input widget and validate", function () { const value1 = 40; enterAndTest("inputwidgetv2", value1, value1); cy.wait(400); @@ -28,9 +28,7 @@ describe("Chart Widget Functionality around custom chart data", function() { cy.get(`.t--widget-${widgetName} input`).clear(); cy.wait(300); if (text) { - cy.get(`.t--widget-${widgetName} input`) - .click() - .type(text); + cy.get(`.t--widget-${widgetName} input`).click().type(text); } cy.get(`.t--widget-${widgetName} input`).should("have.value", expected); } diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_spec.js index 898d50fd94..37c2e0d3eb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Custom_Chart_spec.js @@ -4,7 +4,7 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/chartUpdatedDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Chart Widget Functionality around custom chart feature", function() { +describe("Chart Widget Functionality around custom chart feature", function () { before(() => { cy.addDsl(dsl); }); @@ -13,7 +13,7 @@ describe("Chart Widget Functionality around custom chart feature", function() { cy.openPropertyPane("chartwidget"); }); - it("1. Fill the Chart Widget Properties.", function() { + it("1. Fill the Chart Widget Properties.", function () { //changing the Chart Name /** * @param{Text} Random Text @@ -65,7 +65,7 @@ describe("Chart Widget Functionality around custom chart feature", function() { cy.PublishtheApp(); }); - it("2. Custom Chart Widget Functionality", function() { + it("2. Custom Chart Widget Functionality", function () { //changing the Chart type //cy.get(widgetsPage.toggleChartType).click({ force: true }); cy.UpdateChartType("Custom Chart"); @@ -82,14 +82,12 @@ describe("Chart Widget Functionality around custom chart feature", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); cy.PublishtheApp(); }); - it("3. Toggle JS - Custom Chart Widget Functionality", function() { + it("3. Toggle JS - Custom Chart Widget Functionality", function () { cy.get(widgetsPage.toggleChartType).click({ force: true }); //changing the Chart type cy.testJsontext("charttype", "CUSTOM_FUSION_CHART"); @@ -108,23 +106,21 @@ describe("Chart Widget Functionality around custom chart feature", function() { cy.get(viewWidgetsPage.rectangleChart) .eq(k) .trigger("mousemove", { force: true }); - cy.get(viewWidgetsPage.Chartlabel) - .eq(k) - .should("have.text", labels[k]); + cy.get(viewWidgetsPage.Chartlabel).eq(k).should("have.text", labels[k]); }); //Close edit prop cy.PublishtheApp(false); }); - it("4. Chart-Copy Verification", function() { + it("4. Chart-Copy Verification", function () { //Copy Chart and verify all properties cy.wait(1000); cy.copyWidget("chartwidget", viewWidgetsPage.chartWidget); cy.PublishtheApp(); }); - it("5. Chart-Delete Verification", function() { + it("5. Chart-Delete Verification", function () { // Delete the Chart widget cy.deleteWidget(viewWidgetsPage.chartWidget); cy.PublishtheApp(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js index 6bf0da46ba..47d76beb0d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/snippetDsl.json"); -describe("Linting warning validation with Checkbox widget", function() { +describe("Linting warning validation with Checkbox widget", function () { before(() => { cy.addDsl(dsl); }); - it("Linting warning validation", function() { + it("Linting warning validation", function () { cy.openPropertyPane("checkboxwidget"); /** * @param{Text} Random Text @@ -19,12 +19,8 @@ describe("Linting warning validation with Checkbox widget", function() { .wait(500); //lint mark validation - cy.get(commonlocators.lintError) - .first() - .should("be.visible"); - cy.get(commonlocators.lintError) - .last() - .should("be.visible"); + cy.get(commonlocators.lintError).first().should("be.visible"); + cy.get(commonlocators.lintError).last().should("be.visible"); cy.get(commonlocators.lintError) .last() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js index 0c5ebc4d82..bd84ffed0e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/snippetErrordsl.json"); -describe("Linting warning validation with Checkbox widget", function() { +describe("Linting warning validation with Checkbox widget", function () { before(() => { cy.addDsl(dsl); }); - it("Linting warning validation", function() { + it("Linting warning validation", function () { cy.openPropertyPane("checkboxwidget"); /** * @param{Text} Random Text @@ -19,12 +19,8 @@ describe("Linting warning validation with Checkbox widget", function() { .wait(500); //lint mark validation - cy.get(commonlocators.lintError) - .first() - .should("be.visible"); - cy.get(commonlocators.lintError) - .last() - .should("be.visible"); + cy.get(commonlocators.lintError).first().should("be.visible"); + cy.get(commonlocators.lintError).last().should("be.visible"); cy.get(commonlocators.lintError) .last() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBox_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBox_spec.js index 4f3136a9af..0fe4617b39 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBox_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckBox_spec.js @@ -4,11 +4,11 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/newFormDsl.json"); -describe("Checkbox Widget Functionality", function() { +describe("Checkbox Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Checkbox Widget Functionality", function() { + it("Checkbox Widget Functionality", function () { cy.openPropertyPane("checkboxwidget"); /** * @param{Text} Random Text @@ -35,35 +35,35 @@ describe("Checkbox Widget Functionality", function() { cy.getAlert(commonlocators.optionchangetextCheckbox); cy.PublishtheApp(); }); - it("Checkbox Functionality To Check Label", function() { + it("Checkbox Functionality To Check Label", function () { cy.get(publish.checkboxWidget + " " + "label").should( "have.text", this.data.checkbocInputName, ); cy.get(publish.backToEditor).click(); }); - it("Checkbox Functionality To Check Disabled Widget", function() { + it("Checkbox Functionality To Check Disabled Widget", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebar(commonlocators.Disablejs + " " + "input"); cy.PublishtheApp(); cy.get(publish.checkboxWidget + " " + "input").should("be.disabled"); cy.get(publish.backToEditor).click(); }); - it("Checkbox Functionality To Check Enabled Widget", function() { + it("Checkbox Functionality To Check Enabled Widget", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebarDisable(commonlocators.Disablejs + " " + "input"); cy.PublishtheApp(); cy.get(publish.checkboxWidget + " " + "input").should("be.enabled"); cy.get(publish.backToEditor).click(); }); - it("Checkbox Functionality To Unchecked Visible Widget", function() { + it("Checkbox Functionality To Unchecked Visible Widget", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.checkboxWidget + " " + "input").should("not.exist"); cy.get(publish.backToEditor).click(); }); - it("Checkbox Functionality To Check Visible Widget", function() { + it("Checkbox Functionality To Check Visible Widget", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -71,22 +71,18 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("Check isDirty meta property", function() { + it("Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput(".t--property-control-text", `{{checker.isDirty}}`); // Check if initial value of isDirty is false cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(`${formWidgetsPage.checkboxWidget} label`) - .first() - .click(); + cy.get(`${formWidgetsPage.checkboxWidget} label`).first().click(); // Check if isDirty is set to true cy.get(".t--widget-textwidget").should("contain", "true"); // Change defaultCheckedState property cy.openPropertyPane("checkboxwidget"); - cy.get(".t--property-control-defaultstate label") - .last() - .click(); + cy.get(".t--property-control-defaultstate label").last().click(); // Check if isDirty is reset to false cy.get(".t--widget-textwidget").should("contain", "false"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup1_spec.js index 2af63e064c..0922c4764d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup1_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../../../fixtures/emptyDSL.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("checkboxgroupwidget Widget Functionality", function() { +describe("checkboxgroupwidget Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup2_spec.js index f9c525f128..2e93c5aa5d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup2_spec.js @@ -5,12 +5,12 @@ const explorer = require("../../../../../locators/explorerlocators.json"); const dsl = require("../../../../../fixtures/checkboxgroupDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Checkbox Group Widget Functionality", function() { +describe("Checkbox Group Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Checkbox Group Widget Functionality", function() { + it("1. Checkbox Group Widget Functionality", function () { cy.openPropertyPane("checkboxgroupwidget"); /** * @param{Text} Random Text @@ -39,17 +39,13 @@ describe("Checkbox Group Widget Functionality", function() { cy.radioInput(3, "2"); cy.get(formWidgetsPage.radioAddButton).click({ force: true }); cy.radioInput(4, this.data.radio4); - cy.get(formWidgetsPage.deleteradiovalue) - .eq(2) - .click({ force: true }); + cy.get(formWidgetsPage.deleteradiovalue).eq(2).click({ force: true }); cy.wait(200); cy.get(formWidgetsPage.labelCheckboxGroup).should( "not.have.value", "test4", ); - cy.get(formWidgetsPage.deleteradiovalue) - .eq(2) - .click({ force: true }); + cy.get(formWidgetsPage.deleteradiovalue).eq(2).click({ force: true }); cy.wait(200); /** * @param{Show Alert} Css for InputChange @@ -62,7 +58,7 @@ describe("Checkbox Group Widget Functionality", function() { cy.PublishtheApp(); }); - it("2. Checkbox Group Functionality To Unchecked Visible Widget", function() { + it("2. Checkbox Group Functionality To Unchecked Visible Widget", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("checkboxgroupwidget"); cy.togglebarDisable(commonlocators.visibleCheckbox); @@ -71,7 +67,7 @@ describe("Checkbox Group Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("3. Checkbox Group Functionality To Check Visible Widget", function() { + it("3. Checkbox Group Functionality To Check Visible Widget", function () { cy.openPropertyPane("checkboxgroupwidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -81,14 +77,14 @@ describe("Checkbox Group Widget Functionality", function() { .should("exist"); }); - it("4. Checkbox Group Functionality To Button Text", function() { + it("4. Checkbox Group Functionality To Button Text", function () { cy.get(publish.checkboxGroupWidget + " " + "label") .eq(2) .should("have.text", "test2"); cy.get(publish.backToEditor).click(); }); - it("handleSelectAllChange: unchecked", function() { + it("handleSelectAllChange: unchecked", function () { const selectAllSelector = formWidgetsPage.selectAllCheckboxControl; const uncheckedOptionInputs = `${formWidgetsPage.checkboxGroupOptionInputs} input:not(:checked)`; // Deselect all @@ -97,7 +93,7 @@ describe("Checkbox Group Widget Functionality", function() { cy.get(uncheckedOptionInputs).should("have.length", 2); }); - it("handleSelectAllChange: checked", function() { + it("handleSelectAllChange: checked", function () { const selectAllSelector = formWidgetsPage.selectAllCheckboxControl; const checkedOptionInputs = `${formWidgetsPage.checkboxGroupOptionInputs} input:checked`; // Select all @@ -106,7 +102,7 @@ describe("Checkbox Group Widget Functionality", function() { cy.get(checkedOptionInputs).should("have.length", 2); }); - it("Checkbox Group Functionality To alignment options", function() { + it("Checkbox Group Functionality To alignment options", function () { cy.openPropertyPane("checkboxgroupwidget"); cy.moveToStyleTab(); // check default value @@ -125,16 +121,14 @@ describe("Checkbox Group Widget Functionality", function() { force: true, }); cy.wait(200); - cy.get(".t--dropdown-option") - .contains("Start") - .click({ force: true }); + cy.get(".t--dropdown-option").contains("Start").click({ force: true }); cy.wait(400); cy.get( ".t--draggable-checkboxgroupwidget div[data-cy^='checkbox-group-container']", ).should("have.css", "justify-content", "flex-start"); }); - it("Check isDirty meta property", function() { + it("Check isDirty meta property", function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); cy.openPropertyPane("textwidget"); @@ -149,9 +143,7 @@ describe("Checkbox Group Widget Functionality", function() { // Check if isDirty is reset to false cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(formWidgetsPage.labelCheckboxGroup) - .first() - .click(); + cy.get(formWidgetsPage.labelCheckboxGroup).first().click(); // Check if isDirty is set to true cy.get(".t--widget-textwidget").should("contain", "true"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js index 56f02a90b1..e40c305e39 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js @@ -2,7 +2,7 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const explorer = require("../../../../../locators/explorerlocators.json"); import * as _ from "../../../../../support/Objects/ObjectsCore"; -describe("Checkbox Group Widget Functionality", function() { +describe("Checkbox Group Widget Functionality", function () { let dsName; before(() => { _.dataSources.CreateDataSource("Postgres"); @@ -11,7 +11,7 @@ describe("Checkbox Group Widget Functionality", function() { }); }); - it("1. Check checkbox group with dynamic query", function() { + it("1. Check checkbox group with dynamic query", function () { let query1 = `SELECT * FROM public."country" LIMIT 10;`; let query2 = `SELECT * FROM public."country" LIMIT 2;`; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Container_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Container_spec.js index b0012d4380..91065ec0b3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Container_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Container_spec.js @@ -3,12 +3,12 @@ const publish = require("../../../../locators/publishWidgetspage.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const dsl = require("../../../../fixtures/containerdsl.json"); -describe("Container Widget Functionality", function() { +describe("Container Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Container Widget Functionality", function() { + it("Container Widget Functionality", function () { cy.openPropertyPane("containerwidget"); /** * @param{Text} Random Text @@ -59,7 +59,7 @@ describe("Container Widget Functionality", function() { .should("be.visible"); cy.PublishtheApp(); }); - it("Container Widget Functionality To Verify The Colour", function() { + it("Container Widget Functionality To Verify The Colour", function () { cy.get(widgetsPage.containerD) .eq(0) .should("have.css", "background") @@ -69,7 +69,7 @@ describe("Container Widget Functionality", function() { ); }); - it("Test border width and verity", function() { + it("Test border width and verity", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("containerwidget"); cy.moveToStyleTab(); @@ -81,7 +81,7 @@ describe("Container Widget Functionality", function() { .and("eq", "10px"); }); - it("Test border radius and verity", function() { + it("Test border radius and verity", function () { // check if border radius is changed on button cy.get(`.t--property-control-borderradius button > div`) @@ -98,7 +98,7 @@ describe("Container Widget Functionality", function() { }); }); - it("Test Box shadow and verity", function() { + it("Test Box shadow and verity", function () { cy.get(`.t--property-control-boxshadow button > div`) .eq(0) .click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js index f86257875b..8b0e6802cb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js @@ -16,9 +16,7 @@ describe("Currency input widget - ", () => { .last() .click({ force: true }); // Click on the currency change option - cy.get(".t--input-currency-change") - .first() - .click(); + cy.get(".t--input-currency-change").first().click(); // Search with a typo cy.get(".t--search-input input").type("gdp"); cy.wait(500); @@ -27,9 +25,7 @@ describe("Currency input widget - ", () => { cy.PublishtheApp(); // Click on the currency change option - cy.get(".t--input-currency-change") - .first() - .click(); + cy.get(".t--input-currency-change").first().click(); // Search with a typo cy.get(".t--search-input input").type("gdp"); cy.wait(500); @@ -45,29 +41,21 @@ describe("Currency input widget - ", () => { "contain", "{{appsmith.store.test}}", ); - cy.get(".t--input-currency-change") - .first() - .click(); + cy.get(".t--input-currency-change").first().click(); cy.get(".t--search-input input").type("gbp"); cy.wait(500); - cy.get(".t--dropdown-option") - .last() - .click(); + cy.get(".t--dropdown-option").last().click(); cy.get(".t--property-control-currency .CodeMirror-code").should( "contain", "{{appsmith.store.test}}", ); cy.PublishtheApp(); cy.get(".bp3-button.select-button").click({ force: true }); - cy.get(".menu-item-text") - .first() - .click({ force: true }); + cy.get(".menu-item-text").first().click({ force: true }); cy.get(".t--widget-textwidget").should("contain", "USD:AS:USD"); cy.get(".t--input-currency-change").should("contain", "$"); cy.get(".bp3-button.select-button").click({ force: true }); - cy.get(".menu-item-text") - .last() - .click({ force: true }); + cy.get(".menu-item-text").last().click({ force: true }); cy.get(".t--widget-textwidget").should("contain", "INR:IN:INR"); cy.get(".t--input-currency-change").should("contain", "₹"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js index 80dac3fe6c..51398ca676 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js @@ -2,7 +2,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const widgetName = "currencyinputwidget"; -describe("Currency Widget showStepArrows Functionality - ", function() { +describe("Currency Widget showStepArrows Functionality - ", function () { it("1. Validate that For new currency input widgets being dragged, the value for showStepArrows should be set to false", () => { cy.dragAndDropToCanvas(widgetName, { x: 300, y: 400 }); cy.openPropertyPane(widgetName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_spec.js index 2c8c22a2a6..47bf39b98e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_spec.js @@ -81,14 +81,10 @@ describe("Currency widget - ", () => { cy.get(".t--property-control-allowcurrencychange label") .last() .click({ force: true }); - cy.get(".t--input-currency-change") - .first() - .click(); + cy.get(".t--input-currency-change").first().click(); cy.get(".t--search-input input").type("gbp"); cy.wait(500); - cy.get(".t--dropdown-option") - .last() - .click(); + cy.get(".t--dropdown-option").last().click(); enterAndTest("100.22", "100.22:100.22:true:string:number:GB:GBP"); cy.get(".t--input-currency-change").should("contain", "£"); }); @@ -253,7 +249,7 @@ describe("Currency widget - ", () => { }); }); - it("Check isDirty meta property", function() { + it("Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput( ".t--property-control-text", @@ -277,14 +273,14 @@ describe("Currency widget - ", () => { cy.get(".t--widget-textwidget").should("contain", "false"); }); - it("Should check that widget input is not showing any errors on input", function() { + it("Should check that widget input is not showing any errors on input", function () { cy.get(widgetInput).type("123456789"); cy.focused().then(() => { cy.get(themelocators.popover).should("not.exist"); }); }); - it("Currency change dropdown should not close unexpectedly", function() { + it("Currency change dropdown should not close unexpectedly", function () { cy.openPropertyPane(widgetName); // Select the Currency dropdown option from property pane diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker1_spec.js index fea937fee5..cf6c108279 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker1_spec.js @@ -1,12 +1,12 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const dsl = require("../../../../../fixtures/datePicker2dsl.json"); -describe("DatePicker Widget Property pane tests with js bindings", function() { +describe("DatePicker Widget Property pane tests with js bindings", function () { before(() => { cy.addDsl(dsl); }); - it("1. Datepicker default date validation with js binding and default date", function() { + it("1. Datepicker default date validation with js binding and default date", function () { cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-defaultdate .bp3-input").clear(); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); @@ -17,7 +17,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); }); - it("2. Datepicker default time picker validation by Time precision", function() { + it("2. Datepicker default time picker validation by Time precision", function () { // default value in property pane cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-timeprecision span[type='p1']").should( @@ -37,16 +37,13 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("3. Hide Time picker from Datepicker", function() { + it("3. Hide Time picker from Datepicker", function () { // default value in property pane cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-timeprecision .bp3-popover-target") .last() .click(); - cy.get(".t--dropdown-option") - .children() - .contains("None") - .click(); + cy.get(".t--dropdown-option").children().contains("None").click(); cy.wait("@updateLayout"); // default in date picker @@ -61,17 +58,14 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("4. set second field in time picker for Datepicker", function() { + it("4. set second field in time picker for Datepicker", function () { // default value in property pane cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-timeprecision .bp3-popover-target") .last() .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Second") - .click(); + cy.get(".t--dropdown-option").children().contains("Second").click(); cy.wait("@updateLayout"); // default in date picker @@ -86,7 +80,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("5. Text widgets binding with datepicker", function() { + it("5. Text widgets binding with datepicker", function () { cy.SearchEntityandOpen("Text1"); cy.EnableAllCodeEditors(); cy.testJsontext("text", "{{DatePicker1.formattedDate}}"); @@ -97,7 +91,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("6. Text widgets binding with datepicker", function() { + it("6. Text widgets binding with datepicker", function () { cy.openPropertyPane("datepickerwidget2"); cy.selectDateFormat("DD/MM/YYYY"); cy.assertDateFormat(); @@ -105,13 +99,11 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.assertDateFormat(); }); - it("7. Datepicker default date validation with js binding and default date with moment object", function() { + it("7. Datepicker default date validation with js binding and default date with moment object", function () { cy.openPropertyPane("datepickerwidget2"); //cy.testJsontext("defaultdate", ""); cy.clearPropertyValue(0); - cy.get(formWidgetsPage.toggleJsDefaultDate) - .click() - .wait(1000); //disable + cy.get(formWidgetsPage.toggleJsDefaultDate).click().wait(1000); //disable cy.get(formWidgetsPage.toggleJsDefaultDate).click(); //enable cy.EnableAllCodeEditors(); cy.testJsontext("defaultdate", `{{moment("1/1/2012")}}`); @@ -121,7 +113,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); }); - it("8. Datepicker clear date, validation with js binding and default date with moment object", function() { + it("8. Datepicker clear date, validation with js binding and default date with moment object", function () { // clear data and check datepicker textbox is clear cy.clearPropertyValue(0); cy.get(".t--widget-datepickerwidget2 .bp3-input").should( @@ -137,7 +129,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); }); - it("9. Datepicker default date validation with js binding", function() { + it("9. Datepicker default date validation with js binding", function () { cy.PublishtheApp(); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(10000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker2_spec.js index 628a8c57e8..b9f4924089 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker2_spec.js @@ -5,7 +5,7 @@ const publishPage = require("../../../../../locators/publishWidgetspage.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const dayjs = require("dayjs"); -describe("DatePicker Widget Functionality", function() { +describe("DatePicker Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -14,7 +14,7 @@ describe("DatePicker Widget Functionality", function() { cy.openPropertyPane("datepickerwidget"); }); - it("DatePicker-Date Name validation", function() { + it("DatePicker-Date Name validation", function () { // changing the date to today cy.get(formWidgetsPage.defaultDate).click(); cy.SetDateToToday(); @@ -35,9 +35,7 @@ describe("DatePicker Widget Functionality", function() { * @param2 --> user date formate */ cy.setDate(1, "ddd MMM DD YYYY"); - const nextDay = dayjs() - .add(1, "days") - .format("DD/MM/YYYY"); + const nextDay = dayjs().add(1, "days").format("DD/MM/YYYY"); cy.log(nextDay); cy.get(formWidgetsPage.datepickerWidget + " .bp3-input").should( "contain.value", @@ -51,10 +49,8 @@ describe("DatePicker Widget Functionality", function() { ); }); - it("Datepicker-Clear date validation", function() { - const today = dayjs() - .add(0, "days") - .format("DD/MM/YYYY"); + it("Datepicker-Clear date validation", function () { + const today = dayjs().add(0, "days").format("DD/MM/YYYY"); cy.get(formWidgetsPage.defaultDate).click(); cy.ClearDate(); cy.PublishtheApp(); @@ -145,21 +141,21 @@ describe("DatePicker Widget Functionality", function() { // ); // }); - it("DatePicker-check Visible field validation", function() { + it("DatePicker-check Visible field validation", function () { // Check the visible checkbox cy.UncheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.datepickerWidget).should("not.exist"); }); - it("DatePicker-uncheck Visible field validation", function() { + it("DatePicker-uncheck Visible field validation", function () { // Check the visible checkbox cy.CheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.datepickerWidget).should("be.visible"); }); - it("DatePicker-Disable field validation", function() { + it("DatePicker-Disable field validation", function () { //Check the Disabled checkbox cy.CheckWidgetProperties(commonlocators.disableCheckbox); cy.validateDisableWidget( @@ -173,7 +169,7 @@ describe("DatePicker Widget Functionality", function() { ); }); - it("DatePicker-Enable field validation", function() { + it("DatePicker-Enable field validation", function () { //UnCheck the Disabled checkbox cy.UncheckWidgetProperties(commonlocators.disableCheckbox); cy.validateEnableWidget( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2Updated_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2Updated_spec.js index a62f029cf9..053f00de3f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2Updated_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2Updated_spec.js @@ -4,7 +4,7 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper; -describe("DatePicker Widget Property pane tests with js bindings", function() { +describe("DatePicker Widget Property pane tests with js bindings", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -31,9 +31,7 @@ describe("DatePicker Widget required property test", () => { cy.openPropertyPane("datepickerwidget2"); cy.wait(1000); //set the required condition to true in the property pane - cy.get(".t--property-control-required label") - .last() - .click({ force: true }); + cy.get(".t--property-control-required label").last().click({ force: true }); //preview changes cy.PublishtheApp(); cy.wait(1000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2_spec.js index e43f104242..0939f80a56 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePickerV2_spec.js @@ -8,7 +8,7 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper; -describe("DatePicker Widget Property pane tests with js bindings", function() { +describe("DatePicker Widget Property pane tests with js bindings", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -21,7 +21,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.addDsl(dsl); }); - it("1. Datepicker default date validation with js binding", function() { + it("1. Datepicker default date validation with js binding", function () { cy.wait(7000); cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-defaultdate .bp3-input").clear(); @@ -47,7 +47,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { */ }); - it("2. Text widgets binding with datepicker", function() { + it("2. Text widgets binding with datepicker", function () { cy.openPropertyPane("textwidget"); cy.testJsontext("text", "{{DatePicker1.formattedDate}}"); cy.closePropertyPane(); @@ -57,7 +57,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("3. Text widgets binding with datepicker", function() { + it("3. Text widgets binding with datepicker", function () { cy.openPropertyPane("datepickerwidget2"); cy.selectDateFormat("YYYY-MM-DD"); cy.assertDateFormat(); @@ -72,7 +72,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.assertDateFormat(); }); - it("4. Datepicker default date validation message", function() { + it("4. Datepicker default date validation message", function () { cy.openPropertyPane("datepickerwidget2"); cy.testJsontext("defaultdate", "24-12-2021"); cy.evaluateErrorMessage("Value does not match: ISO 8601 date string"); @@ -109,7 +109,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); }); - it("6. Datepicker default date validation with strings", function() { + it("6. Datepicker default date validation with strings", function () { cy.addDsl(datedsl); cy.openPropertyPane("datepickerwidget2"); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); @@ -124,7 +124,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.closePropertyPane(); }); - it("7. Datepicker input value changes to work with selected date formats", function() { + it("7. Datepicker input value changes to work with selected date formats", function () { cy.openPropertyPane("datepickerwidget2"); cy.get(".t--property-control-mindate .bp3-input") .clear() @@ -155,7 +155,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { .should("contain.text", "May 4, 2021 6:25 AM"); }); - it("8. Check isDirty meta property", function() { + it("8. Check isDirty meta property", function () { cy.addDsl(datedsl); cy.openPropertyPane("textwidget"); cy.updateCodeInput(".t--property-control-text", `{{DatePicker1.isDirty}}`); @@ -171,9 +171,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { ); cy.closePropertyPane(); // Check if initial value of isDirty is false - cy.get(".t--widget-textwidget") - .first() - .should("contain", "false"); + cy.get(".t--widget-textwidget").first().should("contain", "false"); // Interact with UI cy.get(".t--draggable-datepickerwidget2 .bp3-input") .clear({ @@ -182,9 +180,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { .type("04/05/2021 06:25"); cy.wait("@updateLayout"); // Check if isDirty is set to true - cy.get(".t--widget-textwidget") - .first() - .should("contain", "true"); + cy.get(".t--widget-textwidget").first().should("contain", "true"); // Change defaultDate cy.openPropertyPane("datepickerwidget2"); cy.testJsontext("defaultdate", ""); @@ -196,12 +192,10 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { '{{moment("07/05/2021 05:25", "DD/MM/YYYY HH:mm").toISOString()}}', ); // Check if isDirty is reset to false - cy.get(".t--widget-textwidget") - .first() - .should("contain", "false"); + cy.get(".t--widget-textwidget").first().should("contain", "false"); }); - it("9. Datepicker default date validation with js binding", function() { + it("9. Datepicker default date validation with js binding", function () { cy.PublishtheApp(); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(10000); @@ -209,7 +203,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { }); }); -describe("DatePicker Widget Property tests onFocus and onBlur", function() { +describe("DatePicker Widget Property tests onFocus and onBlur", function () { it("onBlur and onFocus should be triggered from the datePicker widget", () => { cy.Createpage("New Page"); cy.dragAndDropToCanvas("datepickerwidget2", { x: 300, y: 600 }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_Toggle_js_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_Toggle_js_spec.js index 9fcfc1176f..5cfdd24163 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_Toggle_js_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_Toggle_js_spec.js @@ -2,7 +2,7 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const dsl = require("../../../../../fixtures/newFormDsl.json"); const publishPage = require("../../../../../locators/publishWidgetspage.json"); -describe("DatePicker Widget Property pane tests with js bindings", function() { +describe("DatePicker Widget Property pane tests with js bindings", function () { before(() => { cy.addDsl(dsl); }); @@ -11,7 +11,7 @@ describe("DatePicker Widget Property pane tests with js bindings", function() { cy.openPropertyPane("datepickerwidget"); }); - it("Datepicker default date validation with js binding", function() { + it("Datepicker default date validation with js binding", function () { cy.get(".t--property-control-defaultdate .bp3-input").clear(); cy.get(formWidgetsPage.toggleJsDefaultDate).click(); cy.testJsontext( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_With_Switch_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_With_Switch_spec.js index 9d510578b1..139c8b4674 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_With_Switch_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Datepicker/DatePicker_With_Switch_spec.js @@ -4,11 +4,11 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/datepicker_switchDsl.json"); const dayjs = require("dayjs"); -describe("Switch Widget within Form widget Functionality", function() { +describe("Switch Widget within Form widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Switch Widget Functionality check with success message", function() { + it("Switch Widget Functionality check with success message", function () { cy.openPropertyPane("switchwidget"); cy.widgetText( "Toggler", @@ -22,7 +22,7 @@ describe("Switch Widget within Form widget Functionality", function() { cy.closePropertyPane(); }); - it("Date Widget with Reset widget being switch widget", function() { + it("Date Widget with Reset widget being switch widget", function () { cy.SearchEntityandOpen("DatePicker1"); cy.get(formWidgetsPage.defaultDate).click(); cy.SetDateToToday(); @@ -37,10 +37,7 @@ describe("Switch Widget within Form widget Functionality", function() { .contains("Reset widget") .click(); cy.get(widgetsPage.selectWidget).click({ force: true }); - cy.get(commonlocators.chooseAction) - .children() - .contains("Toggler") - .click(); + cy.get(commonlocators.chooseAction).children().contains("Toggler").click(); cy.closePropertyPane(); cy.get(widgetsPage.switchWidget).click(); cy.get(widgetsPage.toastMsg) @@ -54,7 +51,7 @@ describe("Switch Widget within Form widget Functionality", function() { cy.get(widgetsPage.switchWidgetInactive).should("be.visible"); }); - it("DatePicker-Date change and validate switch widget status", function() { + it("DatePicker-Date change and validate switch widget status", function () { cy.get(widgetsPage.datepickerInput).click({ force: true }); cy.SetDateToToday(); cy.get(widgetsPage.switchWidgetActive).should("be.visible"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Disabled_Widgets_drag_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Disabled_Widgets_drag_validation_spec.js index b99ccf714f..c947eaf888 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Disabled_Widgets_drag_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Disabled_Widgets_drag_validation_spec.js @@ -1,20 +1,18 @@ const dsl = require("../../../../fixtures/disabledWidgetsDsl.json"); const explorer = require("../../../../locators/explorerlocators.json"); -describe("Disabled Widgets drag Functionality", function() { +describe("Disabled Widgets drag Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Should be able to drag disabled button", function() { + it("Should be able to drag disabled button", function () { const selector = ".t--draggable-buttonwidget button"; cy.wait(1000); cy.get(selector).then((button) => { cy.wrap(button[0].getBoundingClientRect()).as("initialPosition"); }); - cy.get(selector) - .realHover() - .trigger("dragstart", { force: true }); + cy.get(selector).realHover().trigger("dragstart", { force: true }); cy.get(explorer.dropHere) .trigger("mousemove", 200, 300, { eventConstructor: "MouseEvent" }) .trigger("mouseup", 200, 300, { eventConstructor: "MouseEvent" }); @@ -29,15 +27,13 @@ describe("Disabled Widgets drag Functionality", function() { ); }); - it("Should be able to drag disabled menu button", function() { + it("Should be able to drag disabled menu button", function () { const selector = ".t--draggable-menubuttonwidget button"; cy.wait(1000); cy.get(selector).then((button) => { cy.wrap(button[0].getBoundingClientRect()).as("initialPosition"); }); - cy.get(selector) - .realHover() - .trigger("dragstart", { force: true }); + cy.get(selector).realHover().trigger("dragstart", { force: true }); cy.get(explorer.dropHere) .trigger("mousemove", 600, 300, { eventConstructor: "MouseEvent" }) .trigger("mouseup", 600, 300, { eventConstructor: "MouseEvent" }); @@ -52,15 +48,13 @@ describe("Disabled Widgets drag Functionality", function() { ); }); - it("Should be able to drag disabled icon button", function() { + it("Should be able to drag disabled icon button", function () { const selector = ".t--draggable-iconbuttonwidget button"; cy.wait(1000); cy.get(selector).then((button) => { cy.wrap(button[0].getBoundingClientRect()).as("initialPosition"); }); - cy.get(selector) - .realHover() - .trigger("dragstart", { force: true }); + cy.get(selector).realHover().trigger("dragstart", { force: true }); cy.get(explorer.dropHere) .trigger("mousemove", 200, 200, { eventConstructor: "MouseEvent" }) .trigger("mouseup", 200, 200, { eventConstructor: "MouseEvent" }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/DocumentViewer/DocumentViewer_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/DocumentViewer/DocumentViewer_spec.ts index cddd7a81bd..1e70104675 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/DocumentViewer/DocumentViewer_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/DocumentViewer/DocumentViewer_spec.ts @@ -1,5 +1,8 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; -import { encodedWordDoc, encodedXlsxDoc } from "../../../../../fixtures/exampleEncodedDocs"; +import { + encodedWordDoc, + encodedXlsxDoc, +} from "../../../../../fixtures/exampleEncodedDocs"; const ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, deployMode = ObjectsRegistry.DeployMode, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/DropDownWidget_value_reset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/DropDownWidget_value_reset_spec.js index 7a902269f2..6d809bd98c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/DropDownWidget_value_reset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/DropDownWidget_value_reset_spec.js @@ -1,18 +1,16 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/dropDownWidget_reset_check_dsl.json"); -describe("Dropdown Widget Check value does not reset on navigation", function() { +describe("Dropdown Widget Check value does not reset on navigation", function () { before(() => { cy.addDsl(dsl); }); - it("check if the dropdown value does not change on navigation", function() { + it("check if the dropdown value does not change on navigation", function () { //Change the value of drop down; cy.wait(4000); //settling time for dsl into layout - cy.get(commonlocators.selectButton) - .last() - .click(); + cy.get(commonlocators.selectButton).last().click(); cy.selectWidgetOnClickOption("Red"); cy.wait(200); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_onOptionChange_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_onOptionChange_spec.js index d8c0f5f131..82ab57a99b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_onOptionChange_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_onOptionChange_spec.js @@ -6,13 +6,13 @@ const dsl = require("../../../../../fixtures/newFormDsl.json"); const data = require("../../../../../fixtures/example.json"); const datasource = require("../../../../../locators/DatasourcesEditor.json"); -describe("Dropdown Widget Functionality", function() { +describe("Dropdown Widget Functionality", function () { before(() => { cy.addDsl(dsl); cy.wait(3000); }); - it("1. Dropdown-Modal Validation", function() { + it("1. Dropdown-Modal Validation", function () { cy.CheckAndUnfoldWidgets(); cy.SearchEntityandOpen("Dropdown1"); cy.EnableAllCodeEditors(); @@ -34,7 +34,7 @@ describe("Dropdown Widget Functionality", function() { // ); }); - it("2. Dropdown-Call-Api Validation", function() { + it("2. Dropdown-Call-Api Validation", function () { //creating an api and calling it from the onOptionChangeAction of the Dropdown widget. // Creating the api cy.NavigateToAPI_Panel(); @@ -68,7 +68,7 @@ describe("Dropdown Widget Functionality", function() { cy.get(formWidgetsPage.apiCallToast).should("have.text", "Success"); }); - it("3. Dropdown-Call-Query Validation", function() { + it("3. Dropdown-Call-Query Validation", function () { //creating a query and calling it from the onOptionChangeAction of the Dropdown widget. // Creating a mock query // cy.CreateMockQuery("Query1"); @@ -120,7 +120,7 @@ describe("Dropdown Widget Functionality", function() { cy.get(formWidgetsPage.apiCallToast).should("have.text", "Success"); }); - it("4. Toggle JS - Dropdown-Call-Query Validation", function() { + it("4. Toggle JS - Dropdown-Call-Query Validation", function () { //creating an api and calling it from the onOptionChangeAction of the button widget. // calling the existing api cy.SearchEntityandOpen("Dropdown1"); @@ -142,7 +142,7 @@ describe("Dropdown Widget Functionality", function() { cy.get(formWidgetsPage.apiCallToast).should("have.text", "Success"); }); - it("5. Toggle JS - Dropdown-CallAnApi Validation", function() { + it("5. Toggle JS - Dropdown-CallAnApi Validation", function () { //creating an api and calling it from the onOptionChangeAction of the button widget. // calling the existing api cy.SearchEntityandOpen("Dropdown1"); @@ -164,16 +164,14 @@ describe("Dropdown Widget Functionality", function() { cy.openPropertyPane("selectwidget"); // Click on onOptionChange JS button cy.get(formWidgetsPage.toggleOnOptionChange).click({ force: true }); - cy.get(commonlocators.dropdownSelectButton) - .eq(0) - .click(); + cy.get(commonlocators.dropdownSelectButton).eq(0).click(); cy.get(commonlocators.chooseAction) .children() .contains("No action") .click(); }); - it("6. Dropdown Widget Functionality to Verify On Option Change Action", function() { + it("6. Dropdown Widget Functionality to Verify On Option Change Action", function () { // Open property pane cy.SearchEntityandOpen("Dropdown1"); // Dropdown On Option Change diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_spec.js index b2ad330911..4d40130539 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Dropdown/Dropdown_spec.js @@ -4,7 +4,7 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Dropdown Widget Functionality", function() { +describe("Dropdown Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -140,7 +140,7 @@ describe("Dropdown Widget Functionality", function() { ).should("exist"); }); - it("Dropdown Functionality To Check disabled Widget", function() { + it("Dropdown Functionality To Check disabled Widget", function () { cy.openPropertyPane("selectwidget"); // Disable the visible JS cy.togglebarDisable(commonlocators.visibleCheckbox); @@ -150,7 +150,7 @@ describe("Dropdown Widget Functionality", function() { cy.goToEditFromPublish(); }); - it("Dropdown Functionality To UnCheck disabled Widget", function() { + it("Dropdown Functionality To UnCheck disabled Widget", function () { cy.openPropertyPane("selectwidget"); // Check the visible JS cy.togglebar(commonlocators.visibleCheckbox); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker2_spec.js index 4e665f5bff..a7e2b9969a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker2_spec.js @@ -3,7 +3,7 @@ const dsl = require("../../../../../fixtures/newFormDsl.json"); import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("FilePicker Widget Functionality", function() { +describe("FilePicker Widget Functionality", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -13,7 +13,7 @@ describe("FilePicker Widget Functionality", function() { cy.addDsl(dsl); }); - it("1. Create API to be used in Filepicker", function() { + it("1. Create API to be used in Filepicker", function () { cy.log("Login Successful"); cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); @@ -26,7 +26,7 @@ describe("FilePicker Widget Functionality", function() { cy.SaveAndRunAPI(); }); - it("2. FilePicker Widget Functionality", function() { + it("2. FilePicker Widget Functionality", function () { cy.SearchEntityandOpen("FilePicker1"); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); @@ -34,14 +34,12 @@ describe("FilePicker Widget Functionality", function() { cy.testCodeMirror("Upload Files"); }); - it("3. It checks the loading state of filepicker on call the action", function() { + it("3. It checks the loading state of filepicker on call the action", function () { cy.SearchEntityandOpen("FilePicker1"); const fixturePath = "testFile.mov"; cy.addAPIFromLightningMenu("FirstAPI"); cy.get(commonlocators.filePickerButton).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile(fixturePath); + cy.get(commonlocators.filePickerInput).first().attachFile(fixturePath); cy.get(commonlocators.filePickerUploadButton).click(); cy.get(".bp3-spinner").should("have.length", 1); //eslint-disable-next-line cypress/no-unnecessary-waiting @@ -49,11 +47,9 @@ describe("FilePicker Widget Functionality", function() { cy.get("button").contains("1 files selected"); }); - it("4. It checks the deletion of filepicker works as expected", function() { + it("4. It checks the deletion of filepicker works as expected", function () { cy.get(commonlocators.filePickerButton).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile.mov"); cy.get(commonlocators.filePickerUploadButton).click(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); @@ -63,9 +59,7 @@ describe("FilePicker Widget Functionality", function() { cy.wait(200); cy.get("button.uppy-Dashboard-Item-action--remove").click(); cy.get("button.uppy-Dashboard-browse").click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile2.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile2.mov"); cy.get(commonlocators.filePickerUploadButton).click(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_CSV_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_CSV_spec.js index 308e443729..7991415e7a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_CSV_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_CSV_spec.js @@ -27,9 +27,7 @@ describe("File picker widget v2", () => { cy.get( `.t--property-control-dataformat ${commonlocators.helperText}`, ).contains(ARRAY_CSV_HELPER_TEXT); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("Test_csv.csv"); + cy.get(commonlocators.filePickerInput).first().attachFile("Test_csv.csv"); cy.wait(3000); cy.readTableV2dataPublish("1", "1").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js index b4294bbd8f..a23c17b8bc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_Reskinning_spec.js @@ -6,7 +6,7 @@ const dsl = require("../../../../../fixtures/filePickerV2WidgetReskinDsl.json"); const appSettings = ObjectsRegistry.AppSettings; -describe("Checkbox Widget Functionality", function() { +describe("Checkbox Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -17,9 +17,7 @@ describe("Checkbox Widget Functionality", function() { appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); - cy.get(commonlocators.themeAppBorderRadiusBtn) - .last() - .click(); + cy.get(commonlocators.themeAppBorderRadiusBtn).last().click(); appSettings.ClosePane(); cy.get(commonlocators.filepickerv2).click(); @@ -40,9 +38,7 @@ describe("Checkbox Widget Functionality", function() { // Check the border radius of close button top right cy.get(".uppy-Dashboard-close").should("have.css", "border-radius", "24px"); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile.mov"); cy.get(".uppy-StatusBar-actionBtn--upload").should( "have.css", "border-radius", @@ -63,9 +59,7 @@ describe("Checkbox Widget Functionality", function() { cy.get(commonlocators.canvas).click({ force: true }); appSettings.OpenAppSettings(); appSettings.GoToThemeSettings(); - cy.get(commonlocators.themeAppBorderRadiusBtn) - .eq(1) - .click(); + cy.get(commonlocators.themeAppBorderRadiusBtn).eq(1).click(); appSettings.ClosePane(); cy.get(commonlocators.filepickerv2).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js index fa82cdd7e9..312facdfd4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_Widget_reset_spec.js @@ -3,7 +3,7 @@ const dsl = require("../../../../../fixtures/filePickerV2_reset_check_dsl.json") const Layoutpage = require("../../../../../locators/Layout.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("File Picker Widget V2 Functionality", function() { +describe("File Picker Widget V2 Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -11,23 +11,17 @@ describe("File Picker Widget V2 Functionality", function() { it("Check if the uploaded data does not reset when tab switch in the TabsWidget", () => { cy.get(widgetsPage.filepickerwidgetv2).should("contain", "Select Files"); cy.get(widgetsPage.filepickerwidgetv2).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile.mov"); cy.get(commonlocators.filePickerUploadButton).click(); cy.get(widgetsPage.filepickerwidgetv2).should( "contain", "1 files selected", ); - cy.get(Layoutpage.tabWidget) - .contains("Tab 2") - .click({ force: true }); + cy.get(Layoutpage.tabWidget).contains("Tab 2").click({ force: true }); cy.get(Layoutpage.tabWidget) .contains("Tab 2") .should("have.class", "is-selected"); - cy.get(Layoutpage.tabWidget) - .contains("Tab 1") - .click({ force: true }); + cy.get(Layoutpage.tabWidget).contains("Tab 1").click({ force: true }); cy.get(Layoutpage.tabWidget) .contains("Tab 1") .should("have.class", "is-selected"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_spec.js index e878feea8a..324f1f0b6e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePickerV2_spec.js @@ -17,14 +17,12 @@ describe("File picker widget v2", () => { cy.updateCodeInput(".t--property-control-text", `{{FilePicker1.isDirty}}`); }); - it("2. Check isDirty meta property", function() { + it("2. Check isDirty meta property", function () { // Check if initial value of isDirty is false cy.get(".t--widget-textwidget").should("contain", "false"); // Upload a new file cy.get(widgetsPage.filepickerwidgetv2).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile.mov"); cy.get(commonlocators.filePickerUploadButton).click(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); @@ -47,9 +45,7 @@ describe("File picker widget v2", () => { cy.wait(1000); cy.validateEvaluatedValue("testFile.mov"); - cy.get(".t--more-action-menu") - .first() - .click({ force: true }); + cy.get(".t--more-action-menu").first().click({ force: true }); // Go back to widgets page cy.get(explorer.widgetSwitchId).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js index 8bf42be8db..dad20dd5dc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker_with_fileTypes_spec.js @@ -1,18 +1,16 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/filepickerDsl.json"); -describe("FilePicker Widget Functionality with different file types", function() { +describe("FilePicker Widget Functionality with different file types", function () { before(() => { cy.addDsl(dsl); }); - it("Check file upload of type jpeg", function() { + it("Check file upload of type jpeg", function () { cy.SearchEntityandOpen("FilePicker1"); const fixturePath = "AAAFlowerVase.jpeg"; cy.get(commonlocators.filepickerv2).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile(fixturePath); + cy.get(commonlocators.filePickerInput).first().attachFile(fixturePath); cy.get(commonlocators.filePickerUploadButton).click(); cy.get(commonlocators.dashboardItemName).contains("AAAFlowerVase.jpeg"); //eslint-disable-next-line cypress/no-unnecessary-waiting @@ -20,7 +18,7 @@ describe("FilePicker Widget Functionality with different file types", function() cy.get("button").contains("Upload 1 file"); }); - it("Replace an existing file type with another file type", function() { + it("Replace an existing file type with another file type", function () { cy.get(commonlocators.filepickerv2).click(); cy.get("button.uppy-Dashboard-Item-action--remove").click(); cy.get("button.uppy-Dashboard-browse").should("be.visible"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/Filepicker1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/Filepicker1_spec.js index 96da7cafbf..32e9ed837f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/Filepicker1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/Filepicker1_spec.js @@ -1,11 +1,9 @@ const explorer = require("../../../../../locators/explorerlocators.json"); -describe("FilePicker Widget Functionality", function() { +describe("FilePicker Widget Functionality", function () { before(() => { cy.visit("/applications"); - cy.get(".t--new-button") - .first() - .click(); + cy.get(".t--new-button").first().click(); cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("filepickerwidgetv2", { x: 200, y: 600 }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormData_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormData_spec.js index 8537a0a905..0dea703cb9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormData_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormData_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../../fixtures/formDataDsl.json"); -describe("Form data", function() { +describe("Form data", function () { before(() => { cy.addDsl(dsl); }); - it("CheckboxGroupWidget, MultiSelectTreeWidget, MultiSelectWidgetV2, SelectWidget, SingleSelectTreeWidget, SwitchGroupWidget, PhoneInputWidget, InputWidgetV2 and CurrencyInputWidget should have value props of which values are not null or undefined to be included as a form data", function() { + it("CheckboxGroupWidget, MultiSelectTreeWidget, MultiSelectWidgetV2, SelectWidget, SingleSelectTreeWidget, SwitchGroupWidget, PhoneInputWidget, InputWidgetV2 and CurrencyInputWidget should have value props of which values are not null or undefined to be included as a form data", function () { cy.wait("@updateLayout").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormReset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormReset_spec.js index 9aa0124fdc..5ed40d2bab 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormReset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormReset_spec.js @@ -1,17 +1,14 @@ const dsl = require("../../../../../fixtures/formResetDsl.json"); import widgets from "../../../../../locators/Widgets.json"; -describe("Form reset functionality", function() { +describe("Form reset functionality", function () { before(() => { cy.addDsl(dsl); }); it("Resets the form", () => { // Select a row and verify - cy.get(".tr") - .eq(2) - .click() - .should("have.class", "selected-row"); + cy.get(".tr").eq(2).click().should("have.class", "selected-row"); cy.wait(2000); cy.get(".rc-select-selection-overflow").click({ force: true }); cy.dropdownMultiSelectDynamic("Option 1"); @@ -27,9 +24,7 @@ describe("Form reset functionality", function() { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); // verify table should not have selected row - cy.get(".tr") - .eq(2) - .should("not.have.class", "selected-row"); + cy.get(".tr").eq(2).should("not.have.class", "selected-row"); // Verify dropdown does not have selected values cy.get(`${widgets.selectWidget} .bp3-tag-input-values .bp3-tag`).should( ($span) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Nested_HasChanges_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Nested_HasChanges_spec.js index 740884bba8..03fb7df4a5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Nested_HasChanges_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Nested_HasChanges_spec.js @@ -9,9 +9,7 @@ describe("Form Widget", () => { // Check if isDirty is false for the first time cy.contains(".t--widget-textwidget", "false").should("exist"); // Interact with UI - cy.get(`.t--widget-checkboxwidget label`) - .first() - .click(); + cy.get(`.t--widget-checkboxwidget label`).first().click(); // Check if isDirty is set to true cy.contains(".t--widget-textwidget", "false").should("not.exist"); cy.contains(".t--widget-textwidget", "true").should("exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Select_TreeSelect_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Select_TreeSelect_spec.js index 664b179d84..db30e6954a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Select_TreeSelect_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_Select_TreeSelect_spec.js @@ -2,20 +2,16 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/formSelectTreeselectDsl.json"); const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); -describe("Form Widget Functionality", function() { +describe("Form Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Validate Select and TreeSelect Widget", function() { + it("Validate Select and TreeSelect Widget", function () { cy.get(widgetsPage.formButtonWidget) .contains("Submit") .should("have.attr", "disabled"); - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); - cy.get(formWidgetsPage.treeSelectFilterInput) - .click() - .type("Blue"); + cy.get(formWidgetsPage.treeSelectInput).last().click({ force: true }); + cy.get(formWidgetsPage.treeSelectFilterInput).click().type("Blue"); cy.treeSelectDropdown("Blue"); cy.get(formWidgetsPage.dropdownWidget) @@ -24,9 +20,7 @@ describe("Form Widget Functionality", function() { force: true, }); cy.wait(2000); - cy.get(".select-popover-wrapper") - .contains("Blue") - .click({ force: true }); + cy.get(".select-popover-wrapper").contains("Blue").click({ force: true }); cy.wait(2000); cy.get(widgetsPage.formButtonWidget) .contains("Submit") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_Input_Number.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_Input_Number.js index 42dad29205..22b65111b6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_Input_Number.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_Input_Number.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/formWidgetWithInputValCheckDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Form Widget with Input Functionality", function() { +describe("Form Widget with Input Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Check if the default value of text input is 0", function() { + it("Check if the default value of text input is 0", function () { //Check if the Input widget is visible cy.get(widgetsPage.inputWidget).should("be.visible"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_RichTextEditor_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_RichTextEditor_spec.js index 44d1b88ca1..8cdc43798f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_RichTextEditor_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_With_RichTextEditor_spec.js @@ -3,7 +3,7 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const dsl = require("../../../../../fixtures/formWithRTEDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("RichTextEditor Widget Functionality in Form", function() { +describe("RichTextEditor Widget Functionality in Form", function () { before(() => { cy.addDsl(dsl); }); @@ -13,7 +13,7 @@ describe("RichTextEditor Widget Functionality in Form", function() { cy.openPropertyPane("richtexteditorwidget"); }); - it("RichTextEditor required functionality", function() { + it("RichTextEditor required functionality", function () { //changing the Text Name cy.widgetText( this.data.RichTextEditorName, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_spec.js index 824c215fb2..f1f0823fe3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWidget_spec.js @@ -5,11 +5,11 @@ const dsl = require("../../../../../fixtures/formdsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("Form Widget Functionality", function() { +describe("Form Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Default Form text, Reset and Close button Validation", function() { + it("Default Form text, Reset and Close button Validation", function () { cy.get(widgetsPage.textWidget).should("be.visible"); cy.get(widgetsPage.formButtonWidget) .contains("Submit") @@ -20,7 +20,7 @@ describe("Form Widget Functionality", function() { .scrollIntoView() .should("be.visible"); }); - it("Add Multiple widgets in Form", function() { + it("Add Multiple widgets in Form", function () { cy.get(explorer.addWidget).click(); cy.get(commonlocators.entityExplorersearch).should("be.visible"); cy.dragAndDropToWidget("multiselectwidgetv2", "formwidget", { @@ -34,7 +34,7 @@ describe("Form Widget Functionality", function() { cy.get(widgetsPage.inputWidget).should("be.visible"); cy.PublishtheApp(); }); - it("Form_Widget Minimize and maximize General Validation", function() { + it("Form_Widget Minimize and maximize General Validation", function () { cy.openPropertyPane("formwidget"); cy.get(commonlocators.generalChevran).click({ force: true }); cy.get(commonlocators.generalSection).should("not.be.visible"); @@ -42,7 +42,7 @@ describe("Form Widget Functionality", function() { cy.get(commonlocators.generalSection).should("be.visible"); cy.PublishtheApp(); }); - it("Rename Form widget from Entity Explorer", function() { + it("Rename Form widget from Entity Explorer", function () { cy.GlobalSearchEntity("Form1"); cy.RenameEntity("Form"); cy.wait(1000); @@ -86,13 +86,13 @@ describe("Form Widget Functionality", function() { // cy.get(commonlocators.editPropCrossButton).click({ force: true }); //}); - it("Form Widget Functionality To Verify The Colour", function() { + it("Form Widget Functionality To Verify The Colour", function () { cy.PublishtheApp(); cy.get(formWidgetsPage.formD) .should("have.css", "background-color") .and("eq", "rgb(128, 128, 128)"); }); - it("Form Widget Functionality To Unchecked Visible Widget", function() { + it("Form Widget Functionality To Unchecked Visible Widget", function () { cy.openPropertyPane("formwidget"); // Uncheck the visble JS cy.togglebarDisable(commonlocators.visibleCheckbox); @@ -101,7 +101,7 @@ describe("Form Widget Functionality", function() { cy.get(publish.formWidget).should("not.exist"); cy.get(publish.backToEditor).click(); }); - it("Form Widget Functionality To Check Visible Widget", function() { + it("Form Widget Functionality To Check Visible Widget", function () { // Open property pone cy.openPropertyPane("formwidget"); // Check the visible JS @@ -111,7 +111,7 @@ describe("Form Widget Functionality", function() { cy.get(publish.formWidget).should("be.visible"); cy.get(publish.backToEditor).click(); }); - it("Toggle JS - Form-Unckeck Visible field Validation", function() { + it("Toggle JS - Form-Unckeck Visible field Validation", function () { cy.openPropertyPane("formwidget"); //Uncheck the disabled checkbox using JS and validate cy.get(widgetsPage.toggleVisible).click({ force: true }); @@ -121,14 +121,14 @@ describe("Form Widget Functionality", function() { cy.get(publish.formWidget).should("not.exist"); }); - it("Toggle JS - Form-Check Visible field Validation", function() { + it("Toggle JS - Form-Check Visible field Validation", function () { cy.openPropertyPane("formwidget"); //Check the disabled checkbox using JS and Validate cy.testJsontext("visible", "true"); cy.PublishtheApp(); cy.get(publish.formWidget).should("be.visible"); }); - it("Form-Copy Verification", function() { + it("Form-Copy Verification", function () { cy.openPropertyPane("formwidget"); const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; //Copy Form and verify all properties diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWithSwitch_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWithSwitch_spec.js index bb8022aab4..d325241675 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWithSwitch_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/FormWithSwitch_spec.js @@ -3,11 +3,11 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/formSwitchDsl.json"); -describe("Switch Widget within Form widget Functionality", function() { +describe("Switch Widget within Form widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Switch Widget Functionality check with success message", function() { + it("Switch Widget Functionality check with success message", function () { //Open switch widget cy.openPropertyPane("switchwidget"); // Change name of switch widget @@ -27,7 +27,7 @@ describe("Switch Widget within Form widget Functionality", function() { cy.closePropertyPane(); }); - it("Form reset button valdiation with switch widget", function() { + it("Form reset button valdiation with switch widget", function () { // Open form button cy.SearchEntityandOpen("FormButton2"); // Click on reset widget action @@ -38,10 +38,7 @@ describe("Switch Widget within Form widget Functionality", function() { .click(); // click on toggler from actions cy.get(widgetsPage.selectWidget).click({ force: true }); - cy.get(commonlocators.chooseAction) - .children() - .contains("Toggler") - .click(); + cy.get(commonlocators.chooseAction).children().contains("Toggler").click(); cy.closePropertyPane(); // Uncheck the switch cy.get(widgetsPage.switchWidget).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/Form_With_CheckBox_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/Form_With_CheckBox_spec.js index 71bb6fb6d8..3f6ceb45af 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/Form_With_CheckBox_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Form/Form_With_CheckBox_spec.js @@ -3,12 +3,12 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/formWidgetdsl.json"); -describe("Checkbox Widget Functionality", function() { +describe("Checkbox Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Checkbox Functionality To Check required toggle for form", function() { + it("1. Checkbox Functionality To Check required toggle for form", function () { cy.openPropertyPane("checkboxwidget"); cy.togglebar(commonlocators.requiredjs + " " + "input"); cy.PublishtheApp(); @@ -27,7 +27,7 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("2. Checkbox Functionality To swap label alignment of checkbox", function() { + it("2. Checkbox Functionality To swap label alignment of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.get(publish.checkboxWidget + " " + ".t--checkbox-widget-label").should( "have.css", @@ -54,16 +54,14 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("3. Checkbox Functionality To swap label position of checkbox", function() { + it("3. Checkbox Functionality To swap label position of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.get(publish.checkboxWidget + " " + ".bp3-align-right").should( "not.exist", ); cy.get(publish.checkboxWidget + " " + ".bp3-align-left").should("exist"); - cy.get(commonlocators.optionposition) - .last() - .click({ force: true }); + cy.get(commonlocators.optionposition).last().click({ force: true }); cy.wait(200); cy.get(".t--button-group-Left").click({ force: true }); cy.wait(200); @@ -77,7 +75,7 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("4. Checkbox Functionality To change label color of checkbox", function() { + it("4. Checkbox Functionality To change label color of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.moveToStyleTab(); cy.get(".t--property-control-fontcolor .bp3-input").type("red"); @@ -91,12 +89,10 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("5. Checkbox Functionality To change label size of checkbox", function() { + it("5. Checkbox Functionality To change label size of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.moveToStyleTab(); - cy.get(widgetsPage.textSizeNew) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSizeNew).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.selectTxtSize("XL"); @@ -109,7 +105,7 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("6. Checkbox Functionality To change label style of checkbox", function() { + it("6. Checkbox Functionality To change label style of checkbox", function () { cy.openPropertyPane("checkboxwidget"); cy.moveToStyleTab(); cy.get(".t--property-control-emphasis .t--button-group-BOLD").click({ diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_onSrcDocChange_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_onSrcDocChange_spec.js index 19fc750743..f2d305f81b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_onSrcDocChange_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_onSrcDocChange_spec.js @@ -4,20 +4,20 @@ const homePage = ObjectsRegistry.HomePage; const agHelper = ObjectsRegistry.AggregateHelper; const page1 = "Page1"; -describe("Iframe Widget functionality", function() { - before(function() { +describe("Iframe Widget functionality", function () { + before(function () { agHelper.ClearLocalStorageCache(); }); - beforeEach(function() { + beforeEach(function () { agHelper.RestoreLocalStorageCache(); }); - afterEach(function() { + afterEach(function () { agHelper.SaveLocalStorageCache(); }); - it("1.Import application json", function() { + it("1.Import application json", function () { cy.visit("/applications"); homePage.ImportApp("IframeOnSrcDocChange.json"); cy.wait("@importNewApplication").then((interception) => { @@ -37,20 +37,12 @@ describe("Iframe Widget functionality", function() { it("2.Check the OnSrcDocChange event call on first render", () => { cy.reload(); cy.wait(2000); - cy.get(`.t--entity .page`) - .first() - .should("have.class", "activePage"); + cy.get(`.t--entity .page`).first().should("have.class", "activePage"); cy.openPropertyPane("iframewidget"); cy.testJsontext("srcdoc", "

Hello World!

"); cy.wait(2000); - cy.get(`.t--entity .page`) - .last() - .should("have.class", "activePage"); - cy.get(`.t--entity-name:contains(${page1})`) - .first() - .click(); - cy.get(`.t--entity .page`) - .first() - .should("have.class", "activePage"); + cy.get(`.t--entity .page`).last().should("have.class", "activePage"); + cy.get(`.t--entity-name:contains(${page1})`).first().click(); + cy.get(`.t--entity .page`).first().should("have.class", "activePage"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_spec.js index 8422433aeb..9142a9b9a8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Iframe/Iframe_spec.js @@ -1,6 +1,6 @@ const dsl = require("../../../../../fixtures/IframeDsl.json"); -describe("Iframe Widget functionality", function() { +describe("Iframe Widget functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -22,10 +22,7 @@ describe("Iframe Widget functionality", function() { it("Tests Iframe post message props correctly exposed or not", () => { cy.wait(3000); - getIframeBody() - .find("button") - .should("have.text", "Click me") - .click(); + getIframeBody().find("button").should("have.text", "Click me").click(); cy.wait(1000); cy.get(".t--draggable-textwidget .bp3-ui-text span").should( "contain.text", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_base64_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_base64_spec.js index 2c5a4139f4..8ab2478d0e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_base64_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_base64_spec.js @@ -1,12 +1,12 @@ const viewWidgetsPage = require("../../../../../locators/ViewWidgets.json"); const dsl = require("../../../../../fixtures/base64imagedsl.json"); -describe("Image Widget Functionality with base64", function() { +describe("Image Widget Functionality with base64", function () { before(() => { cy.addDsl(dsl); }); - it("Image Widget Functionality Base64 validation", function() { + it("Image Widget Functionality Base64 validation", function () { cy.openPropertyPane("imagewidget"); /** * Test for Base64 encoded image diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_spec.js index 33adf0eefb..a2ee5df7d1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_spec.js @@ -4,12 +4,12 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/displayWidgetDsl.json"); -describe("Image Widget Functionality", function() { +describe("Image Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Image Widget Functionality", function() { + it("Image Widget Functionality", function () { cy.openPropertyPane("imagewidget"); /** * @param{Text} Random Text @@ -34,7 +34,7 @@ describe("Image Widget Functionality", function() { cy.closePropertyPane(); }); - it("No Zoom functionality check", function() { + it("No Zoom functionality check", function () { cy.openPropertyPane("imagewidget"); //Zoom validation cy.changeZoomLevel("1x (No Zoom)"); @@ -45,13 +45,13 @@ describe("Image Widget Functionality", function() { cy.PublishtheApp(); }); - it("Image Widget Functionality To Validate Image", function() { + it("Image Widget Functionality To Validate Image", function () { cy.get(publish.imageWidget + " " + "img") .invoke("attr", "src") .should("contain", this.data.NewImage); }); - it("Image Widget Functionality To Unchecked Visible Widget", function() { + it("Image Widget Functionality To Unchecked Visible Widget", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("imagewidget"); cy.togglebarDisable(commonlocators.visibleCheckbox); @@ -60,7 +60,7 @@ describe("Image Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("Image Widget Functionality To Check Visible Widget", function() { + it("Image Widget Functionality To Check Visible Widget", function () { cy.openPropertyPane("imagewidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -68,7 +68,7 @@ describe("Image Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("Image Widget Functionality To check download option and validate image link", function() { + it("Image Widget Functionality To check download option and validate image link", function () { cy.openPropertyPane("imagewidget"); cy.togglebar(".t--property-control-enabledownload input[type='checkbox']"); cy.get(publish.imageWidget).trigger("mouseover"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_validation_spec.js index a120613cf0..0005a74cc6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_validation_spec.js @@ -1,12 +1,12 @@ const viewWidgetsPage = require("../../../../../locators/ViewWidgets.json"); const dsl = require("../../../../../fixtures/displayWidgetDsl.json"); -describe("Image Widget Validation Image Urls", function() { +describe("Image Widget Validation Image Urls", function () { before(() => { cy.addDsl(dsl); }); - it("1. Check default image src", function() { + it("1. Check default image src", function () { cy.openPropertyPane("imagewidget"); cy.get(viewWidgetsPage.imageinner) .invoke("attr", "src") @@ -16,7 +16,7 @@ describe("Image Widget Validation Image Urls", function() { ); }); - it("2. Add new image and check image is showing instead of default image", function() { + it("2. Add new image and check image is showing instead of default image", function () { cy.testCodeMirror(this.data.NewImage); cy.get(viewWidgetsPage.imageinner) .invoke("attr", "src") @@ -24,7 +24,7 @@ describe("Image Widget Validation Image Urls", function() { cy.closePropertyPane(); }); - it("3. Remove both images and check empty screen", function() { + it("3. Remove both images and check empty screen", function () { cy.openPropertyPane("imagewidget"); cy.get(".t--property-control-image").then(($el) => @@ -47,7 +47,7 @@ describe("Image Widget Validation Image Urls", function() { cy.closePropertyPane(); }); - it("4. Add new image and check image src", function() { + it("4. Add new image and check image src", function () { cy.openPropertyPane("imagewidget"); cy.clearPropertyValue(0); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_MaxChar_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_MaxChar_spec.js index 175fa58ea1..205e5972d7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_MaxChar_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_MaxChar_spec.js @@ -5,7 +5,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Input Widget Max Char Functionality", function() { +describe("Input Widget Max Char Functionality", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -30,9 +30,7 @@ describe("Input Widget Max Char Functionality", function() { cy.testJsontext("defaultvalue", ""); cy.closePropertyPane("inputwidgetv2"); - cy.get(widgetsPage.innertext) - .click({ force: true }) - .type("1234567"); + cy.get(widgetsPage.innertext).click({ force: true }).type("1234567"); cy.openPropertyPane("inputwidgetv2"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_Multiline_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_Multiline_spec.js index df88fe0a01..7b513d8230 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_Multiline_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_Multiline_spec.js @@ -6,7 +6,7 @@ import { } from "../../../../../locators/WidgetLocators"; const homePage = require("../../../../../locators/HomePage"); -describe("Input Widget Multiline feature", function() { +describe("Input Widget Multiline feature", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; it("1. Single-line text with different heights i.e. Auto height and Fixed", () => { const textMsg = "Dynamic panel validation for input widget wrt height"; @@ -23,13 +23,8 @@ describe("Input Widget Multiline feature", function() { cy.testCodeMirror(textMsg); cy.wait(3000); cy.moveToStyleTab(); - cy.get(commonlocators.dropDownIcon) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("XL") - .click(); + cy.get(commonlocators.dropDownIcon).last().click(); + cy.get(".t--dropdown-option").children().contains("XL").click(); cy.wait("@updateLayout"); cy.wait(2000); cy.get(".t--widget-inputwidgetv2") @@ -47,9 +42,7 @@ describe("Input Widget Multiline feature", function() { const textMsg = "Dynamic panel validation for input widget wrt height"; cy.dragAndDropToCanvas("inputwidgetv2", { x: 300, y: 300 }); cy.openPropertyPane("inputwidgetv2"); - cy.get(widgetsPage.datatype) - .last() - .click({ force: true }); + cy.get(widgetsPage.datatype).last().click({ force: true }); cy.get("[data-cy='t--dropdown-option-Multi-line text']").click(); // verify height changes to auto height @@ -78,13 +71,8 @@ describe("Input Widget Multiline feature", function() { .then((height) => { //Changing the text label cy.moveToStyleTab(); - cy.get(commonlocators.dropDownIcon) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("XL") - .click(); + cy.get(commonlocators.dropDownIcon).last().click(); + cy.get(".t--dropdown-option").children().contains("XL").click(); cy.wait("@updateLayout"); cy.wait(2000); @@ -97,9 +85,7 @@ describe("Input Widget Multiline feature", function() { // select height as fixed for multiline datatype cy.openPropertyPane("inputwidgetv2"); cy.moveToContentTab(); - cy.get(widgetsPage.datatype) - .last() - .click({ force: true }); + cy.get(widgetsPage.datatype).last().click({ force: true }); cy.changeLayoutHeightWithoutWait(commonlocators.fixed); // change Label font size and verify cy.get(".t--widget-inputwidgetv2") @@ -107,13 +93,8 @@ describe("Input Widget Multiline feature", function() { .then((height) => { //Changing the text label cy.moveToStyleTab(); - cy.get(commonlocators.dropDownIcon) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("S") - .click(); + cy.get(commonlocators.dropDownIcon).last().click(); + cy.get(".t--dropdown-option").children().contains("S").click(); cy.wait("@updateLayout"); cy.wait(2000); @@ -143,9 +124,7 @@ describe("Input Widget Multiline feature", function() { it("3. Enter key behaviour with single line and multi line selection", () => { cy.dragAndDropToCanvas("inputwidgetv2", { x: 300, y: 500 }); cy.openPropertyPane(WIDGET.INPUT_V2); - cy.get(PROPERTY_SELECTOR.onSubmit) - .find(".t--js-toggle") - .click(); + cy.get(PROPERTY_SELECTOR.onSubmit).find(".t--js-toggle").click(); cy.updateCodeInput(PROPERTY_SELECTOR.onSubmit, "{{showAlert('Success')}}"); // enter some text and hit enter cy.get(".t--draggable-inputwidgetv2") @@ -155,9 +134,7 @@ describe("Input Widget Multiline feature", function() { // verify toast message on enter cy.get(homePage.toastMessage).should("contain", "Success"); // enter key with multiline - cy.get(widgetsPage.datatype) - .last() - .click({ force: true }); + cy.get(widgetsPage.datatype).last().click({ force: true }); cy.get("[data-cy='t--dropdown-option-Multi-line text']").click(); cy.get(".t--draggable-inputwidgetv2") .find("textarea") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_OnFocus_OnBlur_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_OnFocus_OnBlur_spec.js index ef4bace82c..6cd239cd73 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_OnFocus_OnBlur_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_OnFocus_OnBlur_spec.js @@ -12,7 +12,7 @@ const currencyInputWidget = widgetsPage.currencyInputWidget + " " + "input"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Input Widget Property tests onFocus and onBlur", function() { +describe("Input Widget Property tests onFocus and onBlur", function () { it("1. onBlur and onFocus should be triggered from the input widget", () => { cy.dragAndDropToCanvas(inputWidgetName, { x: 300, y: 200 }); cy.openPropertyPane(inputWidgetName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_spec.js index 96b0a7cfa4..5429cece2a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Input_spec.js @@ -3,7 +3,7 @@ const dsl = require("../../../../../fixtures/newFormDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Input Widget Functionality", function() { +describe("Input Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -28,7 +28,7 @@ describe("Input Widget Functionality", function() { // cy.reload(); // }); - it("Input Widget Functionality", function() { + it("Input Widget Functionality", function () { cy.openPropertyPane("inputwidgetv2"); /** * @param{Text} Random Text @@ -42,9 +42,7 @@ describe("Input Widget Functionality", function() { .children() .contains("Single-line text") .click({ force: true }); - cy.get(widgetsPage.innertext) - .click({ force: true }) - .type(this.data.para); + cy.get(widgetsPage.innertext).click({ force: true }).type(this.data.para); cy.get(widgetsPage.inputWidget + " " + "input") .invoke("attr", "value") .should("contain", this.data.para); @@ -70,7 +68,7 @@ describe("Input Widget Functionality", function() { ); cy.PublishtheApp(); }); - it("Input Widget Functionality To Validate Default Text and Placeholder", function() { + it("Input Widget Functionality To Validate Default Text and Placeholder", function () { cy.get(publish.inputWidget + " " + "input") .invoke("attr", "value") .should("contain", this.data.defaultdata); @@ -80,7 +78,7 @@ describe("Input Widget Functionality", function() { cy.get(publish.backToEditor).click({ force: true }); }); - it("isSpellCheck: true", function() { + it("isSpellCheck: true", function () { cy.openPropertyPane("inputwidgetv2"); cy.togglebar(commonlocators.spellCheck + " " + "input"); cy.PublishtheApp(); @@ -90,7 +88,7 @@ describe("Input Widget Functionality", function() { cy.get(publish.backToEditor).click({ force: true }); }); - it("isSpellCheck: false", function() { + it("isSpellCheck: false", function () { cy.openPropertyPane("inputwidgetv2"); cy.togglebarDisable(commonlocators.spellCheck + " " + "input"); cy.PublishtheApp(); @@ -100,28 +98,28 @@ describe("Input Widget Functionality", function() { cy.get(publish.backToEditor).click({ force: true }); }); - it("Input Widget Functionality To Check Disabled Widget", function() { + it("Input Widget Functionality To Check Disabled Widget", function () { cy.openPropertyPane("inputwidgetv2"); cy.togglebar(commonlocators.Disablejs + " " + "input"); cy.PublishtheApp(); cy.get(publish.inputWidget + " " + "input").should("be.disabled"); cy.get(publish.backToEditor).click({ force: true }); }); - it("Input Widget Functionality To Check Enabled Widget", function() { + it("Input Widget Functionality To Check Enabled Widget", function () { cy.openPropertyPane("inputwidgetv2"); cy.togglebarDisable(commonlocators.Disablejs + " " + "input"); cy.PublishtheApp(); cy.get(publish.inputWidget + " " + "input").should("be.enabled"); cy.get(publish.backToEditor).click({ force: true }); }); - it("Input Functionality To Unchecked Visible Widget", function() { + it("Input Functionality To Unchecked Visible Widget", function () { cy.openPropertyPane("inputwidgetv2"); cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.inputWidget + " " + "input").should("not.exist"); cy.get(publish.backToEditor).click({ force: true }); }); - it("Input Functionality To Check Visible Widget", function() { + it("Input Functionality To Check Visible Widget", function () { cy.openPropertyPane("inputwidgetv2"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -129,11 +127,9 @@ describe("Input Widget Functionality", function() { cy.get(publish.backToEditor).click({ force: true }); }); - it("Input Functionality To check number input type with custom regex", function() { + it("Input Functionality To check number input type with custom regex", function () { cy.openPropertyPane("inputwidgetv2"); - cy.get(commonlocators.dataType) - .last() - .click({ force: true }); + cy.get(commonlocators.dataType).last().click({ force: true }); /*cy.get( `${commonlocators.dataType} .single-select:contains("Number")`, ).click();*/ @@ -142,16 +138,11 @@ describe("Input Widget Functionality", function() { .contains("Number") .click({ force: true }); cy.testJsontext("regex", "^s*(?=.*[1-9])d*(?:.d{1,2})?s*$"); - cy.get(widgetsPage.innertext) - .click() - .clear() - .type("1.255"); + cy.get(widgetsPage.innertext).click().clear().type("1.255"); cy.get(".bp3-popover-content").should(($x) => { expect($x).contain("Invalid input"); }); - cy.get(widgetsPage.innertext) - .click({ force: true }) - .clear(); + cy.get(widgetsPage.innertext).click({ force: true }).clear(); cy.closePropertyPane("inputwidgetv2"); }); @@ -182,9 +173,7 @@ describe("Input Widget Functionality", function() { cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-add") - .first() - .click({ force: true }); + cy.get(".bp3-icon-add").first().click({ force: true }); cy.get(".bp3-input-group .bp3-icon-add").should("exist"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_ShowStepArrows_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_ShowStepArrows_spec.js index b73e50e8e9..8f3bf62336 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_ShowStepArrows_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_ShowStepArrows_spec.js @@ -2,7 +2,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const widgetName = "inputwidgetv2"; -describe("Input Widget V2 showStepArrows Functionality - ", function() { +describe("Input Widget V2 showStepArrows Functionality - ", function () { it("1. Validate that dataType - NUMBER, For new widgets being dragged, the value for showStepArrows should be set to false", () => { cy.dragAndDropToCanvas(widgetName, { x: 300, y: 400 }); cy.openPropertyPane(widgetName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_inside_List_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_inside_List_spec.js index d7a8b3e528..9c9c2e833d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_inside_List_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_inside_List_spec.js @@ -55,9 +55,7 @@ describe("Input widget V2 - ", () => { cy.openPropertyPane(widgetName); cy.selectDropdownValue(".t--property-control-datatype", "Number"); - cy.get(".t--property-control-required label") - .last() - .click({ force: true }); + cy.get(".t--property-control-required label").last().click({ force: true }); cy.selectDropdownValue(".t--property-control-datatype", "Number"); [ @@ -139,9 +137,7 @@ describe("Input widget V2 - ", () => { cy.openPropertyPane(widgetName); cy.selectDropdownValue(".t--property-control-datatype", "Email"); - cy.get(".t--property-control-required label") - .last() - .click({ force: true }); + cy.get(".t--property-control-required label").last().click({ force: true }); [ { @@ -179,9 +175,7 @@ describe("Input widget V2 - ", () => { cy.get(`.t--widget-${widgetName} input`).clear({ force: true }); cy.wait(300); if (text) { - cy.get(`.t--widget-${widgetName} input`) - .click() - .type(text); + cy.get(`.t--widget-${widgetName} input`).click().type(text); } cy.get(".t--widget-textwidget").should("contain", expected); } diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_spec.js index d2e1adce28..569c5e8def 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Input/Inputv2_spec.js @@ -69,9 +69,7 @@ describe("Input widget V2 - ", () => { cy.openPropertyPane(widgetName); //required: on - cy.get(".t--property-control-required label") - .last() - .click({ force: true }); + cy.get(".t--property-control-required label").last().click({ force: true }); [ { @@ -152,9 +150,7 @@ describe("Input widget V2 - ", () => { ].forEach(({ expected, input }) => enterAndTest(input, expected)); //required: off - cy.get(".t--property-control-required label") - .last() - .click({ force: true }); + cy.get(".t--property-control-required label").last().click({ force: true }); cy.selectDropdownValue(".t--property-control-datatype", "Number"); [ @@ -232,9 +228,7 @@ describe("Input widget V2 - ", () => { ].forEach(({ expected, input }) => enterAndTest(input, expected)); //required: on - cy.get(".t--property-control-required label") - .last() - .click({ force: true }); + cy.get(".t--property-control-required label").last().click({ force: true }); [ { @@ -303,9 +297,7 @@ describe("Input widget V2 - ", () => { ].forEach(({ expected, input }) => enterAndTest(input, expected)); //required: off - cy.get(".t--property-control-required label") - .last() - .click({ force: true }); + cy.get(".t--property-control-required label").last().click({ force: true }); [ { @@ -356,13 +348,9 @@ describe("Input widget V2 - ", () => { it("8. onSubmit should be triggered with the whole input value", () => { cy.openPropertyPane(widgetName); cy.selectDropdownValue(".t--property-control-datatype", "Single-line text"); - cy.get(".t--property-control-required label") - .last() - .click({ force: true }); + cy.get(".t--property-control-required label").last().click({ force: true }); // Set onSubmit action, storing value - cy.get(".t--property-control-onsubmit") - .find(".t--js-toggle") - .click(); + cy.get(".t--property-control-onsubmit").find(".t--js-toggle").click(); cy.updateCodeInput( ".t--property-control-onsubmit", "{{storeValue('textPayloadOnSubmit',Input1.text)}}", @@ -424,7 +412,7 @@ describe("Input widget V2 - ", () => { cy.get(".t--widget-textwidget").should("contain", "1.0001:1.0001:true"); }); - it("Check isDirty meta property", function() { + it("Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput(".t--property-control-text", `{{Input1.isDirty}}`); // Init isDirty diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_ArrayField_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_ArrayField_spec.js index fd04ef9549..db6e31908b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_ArrayField_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_ArrayField_spec.js @@ -181,9 +181,7 @@ describe("JSON Form Widget Array Field", () => { expect($items.length).equal(initialNoOfItems); }); // Click remove button - cy.get(`${education} ${deleteButton}`) - .last() - .click({ force: true }); + cy.get(`${education} ${deleteButton}`).last().click({ force: true }); cy.get(`${education}-item`).then(($items) => { expect($items.length).equal(initialNoOfItems); }); @@ -198,9 +196,7 @@ describe("JSON Form Widget Array Field", () => { expect($items.length).equal(initialNoOfItems + 1); }); // Click remove button - cy.get(`${education} ${deleteButton}`) - .last() - .click({ force: true }); + cy.get(`${education} ${deleteButton}`).last().click({ force: true }); cy.get(`${education}-item`).then(($items) => { expect($items.length).equal(initialNoOfItems); }); @@ -268,14 +264,10 @@ describe("JSON Form Widget Array Field", () => { cy.testJsontext("text", "Phone Number"); // Open country code dropdown and select +91 - cy.get(".t--input-country-code-change") - .first() - .click(); + cy.get(".t--input-country-code-change").first().click(); cy.get(".t--search-input input").type("+91"); cy.wait(500); - cy.get(".t--dropdown-option") - .last() - .click(); + cy.get(".t--dropdown-option").last().click(); cy.get(".t--input-country-code-change").should("contain", "🇮🇳+91"); }); @@ -303,14 +295,10 @@ describe("JSON Form Widget Array Field", () => { cy.testJsontext("text", "Currency"); // Open country code dropdown and select gbp - cy.get(".t--input-currency-change") - .first() - .click(); + cy.get(".t--input-currency-change").first().click(); cy.get(".t--search-input input").type("gbp"); cy.wait(500); - cy.get(".t--dropdown-option") - .first() - .click(); + cy.get(".t--dropdown-option").first().click(); cy.get(".t--input-currency-change").should("contain", "£"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_AutoGenerateFormDisabled_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_AutoGenerateFormDisabled_spec.js index 93a807c011..14a4a80ce0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_AutoGenerateFormDisabled_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_AutoGenerateFormDisabled_spec.js @@ -51,47 +51,35 @@ describe("JSON Form Widget AutoGenerate Disabled", () => { cy.get(`${fieldPrefix}-name label`).contains("Name"); cy.get(`${fieldPrefix}-name input`).then((input) => { cy.wrap(input).should("have.value", "John"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-age label`).contains("Age"); cy.get(`${fieldPrefix}-age input`).then((input) => { cy.wrap(input).should("have.value", 30); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-dob label`).contains("Dob"); cy.get(`${fieldPrefix}-dob input`).then((input) => { cy.wrap(input).should("have.value", "10/12/1992"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-migrant label`).contains("Migrant"); cy.get(`${fieldPrefix}-migrant .t--switch-widget-inactive`).should("exist"); - cy.get(`${fieldPrefix}-address`) - .find("label") - .should("have.length", 3); + cy.get(`${fieldPrefix}-address`).find("label").should("have.length", 3); cy.get(`${fieldPrefix}-address-street label`).contains("Street"); cy.get(`${fieldPrefix}-address-street input`).then((input) => { cy.wrap(input).should("have.value", "Koramangala"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-address-city label`).contains("City"); cy.get(`${fieldPrefix}-address-city input`).then((input) => { cy.wrap(input).should("have.value", "Bangalore"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-education label`).should("have.length", 3); @@ -99,17 +87,13 @@ describe("JSON Form Widget AutoGenerate Disabled", () => { cy.get(`${fieldPrefix}-education-0--college label`).contains("College"); cy.get(`${fieldPrefix}-education-0--college input`).then((input) => { cy.wrap(input).should("have.value", "MIT"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-education-0--year label`).contains("Year"); cy.get(`${fieldPrefix}-education-0--year input`).then((input) => { cy.wrap(input).should("have.value", "20/10/2014"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get( @@ -185,9 +169,7 @@ describe("JSON Form Widget AutoGenerate Disabled", () => { cy.get(`${fieldPrefix}-migrant label`).contains("Migrant"); cy.get(`${fieldPrefix}-migrant .t--switch-widget-inactive`).should("exist"); - cy.get(`${fieldPrefix}-address`) - .find("label") - .should("have.length", 4); + cy.get(`${fieldPrefix}-address`).find("label").should("have.length", 4); cy.get(`${fieldPrefix}-address-street label`).contains("Street"); cy.get(`${fieldPrefix}-address-street input`).should( "have.value", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js index ffa28e193b..1c65985294 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js @@ -39,47 +39,35 @@ describe("JSON Form Widget AutoGenerate Enabled", () => { cy.get(`${fieldPrefix}-name label`).contains("Name"); cy.get(`${fieldPrefix}-name input`).then((input) => { cy.wrap(input).should("have.value", "John"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-age label`).contains("Age"); cy.get(`${fieldPrefix}-age input`).then((input) => { cy.wrap(input).should("have.value", 30); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-dob label`).contains("Dob"); cy.get(`${fieldPrefix}-dob input`).then((input) => { cy.wrap(input).should("have.value", "10/12/1992"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-migrant label`).contains("Migrant"); cy.get(`${fieldPrefix}-migrant .t--switch-widget-inactive`).should("exist"); - cy.get(`${fieldPrefix}-address`) - .find("label") - .should("have.length", 3); + cy.get(`${fieldPrefix}-address`).find("label").should("have.length", 3); cy.get(`${fieldPrefix}-address-street label`).contains("Street"); cy.get(`${fieldPrefix}-address-street input`).then((input) => { cy.wrap(input).should("have.value", "Koramangala"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-address-city label`).contains("City"); cy.get(`${fieldPrefix}-address-city input`).then((input) => { cy.wrap(input).should("have.value", "Bangalore"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-education label`).should("have.length", 3); @@ -87,17 +75,13 @@ describe("JSON Form Widget AutoGenerate Enabled", () => { cy.get(`${fieldPrefix}-education-0--college label`).contains("College"); cy.get(`${fieldPrefix}-education-0--college input`).then((input) => { cy.wrap(input).should("have.value", "MIT"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-education-0--year label`).contains("Year"); cy.get(`${fieldPrefix}-education-0--year input`).then((input) => { cy.wrap(input).should("have.value", "20/10/2014"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get( @@ -149,9 +133,7 @@ describe("JSON Form Widget AutoGenerate Enabled", () => { ); cy.get(`${fieldPrefix}-migrant input`).should("exist"); - cy.get(`${fieldPrefix}-address`) - .find("label") - .should("have.length", 4); + cy.get(`${fieldPrefix}-address`).find("label").should("have.length", 4); cy.get(`${fieldPrefix}-address-street label`).contains("Street"); cy.get(`${fieldPrefix}-address-street input`).should( "have.value", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_Basic_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_Basic_spec.js index 326d30a425..3a4b94aa7c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_Basic_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_Basic_spec.js @@ -3,15 +3,15 @@ const explorer = require("../../../../../locators/explorerlocators.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const jsonform = require("../../../../../locators/jsonFormWidget.json"); -describe("JsonForm widget basis c usecases", function() { - it("Validate Drag and drop jsonform widget", function() { +describe("JsonForm widget basis c usecases", function () { + it("Validate Drag and drop jsonform widget", function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("jsonformwidget", { x: 200, y: 200 }); cy.openPropertyPane("jsonformwidget"); cy.get(widgetsPage.jsonFormWidget).should("have.length", 1); }); - it("json form widget validate default data", function() { + it("json form widget validate default data", function () { cy.openPropertyPane("jsonformwidget"); cy.get(jsonform.jsformInput).should( "have.value", @@ -27,7 +27,7 @@ describe("JsonForm widget basis c usecases", function() { ); }); - it("json form widget validate reset button function", function() { + it("json form widget validate reset button function", function () { cy.openPropertyPane("jsonformwidget"); cy.get(jsonform.jsformInput).clear({ force: true }); cy.get(jsonform.jsformInput).type("TestReset"); @@ -52,7 +52,7 @@ describe("JsonForm widget basis c usecases", function() { ); }); - it("Validate copy/paste/delete widget ", function() { + it("Validate copy/paste/delete widget ", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; //copy and paste cy.openPropertyPane("jsonformwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_CustomField_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_CustomField_spec.js index 4daecedd8d..6e9ba0a912 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_CustomField_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_CustomField_spec.js @@ -66,9 +66,7 @@ describe("JSON Form Widget Custom Field", () => { cy.get(`${fieldPrefix}-migrant label`).contains("Migrant"); cy.get(`${fieldPrefix}-migrant .t--switch-widget-inactive`).should("exist"); - cy.get(`${fieldPrefix}-address`) - .find("label") - .should("have.length", 4); + cy.get(`${fieldPrefix}-address`).find("label").should("have.length", 4); cy.get(`${fieldPrefix}-address-street label`).contains("Street"); cy.get(`${fieldPrefix}-address-street input`).should( "have.value", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FieldChange_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FieldChange_spec.js index 6af1616ecb..35195790b7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FieldChange_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FieldChange_spec.js @@ -10,14 +10,10 @@ describe("JSON Form Widget Field Change", () => { it("modifies field type text to number", () => { cy.openPropertyPane("jsonformwidget"); - cy.get(`${fieldPrefix}-name`) - .find("button") - .should("not.exist"); + cy.get(`${fieldPrefix}-name`).find("button").should("not.exist"); cy.openFieldConfiguration("name"); cy.selectDropdownValue(commonlocators.jsonFormFieldType, "Number Input"); - cy.get(`${fieldPrefix}-name`) - .find("button") - .should("have.length", 2); + cy.get(`${fieldPrefix}-name`).find("button").should("have.length", 2); cy.selectDropdownValue(commonlocators.jsonFormFieldType, /^Text Input/); cy.closePropertyPane(); }); @@ -42,15 +38,11 @@ describe("JSON Form Widget Field Change", () => { it("modifies field type text to date", () => { cy.openPropertyPane("jsonformwidget"); - cy.get(`${fieldPrefix}-name`) - .find("input") - .click({ force: true }); + cy.get(`${fieldPrefix}-name`).find("input").click({ force: true }); cy.get(".bp3-popover.bp3-dateinput-popover").should("not.exist"); cy.openFieldConfiguration("name"); cy.selectDropdownValue(commonlocators.jsonFormFieldType, "Datepicker"); - cy.get(`${fieldPrefix}-name`) - .find("input") - .click({ force: true }); + cy.get(`${fieldPrefix}-name`).find("input").click({ force: true }); cy.get(".bp3-popover.bp3-dateinput-popover").should("exist"); cy.selectDropdownValue(commonlocators.jsonFormFieldType, /^Text Input/); cy.closePropertyPane(); @@ -99,9 +91,7 @@ describe("JSON Form Widget Field Change", () => { cy.openFieldConfiguration("name"); cy.selectDropdownValue(commonlocators.jsonFormFieldType, "Multiselect"); - cy.get(`${fieldPrefix}-name`) - .find(".rc-select-multiple") - .should("exist"); + cy.get(`${fieldPrefix}-name`).find(".rc-select-multiple").should("exist"); cy.selectDropdownValue(commonlocators.jsonFormFieldType, /^Text Input/); cy.closePropertyPane(); @@ -140,9 +130,7 @@ describe("JSON Form Widget Field Change", () => { .find(".t--jsonformfield-array-add-btn") .should("exist"); */ - cy.get('button span:contains("Add New")') - .first() - .should("be.visible"); + cy.get('button span:contains("Add New")').first().should("be.visible"); cy.selectDropdownValue(commonlocators.jsonFormFieldType, /^Text Input/); cy.closePropertyPane(); }); @@ -152,17 +140,13 @@ describe("JSON Form Widget Field Change", () => { cy.openFieldConfiguration("name"); cy.selectDropdownValue(commonlocators.jsonFormFieldType, "Object"); - cy.get(`${fieldPrefix}-name`) - .find("input") - .should("not.exist"); + cy.get(`${fieldPrefix}-name`).find("input").should("not.exist"); cy.get(commonlocators.jsonFormAddNewCustomFieldBtn).click({ force: true, }); - cy.get(`${fieldPrefix}-name`) - .find("input") - .should("exist"); + cy.get(`${fieldPrefix}-name`).find("input").should("exist"); cy.selectDropdownValue(commonlocators.jsonFormFieldType, /^Text Input/); cy.closePropertyPane(); @@ -179,12 +163,8 @@ describe("JSON Form Widget Field Change", () => { cy.selectDropdownValue(commonlocators.jsonFormFieldType, "Array"); cy.wait(2000); //for array field to reflect cy.get(`${fieldPrefix}-hobbies`).then((hobbies) => { - cy.wrap(hobbies) - .find(".t--jsonformfield-array-add-btn") - .should("exist"); - cy.wrap(hobbies) - .find("input") - .should("have.length", 2); + cy.wrap(hobbies).find(".t--jsonformfield-array-add-btn").should("exist"); + cy.wrap(hobbies).find("input").should("have.length", 2); cy.wrap(hobbies) .find(".t--jsonformfield-array-delete-btn") .should("have.length", 2); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FieldProperties_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FieldProperties_spec.js index 6a776e0d47..d41755037d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FieldProperties_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FieldProperties_spec.js @@ -47,9 +47,7 @@ describe("Text Field Property Control", () => { it("4. throws max character error when exceeds maxChar limit for input text", () => { cy.testJsontext("defaultvalue", "").wait(200); - cy.get(`${fieldPrefix}-name input`) - .clear() - .type("abcdefghi"); + cy.get(`${fieldPrefix}-name input`).clear().type("abcdefghi"); cy.testJsontext("maxchars", 5).wait(200); cy.get(`${fieldPrefix}-name input`).click(); cy.get(".bp3-popover-content").should(($x) => { @@ -68,9 +66,7 @@ describe("Text Field Property Control", () => { it("6. sets valid property with custom error message", () => { cy.testJsontext("valid", "false"); - cy.get(`${fieldPrefix}-name input`) - .clear() - .type("abcd"); + cy.get(`${fieldPrefix}-name input`).clear().type("abcd"); cy.get(".bp3-popover-content").contains("Invalid input"); cy.testJsontext("errormessage", "Custom error message"); @@ -102,14 +98,10 @@ describe("Text Field Property Control", () => { it("9. throws error when REGEX does not match the input value", () => { cy.testJsontext("regex", "^\\d+$"); - cy.get(`${fieldPrefix}-name input`) - .clear() - .type("abcd"); + cy.get(`${fieldPrefix}-name input`).clear().type("abcd"); cy.get(".bp3-popover-content").contains("Invalid input"); - cy.get(`${fieldPrefix}-name input`) - .clear() - .type("1234"); + cy.get(`${fieldPrefix}-name input`).clear().type("1234"); cy.get(".bp3-popover-content").should("not.exist"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FormBindings_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FormBindings_spec.js index 832afab759..2b067ba689 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FormBindings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FormBindings_spec.js @@ -207,11 +207,9 @@ describe("JSON Form Widget Form Bindings", () => { }; cy.openPropertyPane("textwidget"); - cy.get(".t--property-control-text .CodeMirror textarea") - .first() - .clear({ - force: true, - }); + cy.get(".t--property-control-text .CodeMirror textarea").first().clear({ + force: true, + }); cy.testJsontext("text", "{{JSON.stringify(JSONForm1.fieldState)}}"); cy.closePropertyPane(); @@ -227,34 +225,24 @@ describe("JSON Form Widget Form Bindings", () => { // name.required -> true cy.openFieldConfiguration("name"); cy.togglebar(`${propertyControlPrefix}-required input`); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); // age.disabled -> true cy.openFieldConfiguration("age"); cy.togglebar(`${propertyControlPrefix}-disabled input`); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); // migrant.visible -> false cy.openFieldConfiguration("migrant", false); cy.togglebarDisable(`${propertyControlPrefix}-visible input`); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); // address.street.required -> true cy.openFieldConfiguration("address", false); cy.openFieldConfiguration("street", false); cy.togglebar(`${propertyControlPrefix}-required input`); - cy.get(backBtn) - .click({ force: true }) - .wait(500); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); + cy.get(backBtn).click({ force: true }).wait(500); // education.college.required -> true // education.year.visible -> false @@ -262,14 +250,10 @@ describe("JSON Form Widget Form Bindings", () => { cy.openFieldConfiguration("__array_item__", false); cy.openFieldConfiguration("college", false); cy.togglebar(`${propertyControlPrefix}-required input`); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); cy.openFieldConfiguration("year", false); cy.togglebarDisable(`${propertyControlPrefix}-visible input`); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); cy.closePropertyPane(); @@ -354,11 +338,9 @@ describe("JSON Form Widget Form Bindings", () => { }; cy.openPropertyPane("textwidget"); - cy.get(".t--property-control-text .CodeMirror textarea") - .first() - .clear({ - force: true, - }); + cy.get(".t--property-control-text .CodeMirror textarea").first().clear({ + force: true, + }); cy.testJsontext("text", "{{JSON.stringify(JSONForm1.fieldState)}}"); cy.openPropertyPane("jsonformwidget"); @@ -368,9 +350,7 @@ describe("JSON Form Widget Form Bindings", () => { cy.testJsontext("propertyname", "firstName"); cy.wait(1000); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); // Change accessor education -> college to education -> graduatingCollege cy.openFieldConfiguration("education", false); @@ -405,9 +385,7 @@ describe("JSON Form Widget Form Bindings", () => { cy.testJsontext("propertyname", "firstName"); cy.wait(1000); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); // Change accessor education -> college to education -> graduatingCollege cy.openFieldConfiguration("education"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FormProperties_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FormProperties_spec.js index 18a85e3d1f..107b7e06cd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FormProperties_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_FormProperties_spec.js @@ -65,17 +65,13 @@ describe("JSON Form Widget Form Bindings", () => { cy.togglebar(`${propertyControlPrefix}-required input`); cy.get(backBtn).click({ force: true }); - cy.get(`${fieldPrefix}-name input`) - .clear() - .wait(300); + cy.get(`${fieldPrefix}-name input`).clear().wait(300); cy.get("button") .contains("Submit") .parent("button") .should("have.attr", "disabled"); - cy.get(`${fieldPrefix}-name input`) - .type("JOHN") - .wait(300); + cy.get(`${fieldPrefix}-name input`).type("JOHN").wait(300); cy.get("button") .contains("Submit") @@ -89,15 +85,11 @@ describe("JSON Form Widget Form Bindings", () => { cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).contains("true"); - cy.get(`${fieldPrefix}-name input`) - .clear() - .wait(300); + cy.get(`${fieldPrefix}-name input`).clear().wait(300); cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).contains("false"); - cy.get(`${fieldPrefix}-name input`) - .type("JOHN") - .wait(300); + cy.get(`${fieldPrefix}-name input`).type("JOHN").wait(300); cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).contains("true"); }); @@ -116,12 +108,9 @@ describe("JSON Form Widget Form Bindings", () => { }); */ // Click Icon property - cy.get(submitButtonStylesSection) - .contains("(none)") - .parent() - .click({ - force: true, - }); + cy.get(submitButtonStylesSection).contains("(none)").parent().click({ + force: true, + }); // Check if icon selector opened cy.get(".bp3-select-popover .virtuoso-grid-item").should("be.visible"); @@ -173,9 +162,7 @@ describe("JSON Form Widget Form Bindings", () => { cy.get(".t--widget-textwidget .bp3-ui-text").contains("false"); // Click reset button - cy.get("button") - .contains("Reset") - .click({ force: true }); + cy.get("button").contains("Reset").click({ force: true }); cy.get(".t--widget-textwidget .bp3-ui-text").contains("false"); // Type JOHN in name field @@ -183,9 +170,7 @@ describe("JSON Form Widget Form Bindings", () => { cy.get(".t--widget-textwidget .bp3-ui-text").contains("true"); // Click reset button - cy.get("button") - .contains("Reset") - .click({ force: true }); + cy.get("button").contains("Reset").click({ force: true }); cy.get(".t--widget-textwidget .bp3-ui-text").contains("false"); cy.get(publishPage.backToEditor).click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_HiddenFields_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_HiddenFields_spec.js index 7e0588a840..8fbd1659ad 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_HiddenFields_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_HiddenFields_spec.js @@ -206,9 +206,7 @@ describe("JSON Form Hidden fields", () => { // hide education field cy.openFieldConfiguration("education"); cy.togglebarDisable(".t--property-control-visible input"); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); // hide name field cy.openFieldConfiguration("name"); cy.togglebarDisable(".t--property-control-visible input"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_Reset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_Reset_spec.js index ff6c3bd885..635b14a0d5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_Reset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_Reset_spec.js @@ -108,10 +108,7 @@ describe("JSON Form reset", () => { ); // Reset form - cy.get("button") - .contains("Reset") - .parent("button") - .click({ force: true }); + cy.get("button").contains("Reset").parent("button").click({ force: true }); // Verify initial field values cy.get(`${fieldPrefix}-name input`).should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_UnicodeKeys_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_UnicodeKeys_spec.js index fcf0c8bdbe..a5eed8da5a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_UnicodeKeys_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_UnicodeKeys_spec.js @@ -37,18 +37,14 @@ describe("JSON Form Widget Unicode keys", () => { cy.get(`${fieldPrefix}-xn__l2bm1c label`).contains("नाम"); cy.get(`${fieldPrefix}-xn__l2bm1c input`).then((input) => { cy.wrap(input).should("have.value", "John"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-xn__80a1afdk69b label`).should("have.length", 2); cy.get(`${fieldPrefix}-xn__80a1afdk69b-xn__mgbuhw label`).contains("شارع"); cy.get(`${fieldPrefix}-xn__80a1afdk69b-xn__mgbuhw input`).then((input) => { cy.wrap(input).should("have.value", "Koramangala"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-xn__12ca5huag4ce3a label`).should("have.length", 2); @@ -59,9 +55,7 @@ describe("JSON Form Widget Unicode keys", () => { cy.get(`${fieldPrefix}-xn__12ca5huag4ce3a-0--xn__ohco9d4d input`).then( (input) => { cy.wrap(input).should("have.value", "MIT"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }, ); @@ -97,26 +91,20 @@ describe("JSON Form Widget Unicode keys", () => { cy.get(`${fieldPrefix}-xn____xvdesr5bxbc label`).contains("पहला नाम"); cy.get(`${fieldPrefix}-xn____xvdesr5bxbc input`).then((input) => { cy.wrap(input).should("have.value", "John"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-xn____qtdi9jva8ac1kf label`).contains("अंतिम नाम"); cy.get(`${fieldPrefix}-xn____qtdi9jva8ac1kf input`).then((input) => { cy.wrap(input).should("have.value", "Doe"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-xn__80a1afdk69b label`).should("have.length", 2); cy.get(`${fieldPrefix}-xn__80a1afdk69b-xn__mgbuhw label`).contains("شارع"); cy.get(`${fieldPrefix}-xn__80a1afdk69b-xn__mgbuhw input`).then((input) => { cy.wrap(input).should("have.value", "Koramangala"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-xn__12ca5huag4ce3a label`).should("have.length", 3); @@ -127,9 +115,7 @@ describe("JSON Form Widget Unicode keys", () => { cy.get(`${fieldPrefix}-xn__12ca5huag4ce3a-0--xn__ohco9d4d input`).then( (input) => { cy.wrap(input).should("have.value", "MIT"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }, ); @@ -139,9 +125,7 @@ describe("JSON Form Widget Unicode keys", () => { cy.get(`${fieldPrefix}-xn__12ca5huag4ce3a-0--xn__u9j436hvxmjkd input`).then( (input) => { cy.wrap(input).should("have.value", "21/03/2010"); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }, ); @@ -213,20 +197,14 @@ describe("JSON Form Widget Unicode keys", () => { // नाम field cy.openFieldConfiguration("xn__l2bm1c"); cy.testJsontext("propertyname", "नाम नाम"); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); // open field суроға -> شارع cy.openFieldConfiguration("xn__80a1afdk69b"); cy.openFieldConfiguration("xn__mgbuhw", false); cy.testJsontext("propertyname", "شارع1 شارع"); - cy.get(backBtn) - .click({ force: true }) - .wait(500); - cy.get(backBtn) - .click({ force: true }) - .wait(500); + cy.get(backBtn).click({ force: true }).wait(500); + cy.get(backBtn).click({ force: true }).wait(500); // Validate initial form data cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).then(($el) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONFrom_Modal_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONFrom_Modal_spec.js index 864b509e88..f30172b4c0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONFrom_Modal_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONFrom_Modal_spec.js @@ -10,25 +10,19 @@ const checkFormModalValues = (value) => { cy.get(`${fieldPrefix}-step label`).contains("Step"); cy.get(`${fieldPrefix}-step input`).then((input) => { cy.wrap(input).should("have.value", value.step); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-task label`).contains("Task"); cy.get(`${fieldPrefix}-task input`).then((input) => { cy.wrap(input).should("have.value", value.task); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); cy.get(`${fieldPrefix}-status label`).contains("Status"); cy.get(`${fieldPrefix}-status input`).then((input) => { cy.wrap(input).should("have.value", value.status); - cy.wrap(input) - .invoke("attr", "type") - .should("contain", "text"); + cy.wrap(input).invoke("attr", "type").should("contain", "text"); }); // Close the modal diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List1_spec.js index 2565d0d4af..e470036168 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List1_spec.js @@ -1,8 +1,8 @@ const dsl = require("../../../../../fixtures/listRegressionDsl.json"); -describe("Binding the list widget with text widget", function() { +describe("Binding the list widget with text widget", function () { //const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - it("1. Validate delete widget action from side bar", function() { + it("1. Validate delete widget action from side bar", function () { cy.addDsl(dsl); cy.wait(3000); //for dsl to settle cy.openPropertyPane("listwidget"); @@ -10,9 +10,7 @@ describe("Binding the list widget with text widget", function() { cy.verifyUpdatedWidgetName("#$%1234", "___1234"); cy.verifyUpdatedWidgetName("56789"); cy.get(".t--delete-widget").click({ force: true }); - cy.get(".t--toast-action span") - .eq(0) - .contains("56789 is removed"); + cy.get(".t--toast-action span").eq(0).contains("56789 is removed"); cy.wait("@updateLayout").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List3_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List3_spec.js index def65b8c56..52bd3f854a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List3_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List3_spec.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/listRegression3Dsl.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Binding the list widget with text widget", function() { +describe("Binding the list widget with text widget", function () { before(() => { cy.addDsl(dsl); }); - it("Validate text widget data based on changes in list widget Data3", function() { + it("Validate text widget data based on changes in list widget Data3", function () { cy.PublishtheApp(); cy.wait(5000); cy.get(".t--widget-textwidget span:contains('Vivek')").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List4_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List4_spec.js index 1672e1fbfb..1ea3ca71cd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List4_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List4_spec.js @@ -5,7 +5,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/listdsl.json"); const publishPage = require("../../../../../locators/publishWidgetspage.json"); -describe("Container Widget Functionality", function() { +describe("Container Widget Functionality", function () { const items = JSON.parse(dsl.dsl.children[0].listData); before(() => { @@ -13,7 +13,7 @@ describe("Container Widget Functionality", function() { cy.wait(5000); }); - it("1. List-Unckeck Visible field Validation", function() { + it("1. List-Unckeck Visible field Validation", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -24,7 +24,7 @@ describe("Container Widget Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("2. List-Check Visible field Validation", function() { + it("2. List-Check Visible field Validation", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -35,7 +35,7 @@ describe("Container Widget Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("3. Toggle JS - List-Unckeck Visible field Validation", function() { + it("3. Toggle JS - List-Unckeck Visible field Validation", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -47,7 +47,7 @@ describe("Container Widget Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("4. Toggle JS - List-Check Visible field Validation", function() { + it("4. Toggle JS - List-Check Visible field Validation", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -58,14 +58,14 @@ describe("Container Widget Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("5. checks if list shows correct no. of items", function() { + it("5. checks if list shows correct no. of items", function () { // Verify the length of list - cy.get(commonlocators.containerWidget).then(function($lis) { + cy.get(commonlocators.containerWidget).then(function ($lis) { expect($lis).to.have.length(2); }); }); - it("6. checks currentItem binding", function() { + it("6. checks currentItem binding", function () { // Open property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.CheckAndUnfoldEntityItem("List1"); @@ -77,7 +77,7 @@ describe("Container Widget Functionality", function() { cy.closePropertyPane(); // Verify Current Item Bindings - cy.get(commonlocators.TextInside).then(function($lis) { + cy.get(commonlocators.TextInside).then(function ($lis) { expect($lis.eq(0)).to.contain(items[0].first_name); expect($lis.eq(1)).to.contain(items[1].first_name); }); @@ -92,7 +92,7 @@ describe("Container Widget Functionality", function() { cy.testJsontext("itemspacing\\(" + "px" + "\\)", "-"); cy.wait(2000); // Verify the length of list - cy.get(commonlocators.containerWidget).then(function($lis) { + cy.get(commonlocators.containerWidget).then(function ($lis) { expect($lis).to.have.length(2); }); @@ -104,7 +104,7 @@ describe("Container Widget Functionality", function() { cy.closePropertyPane(); }); - it("8. checks button action", function() { + it("8. checks button action", function () { // Open property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.CheckAndUnfoldEntityItem("List1"); @@ -117,15 +117,12 @@ describe("Container Widget Functionality", function() { cy.PublishtheApp(); cy.wait(2000); // Verify Widget Button by clicking on it - cy.get(widgetsPage.widgetBtn) - .closest("div") - .first() - .click({ force: true }); + cy.get(widgetsPage.widgetBtn).closest("div").first().click({ force: true }); // Verify the click on first button cy.get(commonlocators.toastmsg).contains(items[0].last_name); }); - it("9. it checks onListItem click action", function() { + it("9. it checks onListItem click action", function () { // Verify Clicking on list item shows message of first name cy.get(publishPage.backToEditor).click({ force: true }); // Open property pane @@ -133,9 +130,7 @@ describe("Container Widget Functionality", function() { cy.selectEntityByName("List1"); // Verify Action type and Message of List Item // Click on the onListItemClick action dropdown. - cy.get(commonlocators.dropdownSelectButton) - .last() - .click(); + cy.get(commonlocators.dropdownSelectButton).last().click(); cy.get(commonlocators.chooseAction) .children() @@ -168,19 +163,19 @@ describe("Container Widget Functionality", function() { cy.get(commonlocators.toastmsg).contains(items[0].first_name); }); - it("10. it checks pagination", function() { + it("10. it checks pagination", function () { // clicking on second pagination button cy.get(`${commonlocators.paginationButton}-2`).click(); // now we are on the second page which shows first the 3rd item in the list - cy.get(commonlocators.TextInside).then(function($lis) { + cy.get(commonlocators.TextInside).then(function ($lis) { expect($lis.eq(0)).to.contain(items[2].first_name); expect($lis.eq(1)).to.contain(items[3].first_name); }); cy.get(publishPage.backToEditor).click({ force: true }); }); - it("11. ListWidget-Copy & Delete Verification", function() { + it("11. ListWidget-Copy & Delete Verification", function () { //Copy Chart and verify all properties cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -192,7 +187,7 @@ describe("Container Widget Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("12. List widget background colour and deploy ", function() { + it("12. List widget background colour and deploy ", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -218,7 +213,7 @@ describe("Container Widget Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("13. Toggle JS - List widget background colour and deploy ", function() { + it("13. Toggle JS - List widget background colour and deploy ", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -246,7 +241,7 @@ describe("Container Widget Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("14. Add new item in the list widget array object", function() { + it("14. Add new item in the list widget array object", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -257,7 +252,7 @@ describe("Container Widget Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("15. Adding large item Spacing for item card", function() { + it("15. Adding large item Spacing for item card", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -270,7 +265,7 @@ describe("Container Widget Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("16. Renaming the widget from Property pane and Entity explorer ", function() { + it("16. Renaming the widget from Property pane and Entity explorer ", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List5_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List5_spec.js index 8a4f081b4f..f87b6218a7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List5_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List5_spec.js @@ -1,14 +1,14 @@ const dsl = require("../../../../../fixtures/listRegression2Dsl.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Binding the list widget with text widget", function() { +describe("Binding the list widget with text widget", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; before(() => { cy.addDsl(dsl); }); - it("Validate text widget data based on changes in list widget Data2", function() { + it("Validate text widget data based on changes in list widget Data2", function () { cy.PublishtheApp(); cy.wait(5000); cy.get(".t--widget-textwidget span:contains('pawan,Vivek')").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List6_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List6_spec.js index b2530fd4ce..3d9960c3de 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List6_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List6_spec.js @@ -5,7 +5,7 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; let propPane = ObjectsRegistry.PropertyPane, agHelper = ObjectsRegistry.AggregateHelper; -describe("Binding the list widget with text widget", function() { +describe("Binding the list widget with text widget", function () { //const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; before(() => { @@ -13,7 +13,7 @@ describe("Binding the list widget with text widget", function() { cy.wait(3000); //for dsl to settle }); - it("1. Validate text widget data based on changes in list widget Data1", function() { + it("1. Validate text widget data based on changes in list widget Data1", function () { cy.PublishtheApp(); cy.wait(2000); cy.get(".t--widget-textwidget span:contains('Vivek')").should( @@ -35,7 +35,7 @@ describe("Binding the list widget with text widget", function() { ); }); - it("2. Validate text widget data based on changes in list widget Data2", function() { + it("2. Validate text widget data based on changes in list widget Data2", function () { cy.SearchEntityandOpen("List1"); propPane.UpdatePropertyFieldValue( "Items", @@ -70,7 +70,7 @@ describe("Binding the list widget with text widget", function() { cy.get(publish.backToEditor).click({ force: true }); }); - it("3. Validate text widget data based on changes in list widget Data3", function() { + it("3. Validate text widget data based on changes in list widget Data3", function () { cy.SearchEntityandOpen("List1"); propPane.UpdatePropertyFieldValue( "Items", @@ -102,7 +102,7 @@ describe("Binding the list widget with text widget", function() { cy.get(publish.backToEditor).click({ force: true }); }); - after(function() { + after(function () { //-- Deleting the application by Api---// cy.DeleteAppByApi(); //-- LogOut Application---// diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List7_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List7_spec.js index b14cfce4ce..41cd253a7d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List7_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/List7_spec.js @@ -1,21 +1,19 @@ const dsl = require("../../../../../fixtures/ListVulnerabilityDSL.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); -describe("Binding the list widget with text widget", function() { +describe("Binding the list widget with text widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Validate that list widget doesn't execute code", function() { + it("1. Validate that list widget doesn't execute code", function () { cy.get(".t--widget-inputwidgetv2 input") .eq(1) .type("'+(function() { return 3; })()+'", { parseSpecialCharSequences: false, }); cy.wait(1000); - cy.get(".t--widget-buttonwidget") - .eq(0) - .click(); + cy.get(".t--widget-buttonwidget").eq(0).click(); cy.get(commonlocators.toastmsg).contains( "'+(function() { return 3; })()+'", ); @@ -27,9 +25,7 @@ describe("Binding the list widget with text widget", function() { parseSpecialCharSequences: false, }); cy.wait(1000); - cy.get(".t--widget-buttonwidget") - .eq(0) - .click(); + cy.get(".t--widget-buttonwidget").eq(0).click(); cy.get(commonlocators.toastmsg).should( "contain", "`+(function() { return 3; })()+`", @@ -42,9 +38,7 @@ describe("Binding the list widget with text widget", function() { parseSpecialCharSequences: false, }); cy.wait(1000); - cy.get(".t--widget-buttonwidget") - .eq(0) - .click(); + cy.get(".t--widget-buttonwidget").eq(0).click(); cy.get(commonlocators.toastmsg).should( "contain", '"+(function() { return 3; })()+"', diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/ListWidgetLintErrorValidation.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/ListWidgetLintErrorValidation.js index ae54d4bb02..8b6eb50164 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/ListWidgetLintErrorValidation.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/ListWidgetLintErrorValidation.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/listWidgetLintDsl.json"); -describe("Linting warning validation with list widget", function() { +describe("Linting warning validation with list widget", function () { before(() => { cy.addDsl(dsl); }); - it("Linting Error validation on mouseover and errorlog tab", function() { + it("Linting Error validation on mouseover and errorlog tab", function () { cy.openPropertyPane("listwidget"); /** * @param{Text} Random Text @@ -19,12 +19,8 @@ describe("Linting warning validation with list widget", function() { .wait(500); //lint mark validation - cy.get(commonlocators.lintError) - .first() - .should("be.visible"); - cy.get(commonlocators.lintError) - .last() - .should("be.visible"); + cy.get(commonlocators.lintError).first().should("be.visible"); + cy.get(commonlocators.lintError).last().should("be.visible"); cy.get(commonlocators.lintError) .first() @@ -44,13 +40,9 @@ describe("Linting warning validation with list widget", function() { .should("be.visible") .contains("'DATA' is not defined."); - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); - cy.get(commonlocators.errorTab) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); cy.get(commonlocators.debugErrorMsg).should("have.length", 6); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_FilePicker_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_FilePicker_spec.js index 4b0e3d385a..681f9fd026 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_FilePicker_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_FilePicker_spec.js @@ -4,11 +4,11 @@ const commonlocators = require("../../../../../../locators/commonlocators.json") const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; -describe(" File Picker Widget", function() { +describe(" File Picker Widget", function () { before(() => { cy.addDsl(dsl); }); - it("a. should test allowed values", function() { + it("a. should test allowed values", function () { cy.dragAndDropToWidget("filepickerwidgetv2", "listwidgetv2", { x: 150, y: 50, @@ -46,7 +46,7 @@ describe(" File Picker Widget", function() { ".t--property-control-allowedfiletypes .t--codemirror-has-error", ).should("not.exist"); }); - it("b. Select Widgets isValid and onFilesSelected", function() { + it("b. Select Widgets isValid and onFilesSelected", function () { // Test for isValid === True cy.dragAndDropToWidget("textwidget", "listwidgetv2", { x: 550, @@ -78,9 +78,7 @@ describe(" File Picker Widget", function() { // Upload a new file cy.get(widgetsPage.filepickerwidgetv2).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile.mov"); cy.get(commonlocators.filePickerUploadButton).click(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); @@ -95,9 +93,7 @@ describe(" File Picker Widget", function() { // Upload a new file cy.get(widgetsPage.filepickerwidgetv2).click(); - cy.get(commonlocators.filePickerInput) - .first() - .attachFile("testFile2.mov"); + cy.get(commonlocators.filePickerInput).first().attachFile("testFile2.mov"); cy.get(commonlocators.filePickerUploadButton).click(); //eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); @@ -116,7 +112,7 @@ describe(" File Picker Widget", function() { cy.get(".t--widget-textwidget").should("contain", "true_true_testFile.mov"); }); - it("c. File Widget Max No of Files", function() { + it("c. File Widget Max No of Files", function () { cy.openPropertyPane("filepickerwidgetv2"); cy.get(widgetsPage.filepickerwidgetv2).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Inputs_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Inputs_spec.js index 6ea81785c5..2771eb6a3b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Inputs_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Inputs_spec.js @@ -14,7 +14,7 @@ let agHelper = ObjectsRegistry.AggregateHelper; // TODO: Test for Reset functionality const items = JSON.parse(dsl.dsl.children[0].listData); -describe("Input Widgets", function() { +describe("Input Widgets", function () { before(() => { cy.addDsl(dsl); }); @@ -27,7 +27,7 @@ describe("Input Widgets", function() { agHelper.SaveLocalStorageCache(); }); - it("1. Input Widgets default value", function() { + it("1. Input Widgets default value", function () { cy.dragAndDropToWidget("currencyinputwidget", "listwidgetv2", { x: 50, y: 50, @@ -74,7 +74,7 @@ describe("Input Widgets", function() { .should("contain", items[0].phoneNumber); }); - it("2. Input Widgets isValid", function() { + it("2. Input Widgets isValid", function () { // Test for isValid === True cy.dragAndDropToWidget("textwidget", "listwidgetv2", { x: 350, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Modal_Stats_Check_Radio_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Modal_Stats_Check_Radio_spec.js index 4ad2fe5592..767fa2ae9d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Modal_Stats_Check_Radio_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Modal_Stats_Check_Radio_spec.js @@ -3,11 +3,11 @@ const commonlocators = require("../../../../../../locators/commonlocators.json") const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; -describe("Modal, Radio, Checkbox widget", function() { +describe("Modal, Radio, Checkbox widget", function () { before(() => { cy.addDsl(dsl); }); - it("a. CurrentView Works in modal", function() { + it("a. CurrentView Works in modal", function () { cy.get(`${widgetSelector("Text4")} ${commonlocators.bodyTextStyle}`) .first() .should("have.text", ""); @@ -34,7 +34,7 @@ describe("Modal, Radio, Checkbox widget", function() { cy.get(`${widgetSelector("IconButton2")} button`).click({ force: true }); cy.wait(5000); }); - it("b. Radio And Checkbox connected to modal", function() { + it("b. Radio And Checkbox connected to modal", function () { cy.get(`${widgetSelector("RadioGroup1")} [type="radio"]`).check("N", { force: true, }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Select_Widgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Select_Widgets_spec.js index b2301ba571..250d7e856d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Select_Widgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Select_Widgets_spec.js @@ -12,11 +12,11 @@ const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; const widgetSelectorByType = (name) => `.t--widget-${name}`; const toggleJSButton = (name) => `.t--property-control-${name} .t--js-toggle`; -describe("Select Widgets", function() { +describe("Select Widgets", function () { before(() => { cy.addDsl(dsl); }); - it("a. Select Widgets default value", function() { + it("a. Select Widgets default value", function () { cy.dragAndDropToWidget("multiselectwidgetv2", "listwidgetv2", { x: 150, y: 50, @@ -91,7 +91,7 @@ describe("Select Widgets", function() { force: true, }); }); - it("b. Select Widgets isValid", function() { + it("b. Select Widgets isValid", function () { // Test for isValid === True cy.dragAndDropToWidget("textwidget", "listwidgetv2", { x: 550, @@ -143,7 +143,7 @@ describe("Select Widgets", function() { .first() .should("have.text", `__true_false`); }); - it("c. Select Widgets onOptionChange", function() { + it("c. Select Widgets onOptionChange", function () { cy.get(formWidgetsPage.selectWidget) .find(widgetLocators.dropdownSingleSelect) .click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Table_Widgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Table_Widgets_spec.js index 446f33e927..24174cb562 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Table_Widgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/List_Table_Widgets_spec.js @@ -13,11 +13,11 @@ const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; const widgetSelectorByType = (name) => `.t--widget-${name}`; const toggleJSButton = (name) => `.t--property-control-${name} .t--js-toggle`; -describe("Select Widgets", function() { +describe("Select Widgets", function () { before(() => { cy.addDsl(dsl); }); - it("a. Validate the Values in Table widget", function() { + it("a. Validate the Values in Table widget", function () { cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) .eq(0) .within(() => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js index 720b216b37..bd21e11da1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js @@ -24,9 +24,7 @@ describe("List v2- Tabs Widget", () => { // Enable Scroll Content cy.togglebar(commonlocators.scrollView); // Check if enabled - cy.get(commonlocators.scrollView) - .parent() - .should("have.class", "checked"); + cy.get(commonlocators.scrollView).parent().should("have.class", "checked"); // Check if Tab 1 still selected cy.get(".t--page-switch-tab.is-active").contains("Tab 1"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js index 9841d76b17..8ec5a2ef04 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js @@ -179,9 +179,7 @@ describe("List widget V2 page number and page size", () => { cy.get(queryLocators.queryNameField).type("Query1"); // switching off Use Prepared Statement toggle - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); //.1: Click on Write query area cy.get(queryLocators.templateMenu).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_PropertyPane_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_PropertyPane_spec.js index c85626fbd9..448b30a929 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_PropertyPane_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_PropertyPane_spec.js @@ -27,7 +27,7 @@ describe("List widget V2 PropertyPane", () => { }); }); - it("2. Toggle JS - Validate isVisible", function() { + it("2. Toggle JS - Validate isVisible", function () { // Open Property pane cy.openPropertyPane("listwidgetv2"); //Uncheck the disabled checkbox using JS and validate @@ -46,7 +46,7 @@ describe("List widget V2 PropertyPane", () => { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("3. Renaming the widget from Property pane and Entity explorer ", function() { + it("3. Renaming the widget from Property pane and Entity explorer ", function () { // Open Property pane cy.CheckAndUnfoldEntityItem("Widgets"); cy.selectEntityByName("List1"); @@ -70,7 +70,7 @@ describe("List widget V2 PropertyPane", () => { ); }); - it("4. Item Spacing Validation ", function() { + it("4. Item Spacing Validation ", function () { cy.openPropertyPane("listwidgetv2"); cy.get(commonlocators.PropertyPaneSearchInput).type("item spacing"); cy.testJsontext("itemspacing\\(px\\)", "-1"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_nested_List_widget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_nested_List_widget_spec.js index 3fdad4cb2c..5266fa1cbc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_nested_List_widget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/ListV2_nested_List_widget_spec.js @@ -11,13 +11,13 @@ function checkAutosuggestion(label, type) { expect(afterContent).eq(`"${type}"`); }); } -describe(" Nested List Widgets ", function() { +describe(" Nested List Widgets ", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; before(() => { cy.addDsl(dsl); }); - it("a. Pasting - should show toast when nesting is greater than 3", function() { + it("a. Pasting - should show toast when nesting is greater than 3", function () { cy.openPropertyPaneByWidgetName("List1", "listwidgetv2"); // Copy List1 cy.get(".t--copy-widget").click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js index 6e3c95008c..4aa4ece362 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js @@ -64,9 +64,7 @@ describe("List widget v2 - Basic Child Widget Interaction", () => { cy.get(publishLocators.inputWidget).should("exist"); // Type value - cy.get(publishLocators.inputWidget) - .find("input") - .type("abcd"); + cy.get(publishLocators.inputWidget).find("input").type("abcd"); // Verify if the value got typed cy.get(publishLocators.inputWidget) @@ -176,9 +174,7 @@ describe("List widget v2 - Basic Child Widget Interaction", () => { ); // Verify checked - cy.get(publishLocators.switchwidget) - .find("input") - .should("be.checked"); + cy.get(publishLocators.switchwidget).find("input").should("be.checked"); cy.wait(1000); cy.waitUntil(() => cy diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_BasicServerSideData_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_BasicServerSideData_spec.js index c173b21866..487742da9c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_BasicServerSideData_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_BasicServerSideData_spec.js @@ -105,17 +105,13 @@ describe("List widget v2 - Basic server side data tests", () => { cy.get(commonlocators.toastmsg).should("not.exist"); // Reset List widget - cy.get(".t--draggable-buttonwidget") - .find("button") - .click({ force: true }); + cy.get(".t--draggable-buttonwidget").find("button").click({ force: true }); // Verify if page 1 cy.get(".rc-pagination-item").contains(1); // Verify if Query fired once - cy.get(commonlocators.toastmsg) - .should("exist") - .should("have.length", 1); + cy.get(commonlocators.toastmsg).should("exist").should("have.length", 1); }); it("4. retains input values when pages are switched", () => { @@ -166,9 +162,7 @@ describe("List widget v2 - Basic server side data tests", () => { .find("button") .click({ force: true }); - cy.get(".rc-pagination-item") - .contains(1) - .wait(5000); + cy.get(".rc-pagination-item").contains(1).wait(5000); // Verify if previously the typed values are retained cy.get(".t--draggable-inputwidgetv2").each(($inputWidget, index) => { @@ -236,11 +230,9 @@ describe("List widget v2 - Basic server side data tests", () => { cy.get(queryLocators.queryNameField).type("Query2"); // switching off Use Prepared Statement toggle - cy.get(queryLocators.switch) - .last() - .click({ - force: true, - }); + cy.get(queryLocators.switch).last().click({ + force: true, + }); //.1: Click on Write query area cy.get(queryLocators.templateMenu).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Copy_Paste_Delete_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Copy_Paste_Delete_spec.js index 722320f7be..e3c0a1f22f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Copy_Paste_Delete_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Copy_Paste_Delete_spec.js @@ -39,9 +39,7 @@ describe("List widget v2 Copy and Paste", () => { cy.openPropertyPane("listwidgetv2"); cy.get(".t--delete-widget").click({ force: true }); - cy.get(".t--toast-action span") - .eq(0) - .contains("List1 is removed"); + cy.get(".t--toast-action span").eq(0).contains("List1 is removed"); cy.wait("@updateLayout").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js index 5935dc01dd..4c63dba8cd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js @@ -108,9 +108,7 @@ describe("List widget v2 - meta hydration tests", () => { cy.get(queryLocators.queryNameField).type("Query1"); // switching off Use Prepared Statement toggle - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); //.1: Click on Write query area cy.get(queryLocators.templateMenu).click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Nested_EventBindings_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Nested_EventBindings_spec.js index 3a4169ee20..be8ff7f264 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Nested_EventBindings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_Nested_EventBindings_spec.js @@ -19,19 +19,13 @@ describe("Listv2 - Event bindings spec", () => { "{{showAlert(`${level_1.currentView.Text1.text} _ ${level_1.currentItem.id} _ ${level_1.currentIndex} _ ${level_1.currentView.Input1.text} _ ${currentView.Input2.text}`)}}", ); // Enter text in the parent list widget's text input - cy.get(widgetSelector("Input1")) - .find("input") - .type("outer input"); + cy.get(widgetSelector("Input1")).find("input").type("outer input"); // Enter text in the child list widget's text input in first row - cy.get(widgetSelector("Input2")) - .find("input") - .type("inner input"); + cy.get(widgetSelector("Input2")).find("input").type("inner input"); // click the button on inner list 1st row. - cy.get(widgetSelector("Button3")) - .find("button") - .click({ force: true }); + cy.get(widgetSelector("Button3")).find("button").click({ force: true }); cy.get(commonlocators.toastmsg).contains( "Blue _ 001 _ 0 _ outer input _ inner input", @@ -52,9 +46,7 @@ describe("Listv2 - Event bindings spec", () => { .type("inner input updated"); // click the button on inner list 1st row. - cy.get(widgetSelector("Button3")) - .find("button") - .click({ force: true }); + cy.get(widgetSelector("Button3")).find("button").click({ force: true }); cy.wait(1000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_autocomplete_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_autocomplete_spec.js index 859217dc3d..31aaee061b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_autocomplete_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_autocomplete_spec.js @@ -102,18 +102,20 @@ describe("List v2 - Property autocomplete", () => { // level_1 List currentItemsView should not exist cy.testJsontext("text", ""); - cy.get( - ".t--property-control-text .CodeMirror textarea", - ).type("{{level_1.currentView.List2.", { force: true }); + cy.get(".t--property-control-text .CodeMirror textarea").type( + "{{level_1.currentView.List2.", + { force: true }, + ); cy.get(".CodeMirror-hints") .contains("currentItemsView") .should("not.exist"); // level_2 List currentItemsView should not exist cy.testJsontext("text", ""); - cy.get( - ".t--property-control-text .CodeMirror textarea", - ).type("{{level_2.currentView.List3.", { force: true }); + cy.get(".t--property-control-text .CodeMirror textarea").type( + "{{level_2.currentView.List3.", + { force: true }, + ); cy.get(".CodeMirror-hints") .contains("currentItemsView") .should("not.exist"); @@ -124,9 +126,10 @@ describe("List v2 - Property autocomplete", () => { cy.openPropertyPaneByWidgetName("Text1", "textwidget"); cy.testJsontext("text", ""); - cy.get( - ".t--property-control-text .CodeMirror textarea", - ).type("{{currentItem.", { force: true }); + cy.get(".t--property-control-text .CodeMirror textarea").type( + "{{currentItem.", + { force: true }, + ); checkAutosuggestion("companyName", "String"); checkAutosuggestion("id", "Number"); checkAutosuggestion("location", "String"); @@ -139,34 +142,38 @@ describe("List v2 - Property autocomplete", () => { // level_1.currentView cy.testJsontext("text", ""); - cy.get( - ".t--property-control-text .CodeMirror textarea", - ).type("{{level_1.currentView.", { force: true }); + cy.get(".t--property-control-text .CodeMirror textarea").type( + "{{level_1.currentView.", + { force: true }, + ); checkAutosuggestion("Text1", "Object"); checkAutosuggestion("Text2", "Object"); checkAutosuggestion("List2", "Object"); // level_1.currentView.Text1 cy.testJsontext("text", ""); - cy.get( - ".t--property-control-text .CodeMirror textarea", - ).type("{{level_1.currentView.Text1.", { force: true }); + cy.get(".t--property-control-text .CodeMirror textarea").type( + "{{level_1.currentView.Text1.", + { force: true }, + ); checkAutosuggestion("text", "String"); checkAutosuggestion("isVisible", "Boolean"); // level_1.currentView.Text2 cy.testJsontext("text", ""); - cy.get( - ".t--property-control-text .CodeMirror textarea", - ).type("{{level_1.currentView.Text2.", { force: true }); + cy.get(".t--property-control-text .CodeMirror textarea").type( + "{{level_1.currentView.Text2.", + { force: true }, + ); checkAutosuggestion("text", "String"); checkAutosuggestion("isVisible", "Boolean"); // level_1.currentView.List2 cy.testJsontext("text", ""); - cy.get( - ".t--property-control-text .CodeMirror textarea", - ).type("{{level_1.currentView.List2.", { force: true }); + cy.get(".t--property-control-text .CodeMirror textarea").type( + "{{level_1.currentView.List2.", + { force: true }, + ); checkAutosuggestion("backgroundColor", "String"); checkAutosuggestion("itemSpacing", "Number"); checkAutosuggestion("isVisible", "Boolean"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_container_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_container_spec.js index fd9268f342..208d74911d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_container_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_container_spec.js @@ -18,9 +18,7 @@ describe("Listv2 - Container widget", () => { cy.openPropertyPaneByWidgetName("Container1", "containerwidget"); // Open style table - cy.get(commonlocators.propertyStyle) - .first() - .click({ force: true }); + cy.get(commonlocators.propertyStyle).first().click({ force: true }); cy.get(".t--property-control-backgroundcolor") .find(".t--js-toggle") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_dataIdentifierProperty_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_dataIdentifierProperty_spec.js index eb6fa7db09..83339cebdd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_dataIdentifierProperty_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_dataIdentifierProperty_spec.js @@ -65,9 +65,7 @@ describe("List v2 - Data Identifier property", () => { .click({ force: true }); cy.wait(250); - cy.get(".t--dropdown-option") - .first() - .click({ force: true }); + cy.get(".t--dropdown-option").first().click({ force: true }); cy.wait(1000); @@ -115,16 +113,11 @@ describe("List v2 - Data Identifier property", () => { .click({ force: true }); cy.wait(250); - cy.get(".t--dropdown-option") - .first() - .click({ force: true }); + cy.get(".t--dropdown-option").first().click({ force: true }); cy.get(widgetsPage.containerWidget).should("have.length", 2); - cy.get(".rc-pagination") - .find("a") - .contains("2") - .click({ force: true }); + cy.get(".rc-pagination").find("a").contains("2").click({ force: true }); cy.get(widgetsPage.containerWidget).should("have.length", 2); }); @@ -139,26 +132,19 @@ describe("List v2 - Data Identifier property", () => { .click({ force: true }); cy.wait(250); - cy.get(".t--dropdown-option") - .last() - .click({ force: true }); + cy.get(".t--dropdown-option").last().click({ force: true }); cy.get(widgetsPage.containerWidget).should("have.length", 2); // click on debugger icon - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); cy.get(".debugger-list").contains( "This data identifier is evaluating to a duplicate value. Please use an identifier that evaluates to a unique value.", ); }); it("8. pagination should work for non unique data identifier", () => { - cy.get(".rc-pagination") - .find("a") - .contains("2") - .click({ force: true }); + cy.get(".rc-pagination").find("a").contains("2").click({ force: true }); cy.get(widgetsPage.containerWidget).should("have.length", 2); }); @@ -179,11 +165,9 @@ describe("List v2 - Data Identifier property", () => { .first() .should("have.text", `0`); - cy.get(commonlocators.listPaginateNextButton) - .first() - .click({ - force: true, - }); + cy.get(commonlocators.listPaginateNextButton).first().click({ + force: true, + }); cy.wait(1000); cy.get(`${widgetSelector("Text2")} ${commonlocators.bodyTextStyle}`) @@ -200,21 +184,17 @@ describe("List v2 - Data Identifier property", () => { .first() .should("have.text", `0`); - cy.get(commonlocators.listPaginateNextButton) - .eq(1) - .click({ - force: true, - }); + cy.get(commonlocators.listPaginateNextButton).eq(1).click({ + force: true, + }); cy.get(`${widgetSelector("Text4")} ${commonlocators.bodyTextStyle}`) .first() .should("have.text", `1`); - cy.get(commonlocators.listPaginateNextButton) - .eq(1) - .click({ - force: true, - }); + cy.get(commonlocators.listPaginateNextButton).eq(1).click({ + force: true, + }); cy.get(`${widgetSelector("Text4")} ${commonlocators.bodyTextStyle}`) .first() diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_event_bindings_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_event_bindings_spec.js index 681adc0ab9..7d1ffc2a89 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_event_bindings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_event_bindings_spec.js @@ -19,14 +19,10 @@ describe("Listv2 - Event bindings", () => { "{{showAlert(`${currentView.Input1.text} _ ${currentItem.id} _ ${currentIndex}`)}}", ); // Enter text in the parent list widget's text input - cy.get(widgetSelector("Input1")) - .find("input") - .type("Input"); + cy.get(widgetSelector("Input1")).find("input").type("Input"); // click the button on inner list 1st row. - cy.get(widgetSelector("Button1")) - .find("button") - .click({ force: true }); + cy.get(widgetSelector("Button1")).find("button").click({ force: true }); cy.get(commonlocators.toastmsg).contains("Input _ 000 _ 0"); }); @@ -39,9 +35,7 @@ describe("Listv2 - Event bindings", () => { .type("Updated Input"); // click the button on inner list 1st row. - cy.get(widgetSelector("Button1")) - .find("button") - .click({ force: true }); + cy.get(widgetSelector("Button1")).find("button").click({ force: true }); cy.wait(1000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_onItemClick_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_onItemClick_spec.js index 78543fcbcc..088e5049ea 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_onItemClick_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_onItemClick_spec.js @@ -24,18 +24,14 @@ describe("List widget v2 onItemClick", () => { .click({ force: true }); cy.validateToastMessage("ListWidget_Blue_0"); - cy.get(commonlocators.toastBody) - .first() - .click(); + cy.get(commonlocators.toastBody).first().click(); cy.wait(300); cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) .eq(1) .click({ force: true }); cy.validateToastMessage("ListWidget_Green_1"); - cy.get(commonlocators.toastBody) - .first() - .click(); + cy.get(commonlocators.toastBody).first().click(); cy.wait(300); cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`) @@ -43,16 +39,12 @@ describe("List widget v2 onItemClick", () => { .click({ force: true }); cy.validateToastMessage("ListWidget_Red_2"); - cy.get(commonlocators.toastBody) - .first() - .click(); + cy.get(commonlocators.toastBody).first().click(); cy.wait(300); }); it("2. List widget V2 with onItemClick shouldn't be triggered when child widget is clicked", () => { - cy.get(widgetSelector("Image1")) - .first() - .click({ force: true }); + cy.get(widgetSelector("Image1")).first().click({ force: true }); cy.get(commonlocators.toastmsg).should("not.exist"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_spec.js index 8a39222c0c..c88a59914d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_spec.js @@ -2,7 +2,7 @@ const dsl = require("../../../../../fixtures/Listv2/simpleLargeListv2.json"); const explorer = require("../../../../../locators/explorerlocators.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("List Widget V2 Functionality", function() { +describe("List Widget V2 Functionality", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_vulnerability_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_vulnerability_spec.js index 6bf6775513..4b03a94182 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_vulnerability_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_vulnerability_spec.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/Listv2/simpleListVulnerability.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); -describe("Binding the list widget with text widget", function() { +describe("Binding the list widget with text widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Validate that list widget doesn't execute code", function() { + it("1. Validate that list widget doesn't execute code", function () { // First input cy.get(".t--widget-inputwidgetv2 input") .eq(0) @@ -14,9 +14,7 @@ describe("Binding the list widget with text widget", function() { parseSpecialCharSequences: false, }); cy.wait(1000); - cy.get(".t--widget-buttonwidget") - .eq(0) - .click(); + cy.get(".t--widget-buttonwidget").eq(0).click(); cy.get(commonlocators.toastmsg).contains( "'+(function() { return 3; })()+'", ); @@ -29,9 +27,7 @@ describe("Binding the list widget with text widget", function() { parseSpecialCharSequences: false, }); cy.wait(1000); - cy.get(".t--widget-buttonwidget") - .eq(0) - .click(); + cy.get(".t--widget-buttonwidget").eq(0).click(); cy.get(commonlocators.toastmsg).should( "contain", "`+(function() { return 3; })()+`", @@ -45,9 +41,7 @@ describe("Binding the list widget with text widget", function() { parseSpecialCharSequences: false, }); cy.wait(1000); - cy.get(".t--widget-buttonwidget") - .eq(0) - .click(); + cy.get(".t--widget-buttonwidget").eq(0).click(); cy.get(commonlocators.toastmsg).should( "contain", '"+(function() { return 3; })()+"', diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Migration_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Migration_Spec.js index ce009d518d..7bb9563250 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Migration_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Migration_Spec.js @@ -3,13 +3,11 @@ const widgetsPage = require("../../../../locators/Widgets.json"); import homePage from "../../../../locators/HomePage"; -describe("Migration Validate", function() { - it("1. Import application and Validate Migration on pageload", function() { +describe("Migration Validate", function () { + it("1. Import application and Validate Migration on pageload", function () { // import application cy.get(homePage.homeIcon).click(); - cy.get(homePage.optionsIcon) - .first() - .click(); + cy.get(homePage.optionsIcon).first().click(); cy.get(homePage.workspaceImportAppOption).click({ force: true }); cy.get(homePage.workspaceImportAppModal).should("be.visible"); cy.xpath(homePage.uploadLogo) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal/Modal_focus_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal/Modal_focus_spec.js index b9200c071d..caa89f72a4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal/Modal_focus_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal/Modal_focus_spec.js @@ -5,7 +5,7 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper, ee = ObjectsRegistry.EntityExplorer; -describe("Modal focus", function() { +describe("Modal focus", function () { const someInputText = "some text"; function setupModalWithInputWidget() { @@ -63,9 +63,7 @@ describe("Modal focus", function() { cy.get(widgets.modalCloseButton).click({ force: true }); //open the modal - cy.get(widgets.widgetBtn) - .contains("Submit") - .click({ force: true }); + cy.get(widgets.widgetBtn).contains("Submit").click({ force: true }); //check if the focus is on the input field cy.focused().should("have.value", someInputText); }); @@ -81,9 +79,7 @@ describe("Modal focus", function() { cy.get(widgets.modalCloseButton).click({ force: true }); //open the modal cy.get(widgets.modalWidget).should("not.exist"); - cy.get(widgets.widgetBtn) - .contains("Submit") - .click({ force: true }); + cy.get(widgets.widgetBtn).contains("Submit").click({ force: true }); //check if the focus is not on the input field cy.focused().should("not.have.value", someInputText); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal/Modal_functionaliy_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal/Modal_functionaliy_spec.js index 17c5796dd3..c79c233d7e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal/Modal_functionaliy_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal/Modal_functionaliy_spec.js @@ -6,7 +6,7 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper, ee = ObjectsRegistry.EntityExplorer; -describe("Modal Widget Functionality", function() { +describe("Modal Widget Functionality", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -47,9 +47,7 @@ describe("Modal Widget Functionality", function() { cy.SearchEntityandOpen("Modal1"); cy.wait(200); cy.get("body").type(`{${modifierKey}}c`); - cy.get(commonlocators.toastBody) - .first() - .contains("Copied"); + cy.get(commonlocators.toastBody).first().contains("Copied"); cy.wait(1000); //make sure evaluated value disappears cy.get(widgets.modalCloseButton).click({ force: true }); @@ -71,9 +69,7 @@ describe("Modal Widget Functionality", function() { cy.get(".t--modal-widget").should("exist"); //select text widget inside the modal - cy.get(".t--modal-widget") - .find(".t--widget-textwidget") - .click(); + cy.get(".t--modal-widget").find(".t--widget-textwidget").click(); cy.get(".t--modal-widget") .find(".t--widget-textwidget div[data-testid='t--selected']") .should("have.length", 1); @@ -97,9 +93,7 @@ describe("Modal Widget Functionality", function() { cy.get(widgets.modalCloseButton).click({ force: true }); cy.dragAndDropToCanvas("containerwidget", { x: 300, y: 300 }); cy.get("#switcher--explorer").click(); - cy.get(".t--entity-name") - .contains("Widgets") - .click(); + cy.get(".t--entity-name").contains("Widgets").click(); //select all widgets and copy cy.get(`#div-selection-0`).click({ diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal_On_Table_Filter_Pane_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal_On_Table_Filter_Pane_spec.js index 6934929dde..6c101050d3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal_On_Table_Filter_Pane_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal_On_Table_Filter_Pane_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../../fixtures/modalOnTableFilterPaneDsl.json"); const widgets = require("../../../../locators/Widgets.json"); -describe("Modal Widget Functionality", function() { +describe("Modal Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect1_spec.js index b99d9fd513..90ce215d47 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect1_spec.js @@ -2,7 +2,7 @@ const dsl = require("../../../../../fixtures/emptyDSL.json"); const explorer = require("../../../../../locators/explorerlocators.json"); const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); -describe("MultiSelect Widget Functionality", function() { +describe("MultiSelect Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect2_spec.js index 3ad28a06f4..f960b5fa2c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect2_spec.js @@ -15,7 +15,7 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper, propPane = ObjectsRegistry.PropertyPane; -describe("MultiSelect Widget Functionality", function() { +describe("MultiSelect Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -61,9 +61,7 @@ describe("MultiSelect Widget Functionality", function() { .focus({ force: true }) .type("{uparrow}", { force: true }); // Search for Option 2 in the search input - cy.get(".rc-select-dropdown input[type='text']") - .click() - .type("Option 2"); + cy.get(".rc-select-dropdown input[type='text']").click().type("Option 2"); // Select Option 2 cy.get(".multi-select-dropdown") .contains("Option 2") @@ -99,9 +97,7 @@ describe("MultiSelect Widget Functionality", function() { .focus({ force: true }) .type("{uparrow}", { force: true }); // Search for Option 2 in the search input - cy.get(".rc-select-dropdown input[type='text']") - .click() - .type("Option 2"); + cy.get(".rc-select-dropdown input[type='text']").click().type("Option 2"); // Click on Option 2 cy.get(".multi-select-dropdown") .contains("Option 2") @@ -128,12 +124,12 @@ describe("MultiSelect Widget Functionality", function() { ); }); - it("5. Dropdown Functionality To Validate Options", function() { + it("5. Dropdown Functionality To Validate Options", function () { cy.get(".rc-select-selector").click({ force: true }); cy.dropdownMultiSelectDynamic("Option 2"); }); - it("6. Dropdown Functionality To Check Allow select all option", function() { + it("6. Dropdown Functionality To Check Allow select all option", function () { // select all option is not enable cy.get(formWidgetsPage.multiselectwidgetv2) .find(".rc-select-selection-item-content") @@ -162,7 +158,7 @@ describe("MultiSelect Widget Functionality", function() { .should("have.text", "Option 2"); }); - it("7. Check isDirty meta property", function() { + it("7. Check isDirty meta property", function () { cy.openPropertyPane(WIDGET.TEXT); cy.updateCodeInput(PROPERTY_SELECTOR.text, `{{MultiSelect2.isDirty}}`); // Init isDirty by changing defaultOptionValue @@ -171,25 +167,19 @@ describe("MultiSelect Widget Functionality", function() { PROPERTY_SELECTOR.defaultValue, '[\n {\n "label": "Option 1",\n "value": "1"\n }\n]', ); - cy.get(getWidgetSelector(WIDGET.TEXT)) - .eq(0) - .should("contain", "false"); + cy.get(getWidgetSelector(WIDGET.TEXT)).eq(0).should("contain", "false"); // Interact with UI cy.get(".rc-select-selector").click({ force: true }); cy.dropdownMultiSelectDynamic("Option 2"); // Check if isDirty is set to true - cy.get(getWidgetSelector(WIDGET.TEXT)) - .eq(0) - .should("contain", "true"); + cy.get(getWidgetSelector(WIDGET.TEXT)).eq(0).should("contain", "true"); // Reset isDirty by changing defaultOptionValue cy.updateCodeInput( PROPERTY_SELECTOR.defaultValue, '[\n {\n "label": "Option 2",\n "value": "2"\n }\n]', ); // Check if isDirty is set to false - cy.get(getWidgetSelector(WIDGET.TEXT)) - .eq(0) - .should("contain", "false"); + cy.get(getWidgetSelector(WIDGET.TEXT)).eq(0).should("contain", "false"); }); const resetTestCases = [ @@ -238,14 +228,10 @@ describe("MultiSelect Widget Functionality", function() { }, ]; - it("8. Verify MultiSelect resets to default value", function() { + it("8. Verify MultiSelect resets to default value", function () { resetTestCases.forEach((testCase) => { - const { - defaultValue, - options, - optionsToDeselect, - optionsToSelect, - } = testCase; + const { defaultValue, options, optionsToDeselect, optionsToSelect } = + testCase; cy.openPropertyPane("multiselectwidgetv2"); // set options @@ -275,7 +261,7 @@ describe("MultiSelect Widget Functionality", function() { }); }); - it("9. Verify MultiSelect deselection behavior", function() { + it("9. Verify MultiSelect deselection behavior", function () { cy.openPropertyPane("multiselectwidgetv2"); // set options propPane.UpdatePropertyFieldValue( @@ -286,12 +272,10 @@ describe("MultiSelect Widget Functionality", function() { propPane.UpdatePropertyFieldValue("Default Selected Values", '["RED"]'); agHelper.RemoveMultiSelectItems(["RED"]); // verify value is equal to default value - cy.get(getWidgetSelector("textwidget")) - .eq(1) - .should("have.text", ""); + cy.get(getWidgetSelector("textwidget")).eq(1).should("have.text", ""); }); - it("10. Dropdown Functionality To Unchecked Visible Widget", function() { + it("10. Dropdown Functionality To Unchecked Visible Widget", function () { cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.multiselectwidgetv2 + " " + ".rc-select-selector").should( @@ -300,7 +284,7 @@ describe("MultiSelect Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("11. Dropdown Functionality To Check Visible Widget", function() { + it("11. Dropdown Functionality To Check Visible Widget", function () { cy.openPropertyPane("multiselectwidgetv2"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect3_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect3_spec.js index 9716b7a348..8e96a9ffb0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect3_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect3_spec.js @@ -2,12 +2,12 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const widgetLocators = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/widgetPopupDsl.json"); -describe("Dropdown Widget Functionality", function() { +describe("Dropdown Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Verify dropdown width of Select widgets and menu button", function() { + it("Verify dropdown width of Select widgets and menu button", function () { // Select cy.wait(450); cy.get(formWidgetsPage.selectwidget) @@ -96,7 +96,7 @@ describe("Dropdown Widget Functionality", function() { }); }); - it("Verify dropdown width of Select widgets with Label", function() { + it("Verify dropdown width of Select widgets with Label", function () { // Select cy.openPropertyPane("selectwidget"); cy.testJsontext("text", "Label"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect4_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect4_spec.js index f6b261e7b3..c80466ac33 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect4_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiSelect4_spec.js @@ -9,7 +9,7 @@ const defaultValue = `[ } ]`; -describe("MultiSelect Widget Functionality", function() { +describe("MultiSelect Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiTreeSelect_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiTreeSelect_spec.js index c6bf38c265..0c19bbfbf4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiTreeSelect_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/MultiTreeSelect_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../../../fixtures/emptyDSL.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("Multi Tree Select Widget", function() { +describe("Multi Tree Select Widget", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/Multi_Select_Tree_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/Multi_Select_Tree_spec.js index 82ffbe51e9..166c5643fb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/Multi_Select_Tree_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Multiselect/Multi_Select_Tree_spec.js @@ -5,12 +5,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const explorer = require("../../../../../locators/explorerlocators.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("MultiSelectTree Widget Functionality", function() { +describe("MultiSelectTree Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Check isDirty meta property", function() { + it("1. Check isDirty meta property", function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); cy.openPropertyPane("textwidget"); @@ -24,9 +24,7 @@ describe("MultiSelectTree Widget Functionality", function() { // Check if isDirty is set to false cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(formWidgetsPage.treeSelectInput) - .first() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectInput).first().click({ force: true }); cy.treeMultiSelectDropdown("Red"); // Check if isDirty is set to true cy.get(".t--widget-textwidget").should("contain", "true"); @@ -44,9 +42,7 @@ describe("MultiSelectTree Widget Functionality", function() { .first() .should("have.text", "Red"); // Clear the selected value - cy.get(formWidgetsPage.treeSelectInput) - .first() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectInput).first().click({ force: true }); cy.treeMultiSelectDropdown("Red"); }); @@ -55,9 +51,7 @@ describe("MultiSelectTree Widget Functionality", function() { // search for option Red in the search input cy.openPropertyPane("multiselecttreewidget"); cy.testJsontext("defaultselectedvalues", ""); - cy.get(formWidgetsPage.treeSelectInput) - .first() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectInput).first().click({ force: true }); cy.get(formWidgetsPage.multiTreeSelectFilterInput) .click({ force: true }) .type("Green"); @@ -69,9 +63,7 @@ describe("MultiSelectTree Widget Functionality", function() { .first() .should("have.text", "Green"); // Reopen the multi-tree select widget - cy.get(formWidgetsPage.treeSelectInput) - .first() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectInput).first().click({ force: true }); // Assert if the search input is empty now cy.get(formWidgetsPage.multiTreeSelectFilterInput) .invoke("val") @@ -80,17 +72,13 @@ describe("MultiSelectTree Widget Functionality", function() { cy.testJsontext("defaultselectedvalues", "RED\n"); }); - it("4. To Validate Options", function() { - cy.get(formWidgetsPage.treeSelectInput) - .first() - .click({ force: true }); - cy.get(formWidgetsPage.multiTreeSelectFilterInput) - .click() - .type("light"); + it("4. To Validate Options", function () { + cy.get(formWidgetsPage.treeSelectInput).first().click({ force: true }); + cy.get(formWidgetsPage.multiTreeSelectFilterInput).click().type("light"); cy.treeMultiSelectDropdown("Light Blue"); }); - it("5. To Unchecked Visible Widget", function() { + it("5. To Unchecked Visible Widget", function () { cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get( @@ -99,7 +87,7 @@ describe("MultiSelectTree Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("6. To Check Visible Widget", function() { + it("6. To Check Visible Widget", function () { cy.openPropertyPane("multiselecttreewidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -109,13 +97,9 @@ describe("MultiSelectTree Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("7. To Check Option Not Found", function() { - cy.get(formWidgetsPage.treeSelectInput) - .first() - .click({ force: true }); - cy.get(formWidgetsPage.multiTreeSelectFilterInput) - .click() - .type("ABCD"); + it("7. To Check Option Not Found", function () { + cy.get(formWidgetsPage.treeSelectInput).first().click({ force: true }); + cy.get(formWidgetsPage.multiTreeSelectFilterInput).click().type("ABCD"); cy.get(".tree-multiselect-dropdown .rc-tree-select-empty").contains( "No Results Found", ); @@ -126,9 +110,7 @@ describe("MultiSelectTree Widget Functionality", function() { // enter tooltip in property pan cy.get(widgetsPage.inputTooltipControl).type("Helpful text for tooltip !"); // tooltip help icon shows - cy.get(".multitree-select-tooltip") - .scrollIntoView() - .should("be.visible"); + cy.get(".multitree-select-tooltip").scrollIntoView().should("be.visible"); }); }); afterEach(() => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Autocomplete_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Autocomplete_spec.js index c15cacc202..44f4ee1ab9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Autocomplete_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Autocomplete_spec.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/slashcommandDsl.json"); const dynamicInputLocators = require("../../../../../locators/DynamicInput.json"); -describe("Autocomplete using slash command and mustache tests", function() { +describe("Autocomplete using slash command and mustache tests", function () { before(() => { cy.addDsl(dsl); }); - it("Slash command and mustache autocomplete validation for button widget", function() { + it("Slash command and mustache autocomplete validation for button widget", function () { cy.openPropertyPane("buttonwidget"); cy.testCodeMirror("/").then(() => { cy.get(dynamicInputLocators.hints).should("exist"); @@ -29,9 +29,7 @@ describe("Autocomplete using slash command and mustache tests", function() { .type("{backspace}", { parseSpecialCharSequences: true }) .then(() => { // validates autocomplete binding on entering {{}} in label field - cy.get(dynamicInputLocators.input) - .first() - .type("{shift}{{}{shift}{{}"); + cy.get(dynamicInputLocators.input).first().type("{shift}{{}{shift}{{}"); cy.get(`${dynamicInputLocators.hints} li`) .eq(1) .should("have.text", "Text1.text"); @@ -80,7 +78,7 @@ describe("Autocomplete using slash command and mustache tests", function() { }); }); - it("Slash command and mustache autocomplete validation for textbox widget", function() { + it("Slash command and mustache autocomplete validation for textbox widget", function () { cy.openPropertyPane("textwidget"); cy.EnableAllCodeEditors(); cy.testCodeMirror("/").then(() => { @@ -103,9 +101,7 @@ describe("Autocomplete using slash command and mustache tests", function() { .type("{ctrl}{shift}{downarrow}", { parseSpecialCharSequences: true }) .type("{backspace}", { parseSpecialCharSequences: true }) .then(() => { - cy.get(dynamicInputLocators.input) - .first() - .type("{shift}{{}{shift}{{}"); + cy.get(dynamicInputLocators.input).first().type("{shift}{{}{shift}{{}"); // validates autocomplete binding on entering {{}} in text field cy.get(`${dynamicInputLocators.hints} li`) .eq(1) @@ -116,7 +112,7 @@ describe("Autocomplete using slash command and mustache tests", function() { }); }); - it("Bug 9003: Autocomplete not working for Appsmith specific JS APIs", function() { + it("Bug 9003: Autocomplete not working for Appsmith specific JS APIs", function () { cy.openPropertyPane("buttonwidget"); cy.get(".t--property-control-onclick") .find(".t--js-toggle") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Camera_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Camera_spec.js index 76034fb672..b131e792e0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Camera_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Camera_spec.js @@ -25,14 +25,10 @@ describe("Camera Widget", () => { // Initial value of isDirty should be false cy.get(".t--widget-textwidget").should("contain", "false"); // Take photo - cy.xpath(mainControlSelector) - .eq(2) - .click(); //taking photo + cy.xpath(mainControlSelector).eq(2).click(); //taking photo cy.wait(2000); // Save photo - cy.xpath(mainControlSelector) - .eq(2) - .click(); //saving it + cy.xpath(mainControlSelector).eq(2).click(); //saving it // Assert: should trigger onImageSave action - modal popup cy.get(modalWidgetPage.modelTextField).should("have.text", modalName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Canvas_scrolling_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Canvas_scrolling_spec.js index 6b62ec55bc..39fdab0613 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Canvas_scrolling_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Canvas_scrolling_spec.js @@ -1,6 +1,6 @@ const dsl = require("../../../../../fixtures/modalScroll.json"); -describe("Modal Widget Functionality", function() { +describe("Modal Widget Functionality", function () { before(() => { cy.addDsl(dsl); cy.wait(7000); @@ -9,21 +9,13 @@ describe("Modal Widget Functionality", function() { it("1. [Bug]- 11415 - Open Modal from button and test scroll", () => { cy.PublishtheApp(); cy.wait(1000); - cy.get("span:contains('Submit')") - .closest("div") - .click(); + cy.get("span:contains('Submit')").closest("div").click(); cy.get(".t--modal-widget").should("exist"); - cy.get("span:contains('Close')") - .closest("div") - .should("not.be.visible"); + cy.get("span:contains('Close')").closest("div").should("not.be.visible"); cy.get(".t--modal-widget").then(($el) => $el[0].scrollTo(0, 500)); - cy.get("span:contains('Close')") - .closest("div") - .should("be.visible"); + cy.get("span:contains('Close')").closest("div").should("be.visible"); cy.get(".t--modal-widget").then(($el) => $el[0].scrollTo(0, 0)); - cy.get("span:contains('Close')") - .closest("div") - .should("not.be.visible"); + cy.get("span:contains('Close')").closest("div").should("not.be.visible"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Divider_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Divider_spec.js index 9d79f3e63c..c35fc6d2d7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Divider_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Divider_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../../../fixtures/DividerDsl.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("Divider Widget Functionality", function() { +describe("Divider Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/IconButton_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/IconButton_spec.js index d11d792bec..ffdf559d9b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/IconButton_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/IconButton_spec.js @@ -4,12 +4,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const publishPage = require("../../../../../locators/publishWidgetspage.json"); -describe("Icon Button Widget Functionality", function() { +describe("Icon Button Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. check default buttonVariant with isJSConvertible", function() { + it("1. check default buttonVariant with isJSConvertible", function () { cy.openPropertyPane("iconbuttonwidget"); cy.moveToStyleTab(); cy.get(formWidgetsPage.toggleButtonVariant).click(); @@ -20,7 +20,7 @@ describe("Icon Button Widget Functionality", function() { ); }); - it("2. add space into buttonVariant and validate", function() { + it("2. add space into buttonVariant and validate", function () { cy.get(".t--property-control-buttonvariant .CodeMirror textarea") .first() .focus() @@ -45,7 +45,7 @@ describe("Icon Button Widget Functionality", function() { ); }); - it("3. show alert on button click", function() { + it("3. show alert on button click", function () { cy.moveToContentTab(); cy.get(".t--property-control-onclick") .find(".t--js-toggle") @@ -65,7 +65,7 @@ describe("Icon Button Widget Functionality", function() { cy.goToEditFromPublish(); }); - it("4. should not show alert onclick if button is disabled", function() { + it("4. should not show alert onclick if button is disabled", function () { cy.openPropertyPane("iconbuttonwidget"); cy.CheckWidgetProperties(commonlocators.disableCheckbox); cy.get(widgetsPage.iconWidgetBtn).click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/MapChart_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/MapChart_spec.js index 18edf028dc..43b2cd6a47 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/MapChart_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/MapChart_spec.js @@ -3,7 +3,7 @@ const viewWidgetsPage = require("../../../../../locators/ViewWidgets.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/MapChartDsl.json"); -describe("Map Chart Widget Functionality", function() { +describe("Map Chart Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -16,7 +16,7 @@ describe("Map Chart Widget Functionality", function() { cy.goToEditFromPublish(); }); - it("Change Title", function() { + it("Change Title", function () { cy.testJsontext("title", this.data.chartIndata); cy.get(viewWidgetsPage.chartInnerText) .contains("App Sign Up") @@ -24,21 +24,19 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Show Labels: FALSE", function() { + it("Show Labels: FALSE", function () { cy.togglebarDisable(commonLocators.mapChartShowLabels); cy.get(viewWidgetsPage.mapChartEntityLabels).should("not.exist"); cy.PublishtheApp(); }); - it("Show Labels: TRUE", function() { + it("Show Labels: TRUE", function () { cy.togglebar(commonLocators.mapChartShowLabels); - cy.get(viewWidgetsPage.mapChartEntityLabels) - .eq(1) - .should("exist"); + cy.get(viewWidgetsPage.mapChartEntityLabels).eq(1).should("exist"); cy.PublishtheApp(); }); - it("Map type: World with Antarctica", function() { + it("Map type: World with Antarctica", function () { // Change the map type cy.updateMapType("World with Antarctica"); // Verify the number of entities @@ -46,7 +44,7 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Map type: World", function() { + it("Map type: World", function () { // Change the map type cy.updateMapType("World"); // Verify the number of entities @@ -54,7 +52,7 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Map type: Europe", function() { + it("Map type: Europe", function () { // Change the map type cy.updateMapType("Europe"); // Verify the number of entities @@ -62,7 +60,7 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Map type: North America", function() { + it("Map type: North America", function () { // Change the map type cy.updateMapType("North America"); // Verify the number of entities @@ -70,7 +68,7 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Map type: South America", function() { + it("Map type: South America", function () { // Change the map type cy.updateMapType("South America"); // Verify the number of entities @@ -78,7 +76,7 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Map type: Asia", function() { + it("Map type: Asia", function () { // Change the map type cy.updateMapType("Asia"); // Verify the number of entities @@ -86,7 +84,7 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Map type: Oceania", function() { + it("Map type: Oceania", function () { // Change the map type cy.updateMapType("Oceania"); // Verify the number of entities @@ -94,7 +92,7 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Map type: Africa", function() { + it("Map type: Africa", function () { // Change the map type cy.updateMapType("Africa"); // Verify the number of entities @@ -102,7 +100,7 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Map type: USA", function() { + it("Map type: USA", function () { // Change the map type cy.updateMapType("USA"); // Verify the number of entities @@ -110,7 +108,7 @@ describe("Map Chart Widget Functionality", function() { cy.PublishtheApp(); }); - it("Action: onDataPointClick, Open modal", function() { + it("Action: onDataPointClick, Open modal", function () { // Create the Alert Modal and verify Modal name cy.createModal(this.data.ModalName); cy.PublishtheApp(); @@ -126,7 +124,7 @@ describe("Map Chart Widget Functionality", function() { */ }); - it("Action: onDataPointClick, Show message using selectedDataPoint", function() { + it("Action: onDataPointClick, Show message using selectedDataPoint", function () { const expectedEntityData = { value: 2.04, label: "South America", @@ -139,18 +137,10 @@ describe("Map Chart Widget Functionality", function() { // Set action details for onDataPointClick const boundMessage = `{{JSON.stringify(MapChart1.selectedDataPoint)}}`; cy.addAction(boundMessage); - cy.get(commonLocators.chooseMsgType) - .last() - .click({ force: true }); - cy.get(commonLocators.chooseAction) - .children() - .contains("Success") - .click(); + cy.get(commonLocators.chooseMsgType).last().click({ force: true }); + cy.get(commonLocators.chooseAction).children().contains("Success").click(); // Click on the entity, South America - cy.get(widgetsPage.mapChartPlot) - .children() - .first() - .click({ force: true }); + cy.get(widgetsPage.mapChartPlot).children().first().click({ force: true }); // Assert cy.validateToastMessage(JSON.stringify(expectedEntityData)); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/MenuButton_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/MenuButton_spec.js index ae6d19f72e..71dacdf439 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/MenuButton_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/MenuButton_spec.js @@ -15,11 +15,9 @@ describe("Menu Button Widget Functionality", () => { cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-add") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-add").first().click({ + force: true, + }); // Assert if the icon exists cy.get(`${formWidgetsPage.menuButtonWidget} .bp3-icon-add`).should("exist"); // Change its icon alignment to right @@ -39,11 +37,9 @@ describe("Menu Button Widget Functionality", () => { cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-airplane") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-airplane").first().click({ + force: true, + }); // Assert if the icon changes // Assert if the icon still exists on the right side of the text cy.get(`${formWidgetsPage.menuButtonWidget} .bp3-icon-airplane`) @@ -52,15 +48,13 @@ describe("Menu Button Widget Functionality", () => { .should("have.text", "Open Menu"); }); - it("2. MenuButton widget functionality on undo after delete", function() { + it("2. MenuButton widget functionality on undo after delete", function () { cy.openPropertyPane("menubuttonwidget"); cy.moveToContentTab(); // Delete Second Menu Item - cy.get(".t--property-control-menuitems .t--delete-column-btn") - .eq(1) - .click({ - force: true, - }); + cy.get(".t--property-control-menuitems .t--delete-column-btn").eq(1).click({ + force: true, + }); // Click on the menu button cy.get(`${formWidgetsPage.menuButtonWidget} button`).click({ @@ -69,35 +63,23 @@ describe("Menu Button Widget Functionality", () => { cy.wait(500); // Check first menu item - cy.get(".bp3-menu-item") - .eq(0) - .contains("First Menu Item"); + cy.get(".bp3-menu-item").eq(0).contains("First Menu Item"); // Check second menu item - cy.get(".bp3-menu-item") - .eq(1) - .contains("Third Menu Item"); + cy.get(".bp3-menu-item").eq(1).contains("Third Menu Item"); // Undo cy.get("body").type(`{${modifierKey}}+z`); // Check first menu item - cy.get(".bp3-menu-item") - .eq(0) - .contains("First Menu Item"); + cy.get(".bp3-menu-item").eq(0).contains("First Menu Item"); // Check second menu item - cy.get(".bp3-menu-item") - .eq(1) - .contains("Second Menu Item"); + cy.get(".bp3-menu-item").eq(1).contains("Second Menu Item"); // Check third menu item - cy.get(".bp3-menu-item") - .eq(2) - .contains("Third Menu Item"); + cy.get(".bp3-menu-item").eq(2).contains("Third Menu Item"); // Navigate to property pane of Second Menu Item - cy.get(".t--property-control-menuitems .t--edit-column-btn") - .eq(1) - .click({ - force: true, - }); + cy.get(".t--property-control-menuitems .t--edit-column-btn").eq(1).click({ + force: true, + }); cy.wait(1000); // Check the title cy.get(".t--property-pane-title").contains("Second Menu Item"); @@ -105,7 +87,7 @@ describe("Menu Button Widget Functionality", () => { cy.get(".t--property-pane-back-btn").click(); }); - it("3. MenuButton widget functionality to add dynamic menu items", function() { + it("3. MenuButton widget functionality to add dynamic menu items", function () { cy.openPropertyPane("menubuttonwidget"); cy.moveToContentTab(); @@ -142,20 +124,14 @@ describe("Menu Button Widget Functionality", () => { force: true, }); cy.wait(500); - cy.get(".bp3-menu-item") - .eq(0) - .contains("Michael"); - cy.get(".bp3-menu-item") - .eq(1) - .contains("Lindsay"); - cy.get(".bp3-menu-item") - .eq(2) - .contains("Brock"); + cy.get(".bp3-menu-item").eq(0).contains("Michael"); + cy.get(".bp3-menu-item").eq(1).contains("Lindsay"); + cy.get(".bp3-menu-item").eq(2).contains("Brock"); cy.closePropertyPane(); }); - it("4. Disable one dynamic item using {{currentItem}} binding", function() { + it("4. Disable one dynamic item using {{currentItem}} binding", function () { cy.openPropertyPane("menubuttonwidget"); cy.moveToContentTab(); @@ -177,14 +153,12 @@ describe("Menu Button Widget Functionality", () => { force: true, }); cy.wait(500); - cy.get(".bp3-menu-item") - .eq(1) - .should("have.class", "bp3-disabled"); + cy.get(".bp3-menu-item").eq(1).should("have.class", "bp3-disabled"); cy.closePropertyPane(); }); - it("5. Apply background color to dynamic items using {{currentItem}} binding", function() { + it("5. Apply background color to dynamic items using {{currentItem}} binding", function () { cy.openPropertyPane("menubuttonwidget"); cy.moveToContentTab(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Progress_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Progress_spec.js index fd0422d13d..9e1d8be3c9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Progress_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Progress_spec.js @@ -1,7 +1,7 @@ const explorer = require("../../../../../locators/explorerlocators.json"); -describe("Progress Widget", function() { - it("Add a new Progress widget and text widget", function() { +describe("Progress Widget", function () { + it("Add a new Progress widget and text widget", function () { cy.get(explorer.addWidget).click(); cy.dragAndDropToCanvas("progresswidget", { x: 300, y: 300 }); cy.get(".t--widget-progresswidget").should("exist"); @@ -11,7 +11,7 @@ describe("Progress Widget", function() { }); // Linear progress - it("Property: isIndeterminate, Toggle infinite loading", function() { + it("Property: isIndeterminate, Toggle infinite loading", function () { cy.openPropertyPane("progresswidget"); // enable infinite loading cy.togglebar(".t--property-control-infiniteloading input[type='checkbox']"); @@ -26,7 +26,7 @@ describe("Progress Widget", function() { // show determinate linear progress cy.get("[data-cy='50']").should("exist"); }); - it("Property: value, Change progress value", function() { + it("Property: value, Change progress value", function () { cy.updateCodeInput(".t--property-control-progress", "60"); cy.wait("@updateLayout").should( "have.nested.property", @@ -36,25 +36,19 @@ describe("Progress Widget", function() { // pass 60 cy.get("[data-cy='60']").should("exist"); }); - it("Property: showResult, Toggle show result", function() { + it("Property: showResult, Toggle show result", function () { // enable show result cy.togglebar(".t--property-control-showresult input[type='checkbox']"); // show label - cy.get("[data-cy='60']") - .first() - .next() - .should("contain.text", "60"); + cy.get("[data-cy='60']").first().next().should("contain.text", "60"); // disable show result cy.togglebarDisable( ".t--property-control-showresult input[type='checkbox']", ); // does not show any label - cy.get("[data-cy='60']") - .first() - .next() - .should("not.exist"); + cy.get("[data-cy='60']").first().next().should("not.exist"); }); - it("Property: steps, Change steps", function() { + it("Property: steps, Change steps", function () { cy.updateCodeInput(".t--property-control-numberofsteps", "2"); // show progress with steps cy.get("[data-cy='step']").should("have.length", 2); @@ -64,12 +58,12 @@ describe("Progress Widget", function() { }); // Circular progress - it("Property: type, Change type to Circular", function() { + it("Property: type, Change type to Circular", function () { // Switch to circular mode cy.get(".t--button-group-circular").click({ force: true }); cy.get("[data-cy='circular']").should("exist"); }); - it("Property: isIndeterminate, Toggle infinite loading", function() { + it("Property: isIndeterminate, Toggle infinite loading", function () { cy.openPropertyPane("progresswidget"); // enable infinite loading cy.togglebar(".t--property-control-infiniteloading input[type='checkbox']"); @@ -87,7 +81,7 @@ describe("Progress Widget", function() { 200, ); }); - it("Property: value, Change progress value", function() { + it("Property: value, Change progress value", function () { cy.updateCodeInput(".t--property-control-progress", "50"); cy.wait("@updateLayout").should( "have.nested.property", @@ -97,7 +91,7 @@ describe("Progress Widget", function() { // The path element with 50 should exist cy.get("[data-testvalue='50']").should("exist"); }); - it("Property: showResult, Toggle show result", function() { + it("Property: showResult, Toggle show result", function () { // enable show result cy.togglebar(".t--property-control-showresult input[type='checkbox']"); // show label @@ -109,7 +103,7 @@ describe("Progress Widget", function() { // does not show any label cy.get("[data-cy='circular-label']").should("not.exist"); }); - it("Property: steps, Change steps", function() { + it("Property: steps, Change steps", function () { cy.updateCodeInput(".t--property-control-numberofsteps", "2"); // show circular progress with steps cy.get("[data-cy='separator']").should("have.length", 2); @@ -117,7 +111,7 @@ describe("Progress Widget", function() { // does not show progress with steps cy.get("[data-cy='separator']").should("not.exist"); }); - it("Property: counterClockwise,Change counterclockwise", function() { + it("Property: counterClockwise,Change counterclockwise", function () { // enable counterclockwise cy.togglebar( ".t--property-control-counterclockwise input[type='checkbox']", @@ -136,13 +130,12 @@ describe("Progress Widget", function() { .should("not.match", /-/); }); - it("The binding property, progress should be exposed for an auto suggestion", function() { + it("The binding property, progress should be exposed for an auto suggestion", function () { cy.openPropertyPane("textwidget"); - cy.get( - ".t--property-control-text .CodeMirror textarea", - ).type("{{Progress1.", { force: true }); - cy.get("ul.CodeMirror-hints") - .contains("progress") - .should("exist"); + cy.get(".t--property-control-text .CodeMirror textarea").type( + "{{Progress1.", + { force: true }, + ); + cy.get("ul.CodeMirror-hints").contains("progress").should("exist"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/StatBox_DragAndDrop_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/StatBox_DragAndDrop_spec.js index 2d1a962af7..7534666ac5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/StatBox_DragAndDrop_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/StatBox_DragAndDrop_spec.js @@ -5,7 +5,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Statbox Widget Functionality", function() { +describe("Statbox Widget Functionality", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Statbox_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Statbox_spec.js index bf0cd64067..598a43b08c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Statbox_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Statbox_spec.js @@ -6,7 +6,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Statbox Widget Functionality", function() { +describe("Statbox Widget Functionality", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -17,9 +17,7 @@ describe("Statbox Widget Functionality", function() { }); it("1. Open Existing Statbox from created Widgets list", () => { - cy.get(".widgets") - .first() - .click(); + cy.get(".widgets").first().click(); cy.get(".t--entity .widget") .get(".entity-context-menu") .last() @@ -48,27 +46,19 @@ describe("Statbox Widget Functionality", function() { cy.get(".t--property-pane-section-general").then(() => { //cy.moveToStyleTab(); // changing the icon to arrow-up - cy.get(".bp3-button-text") - .first() - .click(); - cy.get(".bp3-icon-arrow-up") - .click() - .wait(500); + cy.get(".bp3-button-text").first().click(); + cy.get(".bp3-icon-arrow-up").click().wait(500); // opening modal from onClick action of icon button cy.createModal("Modal", "Modal1"); }); // verifying the changed icon - cy.get(".bp3-icon-arrow-up") - .should("be.visible") - .click({ force: true }); + cy.get(".bp3-icon-arrow-up").should("be.visible").click({ force: true }); // verifying modal has been added cy.get(".t--modal-widget .t--draggable-iconbuttonwidget").click({ force: true, }); - cy.get("span:contains('Close')") - .closest("div") - .click(); + cy.get("span:contains('Close')").closest("div").click(); }); it("4. Bind datasource to multiple components in statbox", () => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Video_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Video_spec.js index 83af41a091..019c913ee9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Video_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Video_spec.js @@ -3,12 +3,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/videoWidgetDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); -describe("Video Widget Functionality", function() { +describe("Video Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Video Widget play functionality validation", function() { + it("Video Widget play functionality validation", function () { cy.openPropertyPane("videowidget"); cy.widgetText( "Video1", @@ -31,7 +31,7 @@ describe("Video Widget Functionality", function() { */ }); - it("Video widget pause functionality validation", function() { + it("Video widget pause functionality validation", function () { cy.get(commonlocators.onPause).click(); cy.selectShowMsg(); cy.addSuccessMessage("Pause success"); @@ -48,11 +48,9 @@ describe("Video Widget Functionality", function() { */ }); - it("Update video url and check play and pause functionality validation", function() { + it("Update video url and check play and pause functionality validation", function () { cy.testCodeMirror(testdata.videoUrl); - cy.get(".CodeMirror textarea") - .first() - .blur(); + cy.get(".CodeMirror textarea").first().blur(); cy.get(widgetsPage.autoPlay).click({ force: true }); cy.wait("@updateLayout").should( "have.nested.property", @@ -77,7 +75,7 @@ describe("Video Widget Functionality", function() { */ }); - it("Checks if video widget is reset on button click", function() { + it("Checks if video widget is reset on button click", function () { cy.testCodeMirror(testdata.videoUrl2); cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 300 }); cy.openPropertyPane("buttonwidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/PhoneInput/PhoneInputDynamicValue_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/PhoneInput/PhoneInputDynamicValue_spec.js index ebe30c02e2..58ffceabc1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/PhoneInput/PhoneInputDynamicValue_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/PhoneInput/PhoneInputDynamicValue_spec.js @@ -15,9 +15,7 @@ describe("Phone input widget - ", () => { .last() .click({ force: true }); // Click on the country code change option - cy.get(".t--input-country-code-change") - .first() - .click(); + cy.get(".t--input-country-code-change").first().click(); // Search with a typo cy.get(".t--search-input input").type("inpia"); cy.wait(500); @@ -26,9 +24,7 @@ describe("Phone input widget - ", () => { cy.PublishtheApp(); // Click on the country code change option - cy.get(".t--input-country-code-change") - .first() - .click(); + cy.get(".t--input-country-code-change").first().click(); // Search with a typo cy.get(".t--search-input input").type("inpia"); cy.wait(500); @@ -43,29 +39,21 @@ describe("Phone input widget - ", () => { "contain", "{{appsmith.store.test}}", ); - cy.get(".t--input-country-code-change") - .first() - .click(); + cy.get(".t--input-country-code-change").first().click(); cy.get(".t--search-input input").type("india"); cy.wait(500); - cy.get(".t--dropdown-option") - .last() - .click(); + cy.get(".t--dropdown-option").last().click(); cy.get(".t--property-control-defaultcountrycode .CodeMirror-code").should( "contain", "{{appsmith.store.test}}", ); cy.PublishtheApp(); cy.get(".bp3-button.select-button").click({ force: true }); - cy.get(".menu-item-text") - .first() - .click({ force: true }); + cy.get(".menu-item-text").first().click({ force: true }); cy.get(".t--input-country-code-change").should("contain", "+91"); cy.get(".t--widget-textwidget").should("contain", "+91:IN:+91"); cy.get(".bp3-button.select-button").click({ force: true }); - cy.get(".menu-item-text") - .last() - .click({ force: true }); + cy.get(".menu-item-text").last().click({ force: true }); cy.get(".t--input-country-code-change").should("contain", "+93"); cy.get(".t--widget-textwidget").should("contain", "+93:AF:+93"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/PhoneInput/Phone_input_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/PhoneInput/Phone_input_spec.js index 46765eec6e..84a658092b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/PhoneInput/Phone_input_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/PhoneInput/Phone_input_spec.js @@ -41,14 +41,10 @@ describe("Phone input widget - ", () => { cy.get(".t--property-control-changecountrycode label") .last() .click({ force: true }); - cy.get(".t--input-country-code-change") - .first() - .click(); + cy.get(".t--input-country-code-change").first().click(); cy.get(".t--search-input input").type("+91"); cy.wait(500); - cy.get(".t--dropdown-option") - .last() - .click(); + cy.get(".t--dropdown-option").last().click(); cy.get(`.t--widget-${widgetName} input`).clear(); cy.wait(500); cy.get(`.t--widget-${widgetName} input`).type("9999999999"); @@ -95,9 +91,7 @@ describe("Phone input widget - ", () => { cy.get(widgetInput).clear(); cy.wait(500); - cy.get(widgetInput) - .click() - .type("1234567890"); + cy.get(widgetInput).click().type("1234567890"); cy.wait(500); cy.get(".t--widget-textwidget").should("contain", "1234567890:1234567890"); cy.get(widgetInput).type("{enter}"); @@ -106,7 +100,7 @@ describe("Phone input widget - ", () => { cy.get(".t--widget-textwidget").should("contain", ":"); }); - it("4. Check isDirty meta property", function() { + it("4. Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput(".t--property-control-text", `{{PhoneInput1.isDirty}}`); // Change defaultText @@ -129,7 +123,7 @@ describe("Phone input widget - ", () => { cy.get(".t--widget-textwidget").should("contain", "false"); }); - it("Currency change dropdown should not close unexpectedly", function() { + it("Currency change dropdown should not close unexpectedly", function () { cy.openPropertyPane(widgetName); // Select the Currency dropdown option from property pane diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/RTE/RichTextEditor_Validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/RTE/RichTextEditor_Validation_spec.js index 1b3423120e..067a67ab29 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/RTE/RichTextEditor_Validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/RTE/RichTextEditor_Validation_spec.js @@ -2,7 +2,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const dsl = require("../../../../../fixtures/formdsl1.json"); -describe("RichTextEditor Widget Validation", function() { +describe("RichTextEditor Widget Validation", function () { before(() => { cy.addDsl(dsl); }); @@ -12,7 +12,7 @@ describe("RichTextEditor Widget Validation", function() { cy.openPropertyPane("richtexteditorwidget"); }); - it("RichTextEditor-required with empty content show error border for textarea", function() { + it("RichTextEditor-required with empty content show error border for textarea", function () { cy.setTinyMceContent("rte-6h8j08u7ea", ""); cy.get(commonlocators.requiredCheckbox).click({ force: true }); cy.wait(500); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/RTE/RichTextEditor_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/RTE/RichTextEditor_spec.js index c7c0a93461..d9392cd73f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/RTE/RichTextEditor_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/RTE/RichTextEditor_spec.js @@ -32,7 +32,7 @@ const testCursorPoistion = (textValueLen, tinyMceId) => { }); }; -describe("RichTextEditor Widget Functionality", function() { +describe("RichTextEditor Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -42,7 +42,7 @@ describe("RichTextEditor Widget Functionality", function() { cy.openPropertyPane("richtexteditorwidget"); }); - it("1. RichTextEditor-Edit Text area with HTML body functionality", function() { + it("1. RichTextEditor-Edit Text area with HTML body functionality", function () { //changing the Text Name cy.widgetText( this.data.RichTextEditorName, @@ -67,7 +67,7 @@ describe("RichTextEditor Widget Functionality", function() { ); }); - it("2. RichTextEditor-Enable Validation", function() { + it("2. RichTextEditor-Enable Validation", function () { //Uncheck the Disabled checkbox cy.UncheckWidgetProperties(formWidgetsPage.disableJs); cy.validateEnableWidget( @@ -82,7 +82,7 @@ describe("RichTextEditor Widget Functionality", function() { ); }); - it("3. RichTextEditor-Disable Validation", function() { + it("3. RichTextEditor-Disable Validation", function () { //Check the Disabled checkbox cy.CheckWidgetProperties(formWidgetsPage.disableJs); cy.validateDisableWidget( @@ -97,21 +97,21 @@ describe("RichTextEditor Widget Functionality", function() { ); }); - it("4. RichTextEditor-check Visible field validation", function() { + it("4. RichTextEditor-check Visible field validation", function () { // Uncheck the visible checkbox cy.UncheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.richTextEditorWidget).should("not.exist"); }); - it("5. RichTextEditor-uncheck Visible field validation", function() { + it("5. RichTextEditor-uncheck Visible field validation", function () { // Check the visible checkbox cy.CheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publishPage.richTextEditorWidget).should("be.visible"); }); - it("6. RichTextEditor-check Hide toolbar field validation", function() { + it("6. RichTextEditor-check Hide toolbar field validation", function () { // Check the Hide toolbar checkbox cy.CheckWidgetProperties(commonlocators.hideToolbarCheckbox); cy.validateToolbarHidden( @@ -125,7 +125,7 @@ describe("RichTextEditor Widget Functionality", function() { ); }); - it("7. RichTextEditor-uncheck Hide toolbar field validation", function() { + it("7. RichTextEditor-uncheck Hide toolbar field validation", function () { // Uncheck the Hide toolbar checkbox cy.UncheckWidgetProperties(commonlocators.hideToolbarCheckbox); cy.validateToolbarVisible( @@ -139,7 +139,7 @@ describe("RichTextEditor Widget Functionality", function() { ); }); - it("8. Reset RichTextEditor", function() { + it("8. Reset RichTextEditor", function () { // Enable the widget cy.UncheckWidgetProperties(formWidgetsPage.disableJs); @@ -160,7 +160,7 @@ describe("RichTextEditor Widget Functionality", function() { ); }); - it("9. Check isDirty meta property", function() { + it("9. Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput( ".t--property-control-text", @@ -195,7 +195,7 @@ describe("RichTextEditor Widget Functionality", function() { cy.get(".t--widget-textwidget").should("contain", "false"); }); - it("10. Check if the binding is getting removed from the text and the RTE widget", function() { + it("10. Check if the binding is getting removed from the text and the RTE widget", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput(".t--property-control-text", `{{RichtextEditor.text}}`); // Change defaultText of the RTE @@ -214,7 +214,7 @@ describe("RichTextEditor Widget Functionality", function() { cy.get(".t--widget-textwidget").should("contain", ""); }); - it("11. Check if text does not re-appear when cut, inside the RTE widget", function() { + it("11. Check if text does not re-appear when cut, inside the RTE widget", function () { cy.window().then((win) => { const tinyMceId = "rte-6h8j08u7ea"; @@ -234,7 +234,7 @@ describe("RichTextEditor Widget Functionality", function() { }); }); - it("12. Check if the cursor position is at the end for the RTE widget", function() { + it("12. Check if the cursor position is at the end for the RTE widget", function () { const tinyMceId = "rte-6h8j08u7ea"; const testString = "Test Content"; const testStringLen = testString.length; @@ -253,7 +253,7 @@ describe("RichTextEditor Widget Functionality", function() { cy.get(".t--button-group-html").click({ force: true }); }); - it("13. Check if different font size texts are supported inside the RTE widget", function() { + it("13. Check if different font size texts are supported inside the RTE widget", function () { const tinyMceId = "rte-6h8j08u7ea"; const testString = "Test Content"; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup1_spec.js index d5191b9dd7..4b9aa999c5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup1_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../../../fixtures/emptyDSL.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("Radiogroup Widget Functionality", function() { +describe("Radiogroup Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup2_spec.js index 5d832f9b2b..1158a49ff9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup2_spec.js @@ -12,13 +12,11 @@ describe("Radio Group Widget", () => { cy.updateCodeInput(".t--property-control-text", `{{RadioGroup1.isDirty}}`); }); - it("Check isDirty meta property", function() { + it("Check isDirty meta property", function () { // Check if initial value of isDirty is false cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(".t--widget-radiogroupwidget .bp3-radio") - .last() - .click(); + cy.get(".t--widget-radiogroupwidget .bp3-radio").last().click(); // Check if isDirty is set to true cy.get(".t--widget-textwidget").should("contain", "true"); // Change defaultOptionValue diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup_Int_Value_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup_Int_Value_spec.js index 23223afa68..b25fbf77a4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup_Int_Value_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/RadioGroup_Int_Value_spec.js @@ -10,12 +10,12 @@ function checkSelectedRadioValue(selector, value) { cy.get(`${selector} input:checked`).should("have.value", value); } -describe("RadioGroup widget testing", function() { +describe("RadioGroup widget testing", function () { before(() => { cy.addDsl(dsl); }); - it("Radio widget check selection with value property as integer", function() { + it("Radio widget check selection with value property as integer", function () { cy.openPropertyPane("radiogroupwidget"); //Check radio with value=1 is selected @@ -37,7 +37,7 @@ describe("RadioGroup widget testing", function() { checkSelectedRadioValue(formWidgetsPage.radioWidget, "2"); }); - it("Radio widget check selection with value property as string", function() { + it("Radio widget check selection with value property as string", function () { cy.openPropertyPane("radiogroupwidget"); cy.updateCodeInput( @@ -76,7 +76,7 @@ describe("RadioGroup widget testing", function() { checkSelectedRadioValue(formWidgetsPage.radioWidget, "2"); }); - it("Check the custom validations for the options property", function() { + it("Check the custom validations for the options property", function () { /** * Test case defs, an error should be thrown when: * 1. When datatypes are not same for value property diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/Radio_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/Radio_spec.js index cf86b424d8..3bafe255fe 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/Radio_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Radio/Radio_spec.js @@ -4,11 +4,11 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/newFormDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Radio Widget Functionality", function() { +describe("Radio Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Radio Widget Functionality", function() { + it("Radio Widget Functionality", function () { cy.openPropertyPane("radiogroupwidget"); /** * @param{Text} Random Text @@ -26,9 +26,7 @@ describe("Radio Widget Functionality", function() { * */ cy.radioInput(0, this.data.radio1); - cy.get(formWidgetsPage.labelradio) - .eq(0) - .should("have.text", "test1"); + cy.get(formWidgetsPage.labelradio).eq(0).should("have.text", "test1"); cy.radioInput(1, "1"); cy.radioInput(2, this.data.radio2); cy.get(formWidgetsPage.labelradio) @@ -37,9 +35,7 @@ describe("Radio Widget Functionality", function() { cy.radioInput(3, "2"); cy.get(formWidgetsPage.radioAddButton).click({ force: true }); cy.radioInput(4, this.data.radio4); - cy.get(formWidgetsPage.deleteradiovalue) - .eq(2) - .click({ force: true }); + cy.get(formWidgetsPage.deleteradiovalue).eq(2).click({ force: true }); cy.get(formWidgetsPage.labelradio).should("not.have.value", "test4"); /** * @param{Show Alert} Css for InputChange @@ -52,7 +48,7 @@ describe("Radio Widget Functionality", function() { .type("2"); cy.PublishtheApp(); }); - it("Radio Functionality To Unchecked Visible Widget", function() { + it("Radio Functionality To Unchecked Visible Widget", function () { cy.get(publish.backToEditor).click(); cy.openPropertyPane("radiogroupwidget"); cy.togglebarDisable(commonlocators.visibleCheckbox); @@ -60,13 +56,13 @@ describe("Radio Widget Functionality", function() { cy.get(publish.radioWidget + " " + "input").should("not.exist"); cy.get(publish.backToEditor).click(); }); - it("Radio Functionality To Check Visible Widget", function() { + it("Radio Functionality To Check Visible Widget", function () { cy.openPropertyPane("radiogroupwidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.radioWidget + " " + "input").should("be.checked"); }); - it("Radio Functionality To Button Text", function() { + it("Radio Functionality To Button Text", function () { cy.get(publish.radioWidget + " " + "label") .eq(1) .should("have.text", "test2"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_TreeSelect_MultiSelect_Empty_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_TreeSelect_MultiSelect_Empty_spec.js index b2274fddca..c3e0b0b45a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_TreeSelect_MultiSelect_Empty_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_TreeSelect_MultiSelect_Empty_spec.js @@ -1,17 +1,15 @@ const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); const dsl = require("../../../../../fixtures/SelectDslWithEmptyOptions.json"); -describe("MultiSelect, Tree Select and Multi Tree Select Widget Empty Options Functionality", function() { +describe("MultiSelect, Tree Select and Multi Tree Select Widget Empty Options Functionality", function () { before(() => { cy.addDsl(dsl); }); it("To Check empty options for Multi Select Tree Widget", () => { - cy.get(formWidgetsPage.treeSelectInput) - .first() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectInput).first().click({ force: true }); cy.get(".rc-tree-select-empty").should("have.text", "No Results Found"); }); - it("To Check empty options for Single Select Tree Widget", function() { + it("To Check empty options for Single Select Tree Widget", function () { cy.get(formWidgetsPage.treeSelectInput) .last() .click({ force: true }) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_TreeSelect_MultiSelect_OnFocus_OnBlur_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_TreeSelect_MultiSelect_OnFocus_OnBlur_spec.js index f35c89dcdc..ed7c2ca1aa 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_TreeSelect_MultiSelect_OnFocus_OnBlur_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_TreeSelect_MultiSelect_OnFocus_OnBlur_spec.js @@ -2,7 +2,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/selectMultiSelectTreeSelectWidgetDsl.json"); const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); -describe("Select, MultiSelect, Tree Select and Multi Tree Select Widget Property tests onFocus and onBlur", function() { +describe("Select, MultiSelect, Tree Select and Multi Tree Select Widget Property tests onFocus and onBlur", function () { before(() => { cy.addDsl(dsl); }); @@ -61,13 +61,9 @@ describe("Select, MultiSelect, Tree Select and Multi Tree Select Widget Property "{{showAlert('TreeSelect1 dropdown closed', 'success')}}", ); cy.wait(500); - cy.get(formWidgetsPage.treeSelect) - .first() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelect).first().click({ force: true }); cy.validateToastMessage("TreeSelect1 dropdown opened"); - cy.get(formWidgetsPage.treeSelect) - .first() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelect).first().click({ force: true }); cy.validateToastMessage("TreeSelect1 dropdown closed"); }); @@ -85,13 +81,9 @@ describe("Select, MultiSelect, Tree Select and Multi Tree Select Widget Property "{{showAlert('MultiTreeSelect1 dropdown closed', 'success')}}", ); cy.wait(500); - cy.get(formWidgetsPage.multiTreeSelect) - .last() - .click({ force: true }); + cy.get(formWidgetsPage.multiTreeSelect).last().click({ force: true }); cy.validateToastMessage("MultiTreeSelect1 dropdown opened"); - cy.get(formWidgetsPage.multiTreeSelect) - .last() - .click({ force: true }); + cy.get(formWidgetsPage.multiTreeSelect).last().click({ force: true }); cy.validateToastMessage("MultiTreeSelect1 dropdown closed"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_spec.js index c814044bcf..761440bb75 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_spec.js @@ -50,9 +50,7 @@ describe("Select widget", () => { .find(widgetLocators.dropdownSingleSelect) .click({ force: true }); // Assert if the search input is empty now - cy.get(commonlocators.selectInputSearch) - .invoke("val") - .should("be.empty"); + cy.get(commonlocators.selectInputSearch).invoke("val").should("be.empty"); }); it("4. Does not clear the search field when widget is closed and serverSideFiltering is on", () => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_widget1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_widget1_spec.js index 3ab6566904..bedb265636 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_widget1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Select_widget1_spec.js @@ -9,7 +9,7 @@ const defaultValue = ` } `; -describe("Select Widget Functionality", function() { +describe("Select Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Single_Select_Tree_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Single_Select_Tree_spec.js index 2428d22563..f35811fbb5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Single_Select_Tree_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Single_Select_Tree_spec.js @@ -4,12 +4,12 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Single Select Widget Functionality", function() { +describe("Single Select Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Check isDirty meta property", function() { + it("1. Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput( ".t--property-control-text", @@ -21,12 +21,8 @@ describe("Single Select Widget Functionality", function() { // Check if isDirty is reset to false cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); - cy.get(formWidgetsPage.treeSelectFilterInput) - .click() - .type("light"); + cy.get(formWidgetsPage.treeSelectInput).last().click({ force: true }); + cy.get(formWidgetsPage.treeSelectFilterInput).click().type("light"); cy.treeSelectDropdown("Light Blue"); // Check if isDirty is set to true cy.get(".t--widget-textwidget").should("contain", "true"); @@ -46,25 +42,17 @@ describe("Single Select Widget Functionality", function() { .should("have.text", "Red"); }); - it("3. To Validate Options", function() { - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); - cy.get(formWidgetsPage.treeSelectFilterInput) - .click() - .type("light"); + it("3. To Validate Options", function () { + cy.get(formWidgetsPage.treeSelectInput).last().click({ force: true }); + cy.get(formWidgetsPage.treeSelectFilterInput).click().type("light"); cy.treeSelectDropdown("Light Blue"); }); it("4. Clears the search field when widget is closed", () => { // Open the widget - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectInput).last().click({ force: true }); // Search for Green option in the search input - cy.get(formWidgetsPage.treeSelectFilterInput) - .click() - .type("Green"); + cy.get(formWidgetsPage.treeSelectFilterInput).click().type("Green"); // Select the Green Option cy.treeSelectDropdown("Green"); // Assert Green option is selected @@ -73,16 +61,14 @@ describe("Single Select Widget Functionality", function() { .first() .should("have.text", "Green"); // Reopen the widget - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectInput).last().click({ force: true }); // Assert the search input is cleared cy.get(formWidgetsPage.treeSelectFilterInput) .invoke("val") .should("be.empty"); }); - it("5. To Unchecked Visible Widget", function() { + it("5. To Unchecked Visible Widget", function () { cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get( @@ -91,7 +77,7 @@ describe("Single Select Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("6. To Check Visible Widget", function() { + it("6. To Check Visible Widget", function () { cy.openPropertyPane("singleselecttreewidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -101,19 +87,15 @@ describe("Single Select Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("7. To Check Option Not Found", function() { - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); - cy.get(formWidgetsPage.treeSelectFilterInput) - .click() - .type("ABCD"); + it("7. To Check Option Not Found", function () { + cy.get(formWidgetsPage.treeSelectInput).last().click({ force: true }); + cy.get(formWidgetsPage.treeSelectFilterInput).click().type("ABCD"); cy.get(".tree-select-dropdown .rc-tree-select-empty").contains( "No Results Found", ); }); - it("8. To Check Clear all functionality", function() { + it("8. To Check Clear all functionality", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput( ".t--property-control-text", @@ -123,9 +105,7 @@ describe("Single Select Widget Functionality", function() { cy.togglebar( '.t--property-control-allowclearingvalue input[type="checkbox"]', ); - cy.get(formWidgetsPage.treeSelectClearAll) - .last() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectClearAll).last().click({ force: true }); cy.wait(100); cy.get(".t--widget-textwidget").should("contain", ""); cy.get(formWidgetsPage.treeSelectClearAll).should("not.exist"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Tree_Select_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Tree_Select_spec.js index 42a9ce296f..8dca9aecc5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Tree_Select_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/Tree_Select_spec.js @@ -2,7 +2,7 @@ const dsl = require("../../../../../fixtures/emptyDSL.json"); const explorer = require("../../../../../locators/explorerlocators.json"); const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); -describe("Tree Select Widget", function() { +describe("Tree Select Widget", function () { before(() => { cy.addDsl(dsl); }); @@ -32,9 +32,7 @@ describe("Tree Select Widget", function() { .invoke("val") .should("be.empty"); // click on the widget - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectInput).last().click({ force: true }); // select Green option cy.treeSelectDropdown("Green"); // again click on cancel icon in the widget @@ -58,9 +56,7 @@ describe("Tree Select Widget", function() { .find(".rc-tree-select-clear") .should("not.exist"); // click on the widget again - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); + cy.get(formWidgetsPage.treeSelectInput).last().click({ force: true }); // select Green option cy.treeSelectDropdown("Green"); // assert if the widget input value is Green diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/select_Widget_Bug_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/select_Widget_Bug_spec.js index cac6b92302..560e12a692 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/select_Widget_Bug_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/select_Widget_Bug_spec.js @@ -4,12 +4,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/formSelectDsl.json"); const formWidgetsPage = require("../../../../../locators/FormWidgets.json"); -describe("Select Widget Functionality", function() { +describe("Select Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Select Widget name update", function() { + it("Select Widget name update", function () { cy.openPropertyPane("selectwidget"); cy.widgetText( "Select1", @@ -199,7 +199,7 @@ describe("Select Widget Functionality", function() { cy.get(commonlocators.singleSelectWidgetMenuItem).contains("RANDOM5"); }); - it("Disable the widget and check in publish mode", function() { + it("Disable the widget and check in publish mode", function () { cy.get(widgetsPage.disable).scrollIntoView({ force: true }); cy.get(widgetsPage.selectWidgetDisabled).click({ force: true }); cy.get(".bp3-disabled").should("be.visible"); @@ -208,7 +208,7 @@ describe("Select Widget Functionality", function() { cy.goToEditFromPublish(); }); - it("enable the widget and check in publish mode", function() { + it("enable the widget and check in publish mode", function () { cy.openPropertyPane("selectwidget"); cy.get(".bp3-disabled").should("be.visible"); cy.get(widgetsPage.disable).scrollIntoView({ force: true }); @@ -271,8 +271,6 @@ describe("Select Widget Functionality", function() { cy.get(commonlocators.singleSelectWidgetMenuItem).click({ force: true, }); - cy.get(commonlocators.TextInside) - .first() - .should("have.text", "number"); + cy.get(commonlocators.TextInside).first().should("have.text", "number"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/select_Widget_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/select_Widget_validation_spec.js index 0a4e601263..c824cda5e8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/select_Widget_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Select/select_Widget_validation_spec.js @@ -3,12 +3,12 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/selectWidgetDsl.json"); -describe("Select Widget Functionality", function() { +describe("Select Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Select Widget name update", function() { + it("Select Widget name update", function () { cy.openPropertyPane("selectwidget"); cy.widgetText( "Select1", @@ -17,7 +17,7 @@ describe("Select Widget Functionality", function() { ); }); - it("Disable the widget and check in publish mode", function() { + it("Disable the widget and check in publish mode", function () { cy.get(widgetsPage.disable).scrollIntoView({ force: true }); cy.get(widgetsPage.selectWidgetDisabled).click({ force: true }); cy.get(".bp3-disabled").should("be.visible"); @@ -26,7 +26,7 @@ describe("Select Widget Functionality", function() { cy.goToEditFromPublish(); }); - it("enable the widget and check in publish mode", function() { + it("enable the widget and check in publish mode", function () { cy.openPropertyPane("selectwidget"); cy.get(".bp3-disabled").should("be.visible"); cy.get(widgetsPage.disable).scrollIntoView({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Sliders/CategroySlider_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Sliders/CategroySlider_spec.ts index a7f8d13bcf..5601a0a386 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Sliders/CategroySlider_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Sliders/CategroySlider_spec.ts @@ -51,10 +51,7 @@ describe("Category Slider spec", () => { ee.SelectEntityByName("CategorySlider1", "Widgets"); // Change the slider value - agHelper - .GetElement(locator._sliderThumb) - .focus() - .type("{rightArrow}"); + agHelper.GetElement(locator._sliderThumb).focus().type("{rightArrow}"); // Assert the Text widget has value 20 agHelper.GetText(getWidgetSelector(WIDGET.TEXT)).then(($label) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/SwitchGroup2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/SwitchGroup2_spec.js index 8ba45a4398..adda0c75aa 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/SwitchGroup2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/SwitchGroup2_spec.js @@ -7,7 +7,7 @@ let agHelper = ObjectsRegistry.AggregateHelper, propPane = ObjectsRegistry.PropertyPane, ee = ObjectsRegistry.EntityExplorer; -describe("Switch Group Widget Functionality", function() { +describe("Switch Group Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -16,7 +16,7 @@ describe("Switch Group Widget Functionality", function() { cy.goToEditFromPublish(); }); */ - it("1. Widget name changes", function() { + it("1. Widget name changes", function () { /** * @param{Text} Random Text * @param{RadioWidget}Mouseover @@ -26,7 +26,7 @@ describe("Switch Group Widget Functionality", function() { agHelper.RenameWidget("SwitchGroup1", "SwitchGroupTest"); }); - it("2. Property: options", function() { + it("2. Property: options", function () { // Add a new option ee.SelectEntityByName("SwitchGroupTest"); @@ -56,7 +56,7 @@ describe("Switch Group Widget Functionality", function() { .contains("Yellow"); }); - it("3. Property: defaultSelectedValues", function() { + it("3. Property: defaultSelectedValues", function () { // Add a new option const valueToAdd = `[ "BLUE", "GREEN" @@ -70,7 +70,7 @@ describe("Switch Group Widget Functionality", function() { .contains("Green"); }); - it("4. Property: isVisible === FALSE", function() { + it("4. Property: isVisible === FALSE", function () { cy.togglebarDisable(commonlocators.visibleCheckbox); /* cy.PublishtheApp(); @@ -78,7 +78,7 @@ describe("Switch Group Widget Functionality", function() { */ }); - it("5. Property: isVisible === TRUE", function() { + it("5. Property: isVisible === TRUE", function () { cy.togglebar(commonlocators.visibleCheckbox); /* cy.PublishtheApp(); @@ -88,7 +88,7 @@ describe("Switch Group Widget Functionality", function() { */ }); - it("6. Property: onSelectionChange", function() { + it("6. Property: onSelectionChange", function () { // create an alert modal and verify its name cy.createModal(this.data.ModalName); /* @@ -104,7 +104,7 @@ describe("Switch Group Widget Functionality", function() { */ }); - it("7. Check isDirty meta property", function() { + it("7. Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput( ".t--property-control-text", @@ -120,9 +120,7 @@ describe("Switch Group Widget Functionality", function() { cy.get(".t--widget-textwidget").should("contain", "false"); cy.wait(200); // Switch group takes time to reflect default value changes // Interact with UI - cy.get(formWidgetsPage.labelSwitchGroup) - .first() - .click(); + cy.get(formWidgetsPage.labelSwitchGroup).first().click(); // Check if isDirty is set to true cy.get(".t--widget-textwidget").should("contain", "true"); // Change defaultSelectedValues diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/Switch_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/Switch_spec.js index 42e54b5e77..ada8cac0e3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/Switch_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/Switch_spec.js @@ -4,11 +4,11 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/newFormDsl.json"); -describe("Switch Widget Functionality", function() { +describe("Switch Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Switch Widget Functionality", function() { + it("1. Switch Widget Functionality", function () { cy.openPropertyPane("switchwidget"); /** * @param{Text} Random Text @@ -36,7 +36,7 @@ describe("Switch Widget Functionality", function() { cy.PublishtheApp(); }); - it("2. Switch Functionality To Switch Label", function() { + it("2. Switch Functionality To Switch Label", function () { cy.get(publish.switchwidget + " " + "label").should( "have.text", this.data.switchInputName, @@ -44,7 +44,7 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("3. Switch Functionality To Check Disabled Widget", function() { + it("3. Switch Functionality To Check Disabled Widget", function () { cy.openPropertyPane("switchwidget"); cy.togglebar(commonlocators.Disablejs + " " + "input"); cy.PublishtheApp(); @@ -52,7 +52,7 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("4. Switch Functionality To Check Enabled Widget", function() { + it("4. Switch Functionality To Check Enabled Widget", function () { cy.openPropertyPane("switchwidget"); cy.togglebarDisable(commonlocators.Disablejs + " " + "input"); cy.PublishtheApp(); @@ -60,7 +60,7 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("5. Switch Functionality To Unchecked Visible Widget", function() { + it("5. Switch Functionality To Unchecked Visible Widget", function () { cy.openPropertyPane("switchwidget"); cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -68,7 +68,7 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("6. Switch Functionality To Check Visible Widget", function() { + it("6. Switch Functionality To Check Visible Widget", function () { cy.openPropertyPane("switchwidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -76,7 +76,7 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("7. Switch Functionality To swap label alignment of switch", function() { + it("7. Switch Functionality To swap label alignment of switch", function () { cy.openPropertyPane("switchwidget"); cy.get(publish.switchwidget + " " + ".t--switch-widget-label").should( "have.css", @@ -97,14 +97,12 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("8. Switch Functionality To swap label position of switch", function() { + it("8. Switch Functionality To swap label position of switch", function () { cy.openPropertyPane("switchwidget"); cy.get(publish.switchwidget + " " + ".bp3-align-left").should("exist"); cy.get(publish.switchwidget + " " + ".bp3-align-right").should("not.exist"); - cy.get(commonlocators.optionposition) - .last() - .click({ force: true }); + cy.get(commonlocators.optionposition).last().click({ force: true }); cy.wait(200); cy.get(".t--button-group-Left").click({ force: true }); cy.wait(200); @@ -115,7 +113,7 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("9. Switch Functionality To change label color of switch", function() { + it("9. Switch Functionality To change label color of switch", function () { cy.openPropertyPane("switchwidget"); cy.moveToStyleTab(); cy.get(".t--property-control-fontcolor .bp3-input").type("red"); @@ -129,12 +127,10 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("10. Switch Functionality To change label size of switch", function() { + it("10. Switch Functionality To change label size of switch", function () { cy.openPropertyPane("switchwidget"); cy.moveToStyleTab(); - cy.get(widgetsPage.textSizeNew) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSizeNew).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.selectTxtSize("XL"); @@ -147,7 +143,7 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("11. Switch Functionality To change label style of switch", function() { + it("11. Switch Functionality To change label style of switch", function () { cy.openPropertyPane("switchwidget"); cy.moveToStyleTab(); cy.get(".t--property-control-emphasis .t--button-group-BOLD").click({ @@ -162,27 +158,21 @@ describe("Switch Widget Functionality", function() { cy.get(publish.backToEditor).click(); }); - it("12. Check isDirty meta property", function() { + it("12. Check isDirty meta property", function () { cy.openPropertyPane("textwidget"); cy.updateCodeInput(".t--property-control-text", `{{Toggler.isDirty}}`); // Change defaultSwitchState property cy.openPropertyPane("switchwidget"); - cy.get(".t--property-control-defaultstate label") - .last() - .click(); + cy.get(".t--property-control-defaultstate label").last().click(); // Check if isDirty is reset to false cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI - cy.get(`${formWidgetsPage.switchWidget} label`) - .first() - .click(); + cy.get(`${formWidgetsPage.switchWidget} label`).first().click(); // Check if isDirty is set to true cy.get(".t--widget-textwidget").should("contain", "true"); // Change defaultSwitchState property cy.openPropertyPane("switchwidget"); - cy.get(".t--property-control-defaultstate label") - .last() - .click(); + cy.get(".t--property-control-defaultstate label").last().click(); // Check if isDirty is reset to false cy.get(".t--widget-textwidget").should("contain", "false"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/Switchgroup1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/Switchgroup1_spec.js index 3ba7437a40..dfbb8dea2d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/Switchgroup1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Switch/Switchgroup1_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../../../fixtures/emptyDSL.json"); const explorer = require("../../../../../locators/explorerlocators.json"); -describe("Switchgroup Widget Functionality", function() { +describe("Switchgroup Widget Functionality", function () { before(() => { cy.addDsl(dsl); cy.wait(5000); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_Duplicate_TabName_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_Duplicate_TabName_spec.js index 3b10bb9b03..f42f0b92f4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_Duplicate_TabName_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_Duplicate_TabName_spec.js @@ -1,10 +1,10 @@ const dsl = require("../../../../../fixtures/tabsWidgetDsl.json"); -describe("Tab widget test duplicate tab name validation", function() { +describe("Tab widget test duplicate tab name validation", function () { before(() => { cy.addDsl(dsl); }); - it("Tab Widget Functionality Test with Modal on change of selected tab", function() { + it("Tab Widget Functionality Test with Modal on change of selected tab", function () { cy.openPropertyPane("tabswidget"); // added duplicate tab names cy.tabPopertyUpdate("tab2", "TestUpdated"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_OnEvent_Navigation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_OnEvent_Navigation_spec.js index 65e3c27380..f3a10f6f3f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_OnEvent_Navigation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_OnEvent_Navigation_spec.js @@ -3,12 +3,12 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/tabsWidgetReset.json"); const publishPage = require("../../../../../locators/publishWidgetspage.json"); -describe("Tabs widget on change of selection navigation usecases", function() { +describe("Tabs widget on change of selection navigation usecases", function () { before(() => { cy.addDsl(dsl); }); - it("1.On change of tab selection Navigate to a URL", function() { + it("1.On change of tab selection Navigate to a URL", function () { cy.openPropertyPane("tabswidget"); cy.get(".code-highlight") .children() @@ -22,7 +22,7 @@ describe("Tabs widget on change of selection navigation usecases", function() { cy.wait(5000); }); - it("2.Publish the app and validate the navigation change on tab selection.", function() { + it("2.Publish the app and validate the navigation change on tab selection.", function () { cy.PublishtheApp(); cy.wait(5000); cy.get(".t--page-switch-tab:contains('Tab 3')").click( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_new_scenario_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_new_scenario_spec.js index b1a2aa7b0f..b8ead74583 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_new_scenario_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_new_scenario_spec.js @@ -3,11 +3,11 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/tabsWithWidgetDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Tab widget test", function() { +describe("Tab widget test", function () { before(() => { cy.addDsl(dsl); }); - it("Tab Widget Functionality Test with Modal on change of selected tab", function() { + it("Tab Widget Functionality Test with Modal on change of selected tab", function () { cy.openPropertyPane("tabswidget"); cy.widgetText("tab", Layoutpage.tabWidget, widgetsPage.widgetNameSpan); cy.AddActionWithModal(); @@ -16,23 +16,19 @@ describe("Tab widget test", function() { }); }); - it("Publih the app and validate the widgets displayed under each tab", function() { + it("Publih the app and validate the widgets displayed under each tab", function () { cy.PublishtheApp(); cy.get(publish.buttonWidget).should("be.visible"); cy.get(publish.textWidget).should("be.visible"); cy.get(publish.datePickerNew).should("be.visible"); cy.wait(3000); - cy.get(publish.tab) - .contains("Tab 2") - .click({ force: true }); + cy.get(publish.tab).contains("Tab 2").click({ force: true }); cy.get(publish.checkboxWidget).should("be.visible"); cy.get(publish.radioWidget).should("be.visible"); - cy.get(publish.buttonWidget) - .contains("Confirm") - .click({ - force: true, - }); + cy.get(publish.buttonWidget).contains("Confirm").click({ + force: true, + }); }); }); afterEach(() => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_spec.js index 15b72569c7..4abc906f7f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_spec.js @@ -4,11 +4,11 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/layoutdsl.json"); -describe("Tab widget test", function() { +describe("Tab widget test", function () { before(() => { cy.addDsl(dsl); }); - it("1. Tab Widget Functionality Test", function() { + it("1. Tab Widget Functionality Test", function () { cy.openPropertyPane("tabswidget"); /** * @param{Text} Random Text @@ -34,9 +34,7 @@ describe("Tab widget test", function() { cy.xpath(Layoutpage.deleteTab.replace("tabName", "Day")).click({ force: true, }); - cy.get(Layoutpage.tabWidget) - .contains("Day") - .should("not.exist"); + cy.get(Layoutpage.tabWidget).contains("Day").should("not.exist"); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); /** @@ -49,59 +47,47 @@ describe("Tab widget test", function() { cy.assertPageSave(); cy.PublishtheApp(); }); - it("2. Tab Widget Functionality To Select Tabs", function() { + it("2. Tab Widget Functionality To Select Tabs", function () { cy.get(publish.tabWidget) .contains(this.data.tabName) .click({ force: true }) .should("have.class", "is-selected"); cy.get(publish.backToEditor).click(); }); - it("3. Tab Widget Functionality To Unchecked Visible Widget", function() { + it("3. Tab Widget Functionality To Unchecked Visible Widget", function () { cy.openPropertyPane("tabswidget"); cy.togglebarDisable(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.tabWidget).should("not.exist"); cy.get(publish.backToEditor).click(); }); - it("4. Tab Widget Functionality To Check Visible Widget", function() { + it("4. Tab Widget Functionality To Check Visible Widget", function () { cy.openPropertyPane("tabswidget"); cy.togglebar(commonlocators.visibleCheckbox); cy.PublishtheApp(); cy.get(publish.tabWidget).should("be.visible"); cy.get(publish.backToEditor).click(); }); - it("5. Tab Widget Functionality To Check tab invisiblity", function() { + it("5. Tab Widget Functionality To Check tab invisiblity", function () { cy.openPropertyPane("tabswidget"); cy.xpath(Layoutpage.tabEdit.replace("tabName", "Tab 1")).click({ force: true, }); - cy.get(Layoutpage.tabVisibility) - .first() - .click({ force: true }); - cy.get(Layoutpage.tabWidget) - .contains("Tab 1") - .should("not.exist"); + cy.get(Layoutpage.tabVisibility).first().click({ force: true }); + cy.get(Layoutpage.tabWidget).contains("Tab 1").should("not.exist"); cy.PublishtheApp(); - cy.get(publish.tabWidget) - .contains("Tab 1") - .should("not.exist"); + cy.get(publish.tabWidget).contains("Tab 1").should("not.exist"); cy.get(publish.backToEditor).click(); }); - it("6. Tab Widget Functionality To Check tab visibility", function() { + it("6. Tab Widget Functionality To Check tab visibility", function () { cy.openPropertyPane("tabswidget"); cy.xpath(Layoutpage.tabEdit.replace("tabName", "Tab 1")).click({ force: true, }); - cy.get(Layoutpage.tabVisibility) - .first() - .click({ force: true }); - cy.get(Layoutpage.tabWidget) - .contains("Tab 1") - .should("be.visible"); + cy.get(Layoutpage.tabVisibility).first().click({ force: true }); + cy.get(Layoutpage.tabWidget).contains("Tab 1").should("be.visible"); cy.PublishtheApp(); - cy.get(publish.tabWidget) - .contains("Tab 1") - .should("be.visible"); + cy.get(publish.tabWidget).contains("Tab 1").should("be.visible"); cy.get(publish.backToEditor).click(); }); /* Test to be revisted as the undo action is inconsistent in automation @@ -129,7 +115,7 @@ describe("Tab widget test", function() { .should("be.visible"); }); */ - it("8. Tabs widget should have navigation arrows if tabs don't fit", function() { + it("8. Tabs widget should have navigation arrows if tabs don't fit", function () { const rightNavButtonSelector = Layoutpage.tabWidget + " .scroll-nav-right-button"; const leftNavButtonSelector = @@ -147,23 +133,19 @@ describe("Tab widget test", function() { // Should show off left navigation arrow cy.get(rightNavButtonSelector).should("exist"); }); - it("9. Tab Widget Functionality To Check Default Tab selected After Selected Tab Delete", function() { + it("9. Tab Widget Functionality To Check Default Tab selected After Selected Tab Delete", function () { cy.testJsontext("defaulttab", "Tab 2"); cy.tabVerify(3, "Tab3-for-testing-scroll-navigation-controls"); cy.get(Layoutpage.tabWidget) .contains("Tab3-for-testing-scroll-navigation-controls") .should("have.class", "is-selected"); - cy.get(Layoutpage.tabDelete) - .eq(3) - .click({ force: true }); + cy.get(Layoutpage.tabDelete).eq(3).click({ force: true }); cy.get(Layoutpage.tabWidget) .contains("Tab 2") .should("have.class", "is-selected"); }); - it("10. Tab Widget Functionality To Check First Tab Selected After Selected Tab(Default one) Delete", function() { - cy.get(Layoutpage.tabDelete) - .eq(2) - .click({ force: true }); + it("10. Tab Widget Functionality To Check First Tab Selected After Selected Tab(Default one) Delete", function () { + cy.get(Layoutpage.tabDelete).eq(2).click({ force: true }); cy.get(Layoutpage.tabWidget) .contains("Aditya") .should("have.class", "is-selected"); @@ -176,9 +158,7 @@ describe("Tab widget test", function() { cy.get(Layoutpage.tabNumber).should("have.text", "3 tabs"); }); it("13. Validates Total Number Of Tabs Displayed In The Property Pane After Deleting A Tab", () => { - cy.get(Layoutpage.tabDelete) - .eq(1) - .click({ force: true }); + cy.get(Layoutpage.tabDelete).eq(1).click({ force: true }); cy.get(Layoutpage.tabNumber).should("have.text", "2 tabs"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab_reset_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab_reset_spec.js index ecd015f0af..516f7dcb65 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab_reset_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab_reset_spec.js @@ -2,22 +2,20 @@ const LayoutPage = require("../../../../locators/Layout.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const dsl = require("../../../../fixtures/tabsWidgetReset.json"); -describe("Tabs widget resetting", function() { +describe("Tabs widget resetting", function () { before(() => { cy.addDsl(dsl); }); - it("1.Reset the Tabs widget With the default value.", function() { + it("1.Reset the Tabs widget With the default value.", function () { cy.get(LayoutPage.tabWidget) .contains("Tab 3") .click({ force: true }) .should("be.visible"); - cy.get(widgetsPage.buttonWidget) - .contains("Submit") - .click({ - force: true, - }); + cy.get(widgetsPage.buttonWidget).contains("Submit").click({ + force: true, + }); cy.get(LayoutPage.tabWidget) .contains("Tab 1") @@ -34,17 +32,15 @@ describe("Tabs widget resetting", function() { .should("have.text", "Tab 2"); }); - it("2.Reset the Tabs widget Without the default value.", function() { + it("2.Reset the Tabs widget Without the default value.", function () { cy.testJsontext("defaulttab", ""); cy.get(LayoutPage.tabWidget) .contains("Tab 3") .click({ force: true }) .should("be.visible"); - cy.get(widgetsPage.buttonWidget) - .contains("Submit") - .click({ - force: true, - }); + cy.get(widgetsPage.buttonWidget).contains("Submit").click({ + force: true, + }); cy.get(LayoutPage.tabWidget) .contains("Tab 1") .should("have.class", "is-selected"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableBugs_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableBugs_Spec.ts index 380fabcacf..ac953bcff3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableBugs_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableBugs_Spec.ts @@ -7,9 +7,9 @@ const agHelper = ObjectsRegistry.AggregateHelper, table = ObjectsRegistry.Table, deployMode = ObjectsRegistry.DeployMode; -describe("Verify various Table property bugs", function() { +describe("Verify various Table property bugs", function () { before(() => { - cy.fixture("example").then(function(data: any) { + cy.fixture("example").then(function (data: any) { dataSet = data; }); cy.fixture("tablev1NewDsl").then((val: any) => { @@ -17,7 +17,7 @@ describe("Verify various Table property bugs", function() { }); }); - it("1. Adding Data to Table Widget", function() { + it("1. Adding Data to Table Widget", function () { ee.SelectEntityByName("Table1", "Widgets"); propPane.UpdatePropertyFieldValue( "Table Data", @@ -27,7 +27,7 @@ describe("Verify various Table property bugs", function() { agHelper.PressEscape(); }); - it("2. Bug 13299 - Verify Display Text does not contain garbage value for URL column type when empty", function() { + it("2. Bug 13299 - Verify Display Text does not contain garbage value for URL column type when empty", function () { ee.SelectEntityByName("Table1", "Widgets"); table.ChangeColumnType("image", "URL"); propPane.UpdatePropertyFieldValue( @@ -69,7 +69,7 @@ describe("Verify various Table property bugs", function() { deployMode.NavigateBacktoEditor(); }); - it("3. Bug 13299 - Verify Display Text does not contain garbage value for URL column type when null", function() { + it("3. Bug 13299 - Verify Display Text does not contain garbage value for URL column type when null", function () { ee.SelectEntityByName("Table1", "Widgets"); agHelper.GetNClick(table._columnSettings("image")); @@ -110,7 +110,7 @@ describe("Verify various Table property bugs", function() { deployMode.NavigateBacktoEditor(); }); - it("4. Bug 13299 - Verify Display Text does not contain garbage value for URL column type when undefined", function() { + it("4. Bug 13299 - Verify Display Text does not contain garbage value for URL column type when undefined", function () { ee.SelectEntityByName("Table1", "Widgets"); agHelper.GetNClick(table._columnSettings("image")); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableFilter1_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableFilter1_Spec.ts index 3dc0233d76..c5a1685385 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableFilter1_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableFilter1_Spec.ts @@ -8,9 +8,9 @@ const agHelper = ObjectsRegistry.AggregateHelper, homePage = ObjectsRegistry.HomePage, deployMode = ObjectsRegistry.DeployMode; -describe("Verify various Table_Filter combinations", function() { +describe("Verify various Table_Filter combinations", function () { before(() => { - cy.fixture("example").then(function(data: any) { + cy.fixture("example").then(function (data: any) { dataSet = data; }); cy.fixture("tablev1NewDsl").then((val: any) => { @@ -18,7 +18,7 @@ describe("Verify various Table_Filter combinations", function() { }); }); - it("1. Adding Data to Table Widget", function() { + it("1. Adding Data to Table Widget", function () { ee.SelectEntityByName("Table1"); propPane.UpdatePropertyFieldValue( "Table Data", @@ -29,8 +29,8 @@ describe("Verify various Table_Filter combinations", function() { deployMode.DeployApp(); }); - it("2. Table Widget Search Functionality", function() { - table.ReadTableRowColumnData(1, 3,"v1", 2000).then((cellData) => { + it("2. Table Widget Search Functionality", function () { + table.ReadTableRowColumnData(1, 3, "v1", 2000).then((cellData) => { expect(cellData).to.eq("Lindsay Ferguson"); table.SearchTable(cellData); table.ReadTableRowColumnData(0, 3).then((afterSearch) => { @@ -46,7 +46,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveSearchTextNVerify("2381224"); }); - it("3. Verify Table Filter for 'contain'", function() { + it("3. Verify Table Filter for 'contain'", function () { table.OpenNFilterTable("userName", "contains", "Lindsay"); table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); @@ -54,7 +54,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224"); }); - it("4. Verify Table Filter for 'does not contain'", function() { + it("4. Verify Table Filter for 'does not contain'", function () { table.ReadTableRowColumnData(1, 4).then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); @@ -65,7 +65,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224"); }); - it("5. Verify Table Filter for 'starts with'", function() { + it("5. Verify Table Filter for 'starts with'", function () { table.ReadTableRowColumnData(4, 4).then(($cellData) => { expect($cellData).to.eq("Avocado Panini"); }); @@ -76,7 +76,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224"); }); - it("6. Verify Table Filter for 'ends with' - case sensitive", function() { + it("6. Verify Table Filter for 'ends with' - case sensitive", function () { table.ReadTableRowColumnData(1, 4).then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); @@ -87,7 +87,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224"); }); - it("7. Verify Table Filter for 'ends with' - case insenstive", function() { + it("7. Verify Table Filter for 'ends with' - case insenstive", function () { table.ReadTableRowColumnData(1, 4).then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); @@ -98,7 +98,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224"); }); - it("8. Verify Table Filter for 'ends with' - on wrong column", function() { + it("8. Verify Table Filter for 'ends with' - on wrong column", function () { table.ReadTableRowColumnData(1, 4).then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); @@ -107,7 +107,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224"); }); - it("9. Verify Table Filter for 'is exactly' - case sensitive", function() { + it("9. Verify Table Filter for 'is exactly' - case sensitive", function () { table.ReadTableRowColumnData(2, 4).then(($cellData) => { expect($cellData).to.eq("Beef steak"); }); @@ -118,7 +118,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true); }); - it("10. Verify Table Filter for 'is exactly' - case insensitive", function() { + it("10. Verify Table Filter for 'is exactly' - case insensitive", function () { table.ReadTableRowColumnData(2, 4).then(($cellData) => { expect($cellData).to.eq("Beef steak"); }); @@ -127,13 +127,13 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true); }); - it("11. Verify Table Filter for 'empty'", function() { + it("11. Verify Table Filter for 'empty'", function () { table.OpenNFilterTable("email", "empty"); table.WaitForTableEmpty(); table.RemoveFilterNVerify("2381224"); }); - it("12. Verify Table Filter for 'not empty'", function() { + it("12. Verify Table Filter for 'not empty'", function () { table.ReadTableRowColumnData(4, 5).then(($cellData) => { expect($cellData).to.eq("7.99"); }); @@ -144,7 +144,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224"); }); - it("13. Verify Table Filter - Where Edit - Change condition along with input value", function() { + it("13. Verify Table Filter - Where Edit - Change condition along with input value", function () { table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -156,21 +156,14 @@ describe("Verify various Table_Filter combinations", function() { //Change condition - 1st time agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains("empty") - .click(); + cy.get(table._dropdownText).contains("empty").click(); agHelper.ClickButton("APPLY"); table.WaitForTableEmpty(); //Change condition - 2nd time agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains("contains") - .click(); - agHelper - .GetNClick(table._filterInputValue, 0) - .type("19") - .wait(500); + cy.get(table._dropdownText).contains("contains").click(); + agHelper.GetNClick(table._filterInputValue, 0).type("19").wait(500); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); @@ -178,7 +171,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("14. Verify Table Filter - Where Edit - Single Column, Condition & input value", function() { + it("14. Verify Table Filter - Where Edit - Single Column, Condition & input value", function () { table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -196,9 +189,7 @@ describe("Verify various Table_Filter combinations", function() { //Change condition - 1st time agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains("does not contain") - .click(); + cy.get(table._dropdownText).contains("does not contain").click(); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 4).then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); @@ -209,22 +200,14 @@ describe("Verify various Table_Filter combinations", function() { //Change condition - column value agHelper.GetNClick(table._filterColumnsDropdown); - cy.get(table._dropdownText) - .contains("userName") - .click(); + cy.get(table._dropdownText).contains("userName").click(); agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains("does not contain") - .click(); + cy.get(table._dropdownText).contains("does not contain").click(); agHelper.ClickButton("APPLY"); table.WaitForTableEmpty(); //Change input value - agHelper - .GetNClick(table._filterInputValue, 0) - .clear() - .type("i") - .wait(500); + agHelper.GetNClick(table._filterInputValue, 0).clear().type("i").wait(500); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); @@ -233,7 +216,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("15. Verify Table Filter for OR operator - different row match", function() { + it("15. Verify Table Filter for OR operator - different row match", function () { table.ReadTableRowColumnData(2, 3).then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); }); @@ -249,7 +232,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("16. Verify Table Filter for OR operator - same row match", function() { + it("16. Verify Table Filter for OR operator - same row match", function () { table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -264,7 +247,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("17. Verify Table Filter for OR operator - two 'ORs'", function() { + it("17. Verify Table Filter for OR operator - two 'ORs'", function () { table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -283,7 +266,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("18. Verify Table Filter for AND operator - different row match", function() { + it("18. Verify Table Filter for AND operator - different row match", function () { table.ReadTableRowColumnData(3, 3).then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); @@ -296,7 +279,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("19. Verify Table Filter for AND operator - same row match", function() { + it("19. Verify Table Filter for AND operator - same row match", function () { table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -311,7 +294,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("20. Verify Table Filter for AND operator - same row match - edit input text value", function() { + it("20. Verify Table Filter for AND operator - same row match - edit input text value", function () { table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableFilter2_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableFilter2_Spec.ts index f5297cbc8d..5d4f2169f4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableFilter2_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/TableFilter2_Spec.ts @@ -8,9 +8,9 @@ const agHelper = ObjectsRegistry.AggregateHelper, homePage = ObjectsRegistry.HomePage, deployMode = ObjectsRegistry.DeployMode; -describe("Verify various Table_Filter combinations", function() { +describe("Verify various Table_Filter combinations", function () { before(() => { - cy.fixture("example").then(function(data: any) { + cy.fixture("example").then(function (data: any) { dataSet = data; }); cy.fixture("tablev1NewDsl").then((val: any) => { @@ -18,7 +18,7 @@ describe("Verify various Table_Filter combinations", function() { }); }); - it("1. Adding Data to Table Widget", function() { + it("1. Adding Data to Table Widget", function () { ee.SelectEntityByName("Table1"); propPane.UpdatePropertyFieldValue( "Table Data", @@ -29,7 +29,7 @@ describe("Verify various Table_Filter combinations", function() { deployMode.DeployApp(); }); - it("2. Verify Table Filter for AND operator - same row match - Where Edit - input value", function() { + it("2. Verify Table Filter for AND operator - same row match - Where Edit - input value", function () { table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -53,7 +53,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("3. Verify Table Filter for AND operator - two 'ANDs' - clearAll", function() { + it("3. Verify Table Filter for AND operator - two 'ANDs' - clearAll", function () { table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -72,7 +72,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("4. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter condition + Bug 12638", function() { + it("4. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter condition + Bug 12638", function () { table.OpenNFilterTable("id", "contains", "2"); table.ReadTableRowColumnData(1, 3).then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); @@ -93,7 +93,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("5. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter twice + Bug 12638", function() { + it("5. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter twice + Bug 12638", function () { table.OpenNFilterTable("id", "starts with", "2"); table.ReadTableRowColumnData(1, 3).then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); @@ -117,7 +117,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("6. Verify Table Filter for changing from AND -> OR -> AND", function() { + it("6. Verify Table Filter for changing from AND -> OR -> AND", function () { table.OpenNFilterTable("id", "contains", "7"); table.ReadTableRowColumnData(1, 4).then(($cellData) => { expect($cellData).to.eq("Beef steak"); @@ -132,9 +132,7 @@ describe("Verify various Table_Filter combinations", function() { }); agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("OR") - .click(); + cy.get(table._dropdownText).contains("OR").click(); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(1, 4).then(($cellData) => { @@ -142,9 +140,7 @@ describe("Verify various Table_Filter combinations", function() { }); agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("AND") - .click(); + cy.get(table._dropdownText).contains("AND").click(); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 4).then(($cellData) => { @@ -153,7 +149,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("7. Verify Table Filter for changing from AND -> OR -> along with changing Where clause condions", function() { + it("7. Verify Table Filter for changing from AND -> OR -> along with changing Where clause condions", function () { table.OpenNFilterTable("id", "starts with", "2"); table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); @@ -168,32 +164,26 @@ describe("Verify various Table_Filter combinations", function() { }); //Changing filter conditions of both where rows - 1st row - agHelper - .GetNClick(table._filterInputValue, 0) - .clear() - .type("7") - .wait(500); + agHelper.GetNClick(table._filterInputValue, 0).clear().type("7").wait(500); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); }); - table.ReadTableRowColumnData(1, 3, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); - table.ReadTableRowColumnData(2, 3, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); //Changing filter conditions of both where rows - 2nd row agHelper.GetNClick(table._filterConditionDropdown, 1); - cy.get(table._dropdownText) - .contains("does not contain") - .click(); + cy.get(table._dropdownText).contains("does not contain").click(); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); - table.ReadTableRowColumnData(1, 3,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); }); table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { @@ -205,9 +195,7 @@ describe("Verify various Table_Filter combinations", function() { //Changing OR to AND agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("AND") - .click(); + cy.get(table._dropdownText).contains("AND").click(); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Byron Fields"); @@ -218,18 +206,10 @@ describe("Verify various Table_Filter combinations", function() { //Changing AND to OR agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("OR") - .click(); + cy.get(table._dropdownText).contains("OR").click(); agHelper.GetNClick(table._filterConditionDropdown, 1); - cy.get(table._dropdownText) - .contains("starts with") - .click(); - agHelper - .GetNClick(table._filterInputValue, 1) - .clear() - .type("9") - .wait(500); + cy.get(table._dropdownText).contains("starts with").click(); + agHelper.GetNClick(table._filterInputValue, 1).clear().type("9").wait(500); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); @@ -244,7 +224,7 @@ describe("Verify various Table_Filter combinations", function() { }); //Skipping until bug closed - it.skip("8. Verify Table Filter for changing from AND -> OR [Remove a filter] -> AND + Bug 12642", function() { + it.skip("8. Verify Table Filter for changing from AND -> OR [Remove a filter] -> AND + Bug 12642", function () { table.OpenNFilterTable("id", "contains", "7"); table.ReadTableRowColumnData(1, 4).then(($cellData) => { expect($cellData).to.eq("Beef steak"); @@ -259,9 +239,7 @@ describe("Verify various Table_Filter combinations", function() { }); agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("OR") - .click(); + cy.get(table._dropdownText).contains("OR").click(); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(1, 4).then(($cellData) => { @@ -271,9 +249,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", false, true, 0); //Verifies bug 12642 agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("AND") - .click(); + cy.get(table._dropdownText).contains("AND").click(); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 4).then(($cellData) => { @@ -282,7 +258,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, false); }); - it("9. Verify Full table data - download csv and download Excel", function() { + it("9. Verify Full table data - download csv and download Excel", function () { table.DownloadFromTable("Download as CSV"); //This plugin works only from cypress ^9.2 //cy.verifyDownload("Table1.csv") @@ -292,7 +268,7 @@ describe("Verify various Table_Filter combinations", function() { table.ValidateDownloadNVerify("Table1.xlsx", "Michael Lawson"); }); - it("10. Verify Searched data - download csv and download Excel", function() { + it("10. Verify Searched data - download csv and download Excel", function () { table.SearchTable("7434532"); table.ReadTableRowColumnData(0, 3).then((afterSearch) => { expect(afterSearch).to.eq("Byron Fields"); @@ -315,7 +291,7 @@ describe("Verify various Table_Filter combinations", function() { table.ValidateDownloadNVerify("Table1.xlsx", "Beef steak"); }); - it("11. Verify Filtered data - download csv and download Excel", function() { + it("11. Verify Filtered data - download csv and download Excel", function () { table.OpenNFilterTable("id", "starts with", "6"); table.ReadTableRowColumnData(0, 3).then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); @@ -425,14 +401,9 @@ describe("Verify various Table_Filter combinations", function() { input: string | "" = "", ) { agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains(condition) - .click(); + cy.get(table._dropdownText).contains(condition).click(); if (input) - agHelper - .GetNClick(table._filterInputValue, 0) - .type(input) - .wait(500); + agHelper.GetNClick(table._filterInputValue, 0).type(input).wait(500); agHelper.ClickButton("APPLY"); agHelper .GetText(table._showPageItemsCount) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Button_Icon_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Button_Icon_validation_spec.js index 5d06fdbb2e..ce6083fc54 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Button_Icon_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Button_Icon_validation_spec.js @@ -4,12 +4,12 @@ const dsl = require("../../../../../fixtures/tableNewDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); const color = "rgb(151, 0, 0)"; -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("Table widget with with modal popup", function() { + it("Table widget with with modal popup", function () { cy.openPropertyPane("tablewidget"); //update Table name with _ cy.widgetText( @@ -24,7 +24,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(".bp3-overlay-backdrop").click({ force: true }); }); - it("Table widget with button colour change validation", function() { + it("Table widget with button colour change validation", function () { cy.openPropertyPane("tablewidget"); // Open column details of "id". cy.editColumn("id"); @@ -34,10 +34,7 @@ describe("Table Widget property pane feature validation", function() { // Changing the computed value (data) to "orderAmount" cy.updateComputedValue(testdata.currentRowOrderAmt); cy.changeColumnType("Button", false); - cy.get(widgetsPage.buttonColor) - .click({ force: true }) - .clear() - .type(color); + cy.get(widgetsPage.buttonColor).click({ force: true }).clear().type(color); cy.get(widgetsPage.tableBtn).should("have.css", "background-color", color); cy.readTabledataPublish("2", "2").then((tabData) => { const tabValue = tabData; @@ -45,7 +42,7 @@ describe("Table Widget property pane feature validation", function() { }); }); - it("Table widget icon type and colour validation", function() { + it("Table widget icon type and colour validation", function () { cy.openPropertyPane("tablewidget"); // Open column details of "id". cy.get(commonlocators.editPropBackButton).click({ force: true }); @@ -56,16 +53,14 @@ describe("Table Widget property pane feature validation", function() { cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-add") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-add").first().click({ + force: true, + }); cy.get(".t--widget-tablewidget .tbody .bp3-icon-add").should("be.visible"); cy.get(".bp3-overlay-backdrop").click({ force: true }); }); - it("Table widget validation of a field without js ", function() { + it("Table widget validation of a field without js ", function () { cy.openPropertyPane("tablewidget"); cy.editColumn("email"); cy.clearPropertyValue(0); @@ -75,7 +70,7 @@ describe("Table Widget property pane feature validation", function() { cy.clearPropertyValue(1); }); - it("Table widget column reorder and reload function", function() { + it("Table widget column reorder and reload function", function () { cy.openPropertyPane("tablewidget"); cy.get(commonlocators.editPropBackButton).click({ force: true }); cy.hideColumn("email"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Color_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Color_spec.js index b1b4b4d640..93ab90acc7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Color_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Color_spec.js @@ -2,12 +2,12 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/tableNewDsl.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test to validate text color and text background", function() { + it("1. Test to validate text color and text background", function () { // Open property pane cy.openPropertyPane("tablewidget"); //cy.moveToStyleTab(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Column_Resize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Column_Resize_spec.js index 802682ac2b..9ec0bc7924 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Column_Resize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Column_Resize_spec.js @@ -1,12 +1,12 @@ /* eslint-disable cypress/no-unnecessary-waiting */ const dsl = require("../../../../../fixtures/tableResizedColumnsDsl.json"); -describe("Table Widget Functionality with Hidden and Resized Columns", function() { +describe("Table Widget Functionality with Hidden and Resized Columns", function () { before(() => { cy.addDsl(dsl); }); - it("Table Widget Functionality with Hidden and Resized Columns", function() { + it("Table Widget Functionality with Hidden and Resized Columns", function () { cy.PublishtheApp(); // Verify column header width should be equal to table width cy.get(".t--widget-tablewidget") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js index a2035bb758..7be1bb58f8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js @@ -3,12 +3,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableTextPaginationDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table", function() { + it("1. Create an API and Execute the API and bind with Table", function () { // Create and execute an API and bind with table cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); @@ -43,9 +43,7 @@ describe("Test Create Api and Bind to Table widget", function() { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // Click on cell background JS button - cy.get(widgetsPage.toggleJsBcgColor) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleJsBcgColor).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // Change the cell background color to green @@ -57,7 +55,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.readTabledataValidateCSS("1", "4", "background-color", "rgb(0, 128, 0)"); }); - it("2. Edit column name and validate test for computed value based on column type selected", function() { + it("2. Edit column name and validate test for computed value based on column type selected", function () { // opoen customColumn1 property pane cy.editColumn("customColumn1"); // Enter Apil 1st user email data into customColumn1 diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_EmptyRow_Color_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_EmptyRow_Color_spec.js index dfda538eca..991fa811dc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_EmptyRow_Color_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_EmptyRow_Color_spec.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/tableNewDsl.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); -describe("Table Widget empty row color validation", function() { +describe("Table Widget empty row color validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Validate cell background of columns", function() { + it("1. Validate cell background of columns", function () { // Open property pane cy.openPropertyPane("tablewidget"); // give general color to all table row diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_FilteredTableData_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_FilteredTableData_spec.js index a613e103d4..87c533321e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_FilteredTableData_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_FilteredTableData_spec.js @@ -3,26 +3,20 @@ const commonlocators = require("../.././../../../locators/commonlocators.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/tableAndTextDsl.json"); -describe("Table Widget Filtered Table Data in autocomplete", function() { +describe("Table Widget Filtered Table Data in autocomplete", function () { before(() => { cy.addDsl(dsl); }); - it("Table Widget Functionality To Filter and search data", function() { + it("Table Widget Functionality To Filter and search data", function () { cy.openPropertyPane("tablewidget"); cy.wait("@updateLayout"); - cy.get(publish.searchInput) - .first() - .type("query"); + cy.get(publish.searchInput).first().type("query"); cy.get(publish.filterBtn).click(); cy.get(publish.attributeDropdown).click(); - cy.get(publish.attributeValue) - .contains("task") - .click(); + cy.get(publish.attributeValue).contains("task").click(); cy.get(publish.conditionDropdown).click(); - cy.get(publish.attributeValue) - .contains("contains") - .click(); + cy.get(publish.attributeValue).contains("contains").click(); cy.get(publish.inputValue).type("bind"); cy.wait(500); cy.get(widgetsPage.filterApplyBtn).click({ force: true }); @@ -30,7 +24,7 @@ describe("Table Widget Filtered Table Data in autocomplete", function() { cy.get(".t--close-filter-btn").click({ force: true }); }); - it("Table Widget Functionality to validate filtered table data", function() { + it("Table Widget Functionality to validate filtered table data", function () { cy.SearchEntityandOpen("Text1"); cy.testJsontext("text", "{{Table1.filteredTableData[0].task}}"); cy.readTabledata("0", "1").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_GeneralProperty_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_GeneralProperty_spec.js index a6f38188ea..211da138a7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_GeneralProperty_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_GeneralProperty_spec.js @@ -6,70 +6,58 @@ const dsl = require("../../../../../fixtures/tableNewDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test to validate table pagination is disabled", function() { + it("1. Test to validate table pagination is disabled", function () { // Verify pagination is disabled cy.get(".t--table-widget-prev-page").should("have.attr", "disabled"); cy.get(".t--table-widget-next-page").should("have.attr", "disabled"); cy.get(".t--table-widget-page-input input").should("have.attr", "disabled"); }); - it("2. Test to validate text allignment", function() { + it("2. Test to validate text allignment", function () { // Open property pane cy.openPropertyPane("tablewidget"); // Change the text align to center - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); // Verify the center text alignment cy.readTabledataValidateCSS("1", "0", "justify-content", "center"); // Change the text align to right - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); // Verify the right text alignment cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-end"); // Change the text align to left - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); // verify the left text alignment cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-start"); }); - it("3. Test to validate column heading allignment", function() { + it("3. Test to validate column heading allignment", function () { // cy.openPropertyPane("tablewidget"); // Change the text align to center - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); // Verify the column headings are center aligned cy.get(".draggable-header") .first() .should("have.css", "text-align", "center"); // Change the text align to right - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); // Verify the column headings are right aligned cy.get(".draggable-header") .first() .should("have.css", "text-align", "right"); // Change the text align to left - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); // Verify the column headings are left aligned cy.get(".draggable-header") .first() .should("have.css", "text-align", "left"); }); - it("4. Test to validate text format", function() { + it("4. Test to validate text format", function () { // Select the bold font style cy.get(widgetsPage.bold).click({ force: true }); // Varify the font style is bold @@ -85,31 +73,25 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "text-decoration-line", "underline"); }); - it("5. Test to validate vertical allignment", function() { + it("5. Test to validate vertical allignment", function () { cy.openPropertyPane("tablewidget"); // Select the top vertical alignment cy.get(widgetsPage.verticalTop).click({ force: true }); // verify vertical alignment is top cy.readTabledataValidateCSS("1", "0", "align-items", "flex-start"); // Change the vertical alignment to center - cy.get(widgetsPage.verticalCenter) - .last() - .click({ force: true }); + cy.get(widgetsPage.verticalCenter).last().click({ force: true }); // Verify the vertical alignment is centered cy.readTabledataValidateCSS("1", "0", "align-items", "center"); // Change the vertical alignment to bottom - cy.get(widgetsPage.verticalBottom) - .last() - .click({ force: true }); + cy.get(widgetsPage.verticalBottom).last().click({ force: true }); // Verify the vertical alignment is bottom cy.readTabledataValidateCSS("1", "0", "align-items", "flex-end"); }); - it("6. Table widget toggle test for text alignment", function() { + it("6. Table widget toggle test for text alignment", function () { // Click on text align JS - cy.get(widgetsPage.toggleTextAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextAlign).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // Change the text align value to right for michael and left for others @@ -122,20 +104,16 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-start"); }); - it("7. Table widget change text size and validate", function() { + it("7. Table widget change text size and validate", function () { // Verify font size is 14px cy.readTabledataValidateCSS("0", "0", "font-size", "14px"); // Click on text size JS - cy.get(widgetsPage.toggleTextAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextAlign).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // Open txe size dropdown options - cy.get(widgetsPage.textSize) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSize).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // Select Heading 1 text size @@ -150,7 +128,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("0", "0", "font-size", "20px"); }); - it("8. Test to validate open new tab icon shows when URL type data validate link text ", function() { + it("8. Test to validate open new tab icon shows when URL type data validate link text ", function () { // Open property pane cy.openPropertyPane("tablewidget"); @@ -174,7 +152,7 @@ describe("Table Widget property pane feature validation", function() { */ }); - it("9. Edit column name and test for table header changes", function() { + it("9. Edit column name and test for table header changes", function () { cy.get(commonlocators.editPropBackButton).click({ force: true }); // Open email property pane cy.editColumn("email"); @@ -185,14 +163,10 @@ describe("Table Widget property pane feature validation", function() { cy.get(commonlocators.editPropBackButton).click({ force: true }); }); - it("10. Edit Row height and test table for changes", function() { + it("10. Edit Row height and test table for changes", function () { cy.openPropertyPane("tablewidget"); - cy.get(widgetsPage.rowHeight) - .last() - .click({ force: true }); - cy.get(".t--dropdown-option") - .contains("Short") - .click({ force: true }); + cy.get(widgetsPage.rowHeight).last().click({ force: true }); + cy.get(".t--dropdown-option").contains("Short").click({ force: true }); cy.wait(2000); cy.PublishtheApp(); cy.readTabledataValidateCSS("0", "1", "height", "19px", true); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js index 33aeb365be..55a0ed96e1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js @@ -5,24 +5,16 @@ const dsl = require("../../../../../fixtures/multiSelectedRowUpdationDsl.json"); Selected row stays selected after data updation if the primary column value isn't updated. */ -describe("Table Widget row multi select validation", function() { +describe("Table Widget row multi select validation", function () { before(() => { cy.addDsl(dsl); }); - it("Test multi select column shows when enableMultirowselection is true", function() { - cy.get(widgetsPage.buttonWidget) - .first() - .click(); + it("Test multi select column shows when enableMultirowselection is true", function () { + cy.get(widgetsPage.buttonWidget).first().click(); cy.wait(1000); - cy.get(".t--table-multiselect") - .first() - .click(); - cy.get(widgetsPage.buttonWidget) - .last() - .click(); - cy.get(".tbody .tr") - .first() - .should("have.class", "selected-row"); + cy.get(".t--table-multiselect").first().click(); + cy.get(widgetsPage.buttonWidget).last().click(); + cy.get(".tbody .tr").first().should("have.class", "selected-row"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_spec.js index 310ac523ca..eb747149b7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_MultiRowSelect_spec.js @@ -2,55 +2,41 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/tableNewDsl.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); -describe("Table Widget row multi select validation", function() { +describe("Table Widget row multi select validation", function () { before(() => { cy.addDsl(dsl); }); - it("Test multi select column shows when enable Multirowselection is true", function() { + it("Test multi select column shows when enable Multirowselection is true", function () { cy.openPropertyPane("tablewidget"); cy.get(widgetsPage.toggleEnableMultirowselection_tablev1) .first() .click({ force: true }); cy.closePropertyPane("tablewidget"); - cy.get(".t--table-multiselect-header") - .first() - .should("be.visible"); - cy.get(".t--table-multiselect") - .first() - .should("be.visible"); + cy.get(".t--table-multiselect-header").first().should("be.visible"); + cy.get(".t--table-multiselect").first().should("be.visible"); //Test click on header cell selects all row // click on header check cell - cy.get(".t--table-multiselect-header") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect-header").first().click({ force: true }); // check if rows selected cy.get(".tr").should("have.class", "selected-row"); //Test click on single row cell changes header select cell state // un-select all rows - cy.get(".t--table-multiselect-header") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect-header").first().click({ force: true }); // click on first row select box - cy.get(".t--table-multiselect") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect").first().click({ force: true }); // check if header cell is in half check state cy.get(".t--table-multiselect-header-half-check-svg") .first() .should("be.visible"); }); - it("Test action configured on onRowSelected get triggered whenever a table row is selected", function() { + it("Test action configured on onRowSelected get triggered whenever a table row is selected", function () { cy.openPropertyPane("tablewidget"); cy.onTableAction(0, "onrowselected", "Row Selected"); // un select first row - cy.get(".t--table-multiselect") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect").first().click({ force: true }); cy.get(commonlocators.toastmsg).should("not.exist"); // click on first row select box - cy.get(".t--table-multiselect") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect").first().click({ force: true }); cy.get(commonlocators.toastmsg).contains("Row Selected"); }); @@ -59,20 +45,16 @@ describe("Table Widget row multi select validation", function() { cy.testJsontext("defaultselectedrow", 0); // click on header check cell - cy.get(".t--table-multiselect-header") - .first() - .click({ - force: true, - }); + cy.get(".t--table-multiselect-header").first().click({ + force: true, + }); // check if rows selected cy.get(".tr").should("not.have.class", "selected-row"); // click on header check cell - cy.get(".t--table-multiselect-header") - .first() - .click({ - force: true, - }); + cy.get(".t--table-multiselect-header").first().click({ + force: true, + }); // check if rows is not selected cy.get(".tr").should("have.class", "selected-row"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Number_column_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Number_column_spec.js index ee0a427589..f776bfd538 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Number_column_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Number_column_spec.js @@ -1,20 +1,20 @@ /* eslint-disable cypress/no-unnecessary-waiting */ const dsl = require("../../../../../fixtures/basicNumberDataTableDsl.json"); -describe("Validate Table Widget Table Data", function() { +describe("Validate Table Widget Table Data", function () { before(() => { cy.addDsl(dsl); }); - it("Check number key in table data convert table binding and header properly", function() { + it("Check number key in table data convert table binding and header properly", function () { cy.openPropertyPane("tablewidget"); // numeric table data const tableData = [ { - "1": "abc", - "2": "bcd", - "3": "cde", + 1: "abc", + 2: "bcd", + 3: "cde", Dec: "mon", demo: "3", demo_1: "1", @@ -23,9 +23,9 @@ describe("Validate Table Widget Table Data", function() { rowIndex: "0", }, { - "1": "asd", - "2": "dfg", - "3": "jkl", + 1: "asd", + 2: "dfg", + 3: "jkl", Dec: "mon2", demo: "2", demo_1: "1", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_PropertyPane_IconName_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_PropertyPane_IconName_spec.js index ac532bfb4e..c7db46057c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_PropertyPane_IconName_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_PropertyPane_IconName_spec.js @@ -1,12 +1,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableNewDslWithPagination.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("Verify table column type changes effect on menuButton and iconButton", function() { + it("Verify table column type changes effect on menuButton and iconButton", function () { cy.openPropertyPane("tablewidget"); cy.addColumn("CustomColumn"); cy.editColumn("customColumn1"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_PropertyPane_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_PropertyPane_spec.js index af1614f689..5ef44b8321 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_PropertyPane_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_PropertyPane_spec.js @@ -4,7 +4,7 @@ const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/tableNewDslWithPagination.json"); const testdata = require("../../../../../fixtures/testdata.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); @@ -12,7 +12,7 @@ describe("Table Widget property pane feature validation", function() { // To be done: // Column Data type: Video - it("1. Verify On Row Selected Action", function() { + it("1. Verify On Row Selected Action", function () { // Open property pane cy.openPropertyPane("tablewidget"); // Select show message in the "on selected row" dropdown @@ -26,7 +26,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(publish.backToEditor).click(); }); - it("2. Check On Page Change Action", function() { + it("2. Check On Page Change Action", function () { // Open property pane cy.openPropertyPane("tablewidget"); // Select show message in the "on selected row" dropdown @@ -40,7 +40,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(publish.backToEditor).click(); }); - it("3. Verify On Search Text Change Action", function() { + it("3. Verify On Search Text Change Action", function () { // Open property pane cy.openPropertyPane("tablewidget"); // Show Message on Search text change Action @@ -54,7 +54,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(publish.backToEditor).click(); }); - it("4. Check open section and column data in property pane", function() { + it("4. Check open section and column data in property pane", function () { cy.openPropertyPane("tablewidget"); // Validate the columns are visible in the property pane @@ -82,7 +82,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(".draggable-header:contains('CustomColumn')").should("be.visible"); }); - it("5. Column Detail - Edit column name and validate test for computed value based on column type selected", function() { + it("5. Column Detail - Edit column name and validate test for computed value based on column type selected", function () { cy.wait(1000); cy.makeColumnVisible("email"); cy.makeColumnVisible("userName"); @@ -178,23 +178,17 @@ describe("Table Widget property pane feature validation", function() { }); }); - it("6. Test to validate text allignment", function() { + it("6. Test to validate text allignment", function () { // Verifying Center Alignment - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); cy.readTabledataValidateCSS("1", "0", "justify-content", "center", true); // Verifying Right Alignment - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-end", true); // Verifying Left Alignment - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); cy.readTabledataValidateCSS( "0", "0", @@ -204,7 +198,7 @@ describe("Table Widget property pane feature validation", function() { ); }); - it("7. Test to validate text format", function() { + it("7. Test to validate text format", function () { // Validate Bold text cy.get(widgetsPage.bold).click({ force: true }); cy.readTabledataValidateCSS("1", "0", "font-weight", "700"); @@ -213,23 +207,19 @@ describe("Table Widget property pane feature validation", function() { cy.readTabledataValidateCSS("0", "0", "font-style", "italic"); }); - it("8. Test to validate vertical allignment", function() { + it("8. Test to validate vertical allignment", function () { // Validate vertical alignemnt of Cell text to TOP cy.get(widgetsPage.verticalTop).click({ force: true }); cy.readTabledataValidateCSS("1", "0", "align-items", "flex-start", true); // Validate vertical alignemnt of Cell text to Center - cy.get(widgetsPage.verticalCenter) - .last() - .click({ force: true }); + cy.get(widgetsPage.verticalCenter).last().click({ force: true }); cy.readTabledataValidateCSS("1", "0", "align-items", "center", true); // Validate vertical alignemnt of Cell text to Bottom - cy.get(widgetsPage.verticalBottom) - .last() - .click({ force: true }); + cy.get(widgetsPage.verticalBottom).last().click({ force: true }); cy.readTabledataValidateCSS("0", "0", "align-items", "flex-end", true); }); - it("Test to validate text color and text background", function() { + it("Test to validate text color and text background", function () { cy.openPropertyPane("tablewidget"); // Changing text color to rgb(126, 34, 206) and validate @@ -270,7 +260,7 @@ describe("Table Widget property pane feature validation", function() { cy.closePropertyPane(); }); - it("12. Verify default search text", function() { + it("12. Verify default search text", function () { // Open property pane cy.openPropertyPane("tablewidget"); cy.backFromPropertyPanel(); @@ -282,7 +272,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(publish.backToEditor).click(); }); - it("13. Verify default selected row", function() { + it("13. Verify default selected row", function () { // Open property pane cy.openPropertyPane("tablewidget"); cy.backFromPropertyPanel(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Property_JsonUpdate_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Property_JsonUpdate_spec.js index 2bc75e45c1..7a1e2625e5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Property_JsonUpdate_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Property_JsonUpdate_spec.js @@ -1,17 +1,17 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableTextPaginationDsl.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table", function() { + it("1. Create an API and Execute the API and bind with Table", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate Table with API data and then add a column", function() { + it("2. Validate Table with API data and then add a column", function () { // Open property pane cy.SearchEntityandOpen("Table1"); // Change the table data to Apil data users @@ -37,7 +37,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.addColumn("CustomColumn"); }); - it("3. Update table json data and check the column names updated and validate empty value", function() { + it("3. Update table json data and check the column names updated and validate empty value", function () { // Open property pane cy.SearchEntityandOpen("Table1"); // Change the table data @@ -66,7 +66,7 @@ describe("Test Create Api and Bind to Table widget", function() { }); }); - it("4. Check Selected Row(s) Resets When Table Data Changes", function() { + it("4. Check Selected Row(s) Resets When Table Data Changes", function () { // Select 1st row cy.isSelectRow(1); cy.openPropertyPane("tablewidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Switch_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Switch_spec.js index 14d85b6031..fc47f5bd27 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Switch_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Switch_spec.js @@ -1,12 +1,12 @@ /* eslint-disable cypress/no-unnecessary-waiting */ const dsl = require("../../../../../fixtures/swtchTableDsl.json"); -describe("Table Widget and Switch binding Functionality", function() { +describe("Table Widget and Switch binding Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Table Widget Data validation with Switch ON", function() { + it("Table Widget Data validation with Switch ON", function () { cy.openPropertyPane("tablewidget"); cy.readTabledataPublish("1", "1").then((tabData) => { const tabValue = tabData; @@ -34,18 +34,14 @@ describe("Table Widget and Switch binding Functionality", function() { }); }); - it("Selected row and binding with Text widget", function() { + it("Selected row and binding with Text widget", function () { cy.wait(5000); - cy.get(".t--table-multiselect") - .eq(1) - .click({ force: true }); + cy.get(".t--table-multiselect").eq(1).click({ force: true }); cy.get(".t--draggable-textwidget .bp3-ui-text span").should( "contain.text", "30", ); - cy.get(".t--table-multiselect") - .eq(0) - .click({ force: true }); + cy.get(".t--table-multiselect").eq(0).click({ force: true }); cy.get(".t--draggable-textwidget .bp3-ui-text span").should( "contain.text", "29", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Add_button_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Add_button_spec.js index 45469f5711..dea9a7fd88 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Add_button_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Add_button_spec.js @@ -3,12 +3,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableNewDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget with Add button test and validation", function() { + it("1. Table widget with Add button test and validation", function () { cy.openPropertyPane("tablewidget"); // Open column details of "id". cy.editColumn("id"); @@ -29,9 +29,7 @@ describe("Table Widget property pane feature validation", function() { force: true, }); // Validating the button action by clicking - cy.get(widgetsPage.tableBtn) - .last() - .click({ force: true }); + cy.get(widgetsPage.tableBtn).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); // Validating the toast message @@ -59,9 +57,7 @@ describe("Table Widget property pane feature validation", function() { }); // Validating the button action by clicking - cy.get(widgetsPage.tableBtn) - .last() - .click({ force: true }); + cy.get(widgetsPage.tableBtn).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); @@ -73,7 +69,7 @@ describe("Table Widget property pane feature validation", function() { }); }); - it("2. Table Button color validation", function() { + it("2. Table Button color validation", function () { cy.openPropertyPane("tablewidget"); // Open column details of "id". cy.editColumn("id"); @@ -104,20 +100,18 @@ describe("Table Widget property pane feature validation", function() { cy.get(widgetsPage.tableBtn).should("have.css", "background-color", color2); }); - it("3. Table widget triggeredRow property should be accessible", function() { + it("3. Table widget triggeredRow property should be accessible", function () { cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); }); - it("4. Table widget triggeredRow property should be same even after sorting the table", function() { + it("4. Table widget triggeredRow property should be same even after sorting the table", function () { //sort table date on second column - cy.get(".draggable-header ") - .first() - .click({ force: true }); + cy.get(".draggable-header ").first().click({ force: true }); cy.wait(1000); cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); }); - it("5. Table widget add new icon button column", function() { + it("5. Table widget add new icon button column", function () { cy.get(".t--property-pane-back-btn").click({ force: true }); // hide id column cy.makeColumnVisible("id"); @@ -133,11 +127,9 @@ describe("Table Widget property pane feature validation", function() { cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-add") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-add").first().click({ + force: true, + }); cy.get(".t--widget-tablewidget .tbody .bp3-icon-add").should("exist"); // disabled icon btn @@ -160,7 +152,7 @@ describe("Table Widget property pane feature validation", function() { */ }); - it("6. Table widget add new menu button column", function() { + it("6. Table widget add new menu button column", function () { cy.openPropertyPane("tablewidget"); // click on Add new Column. cy.get(".t--add-column-btn").click(); @@ -174,24 +166,17 @@ describe("Table Widget property pane feature validation", function() { cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-airplane") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-airplane").first().click({ + force: true, + }); // validate icon cy.get(".t--widget-tablewidget .tbody .bp3-icon-airplane").should("exist"); - cy.get(".editable-text-container") - .eq(1) - .click(); + cy.get(".editable-text-container").eq(1).click(); // validate label cy.contains("Menu button").should("exist"); const color1 = "rgb(255, 255, 0)"; - cy.get(widgetsPage.menuColor) - .clear() - .click({ force: true }) - .type(color1); + cy.get(widgetsPage.menuColor).clear().click({ force: true }).type(color1); cy.get(widgetsPage.tableBtn).should("have.css", "background-color", color1); // Changing the color again to reproduce issue #9526 @@ -319,16 +304,12 @@ describe("Table Widget property pane feature validation", function() { cy.get(".bp3-menu-item") .eq(2) .should("have.css", "background-color", "rgb(250, 250, 250)"); - cy.get(".bp3-menu-item") - .eq(2) - .should("have.class", "bp3-disabled"); + cy.get(".bp3-menu-item").eq(2).should("have.class", "bp3-disabled"); // Click on the Menu Item - cy.get(".bp3-menu-item") - .eq(0) - .click({ - force: true, - }); + cy.get(".bp3-menu-item").eq(0).click({ + force: true, + }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); // Validating the toast message @@ -343,14 +324,10 @@ describe("Table Widget property pane feature validation", function() { }); it("7. Table widget test on button icon click, row should not get deselected", () => { - cy.get(widgetsPage.tableIconBtn) - .last() - .click({ force: true }); + cy.get(widgetsPage.tableIconBtn).last().click({ force: true }); cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); //click icon button again - cy.get(widgetsPage.tableIconBtn) - .last() - .click({ force: true }); + cy.get(widgetsPage.tableIconBtn).last().click({ force: true }); cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.wait(500); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js index c4a606d9dc..c254872b0a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js @@ -3,12 +3,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/tableNewDsl.json"); -describe("Test Suite to validate copy/paste table Widget", function() { +describe("Test Suite to validate copy/paste table Widget", function () { before(() => { cy.addDsl(dsl); }); - it("Copy paste table widget and valdiate application status", function() { + it("Copy paste table widget and valdiate application status", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; cy.openPropertyPane("tablewidget"); cy.widgetText( @@ -19,9 +19,7 @@ describe("Test Suite to validate copy/paste table Widget", function() { cy.get("body").type(`{${modifierKey}}c`); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); - cy.get(commonlocators.toastBody) - .first() - .contains("Copied"); + cy.get(commonlocators.toastBody).first().contains("Copied"); cy.get("body").click(); cy.get("body").type(`{${modifierKey}}v`, { force: true }); cy.wait("@updateLayout").should( @@ -36,15 +34,11 @@ describe("Test Suite to validate copy/paste table Widget", function() { "not.exist", ); cy.GlobalSearchEntity("Table1Copy"); - cy.get(".widgets") - .first() - .click(); - cy.get(".t--entity-name") - .contains("Table1Copy") - .trigger("mouseover"); + cy.get(".widgets").first().click(); + cy.get(".t--entity-name").contains("Table1Copy").trigger("mouseover"); cy.hoverAndClickParticularIndex(2); cy.selectAction("Show Bindings"); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(13); expect($lis.eq(0)).to.contain("{{Table1Copy.selectedRow}}"); expect($lis.eq(1)).to.contain("{{Table1Copy.selectedRows}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Default_Row_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Default_Row_spec.js index 13e0512ccc..70777d3d75 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Default_Row_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Default_Row_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../../fixtures/defaultTableDsl.json"); -describe("Table Widget property pane deafult feature validation", function() { +describe("Table Widget property pane deafult feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("Verify default table row Data", function() { + it("Verify default table row Data", function () { // Open property pane cy.openPropertyPane("tablewidget"); cy.wait(2000); @@ -14,9 +14,7 @@ describe("Table Widget property pane deafult feature validation", function() { cy.readTabledataFromSpecificIndex("2", "0", 1).then((tabData) => { const tabValue = tabData; cy.log("the table is" + tabValue); - cy.get(".bp3-ui-text span") - .eq(0) - .should("have.text", tabData); + cy.get(".bp3-ui-text span").eq(0).should("have.text", tabData); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js index db9d295923..6d3e7c6a03 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/tableNewDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("Test to add column", function() { + it("Test to add column", function () { cy.openPropertyPane("tablewidget"); // Adding new column cy.addColumn("CustomColumn"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Selected_row_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Selected_row_spec.js index 9f31d1a36e..f0d0c5a7c0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Selected_row_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_Widget_Selected_row_spec.js @@ -1,10 +1,10 @@ const dsl = require("../../../../../fixtures/tableAndTextDsl.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("Table widget new menu button column should not deselect row", function() { + it("Table widget new menu button column should not deselect row", function () { cy.openPropertyPane("tablewidget"); cy.get(".t--widget-textwidget").should("have.text", "0"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_spec.js index d08fa7bf43..5d153a6868 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_spec.js @@ -4,12 +4,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/tableWidgetDsl.json"); -describe("Table Widget Functionality", function() { +describe("Table Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Table Widget Functionality", function() { + it("Table Widget Functionality", function () { cy.openPropertyPane("tablewidget"); /** @@ -41,7 +41,7 @@ describe("Table Widget Functionality", function() { // .should("have.text", "{{navigateTo()}}"); }); - it("Table Widget Functionality To Verify The Data", function() { + it("Table Widget Functionality To Verify The Data", function () { cy.readTabledataPublish("1", "3").then((tabData) => { const tabValue = tabData; expect(tabValue).to.be.equal("Lindsay Ferguson"); @@ -49,7 +49,7 @@ describe("Table Widget Functionality", function() { }); }); - it("Table Widget Functionality To Show a Base64 Image", function() { + it("Table Widget Functionality To Show a Base64 Image", function () { cy.openPropertyPane("tablewidget"); cy.editColumn("image"); cy.changeColumnType("Image", false); @@ -62,7 +62,7 @@ describe("Table Widget Functionality", function() { }); }); - it("Table Widget Functionality To Check if Table is Sortable", function() { + it("Table Widget Functionality To Check if Table is Sortable", function () { cy.get(commonlocators.editPropBackButton).click(); cy.openPropertyPane("tablewidget"); // Confirm if isSortable is true @@ -79,11 +79,9 @@ describe("Table Widget Functionality", function() { expect(tabValue).to.be.equal("Michael Lawson"); }); // Sort Username Column - cy.contains('[role="columnheader"]', "userName") - .first() - .click({ - force: true, - }); + cy.contains('[role="columnheader"]', "userName").first().click({ + force: true, + }); cy.wait(1000); // Confirm order after sort cy.readTabledataPublish("1", "3").then((tabData) => { @@ -116,11 +114,9 @@ describe("Table Widget Functionality", function() { expect(tabValue).to.be.equal("Michael Lawson"); }); // Confirm Sort is disable on Username Column - cy.contains('[role="columnheader"]', "userName") - .first() - .click({ - force: true, - }); + cy.contains('[role="columnheader"]', "userName").first().click({ + force: true, + }); cy.wait(1000); // Confirm order after sort cy.readTabledataPublish("1", "3").then((tabData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_tabledata_schema_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_tabledata_schema_spec.js index f04405675e..c2ed27ae58 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_tabledata_schema_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/Table_tabledata_schema_spec.js @@ -3,13 +3,11 @@ import homePage from "../../../../../locators/HomePage"; const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/tablev1NewDsl.json"); -describe("Table Widget", function() { +describe("Table Widget", function () { it("1. Table Widget Functionality To Check with changing schema of tabledata", () => { let jsContext = `{{Switch1.isSwitchedOn?[{name: "joe"}]:[{employee_name: "john"}];}}`; cy.NavigateToHome(); - cy.get(homePage.createNew) - .first() - .click({ force: true }); + cy.get(homePage.createNew).first().click({ force: true }); cy.wait("@createNewApplication").should( "have.nested.property", "response.body.responseMeta.status", @@ -32,9 +30,7 @@ describe("Table Widget", function() { cy.readTabledataPublish("0", "0").then((value) => { expect(value).to.be.equal("joe"); }); - cy.get(".t--switch-widget-active") - .first() - .click(); + cy.get(".t--switch-widget-active").first().click(); cy.get(".t--widget-tablewidget").scrollIntoView(); cy.wait(1000); cy.getTableDataSelector("0", "0").then((element) => { @@ -43,9 +39,7 @@ describe("Table Widget", function() { cy.readTabledataPublish("0", "0").then((value) => { expect(value).to.be.equal("john"); }); - cy.get(".t--switch-widget-inactive") - .first() - .click(); + cy.get(".t--switch-widget-inactive").first().click(); cy.wait(1000); cy.get(".t--widget-tablewidget").scrollIntoView(); cy.getTableDataSelector("0", "0").then((element) => { @@ -55,9 +49,7 @@ describe("Table Widget", function() { expect(value).to.be.equal("joe"); }); - cy.get(publish.backToEditor) - .click() - .wait(1000); + cy.get(publish.backToEditor).click().wait(1000); cy.wait(30000); cy.CheckAndUnfoldEntityItem("Widgets"); cy.actionContextMenuByEntityName("Switch1"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/table_with_text_no_2dArray_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/table_with_text_no_2dArray_spec.js index 4537e70418..5807ef0bf2 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/table_with_text_no_2dArray_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/table_with_text_no_2dArray_spec.js @@ -2,12 +2,12 @@ const dsl = require("../../../../../fixtures/tableWithTextWidgetDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); import { seconds, testTimeout } from "../../../../../support/timeout"; -describe("Table widget edge case scenario testing", function() { +describe("Table widget edge case scenario testing", function () { before(() => { cy.addDsl(dsl); }); - it("Check if the selectedRowIndices does not contain 2d array", function() { + it("Check if the selectedRowIndices does not contain 2d array", function () { testTimeout(seconds(120)); //2mins cy.openPropertyPane("tablewidget"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/table_with_text_selRowIndices_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/table_with_text_selRowIndices_spec.js index 3fb1733d57..3145612d8e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/table_with_text_selRowIndices_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV1/table_with_text_selRowIndices_spec.js @@ -2,11 +2,11 @@ const dsl = require("../../../../../fixtures/tableWithTextWidgetDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); -describe("Table widget edge case scenario testing", function() { +describe("Table widget edge case scenario testing", function () { before(() => { cy.addDsl(dsl); }); - it("Check if the selectedRowIndices does not contain -1", function() { + it("Check if the selectedRowIndices does not contain -1", function () { cy.openPropertyPane("tablewidget"); //Update the property default selected row to blank diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Add_new_row_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Add_new_row_spec.js index 3c6b23d062..db9fecf67f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Add_new_row_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Add_new_row_spec.js @@ -154,13 +154,8 @@ describe("Table widget Add new row feature's", () => { cy.openPropertyPane("tablewidgetv2"); cy.editColumn("step"); ["Button", "Menu Button", "Icon Button"].forEach((columnType) => { - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains(columnType) - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains(columnType).click(); cy.wait("@updateLayout"); cy.get(`[data-colindex=0][data-rowindex=0] button`).should("not.exist"); }); @@ -242,13 +237,8 @@ describe("Table widget Add new row feature's", () => { cy.wait(500); cy.get(`.t--inlined-cell-editor-has-error`).should("exist"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Number") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Number").click(); cy.wait("@updateLayout"); propPane.UpdatePropertyFieldValue("Min", "5"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Custom_column_alias_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Custom_column_alias_spec.js index 9676030f15..16173f9219 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Custom_column_alias_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Custom_column_alias_spec.js @@ -61,13 +61,8 @@ describe("Custom column alias functionality", () => { cy.get(widgetsPage.addColumn).click({ force: true }); cy.wait(500); cy.editColumn("customColumn2"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Button") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Button").click(); cy.get(".t--property-control-onclick .t--open-dropdown-Select-Action") .last() .click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Date_column_editing_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Date_column_editing_spec.js index 3a525d78c5..2ed620e1ee 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Date_column_editing_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Date_column_editing_spec.js @@ -50,9 +50,7 @@ describe("Table widget date column inline editing functionality", () => { }); cy.get(".bp3-dateinput-popover").should("exist"); cy.get(".t--inlined-cell-editor").should("exist"); - cy.get(`${commonlocators.textWidget}`) - .first() - .click(); + cy.get(`${commonlocators.textWidget}`).first().click(); cy.get(".bp3-dateinput-popover").should("not.exist"); cy.get(".t--inlined-cell-editor").should("not.exist"); cy.get( @@ -78,10 +76,7 @@ describe("Table widget date column inline editing functionality", () => { cy.get(".t--property-control-displayformat .bp3-popover-target") .last() .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Do MMM YYYY") - .click(); + cy.get(".t--dropdown-option").children().contains("Do MMM YYYY").click(); cy.get( `${commonlocators.TableV2Row} .tr:nth-child(1) div:nth-child(3)`, ).should("contain", "17th May 2021"); @@ -91,10 +86,7 @@ describe("Table widget date column inline editing functionality", () => { cy.get(".t--property-control-displayformat .bp3-popover-target") .last() .click(); - cy.get(".t--dropdown-option") - .children() - .contains("DD/MM/YYYY") - .click(); + cy.get(".t--dropdown-option").children().contains("DD/MM/YYYY").click(); cy.get( `${commonlocators.TableV2Row} .tr:nth-child(1) div:nth-child(3)`, ).should("contain", "17/05/2021"); @@ -138,10 +130,7 @@ describe("Table widget date column inline editing functionality", () => { cy.get(".t--property-control-timeprecision .bp3-popover-target") .last() .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Minute") - .click(); + cy.get(".t--dropdown-option").children().contains("Minute").click(); cy.get( `${commonlocators.TableV2Row} .tr:nth-child(1) div:nth-child(3)`, ).dblclick({ @@ -158,10 +147,7 @@ describe("Table widget date column inline editing functionality", () => { cy.get(".t--property-control-timeprecision .bp3-popover-target") .last() .click(); - cy.get(".t--dropdown-option") - .children() - .contains("None") - .click(); + cy.get(".t--dropdown-option").children().contains("None").click(); cy.get( `${commonlocators.TableV2Row} .tr:nth-child(1) div:nth-child(3)`, ).dblclick({ @@ -174,10 +160,7 @@ describe("Table widget date column inline editing functionality", () => { cy.get(".t--property-control-timeprecision .bp3-popover-target") .last() .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Second") - .click(); + cy.get(".t--dropdown-option").children().contains("Second").click(); cy.get( `${commonlocators.TableV2Row} .tr:nth-child(1) div:nth-child(3)`, ).dblclick({ @@ -273,11 +256,9 @@ describe("Table widget date column inline editing functionality", () => { cy.get( `${commonlocators.TableV2Row} .tr:nth-child(1) .td:nth-child(3)`, ).realHover(); - cy.get(`.t--editable-cell-icon`) - .first() - .click({ - force: true, - }); + cy.get(`.t--editable-cell-icon`).first().click({ + force: true, + }); cy.get( ".bp3-transition-container .bp3-popover .bp3-popover-content", ).should("contain", "Date out of range"); @@ -307,18 +288,14 @@ describe("Table widget date column inline editing functionality", () => { cy.get( `${commonlocators.TableV2Row} .tr:nth-child(1) .td:nth-child(3)`, ).realHover(); - cy.get(`.t--editable-cell-icon`) - .first() - .click({ - force: true, - }); + cy.get(`.t--editable-cell-icon`).first().click({ + force: true, + }); cy.get(".bp3-dateinput-popover [aria-label='Wed May 26 2021']").click(); cy.get( `${commonlocators.TableV2Row} .tr:nth-child(1) .td:nth-child(3)`, ).realHover(); - cy.get(`.t--editable-cell-icon`) - .first() - .click({}); + cy.get(`.t--editable-cell-icon`).first().click({}); cy.get(".bp3-dateinput-popover [aria-label='Wed May 26 2021']").click(); cy.get( ".bp3-transition-container .bp3-popover .bp3-popover-content", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Edge_case_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Edge_case_spec.js index ae3c217515..df6d4e1d7a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Edge_case_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Edge_case_spec.js @@ -4,7 +4,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Table widget v2 edge case scenario testing", function() { +describe("Table widget v2 edge case scenario testing", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -14,7 +14,7 @@ describe("Table widget v2 edge case scenario testing", function() { cy.addDsl(dsl); }); - it("1. Check if the selectedRowIndices does not contain 2d array", function() { + it("1. Check if the selectedRowIndices does not contain 2d array", function () { cy.openPropertyPane("tablewidgetv2"); //Enable Multi row select @@ -58,7 +58,7 @@ describe("Table widget v2 edge case scenario testing", function() { ); }); - it("2. Check if the selectedRowIndices does not contain -1", function() { + it("2. Check if the selectedRowIndices does not contain -1", function () { cy.openPropertyPane("tablewidgetv2"); //Update the property default selected row to blank diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Image_resize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Image_resize_spec.js index 3862c9f182..dd4d2852a5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Image_resize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Image_resize_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../../fixtures/Table/ImageResizeDSL.json"); -describe("Table Widget Image Resize feature validation", function() { +describe("Table Widget Image Resize feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Verify image size on selecting different Image Sizes", function() { + it("1. Verify image size on selecting different Image Sizes", function () { cy.getTableV2DataSelector("1", "3").then((selector) => { cy.get(`${selector} img`).should("have.css", "height", "32px"); }); @@ -32,7 +32,7 @@ describe("Table Widget Image Resize feature validation", function() { cy.closePropertyPane(); }); - it("2. Verify image size with cell wrapping turned on", function() { + it("2. Verify image size with cell wrapping turned on", function () { cy.openPropertyPane("tablewidgetv2"); cy.editColumn("title"); cy.moveToContentTab(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Inline_editing_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Inline_editing_spec.js index e2d00eaeff..6f673c3409 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Inline_editing_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Inline_editing_spec.js @@ -169,9 +169,7 @@ describe("Table widget inline editing functionality", () => { }, ].forEach((data) => { cy.editColumn("step"); - cy.get(commonlocators.changeColType) - .last() - .click(); + cy.get(commonlocators.changeColType).last().click(); cy.get(".t--dropdown-option") .children() .contains(data.columnType) @@ -225,9 +223,7 @@ describe("Table widget inline editing functionality", () => { expected: "exist", }, ].forEach((data) => { - cy.get(commonlocators.changeColType) - .last() - .click(); + cy.get(commonlocators.changeColType).last().click(); cy.get(".t--dropdown-option") .children() .contains(data.columnType) @@ -465,9 +461,7 @@ describe("Table widget inline editing functionality", () => { expected: "not.exist", }, ].forEach((data) => { - cy.get(commonlocators.changeColType) - .last() - .click(); + cy.get(commonlocators.changeColType).last().click(); cy.get(".t--dropdown-option") .children() .contains(data.columnType) @@ -519,9 +513,7 @@ describe("Table widget inline editing functionality", () => { expected: "exist", }, ].forEach((data) => { - cy.get(commonlocators.changeColType) - .last() - .click(); + cy.get(commonlocators.changeColType).last().click(); cy.get(".t--dropdown-option") .children() .contains(data.columnType) @@ -723,9 +715,7 @@ describe("Table widget inline editing functionality", () => { cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 300 }); cy.get(".t--widget-buttonwidget").should("exist"); - cy.get(PROPERTY_SELECTOR.onClick) - .find(".t--js-toggle") - .click(); + cy.get(PROPERTY_SELECTOR.onClick).find(".t--js-toggle").click(); cy.updateCodeInput(".t--property-control-label", "Reset"); cy.updateCodeInput( PROPERTY_SELECTOR.onClick, @@ -775,9 +765,7 @@ describe("Table widget inline editing functionality", () => { cy.dragAndDropToCanvas("buttonwidget", { x: 300, y: 300 }); cy.get(".t--widget-buttonwidget").should("exist"); - cy.get(PROPERTY_SELECTOR.onClick) - .find(".t--js-toggle") - .click(); + cy.get(PROPERTY_SELECTOR.onClick).find(".t--js-toggle").click(); cy.updateCodeInput(".t--property-control-label", "Reset"); cy.updateCodeInput( PROPERTY_SELECTOR.onClick, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2Filter1_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2Filter1_Spec.ts index 4320884704..858aca7496 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2Filter1_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2Filter1_Spec.ts @@ -8,14 +8,14 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, propPane = ObjectsRegistry.PropertyPane; -describe("Verify various Table_Filter combinations", function() { +describe("Verify various Table_Filter combinations", function () { before(() => { - cy.fixture("example").then(function(data: any) { + cy.fixture("example").then(function (data: any) { dataSet = data; }); }); - it("1. Adding Data to Table Widget", function() { + it("1. Adding Data to Table Widget", function () { ee.DragDropWidgetNVerify("tablewidgetv2", 650, 250); //propPane.EnterJSContext("Table Data", JSON.stringify(dataSet.TableInput)); propPane.UpdatePropertyFieldValue( @@ -37,7 +37,7 @@ describe("Verify various Table_Filter combinations", function() { deployMode.DeployApp(); }); - it("2. Table Widget Search Functionality", function() { + it("2. Table Widget Search Functionality", function () { table.ReadTableRowColumnData(1, 3, "v2").then((cellData) => { expect(cellData).to.eq("Lindsay Ferguson"); table.SearchTable(cellData); @@ -54,15 +54,15 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveSearchTextNVerify("2381224", "v2"); }); - it("3. Verify Table Filter for 'contain'", function() { + it("3. Verify Table Filter for 'contain'", function () { table.OpenNFilterTable("userName", "contains", "Lindsay"); table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); }); - table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("4. Verify Table Filter for 'does not contain'", function() { + it("4. Verify Table Filter for 'does not contain'", function () { table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); @@ -70,10 +70,10 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Beef steak"); }); - table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("5. Verify Table Filter for 'starts with'", function() { + it("5. Verify Table Filter for 'starts with'", function () { table.ReadTableRowColumnData(4, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Avocado Panini"); }); @@ -81,10 +81,10 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(0, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Avocado Panini"); }); - table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("6. Verify Table Filter for 'ends with' - case sensitive", function() { + it("6. Verify Table Filter for 'ends with' - case sensitive", function () { table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); @@ -92,10 +92,10 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Chicken Sandwich"); }); - table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("7. Verify Table Filter for 'ends with' - case insenstive", function() { + it("7. Verify Table Filter for 'ends with' - case insenstive", function () { table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); @@ -103,19 +103,19 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Chicken Sandwich"); }); - table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("8. Verify Table Filter for 'ends with' - on wrong column", function() { + it("8. Verify Table Filter for 'ends with' - on wrong column", function () { table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); table.OpenNFilterTable("userName", "ends with", "WICH"); table.WaitForTableEmpty("v2"); - table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("9. Verify Table Filter for 'is exactly' - case sensitive", function() { + it("9. Verify Table Filter for 'is exactly' - case sensitive", function () { table.ReadTableRowColumnData(2, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Beef steak"); }); @@ -126,7 +126,7 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("10. Verify Table Filter for 'is exactly' - case insensitive", function() { + it("10. Verify Table Filter for 'is exactly' - case insensitive", function () { table.ReadTableRowColumnData(2, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Beef steak"); }); @@ -135,13 +135,13 @@ describe("Verify various Table_Filter combinations", function() { table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("11. Verify Table Filter for 'empty'", function() { + it("11. Verify Table Filter for 'empty'", function () { table.OpenNFilterTable("email", "empty"); table.WaitForTableEmpty("v2"); - table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("12. Verify Table Filter for 'not empty'", function() { + it("12. Verify Table Filter for 'not empty'", function () { table.ReadTableRowColumnData(4, 5, "v2").then(($cellData) => { expect($cellData).to.eq("7.99"); }); @@ -149,10 +149,10 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(4, 5, "v2").then(($cellData) => { expect($cellData).to.eq("7.99"); }); - table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, true, 0, "v2"); }); - it("13. Verify Table Filter - Where Edit - Change condition along with input value", function() { + it("13. Verify Table Filter - Where Edit - Change condition along with input value", function () { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -164,29 +164,22 @@ describe("Verify various Table_Filter combinations", function() { //Change condition - 1st time agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains("empty") - .click(); + cy.get(table._dropdownText).contains("empty").click(); agHelper.ClickButton("APPLY"); table.WaitForTableEmpty("v2"); //Change condition - 2nd time agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains("contains") - .click(); - agHelper - .GetNClick(table._filterInputValue, 0) - .type("19") - .wait(500); + cy.get(table._dropdownText).contains("contains").click(); + agHelper.GetNClick(table._filterInputValue, 0).type("19").wait(500); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); }); - table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("14. Verify Table Filter - Where Edit - Single Column, Condition & input value", function() { + it("14. Verify Table Filter - Where Edit - Single Column, Condition & input value", function () { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -204,9 +197,7 @@ describe("Verify various Table_Filter combinations", function() { //Change condition - 1st time agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains("does not contain") - .click(); + cy.get(table._dropdownText).contains("does not contain").click(); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); @@ -217,31 +208,23 @@ describe("Verify various Table_Filter combinations", function() { //Change condition - column value agHelper.GetNClick(table._filterColumnsDropdown); - cy.get(table._dropdownText) - .contains("userName") - .click(); + cy.get(table._dropdownText).contains("userName").click(); agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains("does not contain") - .click(); + cy.get(table._dropdownText).contains("does not contain").click(); agHelper.ClickButton("APPLY"); table.WaitForTableEmpty("v2"); //Change input value - agHelper - .GetNClick(table._filterInputValue, 0) - .clear() - .type("i") - .wait(500); + agHelper.GetNClick(table._filterInputValue, 0).clear().type("i").wait(500); agHelper.ClickButton("APPLY"); table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); - table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("15. Verify Table Filter for OR operator - different row match", function() { + it("15. Verify Table Filter for OR operator - different row match", function () { table.ReadTableRowColumnData(2, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); }); @@ -254,10 +237,10 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(2, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); }); - table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("16. Verify Table Filter for OR operator - same row match", function() { + it("16. Verify Table Filter for OR operator - same row match", function () { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -269,10 +252,10 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); - table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("17. Verify Table Filter for OR operator - two 'ORs'", function() { + it("17. Verify Table Filter for OR operator - two 'ORs'", function () { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -288,10 +271,10 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); - table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("18. Verify Table Filter for AND operator - different row match", function() { + it("18. Verify Table Filter for AND operator - different row match", function () { table.ReadTableRowColumnData(3, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); @@ -301,10 +284,10 @@ describe("Verify various Table_Filter combinations", function() { }); table.OpenNFilterTable("productName", "does not contain", "WICH", "AND", 1); table.WaitForTableEmpty("v2"); - table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("19. Verify Table Filter for AND operator - same row match", function() { + it("19. Verify Table Filter for AND operator - same row match", function () { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -316,10 +299,10 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); - table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("20. Verify Table Filter for AND operator - same row match - edit input text value", function() { + it("20. Verify Table Filter for AND operator - same row match - edit input text value", function () { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); @@ -340,6 +323,6 @@ describe("Verify various Table_Filter combinations", function() { table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); - table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2Filter2_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2Filter2_Spec.ts index 80e45bbd0d..12ad22c108 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2Filter2_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2Filter2_Spec.ts @@ -8,14 +8,14 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, propPane = ObjectsRegistry.PropertyPane; -describe("Verify various Table_Filter combinations", function() { +describe("Verify various Table_Filter combinations", function () { before(() => { - cy.fixture("example").then(function(data: any) { + cy.fixture("example").then(function (data: any) { dataSet = data; }); }); - it("1. Adding Data to Table Widget", function() { + it("1. Adding Data to Table Widget", function () { ee.DragDropWidgetNVerify("tablewidgetv2", 650, 250); //propPane.EnterJSContext("Table Data", JSON.stringify(dataSet.TableInput)); propPane.UpdatePropertyFieldValue( @@ -31,22 +31,22 @@ describe("Verify various Table_Filter combinations", function() { From this PR onwards columns with number data (like id and orderAmount here) will be auto-assigned as "NUMBER" type column */ - table.ChangeColumnType("id", "Plain Text",'v2'); - table.ChangeColumnType("orderAmount", "Plain Text",'v2'); + table.ChangeColumnType("id", "Plain Text", "v2"); + table.ChangeColumnType("orderAmount", "Plain Text", "v2"); deployMode.DeployApp(); }); - it("2. Verify Table Filter for AND operator - same row match - Where Edit - input value", function() { - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + it("2. Verify Table Filter for AND operator - same row match - Where Edit - input value", function () { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); table.OpenNFilterTable("userName", "ends with", "s"); - table.ReadTableRowColumnData(1, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); table.OpenNFilterTable("orderAmount", "is exactly", "4.99", "AND", 1); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); agHelper @@ -55,242 +55,218 @@ describe("Verify various Table_Filter combinations", function() { .type("7.99") .wait(500); agHelper.ClickButton("APPLY"); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); - table.RemoveFilterNVerify("2381224", true, false,0,'v2'); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("3. Verify Table Filter for AND operator - two 'ANDs' - clearAll", function() { - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + it("3. Verify Table Filter for AND operator - two 'ANDs' - clearAll", function () { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); table.OpenNFilterTable("id", "contains", "7434532"); - table.ReadTableRowColumnData(1, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); table.OpenNFilterTable("productName", "contains", "i", "AND", 1); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); table.OpenNFilterTable("orderAmount", "starts with", "7", "AND", 2); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); - table.RemoveFilterNVerify("2381224", true, false,0,'v2'); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("4. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter condition + Bug 12638", function() { + it("4. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter condition + Bug 12638", function () { table.OpenNFilterTable("id", "contains", "2"); - table.ReadTableRowColumnData(1, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); }); table.OpenNFilterTable("productName", "ends with", "WICH", "AND", 1); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); table.OpenNFilterTable("userName", "does not contain", "son", "AND", 2); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); - table.RemoveFilterNVerify("7434532", false, true, 1,'v2'); + table.RemoveFilterNVerify("7434532", false, true, 1, "v2"); //Bug 12638 - table.ReadTableRowColumnData(1, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); - table.RemoveFilterNVerify("2381224", true, false,0,'v2'); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("5. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter twice + Bug 12638", function() { + it("5. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter twice + Bug 12638", function () { table.OpenNFilterTable("id", "starts with", "2"); - table.ReadTableRowColumnData(1, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); }); table.OpenNFilterTable("productName", "ends with", "WICH", "AND", 1); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); table.OpenNFilterTable("userName", "contains", "on", "AND", 2); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); - table.RemoveFilterNVerify("2381224", false, true, 1, 'v2'); - table.RemoveFilterNVerify("2381224", false, true, 0,'v2'); + table.RemoveFilterNVerify("2381224", false, true, 1, "v2"); + table.RemoveFilterNVerify("2381224", false, true, 0, "v2"); //Bug 12638 - verification to add here - once closed - table.ReadTableRowColumnData(1, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); }); - table.RemoveFilterNVerify("2381224", true, false,0,'v2'); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("6. Verify Table Filter for changing from AND -> OR -> AND", function() { + it("6. Verify Table Filter for changing from AND -> OR -> AND", function () { table.OpenNFilterTable("id", "contains", "7"); - table.ReadTableRowColumnData(1, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Beef steak"); }); table.OpenNFilterTable("productName", "contains", "I", "AND", 1); - table.ReadTableRowColumnData(1, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Avocado Panini"); }); table.OpenNFilterTable("userName", "starts with", "r", "AND", 2); - table.ReadTableRowColumnData(0, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Avocado Panini"); }); agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("OR") - .click(); + cy.get(table._dropdownText).contains("OR").click(); agHelper.ClickButton("APPLY"); - table.ReadTableRowColumnData(1, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("AND") - .click(); + cy.get(table._dropdownText).contains("AND").click(); agHelper.ClickButton("APPLY"); - table.ReadTableRowColumnData(0, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Avocado Panini"); }); - table.RemoveFilterNVerify("2381224", true, false,0,'v2'); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("7. Verify Table Filter for changing from AND -> OR -> along with changing Where clause condions", function() { + it("7. Verify Table Filter for changing from AND -> OR -> along with changing Where clause condions", function () { table.OpenNFilterTable("id", "starts with", "2"); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); - table.ReadTableRowColumnData(1, 3, "v2",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); }); table.OpenNFilterTable("orderAmount", "contains", "19", "OR", 1); - table.ReadTableRowColumnData(2, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(2, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); }); //Changing filter conditions of both where rows - 1st row - agHelper - .GetNClick(table._filterInputValue, 0) - .clear() - .type("7") - .wait(500); + agHelper.GetNClick(table._filterInputValue, 0).clear().type("7").wait(500); agHelper.ClickButton("APPLY"); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); }); - table.ReadTableRowColumnData(1, 3,'v2',200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); - table.ReadTableRowColumnData(2, 3, 'v2', 200).then(($cellData) => { + table.ReadTableRowColumnData(2, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); //Changing filter conditions of both where rows - 2nd row agHelper.GetNClick(table._filterConditionDropdown, 1); - cy.get(table._dropdownText) - .contains("does not contain") - .click(); + cy.get(table._dropdownText).contains("does not contain").click(); agHelper.ClickButton("APPLY"); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Michael Lawson"); }); - table.ReadTableRowColumnData(1, 3,'v2', 200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); }); - table.ReadTableRowColumnData(2, 3,'v2', 200).then(($cellData) => { + table.ReadTableRowColumnData(2, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); - table.ReadTableRowColumnData(3, 3,'v2', 200).then(($cellData) => { + table.ReadTableRowColumnData(3, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); //Changing OR to AND agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("AND") - .click(); + cy.get(table._dropdownText).contains("AND").click(); agHelper.ClickButton("APPLY"); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); - table.ReadTableRowColumnData(1, 3, 'v2',200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); //Changing AND to OR agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("OR") - .click(); + cy.get(table._dropdownText).contains("OR").click(); agHelper.GetNClick(table._filterConditionDropdown, 1); - cy.get(table._dropdownText) - .contains("starts with") - .click(); - agHelper - .GetNClick(table._filterInputValue, 1) - .clear() - .type("9") - .wait(500); + cy.get(table._dropdownText).contains("starts with").click(); + agHelper.GetNClick(table._filterInputValue, 1).clear().type("9").wait(500); agHelper.ClickButton("APPLY"); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Lindsay Ferguson"); }); - table.ReadTableRowColumnData(1, 3, 'v2',200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Byron Fields"); }); - table.ReadTableRowColumnData(2, 3,'v2', 200).then(($cellData) => { + table.ReadTableRowColumnData(2, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Ryan Holmes"); }); - table.RemoveFilterNVerify("2381224", true, false,0,'v2'); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); //Skipping until bug closed - it.skip("8. Verify Table Filter for changing from AND -> OR [Remove a filter] -> AND + Bug 12642", function() { + it.skip("8. Verify Table Filter for changing from AND -> OR [Remove a filter] -> AND + Bug 12642", function () { table.OpenNFilterTable("id", "contains", "7"); - table.ReadTableRowColumnData(1, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Beef steak"); }); table.OpenNFilterTable("productName", "contains", "I", "AND", 1); - table.ReadTableRowColumnData(1, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Avocado Panini"); }); table.OpenNFilterTable("userName", "starts with", "r", "AND", 2); - table.ReadTableRowColumnData(0, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Avocado Panini"); }); agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("OR") - .click(); + cy.get(table._dropdownText).contains("OR").click(); agHelper.ClickButton("APPLY"); - table.ReadTableRowColumnData(1, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(1, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Tuna Salad"); }); - table.RemoveFilterNVerify("2381224", false, true, 0,'v2');; //Verifies bug 12642 + table.RemoveFilterNVerify("2381224", false, true, 0, "v2"); //Verifies bug 12642 agHelper.GetNClick(table._filterOperatorDropdown); - cy.get(table._dropdownText) - .contains("AND") - .click(); + cy.get(table._dropdownText).contains("AND").click(); agHelper.ClickButton("APPLY"); - table.ReadTableRowColumnData(0, 4,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 4, "v2").then(($cellData) => { expect($cellData).to.eq("Avocado Panini"); }); - table.RemoveFilterNVerify("2381224", true, false,0,'v2'); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); }); - it("9. Verify Full table data - download csv and download Excel", function() { + it("9. Verify Full table data - download csv and download Excel", function () { table.DownloadFromTable("Download as CSV"); //This plugin works only from cypress ^9.2 //cy.verifyDownload("Table1.csv") @@ -300,9 +276,9 @@ describe("Verify various Table_Filter combinations", function() { table.ValidateDownloadNVerify("Table1.xlsx", "Michael Lawson"); }); - it("10. Verify Searched data - download csv and download Excel", function() { + it("10. Verify Searched data - download csv and download Excel", function () { table.SearchTable("7434532"); - table.ReadTableRowColumnData(0, 3,'v2').then((afterSearch) => { + table.ReadTableRowColumnData(0, 3, "v2").then((afterSearch) => { expect(afterSearch).to.eq("Byron Fields"); }); @@ -314,7 +290,7 @@ describe("Verify various Table_Filter combinations", function() { table.DownloadFromTable("Download as Excel"); table.ValidateDownloadNVerify("Table1.xlsx", "Ryan Holmes"); - table.RemoveSearchTextNVerify("2381224",'v2'); + table.RemoveSearchTextNVerify("2381224", "v2"); table.DownloadFromTable("Download as CSV"); table.ValidateDownloadNVerify("Table1.csv", "2736212"); @@ -323,9 +299,9 @@ describe("Verify various Table_Filter combinations", function() { table.ValidateDownloadNVerify("Table1.xlsx", "Beef steak"); }); - it("11. Verify Filtered data - download csv and download Excel", function() { + it("11. Verify Filtered data - download csv and download Excel", function () { table.OpenNFilterTable("id", "starts with", "6"); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Tobias Funke"); }); table.CloseFilter(); @@ -339,7 +315,7 @@ describe("Verify various Table_Filter combinations", function() { table.ValidateDownloadNVerify("Table1.xlsx", "tobias.funke@reqres.in"); agHelper.GetNClick(table._filterBtn); - table.RemoveFilterNVerify("2381224", true, false,0,'v2'); + table.RemoveFilterNVerify("2381224", true, false, 0, "v2"); table.DownloadFromTable("Download as CSV"); table.ValidateDownloadNVerify("Table1.csv", "Tuna Salad"); @@ -350,16 +326,16 @@ describe("Verify various Table_Filter combinations", function() { it("12. Import TableFilter application & verify all filters for same FirstName (one word column) + Bug 13334", () => { deployMode.NavigateBacktoEditor(); - table.WaitUntilTableLoad(0,0,'v2'); + table.WaitUntilTableLoad(0, 0, "v2"); homePage.NavigateToHome(); homePage.ImportApp("Table/TableFilterImportApp.json"); homePage.AssertImportToast(); deployMode.DeployApp(); - table.WaitUntilTableLoad(0,0,'v2'); + table.WaitUntilTableLoad(0, 0, "v2"); //Contains table.OpenNFilterTable("FirstName", "contains", "Della"); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Alvarado"); }); @@ -373,7 +349,7 @@ describe("Verify various Table_Filter combinations", function() { filterOnlyCondition("empty", "0"); filterOnlyCondition("not empty", "50"); filterOnlyCondition("starts with", "3", "ge"); - table.ReadTableRowColumnData(0, 3,'v2').then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2").then(($cellData) => { expect($cellData).to.eq("Chandler"); }); @@ -387,7 +363,7 @@ describe("Verify various Table_Filter combinations", function() { .then(($count) => expect($count).contain("2")); table.OpenFilter(); - table.RemoveFilterNVerify("1", true, false, 0, 'v2'); + table.RemoveFilterNVerify("1", true, false, 0, "v2"); }); it("13. Verify all filters for same FullName (two word column) + Bug 13334", () => { @@ -404,7 +380,7 @@ describe("Verify various Table_Filter combinations", function() { filterOnlyCondition("empty", "0"); filterOnlyCondition("not empty", "50"); filterOnlyCondition("contains", "1", "wolf"); - table.ReadTableRowColumnData(0, 2,"v2").then(($cellData) => { + table.ReadTableRowColumnData(0, 2, "v2").then(($cellData) => { expect($cellData).to.eq("Teresa"); }); @@ -424,10 +400,10 @@ describe("Verify various Table_Filter combinations", function() { .then(($count) => expect($count).contain("3")); table.OpenFilter(); - table.RemoveFilterNVerify("1", true, false, 0, 'v2'); + table.RemoveFilterNVerify("1", true, false, 0, "v2"); }); - it("14. Verify Table Filter for correct value in filter value input after removing second filter - Bug 12638", function() { + it("14. Verify Table Filter for correct value in filter value input after removing second filter - Bug 12638", function () { table.OpenNFilterTable("seq", "greater than", "5"); table.OpenNFilterTable("FirstName", "contains", "r", "AND", 1); @@ -442,16 +418,14 @@ describe("Verify various Table_Filter combinations", function() { table.agHelper.GetNClick(".t--close-filter-btn"); }); - it("15. Verify Table Filter operator for correct value after removing where clause condition - Bug 12642", function() { + it("15. Verify Table Filter operator for correct value after removing where clause condition - Bug 12642", function () { table.OpenNFilterTable("seq", "greater than", "5"); table.OpenNFilterTable("FirstName", "contains", "r", "AND", 1); table.OpenNFilterTable("LastName", "contains", "son", "AND", 2); table.agHelper.GetNClick(".t--table-filter-operators-dropdown"); - cy.get(".t--dropdown-option") - .contains("OR") - .click(); + cy.get(".t--dropdown-option").contains("OR").click(); table.agHelper.GetNClick(".t--table-filter-remove-btn", 0); cy.get(".t--table-filter-operators-dropdown div div span").should( "contain", @@ -466,14 +440,9 @@ describe("Verify various Table_Filter combinations", function() { input: string | "" = "", ) { agHelper.GetNClick(table._filterConditionDropdown); - cy.get(table._dropdownText) - .contains(condition) - .click(); + cy.get(table._dropdownText).contains(condition).click(); if (input) - agHelper - .GetNClick(table._filterInputValue, 0) - .type(input) - .wait(500); + agHelper.GetNClick(table._filterInputValue, 0).type(input).wait(500); agHelper.ClickButton("APPLY"); agHelper .GetText(table._showPageItemsCount) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Button_Icon_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Button_Icon_validation_spec.js index 67bac75399..d300b87898 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Button_Icon_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Button_Icon_validation_spec.js @@ -4,12 +4,12 @@ const dsl = require("../../../../../fixtures/tableV2NewDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); const color = "rgb(151, 0, 0)"; -describe("Table Widget V2 property pane feature validation", function() { +describe("Table Widget V2 property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget V2 with with modal popup", function() { + it("1. Table widget V2 with with modal popup", function () { cy.openPropertyPane("tablewidgetv2"); //update Table name with _ cy.widgetText( @@ -25,7 +25,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(".bp3-overlay-backdrop").click({ force: true }); }); - it("2. Table widget V2 with button colour change validation", function() { + it("2. Table widget V2 with button colour change validation", function () { cy.openPropertyPane("tablewidgetv2"); // Open column details of "id". cy.editColumn("id"); @@ -36,10 +36,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.updateComputedValue(testdata.currentRowOrderAmt); cy.changeColumnType("Button"); cy.moveToStyleTab(); - cy.get(widgetsPage.buttonColor) - .click({ force: true }) - .clear() - .type(color); + cy.get(widgetsPage.buttonColor).click({ force: true }).clear().type(color); cy.get(widgetsPage.tableV2Btn).should( "have.css", "background-color", @@ -51,7 +48,7 @@ describe("Table Widget V2 property pane feature validation", function() { }); }); - it("3. Table widget icon type and colour validation", function() { + it("3. Table widget icon type and colour validation", function () { cy.openPropertyPane("tablewidgetv2"); // Open column details of "id". cy.get(commonlocators.editPropBackButton).click({ force: true }); @@ -63,17 +60,15 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-add") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-add").first().click({ + force: true, + }); cy.get(".t--widget-tablewidgetv2 .tbody .bp3-icon-add").should( "be.visible", ); }); - it("4. Table widget v2 column reorder and reload function", function() { + it("4. Table widget v2 column reorder and reload function", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(commonlocators.editPropBackButton).click({ force: true }); cy.hideColumn("email"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Color_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Color_spec.js index 7a2b3673f0..77a23471b9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Color_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Color_spec.js @@ -1,12 +1,12 @@ -const ObjectsRegistry = require("../../../../../support/Objects/Registry") - .ObjectsRegistry; +const ObjectsRegistry = + require("../../../../../support/Objects/Registry").ObjectsRegistry; let propPane = ObjectsRegistry.PropertyPane; const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/tableV2NewDsl.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); let agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget V2 property pane feature validation", function() { +describe("Table Widget V2 property pane feature validation", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -19,7 +19,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.addDsl(dsl); }); - it("1. Test to validate text color and text background", function() { + it("1. Test to validate text color and text background", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); cy.moveToStyleTab(); @@ -78,7 +78,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(publish.backToEditor).click(); }); - it("2. check background of the edit action column", function() { + it("2. check background of the edit action column", function () { cy.openPropertyPane("tablewidgetv2"); cy.makeColumnEditable("id"); cy.readTableV2dataValidateCSS(0, 5, "background-color", "rgba(0, 0, 0, 0)"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Column_Order_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Column_Order_spec.js index 4e43605831..2552633a05 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Column_Order_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Column_Order_spec.js @@ -1,12 +1,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableV2ColumnOrderDsl.json"); -describe("Table Widget V2 column order maintained on column change validation", function() { +describe("Table Widget V2 column order maintained on column change validation", function () { before(() => { cy.addDsl(dsl); }); - it("Table widget V2 column order should be maintained after reorder and new column should be at the end", function() { + it("Table widget V2 column order should be maintained after reorder and new column should be at the end", function () { const thirdColumnSelector = `${commonlocators.TableV2Head} .tr div:nth-child(3) .draggable-header`; const secondColumnSelector = `${commonlocators.TableV2Head} .tr div:nth-child(2) .draggable-header`; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Column_Resize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Column_Resize_spec.js index 310594bb86..d711181be7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Column_Resize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Column_Resize_spec.js @@ -1,12 +1,12 @@ /* eslint-disable cypress/no-unnecessary-waiting */ const dsl = require("../../../../../fixtures/tableV2ResizedColumnsDsl.json"); -describe("Table Widget V2 Functionality with Hidden and Resized Columns", function() { +describe("Table Widget V2 Functionality with Hidden and Resized Columns", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table Widget Functionality with Hidden and Resized Columns", function() { + it("1. Table Widget Functionality with Hidden and Resized Columns", function () { cy.PublishtheApp(); // Verify column header width should be equal to table width cy.get(".t--widget-tablewidgetv2") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js index 4a6038866b..fd2d413c62 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js @@ -3,18 +3,18 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableV2TextPaginationDsl.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -describe("Test Create Api and Bind to Table widget", function() { +describe("Test Create Api and Bind to Table widget", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table V2", function() { + it("1. Create an API and Execute the API and bind with Table V2", function () { // Create and execute an API and bind with table cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate Table V2 with API data and then add a column", function() { + it("2. Validate Table V2 with API data and then add a column", function () { // Open property pane cy.SearchEntityandOpen("Table1"); // Clear Table data and enter Apil data into table data @@ -41,16 +41,14 @@ describe("Test Create Api and Bind to Table widget", function() { cy.addColumnV2("CustomColumn"); }); - it("3. Table widget toggle test for background color", function() { + it("3. Table widget toggle test for background color", function () { // Open id property pane cy.editColumn("id"); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); cy.moveToStyleTab(); // Click on cell background JS button - cy.get(widgetsPage.toggleJsBcgColor) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleJsBcgColor).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // Change the cell background color to green @@ -67,7 +65,7 @@ describe("Test Create Api and Bind to Table widget", function() { ); }); - it("4. Edit column name and validate test for computed value based on column type selected", function() { + it("4. Edit column name and validate test for computed value based on column type selected", function () { // opoen customColumn1 property pane cy.editColumn("customColumn1"); cy.moveToContentTab(); @@ -83,7 +81,7 @@ describe("Test Create Api and Bind to Table widget", function() { cy.closePropertyPane(); }); - it("5. Update table json data and check the column names updated", function() { + it("5. Update table json data and check the column names updated", function () { // Open table propert pane cy.SearchEntityandOpen("Table1"); cy.backFromPropertyPanel(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_FilteredTableData_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_FilteredTableData_spec.js index ead6b2cc20..b0f5e520f7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_FilteredTableData_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_FilteredTableData_spec.js @@ -3,29 +3,23 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/tableV2AndTextDsl.json"); -describe("Table Widget V2 Filtered Table Data in autocomplete", function() { +describe("Table Widget V2 Filtered Table Data in autocomplete", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table Widget V2 Functionality", function() { + it("1. Table Widget V2 Functionality", function () { cy.openPropertyPane("tablewidgetv2"); cy.wait("@updateLayout"); }); - it("2. Table Widget V2 Functionality To Filter and search data", function() { - cy.get(publish.searchInput) - .first() - .type("query"); + it("2. Table Widget V2 Functionality To Filter and search data", function () { + cy.get(publish.searchInput).first().type("query"); cy.get(publish.filterBtn).click({ force: true }); cy.get(publish.attributeDropdown).click({ force: true }); - cy.get(publish.attributeValue) - .contains("task") - .click({ force: true }); + cy.get(publish.attributeValue).contains("task").click({ force: true }); cy.get(publish.conditionDropdown).click({ force: true }); - cy.get(publish.attributeValue) - .contains("contains") - .click({ force: true }); + cy.get(publish.attributeValue).contains("contains").click({ force: true }); cy.get(publish.tableFilterInputValue).type("bind", { force: true }); cy.wait(500); cy.get(widgetsPage.filterApplyBtn).click({ force: true }); @@ -33,7 +27,7 @@ describe("Table Widget V2 Filtered Table Data in autocomplete", function() { cy.get(".t--close-filter-btn").click({ force: true }); }); - it("3. Table Widget V2 Functionality to validate filtered table data", function() { + it("3. Table Widget V2 Functionality to validate filtered table data", function () { cy.SearchEntityandOpen("Text1"); cy.testJsontext("text", "{{Table1.filteredTableData[0].task}}"); cy.readTableV2data("0", "1").then((tabData) => { @@ -42,7 +36,7 @@ describe("Table Widget V2 Filtered Table Data in autocomplete", function() { }); }); - it("4. Table Widget V2 Functionality to validate filtered table data with actual table data", function() { + it("4. Table Widget V2 Functionality to validate filtered table data with actual table data", function () { cy.readTableV2data("0", "1").then((tabData) => { const tableData = JSON.parse(dsl.dsl.children[0].tableData); cy.get(commonlocators.labelTextStyle).should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_GeneralProperty_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_GeneralProperty_spec.js index b589e0213b..c543721483 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_GeneralProperty_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_GeneralProperty_spec.js @@ -6,72 +6,60 @@ const dsl = require("../../../../../fixtures/tableV2NewDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test to validate table pagination is disabled", function() { + it("1. Test to validate table pagination is disabled", function () { // Verify pagination is disabled cy.get(".t--table-widget-prev-page").should("have.attr", "disabled"); cy.get(".t--table-widget-next-page").should("have.attr", "disabled"); cy.get(".t--table-widget-page-input input").should("have.attr", "disabled"); }); - it("2. Test to validate text allignment", function() { + it("2. Test to validate text allignment", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); cy.moveToStyleTab(); // Change the text align to center - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); // Verify the center text alignment cy.readTableV2dataValidateCSS("1", "0", "justify-content", "center"); // Change the text align to right - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); // Verify the right text alignment cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-end"); // Change the text align to left - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); // verify the left text alignment cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-start"); }); - it("3. Test to validate column heading allignment", function() { + it("3. Test to validate column heading allignment", function () { cy.openPropertyPane("tablewidgetv2"); cy.moveToStyleTab(); // Change the text align to center - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); // Verify the column headings are center aligned cy.get(".draggable-header > div") .first() .should("have.css", "justify-content", "center"); // Change the text align to right - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); // Verify the column headings are right aligned cy.get(".draggable-header > div") .first() .should("have.css", "justify-content", "flex-end"); // Change the text align to left - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); // Verify the column headings are left aligned cy.get(".draggable-header > div") .first() .should("have.css", "justify-content", "flex-start"); }); - it("4. Test to validate text format", function() { + it("4. Test to validate text format", function () { // Select the bold font style cy.get(widgetsPage.bold).click({ force: true }); // Varify the font style is bold @@ -94,7 +82,7 @@ describe("Table Widget property pane feature validation", function() { ); }); - it("5. Test to validate vertical allignment", function() { + it("5. Test to validate vertical allignment", function () { cy.openPropertyPane("tablewidgetv2"); cy.moveToStyleTab(); // Select the top vertical alignment @@ -102,24 +90,18 @@ describe("Table Widget property pane feature validation", function() { // verify vertical alignment is top cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-start"); // Change the vertical alignment to center - cy.get(widgetsPage.verticalCenter) - .last() - .click({ force: true }); + cy.get(widgetsPage.verticalCenter).last().click({ force: true }); // Verify the vertical alignment is centered cy.readTableV2dataValidateCSS("1", "0", "align-items", "center"); // Change the vertical alignment to bottom - cy.get(widgetsPage.verticalBottom) - .last() - .click({ force: true }); + cy.get(widgetsPage.verticalBottom).last().click({ force: true }); // Verify the vertical alignment is bottom cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-end"); }); - it("6. Table widget V2 toggle test for text alignment", function() { + it("6. Table widget V2 toggle test for text alignment", function () { // Click on text align JS - cy.get(widgetsPage.toggleTextAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.toggleTextAlign).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // Change the text align value to right for michael and left for others @@ -132,14 +114,12 @@ describe("Table Widget property pane feature validation", function() { cy.readTableV2dataValidateCSS("1", "0", "justify-content", "flex-start"); }); - it("7. Table widget change text size and validate", function() { + it("7. Table widget change text size and validate", function () { // Verify font size is 14px cy.readTableV2dataValidateCSS("0", "0", "font-size", "14px"); // Open txe size dropdown options - cy.get(widgetsPage.textSize) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSize).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); // Select Heading 1 text size @@ -154,7 +134,7 @@ describe("Table Widget property pane feature validation", function() { cy.readTableV2dataValidateCSS("0", "0", "font-size", "20px"); }); - it("8. Test to validate open new tab icon shows when URL type data validate link text ", function() { + it("8. Test to validate open new tab icon shows when URL type data validate link text ", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); @@ -169,7 +149,7 @@ describe("Table Widget property pane feature validation", function() { cy.get(".link-text").should("have.length", "3"); }); - it("9. Edit column name and test for table header changes", function() { + it("9. Edit column name and test for table header changes", function () { cy.get(commonlocators.editPropBackButton).click({ force: true }); // Open email property pane cy.editColumn("email"); @@ -180,12 +160,10 @@ describe("Table Widget property pane feature validation", function() { cy.get(commonlocators.editPropBackButton).click({ force: true }); }); - it("10. Edit Row height and test table for changes", function() { + it("10. Edit Row height and test table for changes", function () { cy.openPropertyPane("tablewidgetv2"); cy.moveToStyleTab(); - cy.get(widgetsPage.rowHeight) - .last() - .click({ force: true }); + cy.get(widgetsPage.rowHeight).last().click({ force: true }); cy.get(".t--button-group-SHORT").click({ force: true }); cy.wait(2000); cy.PublishtheApp(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_MultiRowSelect_dataUpdation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_MultiRowSelect_dataUpdation_spec.js index d57dbc72d2..876a68ce67 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_MultiRowSelect_dataUpdation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_MultiRowSelect_dataUpdation_spec.js @@ -5,24 +5,16 @@ const dsl = require("../../../../../fixtures/multiSelectedRowUpdationTableV2Dsl. Selected row stays selected after data updation if the primary column value isn't updated. */ -describe("Table Widget V2 row multi select validation", function() { +describe("Table Widget V2 row multi select validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test multi select column shows when enableMultirowselection is true", function() { - cy.get(widgetsPage.buttonWidget) - .first() - .click(); + it("1. Test multi select column shows when enableMultirowselection is true", function () { + cy.get(widgetsPage.buttonWidget).first().click(); cy.wait(1000); - cy.get(".t--table-multiselect") - .first() - .click(); - cy.get(widgetsPage.buttonWidget) - .last() - .click(); - cy.get(".tbody .tr") - .first() - .should("have.class", "selected-row"); + cy.get(".t--table-multiselect").first().click(); + cy.get(widgetsPage.buttonWidget).last().click(); + cy.get(".tbody .tr").first().should("have.class", "selected-row"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_MultiRowSelect_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_MultiRowSelect_spec.js index 602700ee0f..8d389a1d9d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_MultiRowSelect_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_MultiRowSelect_spec.js @@ -2,62 +2,48 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/tableV2NewDsl.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); -describe("Table Widget V2 row multi select validation", function() { +describe("Table Widget V2 row multi select validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test multi select column shows when enable Multirowselection is true", function() { + it("1. Test multi select column shows when enable Multirowselection is true", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(widgetsPage.toggleEnableMultirowselection) .first() .click({ force: true }); cy.closePropertyPane("tablewidgetv2"); - cy.get(".t--table-multiselect-header") - .first() - .should("be.visible"); + cy.get(".t--table-multiselect-header").first().should("be.visible"); - cy.get(".t--table-multiselect") - .first() - .should("be.visible"); + cy.get(".t--table-multiselect").first().should("be.visible"); }); - it("2. Test click on header cell selects all row", function() { + it("2. Test click on header cell selects all row", function () { // click on header check cell - cy.get(".t--table-multiselect-header") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect-header").first().click({ force: true }); // check if rows selected cy.get(".tr").should("have.class", "selected-row"); }); - it("3. Test click on single row cell changes header select cell state", function() { + it("3. Test click on single row cell changes header select cell state", function () { // un select all rows - cy.get(".t--table-multiselect-header") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect-header").first().click({ force: true }); // click on first row select box - cy.get(".t--table-multiselect") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect").first().click({ force: true }); // check if header cell is in half check state cy.get(".t--table-multiselect-header-half-check-svg") .first() .should("be.visible"); }); - it("4. Test action configured on onRowSelected get triggered whenever a table row is selected", function() { + it("4. Test action configured on onRowSelected get triggered whenever a table row is selected", function () { cy.openPropertyPane("tablewidgetv2"); cy.onTableAction(1, "onrowselected", "Row Selected"); // un select first row - cy.get(".t--table-multiselect") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect").first().click({ force: true }); cy.get(commonlocators.toastmsg).should("not.exist"); // click on first row select box - cy.get(".t--table-multiselect") - .first() - .click({ force: true }); + cy.get(".t--table-multiselect").first().click({ force: true }); //cy.get(commonlocators.toastmsg).contains("Row Selected"); cy.get(commonlocators.toastmsg) .should("have.css", "font-size", "14px") @@ -69,20 +55,16 @@ describe("Table Widget V2 row multi select validation", function() { cy.testJsontext("defaultselectedrows", "[0]"); // click on header check cell - cy.get(".t--table-multiselect-header") - .first() - .click({ - force: true, - }); + cy.get(".t--table-multiselect-header").first().click({ + force: true, + }); // check if rows selected cy.get(".tr").should("not.have.class", "selected-row"); // click on header check cell - cy.get(".t--table-multiselect-header") - .first() - .click({ - force: true, - }); + cy.get(".t--table-multiselect-header").first().click({ + force: true, + }); // check if rows is not selected cy.get(".tr").should("have.class", "selected-row"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_IconName_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_IconName_spec.js index d623c974a1..04bf12a90d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_IconName_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_IconName_spec.js @@ -1,12 +1,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableV2NewDslWithPagination.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Verify table column type changes effect on menuButton and iconButton", function() { + it("1. Verify table column type changes effect on menuButton and iconButton", function () { cy.openPropertyPane("tablewidgetv2"); cy.addColumnV2("CustomColumn"); cy.editColumn("customColumn1"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js index 25528c8a8f..daa72f78b8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js @@ -1,5 +1,5 @@ -const ObjectsRegistry = require("../../../../../support/Objects/Registry") - .ObjectsRegistry; +const ObjectsRegistry = + require("../../../../../support/Objects/Registry").ObjectsRegistry; let propPane = ObjectsRegistry.PropertyPane; const widgetsPage = require("../../../../../locators/Widgets.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); @@ -8,14 +8,14 @@ const dsl = require("../../../../../fixtures/tableV2NewDslWithPagination.json"); const testdata = require("../../../../../fixtures/testdata.json"); const emptyTableColumnNameData = require("../../../../../fixtures/TableWidgetDatawithEmptyKeys.json"); -describe("Table Widget V2 property pane feature validation", function() { +describe("Table Widget V2 property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); // To be done: // Column Data type: Video - it("1. Verify default array data", function() { + it("1. Verify default array data", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); // Open Widget side bar @@ -58,7 +58,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.deleteWidget(widgetsPage.tableWidget); }); - it("3. Verify On Row Selected Action", function() { + it("3. Verify On Row Selected Action", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); // Select show message in the "on selected row" dropdown @@ -72,7 +72,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(publish.backToEditor).click(); }); - it("4. Verify On Search Text Change Action", function() { + it("4. Verify On Search Text Change Action", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); // Show Message on Search text change Action @@ -86,7 +86,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(publish.backToEditor).click(); }); - it("5. Check On Page Change Action", function() { + it("5. Check On Page Change Action", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); cy.get(".t--property-control-serversidepagination input").click({ @@ -103,7 +103,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(publish.backToEditor).click(); }); - it("6. Check open section and column data in property pane", function() { + it("6. Check open section and column data in property pane", function () { cy.openPropertyPane("tablewidgetv2"); // Validate the columns are visible in the property pane @@ -131,7 +131,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(".draggable-header:contains('CustomColumn')").should("be.visible"); }); - it("7. Column Detail - Edit column name and validate test for computed value based on column type selected", function() { + it("7. Column Detail - Edit column name and validate test for computed value based on column type selected", function () { cy.openPropertyPane("tablewidgetv2"); cy.wait(1000); cy.makeColumnVisible("email"); @@ -231,28 +231,19 @@ describe("Table Widget V2 property pane feature validation", function() { }); }); - it("8. Test to validate text allignment", function() { + it("8. Test to validate text allignment", function () { cy.openPropertyPane("tablewidgetv2"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("URL") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("URL").click(); // cy.get(".t--property-control-visible span.bp3-control-indicator").click(); cy.wait("@updateLayout"); cy.moveToStyleTab(); // Verifying Center Alignment - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.centerAlign).first().click({ force: true }); cy.readTableV2dataValidateCSS("1", "0", "justify-content", "center", true); // Verifying Right Alignment - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); cy.readTableV2dataValidateCSS( "1", "0", @@ -262,9 +253,7 @@ describe("Table Widget V2 property pane feature validation", function() { ); // Verifying Left Alignment - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); cy.readTableV2dataValidateCSS( "0", "0", @@ -274,7 +263,7 @@ describe("Table Widget V2 property pane feature validation", function() { ); }); - it("9. Test to validate text format", function() { + it("9. Test to validate text format", function () { // Validate Bold text cy.get(widgetsPage.bold).click({ force: true }); cy.readTableV2dataValidateCSS("1", "0", "font-weight", "700"); @@ -283,23 +272,19 @@ describe("Table Widget V2 property pane feature validation", function() { cy.readTableV2dataValidateCSS("0", "0", "font-style", "italic"); }); - it("10. Test to validate vertical allignment", function() { + it("10. Test to validate vertical allignment", function () { // Validate vertical alignemnt of Cell text to TOP cy.get(widgetsPage.verticalTop).click({ force: true }); cy.readTableV2dataValidateCSS("1", "0", "align-items", "flex-start", true); // Validate vertical alignemnt of Cell text to Center - cy.get(widgetsPage.verticalCenter) - .last() - .click({ force: true }); + cy.get(widgetsPage.verticalCenter).last().click({ force: true }); cy.readTableV2dataValidateCSS("1", "0", "align-items", "center", true); // Validate vertical alignemnt of Cell text to Bottom - cy.get(widgetsPage.verticalBottom) - .last() - .click({ force: true }); + cy.get(widgetsPage.verticalBottom).last().click({ force: true }); cy.readTableV2dataValidateCSS("0", "0", "align-items", "flex-end", true); }); - it("Test to validate text color and text background", function() { + it("Test to validate text color and text background", function () { cy.openPropertyPane("tablewidgetv2"); // Changing text color to rgb(126, 34, 206) and validate @@ -339,7 +324,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.closePropertyPane(); }); - it("12. Verify default search text", function() { + it("12. Verify default search text", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); cy.moveToContentTab(); @@ -352,7 +337,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(publish.backToEditor).click(); }); - it("13. Verify custom column property name changes with change in column name ([FEATURE]: #17142)", function() { + it("13. Verify custom column property name changes with change in column name ([FEATURE]: #17142)", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); cy.moveToContentTab(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js index 5b742805d6..4490835245 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js @@ -1,17 +1,17 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableV2TextPaginationDsl.json"); -describe("Test Create Api and Bind to Table widget V2", function() { +describe("Test Create Api and Bind to Table widget V2", function () { before(() => { cy.addDsl(dsl); }); - it("1. Create an API and Execute the API and bind with Table V2", function() { + it("1. Create an API and Execute the API and bind with Table V2", function () { cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam); cy.RunAPI(); }); - it("2. Validate Table with API data and then add a column", function() { + it("2. Validate Table with API data and then add a column", function () { // Open property pane cy.SearchEntityandOpen("Table1"); // Change the table data to Apil data users @@ -38,7 +38,7 @@ describe("Test Create Api and Bind to Table widget V2", function() { cy.addColumnV2("CustomColumn"); }); - it("3. Update table json data and check the column names updated and validate empty value", function() { + it("3. Update table json data and check the column names updated and validate empty value", function () { // Open property pane cy.SearchEntityandOpen("Table1"); // Change the table data @@ -69,7 +69,7 @@ describe("Test Create Api and Bind to Table widget V2", function() { }); }); - it("4. Check Selected Row(s) Resets When Table Data Changes", function() { + it("4. Check Selected Row(s) Resets When Table Data Changes", function () { // Select 1st row cy.isSelectRow(1); cy.openPropertyPane("tablewidgetv2"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Switch_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Switch_spec.js index 68c0492356..d12105947e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Switch_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Switch_spec.js @@ -1,12 +1,12 @@ /* eslint-disable cypress/no-unnecessary-waiting */ const dsl = require("../../../../../fixtures/swtchTableV2Dsl.json"); -describe("Table Widget V2 and Switch binding Functionality", function() { +describe("Table Widget V2 and Switch binding Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table Widget V2 Data validation with Switch ON", function() { + it("1. Table Widget V2 Data validation with Switch ON", function () { cy.openPropertyPane("tablewidgetv2"); cy.readTableV2dataPublish("1", "1").then((tabData) => { const tabValue = tabData; @@ -34,18 +34,14 @@ describe("Table Widget V2 and Switch binding Functionality", function() { }); }); - it("2. Selected row and binding with Text widget", function() { + it("2. Selected row and binding with Text widget", function () { cy.wait(5000); - cy.get(".t--table-multiselect") - .eq(1) - .click({ force: true }); + cy.get(".t--table-multiselect").eq(1).click({ force: true }); cy.get(".t--draggable-textwidget .bp3-ui-text span").should( "contain.text", "30", ); - cy.get(".t--table-multiselect") - .eq(0) - .click({ force: true }); + cy.get(".t--table-multiselect").eq(0).click({ force: true }); cy.get(".t--draggable-textwidget .bp3-ui-text span").should( "contain.text", "29", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Url_Column_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Url_Column_spec.ts index 6d9d52494d..ec70675eb5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Url_Column_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Url_Column_spec.ts @@ -3,14 +3,14 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper, table = ObjectsRegistry.Table; -describe("16108 - Verify Table URL column bugs", function() { +describe("16108 - Verify Table URL column bugs", function () { before(() => { cy.fixture("tableV2WithUrlColumnDsl").then((val: any) => { agHelper.AddDsl(val); }); }); - it("Verify click on URL column with display text takes to the correct link", function() { + it("Verify click on URL column with display text takes to the correct link", function () { table.ReadTableRowColumnData(0, 0, "v2").then(($cellData) => { expect($cellData).to.eq("Profile pic"); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Add_button_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Add_button_spec.js index c64e987ce1..3a3b360adb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Add_button_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Add_button_spec.js @@ -3,12 +3,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableV2NewDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); -describe("Table Widget V2 property pane feature validation", function() { +describe("Table Widget V2 property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget V2 with Add button test and validation", function() { + it("1. Table widget V2 with Add button test and validation", function () { cy.openPropertyPane("tablewidgetv2"); // Open column details of "id". cy.editColumn("id"); @@ -29,9 +29,7 @@ describe("Table Widget V2 property pane feature validation", function() { force: true, }); // Validating the button action by clicking - cy.get(widgetsPage.tableV2Btn) - .last() - .click({ force: true }); + cy.get(widgetsPage.tableV2Btn).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); // Validating the toast message @@ -59,9 +57,7 @@ describe("Table Widget V2 property pane feature validation", function() { }); // Validating the button action by clicking - cy.get(widgetsPage.tableV2Btn) - .last() - .click({ force: true }); + cy.get(widgetsPage.tableV2Btn).last().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); @@ -73,16 +69,13 @@ describe("Table Widget V2 property pane feature validation", function() { }); }); - it("2. Table Button color validation", function() { + it("2. Table Button color validation", function () { cy.openPropertyPane("tablewidgetv2"); // Open column details of "id". cy.editColumn("id"); const color1 = "rgb(255, 0, 0)"; cy.moveToStyleTab(); - cy.get(widgetsPage.buttonColor) - .click({ force: true }) - .clear() - .type(color1); + cy.get(widgetsPage.buttonColor).click({ force: true }).clear().type(color1); cy.get(widgetsPage.tableV2Btn).should( "have.css", "background-color", @@ -104,20 +97,18 @@ describe("Table Widget V2 property pane feature validation", function() { ); }); - it("3. Table widget triggeredRow property should be accessible", function() { + it("3. Table widget triggeredRow property should be accessible", function () { cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); }); - it("4. Table widget triggeredRow property should be same even after sorting the table", function() { + it("4. Table widget triggeredRow property should be same even after sorting the table", function () { //sort table date on second column - cy.get(".draggable-header ") - .first() - .click({ force: true }); + cy.get(".draggable-header ").first().click({ force: true }); cy.wait(1000); cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); }); - it("5. Table widget add new icon button column", function() { + it("5. Table widget add new icon button column", function () { cy.get(".t--property-pane-back-btn").click({ force: true }); // hide id column cy.makeColumnVisible("id"); @@ -133,11 +124,9 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-add") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-add").first().click({ + force: true, + }); cy.get(".t--widget-tablewidgetv2 .tbody .bp3-icon-add").should("exist"); // disabled icon btn @@ -154,7 +143,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.deleteColumn("customColumn1"); }); - it("6. Table widget add new menu button column", function() { + it("6. Table widget add new menu button column", function () { cy.openPropertyPane("tablewidgetv2"); // click on Add new Column. cy.get(".t--add-column-btn").click(); @@ -169,16 +158,12 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ force: true, }); - cy.get(".bp3-icon-add") - .first() - .click({ - force: true, - }); + cy.get(".bp3-icon-add").first().click({ + force: true, + }); // validate icon cy.get(".t--widget-tablewidgetv2 .tbody .bp3-icon-add").should("exist"); - cy.get(".editable-text-container") - .eq(1) - .click(); + cy.get(".editable-text-container").eq(1).click(); // validate label cy.contains("Menu button").should("exist"); @@ -205,11 +190,9 @@ describe("Table Widget V2 property pane feature validation", function() { force: true, }); // Edit a Menu item - cy.get(".t--property-control-menuitems .t--edit-column-btn") - .first() - .click({ - force: true, - }); + cy.get(".t--property-control-menuitems .t--edit-column-btn").first().click({ + force: true, + }); cy.moveToStyleTab(); // update menu item background color cy.get(widgetsPage.backgroundcolorPickerNew) @@ -232,11 +215,9 @@ describe("Table Widget V2 property pane feature validation", function() { force: true, }); // Edit a Menu item - cy.get(".t--property-control-menuitems .t--edit-column-btn") - .last() - .click({ - force: true, - }); + cy.get(".t--property-control-menuitems .t--edit-column-btn").last().click({ + force: true, + }); cy.wait(500); cy.moveToStyleTab(); // update menu item background color @@ -254,11 +235,9 @@ describe("Table Widget V2 property pane feature validation", function() { force: true, }); // Edit a Menu item - cy.get(".t--property-control-menuitems .t--edit-column-btn") - .last() - .click({ - force: true, - }); + cy.get(".t--property-control-menuitems .t--edit-column-btn").last().click({ + force: true, + }); cy.wait(500); cy.moveToStyleTab(); // update menu item background color @@ -282,11 +261,9 @@ describe("Table Widget V2 property pane feature validation", function() { cy.closePropertyPane(); // Edit a Menu item - cy.get(".t--property-control-menuitems .t--edit-column-btn") - .last() - .click({ - force: true, - }); + cy.get(".t--property-control-menuitems .t--edit-column-btn").last().click({ + force: true, + }); cy.wait(1000); cy.moveToContentTab(); cy.wait(500); @@ -300,26 +277,20 @@ describe("Table Widget V2 property pane feature validation", function() { .first() .scrollIntoView() .should("be.visible"); - cy.get(".t--widget-tablewidgetv2 .bp3-button") - .first() - .click({ - force: true, - }); + cy.get(".t--widget-tablewidgetv2 .bp3-button").first().click({ + force: true, + }); cy.wait(2000); // check Menu Item 3 is disable cy.get(".bp3-menu-item") .eq(2) .should("have.css", "background-color", "rgb(250, 250, 250)"); - cy.get(".bp3-menu-item") - .eq(2) - .should("have.class", "bp3-disabled"); + cy.get(".bp3-menu-item").eq(2).should("have.class", "bp3-disabled"); // Click on the Menu Item - cy.get(".bp3-menu-item") - .eq(0) - .click({ - force: true, - }); + cy.get(".bp3-menu-item").eq(0).click({ + force: true, + }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); // Validating the toast message @@ -334,14 +305,10 @@ describe("Table Widget V2 property pane feature validation", function() { }); it("7. Table widget test on button icon click, row should not get deselected", () => { - cy.get(widgetsPage.tableV2IconBtn) - .last() - .click({ force: true }); + cy.get(widgetsPage.tableV2IconBtn).last().click({ force: true }); cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); //click icon button again - cy.get(widgetsPage.tableV2IconBtn) - .last() - .click({ force: true }); + cy.get(widgetsPage.tableV2IconBtn).last().click({ force: true }); cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); cy.get(".t--property-pane-back-btn").click({ force: true }); cy.wait(500); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Copy_Paste_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Copy_Paste_spec.js index 8ec10fdd44..13c17715d9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Copy_Paste_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Copy_Paste_spec.js @@ -3,11 +3,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/tableV2NewDsl.json"); -describe("Test Suite to validate copy/paste table Widget V2", function() { +describe("Test Suite to validate copy/paste table Widget V2", function () { before(() => { cy.addDsl(dsl); }); - it("1. Copy paste table widget and valdiate application status", function() { + it("1. Copy paste table widget and valdiate application status", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; cy.openPropertyPane("tablewidgetv2"); cy.widgetText( @@ -18,9 +18,7 @@ describe("Test Suite to validate copy/paste table Widget V2", function() { cy.get("body").type(`{${modifierKey}}c`); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); - cy.get(commonlocators.toastBody) - .first() - .contains("Copied"); + cy.get(commonlocators.toastBody).first().contains("Copied"); cy.get("body").click(); cy.get("body").type(`{${modifierKey}}v`, { force: true }); cy.wait("@updateLayout").should( @@ -35,16 +33,12 @@ describe("Test Suite to validate copy/paste table Widget V2", function() { "not.exist", ); cy.GlobalSearchEntity("Table1Copy"); - cy.get(".widgets") - .first() - .click(); - cy.get(".t--entity-name") - .contains("Table1Copy") - .trigger("mouseover"); + cy.get(".widgets").first().click(); + cy.get(".t--entity-name").contains("Table1Copy").trigger("mouseover"); cy.hoverAndClickParticularIndex(2); cy.selectAction("Show Bindings"); cy.wait(200); - cy.get(apiwidget.propertyList).then(function($lis) { + cy.get(apiwidget.propertyList).then(function ($lis) { expect($lis).to.have.length(20); expect($lis.eq(0)).to.contain("{{Table1Copy.selectedRow}}"); expect($lis.eq(1)).to.contain("{{Table1Copy.selectedRows}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Default_Row_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Default_Row_spec.js index 4a1c1ae0bd..0dde8b7e52 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Default_Row_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Default_Row_spec.js @@ -1,12 +1,12 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/defaultTableV2Dsl.json"); -describe("Table Widget V2 property pane deafult feature validation", function() { +describe("Table Widget V2 property pane deafult feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Verify default table row Data", function() { + it("1. Verify default table row Data", function () { // Open property pane cy.openPropertyPane("tablewidgetv2"); // Open Widget side bar @@ -22,18 +22,14 @@ describe("Table Widget V2 property pane deafult feature validation", function() cy.readTableV2dataFromSpecificIndex("0", "0", 0).then((tabData) => { const tabValue = tabData; cy.log("the table is" + tabValue); - cy.get(".bp3-ui-text span") - .eq(1) - .should("have.text", tabData); + cy.get(".bp3-ui-text span").eq(1).should("have.text", tabData); }); cy.SearchEntityandOpen("Table1"); cy.wait(2000); cy.readTableV2dataFromSpecificIndex("2", "0", 1).then((tabData) => { const tabValue = tabData; cy.log("the table is" + tabValue); - cy.get(".bp3-ui-text span") - .eq(0) - .should("have.text", tabData); + cy.get(".bp3-ui-text span").eq(0).should("have.text", tabData); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Derived_Column_Computed_value_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Derived_Column_Computed_value_spec.js index faafa6845a..7b0c3d5d13 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Derived_Column_Computed_value_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Derived_Column_Computed_value_spec.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/tableV2NewDsl.json"); const testdata = require("../../../../../fixtures/testdata.json"); -describe("Table Widget V2 property pane feature validation", function() { +describe("Table Widget V2 property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Test to add column", function() { + it("1. Test to add column", function () { cy.openPropertyPane("tablewidgetv2"); // Adding new column cy.addColumnV2("CustomColumn"); @@ -20,7 +20,7 @@ describe("Table Widget V2 property pane feature validation", function() { cy.get(".draggable-header:contains('CustomColumn')").should("be.visible"); }); - it("2. Edit column name and validate test for computed value", function() { + it("2. Edit column name and validate test for computed value", function () { // Open column detail by draggable id of the column cy.editColumn("customColumn1"); // Validating single cell value diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Selected_row_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Selected_row_spec.js index bf194aefc1..ff19c271f4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Selected_row_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Selected_row_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../../fixtures/tableV2AndTextDsl.json"); -describe("Table Widget v2 property pane feature validation", function() { +describe("Table Widget v2 property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table widget v2 new menu button column should not deselect row", function() { + it("1. Table widget v2 new menu button column should not deselect row", function () { cy.openPropertyPane("tablewidgetv2"); cy.get(".t--widget-textwidget").should("have.text", "0"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_misc.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_misc.js index 628a4c2683..850c09efe5 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_misc.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_misc.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/tableV2NewDsl.json"); import { DEFAULT_COLUMN_NAME } from "../../../../../../src/widgets/TableWidgetV2/constants"; -describe("tests bug 20663 TypeError: Cannot read properties of undefined", function() { +describe("tests bug 20663 TypeError: Cannot read properties of undefined", function () { before(() => { cy.addDsl(dsl); }); - it("1. when the column label value is a valid string should show the evaluated string", function() { + it("1. when the column label value is a valid string should show the evaluated string", function () { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", @@ -22,7 +22,7 @@ describe("tests bug 20663 TypeError: Cannot read properties of undefined", funct ); }); - it("2. when the column label value is a boolean replace column name with default column name", function() { + it("2. when the column label value is a boolean replace column name with default column name", function () { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", @@ -37,7 +37,7 @@ describe("tests bug 20663 TypeError: Cannot read properties of undefined", funct ); }); - it("3. when the column label value is a number replace column name with default column name", function() { + it("3. when the column label value is a number replace column name with default column name", function () { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", @@ -64,7 +64,7 @@ describe("tests bug 20663 TypeError: Cannot read properties of undefined", funct ); }); - it("4. when the column label value is an object replace column name with default column name", function() { + it("4. when the column label value is an object replace column name with default column name", function () { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", @@ -79,7 +79,7 @@ describe("tests bug 20663 TypeError: Cannot read properties of undefined", funct ); }); - it("5. when the column label value is undefined replace column name with default column name", function() { + it("5. when the column label value is undefined replace column name with default column name", function () { cy.openPropertyPane("tablewidgetv2"); cy.get( ".tablewidgetv2-primarycolumn-list div[data-rbd-draggable-id='id'] input[type=text]", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_pagination_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_pagination_spec.js index 82a01a6329..1cd6424316 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_pagination_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_pagination_spec.js @@ -1,12 +1,12 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/tableV2NewDslWithPagination.json"); -describe("Table Widget property pane feature validation", function() { +describe("Table Widget property pane feature validation", function () { before(() => { cy.addDsl(dsl); }); - it("1. Verify table column type changes effect on menuButton and iconButton", function() { + it("1. Verify table column type changes effect on menuButton and iconButton", function () { cy.openPropertyPane("tablewidgetv2"); cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); cy.get(".t--property-control-totalrecords pre.CodeMirror-line span span") diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_spec.js index 106a994252..7e4a3d0d93 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_spec.js @@ -8,12 +8,12 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const table = ObjectsRegistry.Table; const PropPane = ObjectsRegistry.PropertyPane; -describe("Table Widget V2 Functionality", function() { +describe("Table Widget V2 Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("1. Table Widget V2 Functionality", function() { + it("1. Table Widget V2 Functionality", function () { cy.openPropertyPane("tablewidgetv2"); /** @@ -30,7 +30,7 @@ describe("Table Widget V2 Functionality", function() { cy.wait("@updateLayout"); }); - it("2. Table Widget V2 Functionality To Verify The Data", function() { + it("2. Table Widget V2 Functionality To Verify The Data", function () { cy.readTableV2dataPublish("1", "3").then((tabData) => { const tabValue = tabData; expect(tabValue).to.be.equal("Lindsay Ferguson"); @@ -38,7 +38,7 @@ describe("Table Widget V2 Functionality", function() { }); }); - it("3. Table Widget V2 Functionality To Show a Base64 Image", function() { + it("3. Table Widget V2 Functionality To Show a Base64 Image", function () { cy.openPropertyPane("tablewidgetv2"); cy.editColumn("image"); cy.changeColumnType("Image"); @@ -51,7 +51,7 @@ describe("Table Widget V2 Functionality", function() { }); }); - it("4. Table Widget V2 Functionality To Check if Table is Sortable", function() { + it("4. Table Widget V2 Functionality To Check if Table is Sortable", function () { cy.get(commonlocators.editPropBackButton).click(); cy.openPropertyPane("tablewidgetv2"); // Confirm if isSortable is true @@ -105,11 +105,9 @@ describe("Table Widget V2 Functionality", function() { expect(tabValue).to.be.equal("Michael Lawson"); }); // Confirm Sort is disable on Username Column - cy.contains('[role="columnheader"]', "userName") - .first() - .click({ - force: true, - }); + cy.contains('[role="columnheader"]', "userName").first().click({ + force: true, + }); cy.wait(1000); // Confirm order after sort cy.readTableV2dataPublish("1", "3").then((tabData) => { @@ -181,9 +179,7 @@ describe("Table Widget V2 Functionality", function() { expected: "contain", }, ].forEach((data) => { - cy.get(commonlocators.changeColType) - .last() - .click(); + cy.get(commonlocators.changeColType).last().click(); cy.get(".t--dropdown-option") .children() .contains(data.columnType) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_tabledata_schema_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_tabledata_schema_spec.js index 86901359df..b11039c127 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_tabledata_schema_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_tabledata_schema_spec.js @@ -2,13 +2,11 @@ const explorer = require("../../../../../locators/explorerlocators.json"); import homePage from "../../../../../locators/HomePage"; const publish = require("../../../../../locators/publishWidgetspage.json"); -describe("Table Widget", function() { +describe("Table Widget", function () { it("1. Table Widget Functionality To Check with changing schema of tabledata", () => { let jsContext = `{{Switch1.isSwitchedOn?[{name: "joe"}]:[{employee_name: "john"}];}}`; cy.NavigateToHome(); - cy.get(homePage.createNew) - .first() - .click({ force: true }); + cy.get(homePage.createNew).first().click({ force: true }); cy.wait("@createNewApplication").should( "have.nested.property", "response.body.responseMeta.status", @@ -31,9 +29,7 @@ describe("Table Widget", function() { cy.readTableV2dataPublish("0", "0").then((value) => { expect(value).to.be.equal("joe"); }); - cy.get(".t--switch-widget-active") - .first() - .click(); + cy.get(".t--switch-widget-active").first().click(); cy.wait(3000); cy.getTableV2DataSelector("0", "0").then((element) => { cy.get(element).should("be.visible"); @@ -41,9 +37,7 @@ describe("Table Widget", function() { cy.readTableV2dataPublish("0", "0").then((value) => { expect(value).to.be.equal("john"); }); - cy.get(".t--switch-widget-inactive") - .first() - .click(); + cy.get(".t--switch-widget-inactive").first().click(); cy.wait(1000); cy.getTableV2DataSelector("0", "0").then((element) => { cy.get(element).should("be.visible"); @@ -52,9 +46,7 @@ describe("Table Widget", function() { expect(value).to.be.equal("joe"); }); - cy.get(publish.backToEditor) - .click() - .wait(1000); + cy.get(publish.backToEditor).click().wait(1000); cy.wait(5000); cy.CheckAndUnfoldEntityItem("Widgets"); cy.actionContextMenuByEntityName("Switch1"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Text_wrapping_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Text_wrapping_spec.js index cdbcd1b622..0f7d984b0c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Text_wrapping_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Text_wrapping_spec.js @@ -3,7 +3,7 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const agHelper = ObjectsRegistry.AggregateHelper; -describe("Table Widget text wrapping functionality", function() { +describe("Table Widget text wrapping functionality", function () { afterEach(() => { agHelper.SaveLocalStorageCache(); }); @@ -115,9 +115,7 @@ describe("Table Widget text wrapping functionality", function() { expected: "not.exist", }, ].forEach((data, i) => { - cy.get(commonlocators.changeColType) - .last() - .click(); + cy.get(commonlocators.changeColType).last().click(); cy.get(".t--dropdown-option") .children() .contains(data.columnType) @@ -132,13 +130,8 @@ describe("Table Widget text wrapping functionality", function() { cy.editColumn("id"); ["URL", "Number", "Plain Text"].forEach((data, i) => { - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains(data) - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains(data).click(); cy.wait("@updateLayout"); cy.getTableCellHeight(0, 0).then((height) => { expect(height).to.equal("28px"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/checkboxCell_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/checkboxCell_spec.js index 161f8b96e4..e0e5b31f72 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/checkboxCell_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/checkboxCell_spec.js @@ -67,9 +67,7 @@ describe("Checkbox column type funtionality test", () => { }); it("3. Check the horizontal, vertical alignment of checkbox, and the cell background color", () => { - cy.get(".t--propertypane") - .contains("STYLE") - .click({ force: true }); + cy.get(".t--propertypane").contains("STYLE").click({ force: true }); // Check horizontal alignment cy.get(".t--property-control-horizontalalignment .t--button-group-CENTER") .first() @@ -99,9 +97,7 @@ describe("Checkbox column type funtionality test", () => { }); it("4. Verify disabled(editable off), enabled states and interactions on checkbox", () => { - cy.get(".t--propertypane") - .contains("CONTENT") - .click({ force: true }); + cy.get(".t--propertypane").contains("CONTENT").click({ force: true }); cy.getTableV2DataSelector("0", "4").then(($elemClass) => { const selector = $elemClass + checkboxSelector; @@ -140,15 +136,11 @@ describe("Checkbox column type funtionality test", () => { it("5. Verify filter condition", () => { cy.get(widgetsJson.tableFilterPaneToggle).click(); cy.get(publishPage.attributeDropdown).click(); - cy.get(".t--dropdown-option") - .contains("completed") - .click(); + cy.get(".t--dropdown-option").contains("completed").click(); cy.get(widgetsJson.tableFilterRow) .find(publishPage.conditionDropdown) .click(); - cy.get(".t--dropdown-option") - .contains("is checked") - .click(); + cy.get(".t--dropdown-option").contains("is checked").click(); cy.get(publishPage.applyFiltersBtn).click(); // filter and verify checked rows @@ -160,9 +152,7 @@ describe("Checkbox column type funtionality test", () => { cy.get(widgetsJson.tableFilterRow) .find(publishPage.conditionDropdown) .click(); - cy.get(".t--dropdown-option") - .contains("is unchecked") - .click(); + cy.get(".t--dropdown-option").contains("is unchecked").click(); cy.get(publishPage.applyFiltersBtn).click(); cy.getTableV2DataSelector("0", "4").then((selector) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/select_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/select_spec.js index d461f5a525..de3634341f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/select_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/select_spec.js @@ -13,13 +13,8 @@ describe("Table widget - Select column type functionality", () => { cy.openPropertyPane("tablewidgetv2"); cy.editColumn("step"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Select") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Select").click(); cy.wait("@updateLayout"); }); @@ -67,9 +62,7 @@ describe("Table widget - Select column type functionality", () => { value: "#3", }, ].forEach((item) => { - cy.get(".menu-item-text") - .contains(item.value) - .should("exist"); + cy.get(".menu-item-text").contains(item.value).should("exist"); }); cy.get(".menu-item-active.has-focus").should("contain", "#1"); @@ -162,9 +155,7 @@ describe("Table widget - Select column type functionality", () => { `, ); cy.editTableSelectCell(0, 0); - cy.get(".menu-item-link") - .contains("#3") - .click(); + cy.get(".menu-item-link").contains("#3").click(); cy.get(widgetsPage.toastAction).should("be.visible"); cy.get(widgetsPage.toastActionText) @@ -194,28 +185,16 @@ describe("Table widget - Select column type functionality", () => { `, ); cy.editTableSelectCell(0, 0); - cy.get(".menu-item-text") - .contains("#1") - .should("exist"); - cy.get(".menu-item-text") - .contains("#2") - .should("not.exist"); + cy.get(".menu-item-text").contains("#1").should("exist"); + cy.get(".menu-item-text").contains("#2").should("not.exist"); cy.editTableSelectCell(0, 1); - cy.get(".menu-item-text") - .contains("#2") - .should("exist"); - cy.get(".menu-item-text") - .contains("#1") - .should("not.exist"); + cy.get(".menu-item-text").contains("#2").should("exist"); + cy.get(".menu-item-text").contains("#1").should("not.exist"); cy.editTableSelectCell(0, 2); - cy.get(".menu-item-text") - .contains("#3") - .should("exist"); - cy.get(".menu-item-text") - .contains("#1") - .should("not.exist"); + cy.get(".menu-item-text").contains("#3").should("exist"); + cy.get(".menu-item-text").contains("#1").should("not.exist"); }); it("8. should check that server side filering is working", () => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/switchCell_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/switchCell_spec.js index 6215e506da..ed7caf88ea 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/switchCell_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/switchCell_spec.js @@ -67,9 +67,7 @@ describe("Switch column type funtionality test", () => { }); it("3. Check the horizontal, vertical alignment of switch, and the cell background color", () => { - cy.get(".t--propertypane") - .contains("STYLE") - .click({ force: true }); + cy.get(".t--propertypane").contains("STYLE").click({ force: true }); // Check horizontal alignment cy.get(".t--property-control-horizontalalignment .t--button-group-CENTER") .first() @@ -99,9 +97,7 @@ describe("Switch column type funtionality test", () => { }); it("4. Verify disabled(editable off), enabled states and interactions on switch", () => { - cy.get(".t--propertypane") - .contains("CONTENT") - .click({ force: true }); + cy.get(".t--propertypane").contains("CONTENT").click({ force: true }); cy.getTableV2DataSelector("0", "4").then(($elemClass) => { const selector = $elemClass + switchSelector; @@ -140,15 +136,11 @@ describe("Switch column type funtionality test", () => { it("5. Verify filter condition", () => { cy.get(widgetsJson.tableFilterPaneToggle).click(); cy.get(publishPage.attributeDropdown).click(); - cy.get(".t--dropdown-option") - .contains("completed") - .click(); + cy.get(".t--dropdown-option").contains("completed").click(); cy.get(widgetsJson.tableFilterRow) .find(publishPage.conditionDropdown) .click(); - cy.get(".t--dropdown-option") - .contains("is checked") - .click(); + cy.get(".t--dropdown-option").contains("is checked").click(); cy.get(publishPage.applyFiltersBtn).click(); // filter and verify checked rows @@ -160,9 +152,7 @@ describe("Switch column type funtionality test", () => { cy.get(widgetsJson.tableFilterRow) .find(publishPage.conditionDropdown) .click(); - cy.get(".t--dropdown-option") - .contains("is unchecked") - .click(); + cy.get(".t--dropdown-option").contains("is unchecked").click(); cy.get(publishPage.applyFiltersBtn).click(); cy.getTableV2DataSelector("0", "4").then((selector) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/freeze_column_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/freeze_column_spec.js index 6173688073..6f92a47ceb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/freeze_column_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/freeze_column_spec.js @@ -119,9 +119,7 @@ describe("1. Check column freeze and unfreeze mechanism in canavs mode", () => { cy.get(".bp3-menu") .contains("Freeze column left") .then(($elem) => { - cy.get($elem) - .parent() - .should("not.have.class", "bp3-disabled"); + cy.get($elem).parent().should("not.have.class", "bp3-disabled"); }); // Check in publish mode. @@ -135,9 +133,7 @@ describe("1. Check column freeze and unfreeze mechanism in canavs mode", () => { cy.get(".bp3-menu") .contains("Freeze column left") .then(($elem) => { - cy.get($elem) - .parent() - .should("not.have.class", "bp3-disabled"); + cy.get($elem).parent().should("not.have.class", "bp3-disabled"); }); cy.goToEditFromPublish(); }); @@ -407,9 +403,7 @@ describe.only("3. Server-side pagination when turned on test of re-ordering colu cy.dragAndDropColumn("productName", "id"); // Check if product name is at first position - cy.get("[data-header]") - .first() - .should("contain.text", "productName"); + cy.get("[data-header]").first().should("contain.text", "productName"); // Check if ProductName column is at the top in property pane tableData cy.get(PROPERTY_SELECTOR.tableColumnNames) @@ -431,9 +425,7 @@ describe.only("3. Server-side pagination when turned on test of re-ordering colu // =========================== Scenario 2 =========================== cy.dragAndDropColumn("id", "email"); - cy.get("[data-header]") - .eq(1) - .should("contain.text", "email"); + cy.get("[data-header]").eq(1).should("contain.text", "email"); cy.get(PROPERTY_SELECTOR.tableColumnNames) .eq(1) @@ -446,9 +438,7 @@ describe.only("3. Server-side pagination when turned on test of re-ordering colu cy.dragAndDropColumn("id", "orderAmount"); - cy.get("[data-header]") - .last() - .should("contain.text", "id"); + cy.get("[data-header]").last().should("contain.text", "id"); cy.get(PROPERTY_SELECTOR.tableColumnNames) .last() @@ -464,9 +454,7 @@ describe.only("3. Server-side pagination when turned on test of re-ordering colu cy.dragAndDropColumn("orderAmount", "id"); // Check if orderAmount is at 3rd position - cy.get("[data-header]") - .eq(2) - .should("contain.text", "orderAmount"); + cy.get("[data-header]").eq(2).should("contain.text", "orderAmount"); // Check if id column is at the top in property pane tableData cy.get(PROPERTY_SELECTOR.tableColumnNames) @@ -484,9 +472,7 @@ describe.only("3. Server-side pagination when turned on test of re-ordering colu cy.dragAndDropColumn("productName", "id"); - cy.get("[data-header]") - .eq(1) - .should("contain.text", "productName"); + cy.get("[data-header]").eq(1).should("contain.text", "productName"); cy.get(PROPERTY_SELECTOR.tableColumnNames) .eq(1) diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/inline_editing_validations_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/inline_editing_validations_spec.js index 8c94c5d934..22ebeae36d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/inline_editing_validations_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/inline_editing_validations_spec.js @@ -31,40 +31,20 @@ describe("Table widget inline editing validation functionality", () => { cy.editColumn("step"); propPane.ToggleOnOrOff("Editable", "On"); cy.get(".t--property-pane-section-collapse-validation").should("exist"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Number") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Number").click(); cy.wait("@updateLayout"); cy.get(".t--property-pane-section-collapse-validation").should("exist"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Plain Text") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Plain Text").click(); cy.wait("@updateLayout"); cy.get(".t--property-pane-section-collapse-validation").should("exist"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Date") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Date").click(); cy.wait("@updateLayout"); cy.get(".t--property-pane-section-collapse-validation").should("exist"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Plain Text") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Plain Text").click(); cy.wait("@updateLayout"); cy.get(".t--property-pane-section-collapse-validation").should("exist"); }); @@ -83,13 +63,8 @@ describe("Table widget inline editing validation functionality", () => { cy.openPropertyPane("tablewidgetv2"); cy.editColumn("step"); propPane.ToggleOnOrOff("Editable", "On"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Number") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Number").click(); cy.wait("@updateLayout"); cy.get(".t--property-pane-section-collapse-validation").should("exist"); ["min", "max", "regex", "valid", "errormessage", "required"].forEach( @@ -158,13 +133,8 @@ describe("Table widget inline editing validation functionality", () => { cy.editColumn("step"); propPane.ToggleOnOrOff("Editable", "On"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Number") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Number").click(); cy.wait("@updateLayout"); propPane.UpdatePropertyFieldValue("Min", "5"); @@ -194,13 +164,8 @@ describe("Table widget inline editing validation functionality", () => { cy.editColumn("step"); propPane.ToggleOnOrOff("Editable", "On"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Number") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Number").click(); cy.wait("@updateLayout"); propPane.UpdatePropertyFieldValue("Max", "5"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/non_ascii_column_name_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/non_ascii_column_name_spec.js index 3b7044d125..a12867165a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/non_ascii_column_name_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/non_ascii_column_name_spec.js @@ -50,13 +50,8 @@ describe("Non ASCII character functionality", () => { cy.openPropertyPane("tablewidgetv2"); cy.addColumnV2("button"); cy.editColumn("customColumn1"); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Button") - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains("Button").click(); cy.get(".t--property-control-onclick .t--open-dropdown-Select-Action") .last() .click(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/pagesize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/pagesize_spec.js index 5e9b04bce9..e69aec4a0e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/pagesize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/pagesize_spec.js @@ -2,8 +2,8 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const propPane = ObjectsRegistry.PropertyPane; -describe("Table widget v2", function() { - it("1. should test that pageSize is computed properly for all the row sizes", function() { +describe("Table widget v2", function () { + it("1. should test that pageSize is computed properly for all the row sizes", function () { cy.dragAndDropToCanvas("textwidget", { x: 300, y: 100 }); cy.openPropertyPane("textwidget"); propPane.UpdatePropertyFieldValue("Text", "{{Table1.pageSize}}"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/virtual_row_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/virtual_row_spec.js index c2f5cd5215..4fa12da7c6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/virtual_row_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/virtual_row_spec.js @@ -3,7 +3,7 @@ import { ObjectsRegistry } from "../../../../../support/Objects/Registry"; const PropertyPane = ObjectsRegistry.PropertyPane; const totalRows = 100; -describe("Table Widget Virtualized Row", function() { +describe("Table Widget Virtualized Row", function () { before(() => { cy.dragAndDropToCanvas("tablewidgetv2", { x: 300, y: 600 }); const row = { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/TextWidget_BgColor_TextSize_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/TextWidget_BgColor_TextSize_spec.js index 6b52899655..d1d9f93063 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/TextWidget_BgColor_TextSize_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/TextWidget_BgColor_TextSize_spec.js @@ -2,11 +2,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); const dsl = require("../../../../../fixtures/textWidgetDsl.json"); -describe("Text Widget Cell Background and Text Size Validation", function() { +describe("Text Widget Cell Background and Text Size Validation", function () { before(() => { cy.addDsl(dsl); }); - it("Change the cell background color", function() { + it("Change the cell background color", function () { cy.openPropertyPane("textwidget"); cy.moveToStyleTab(); /** @@ -25,9 +25,7 @@ describe("Text Widget Cell Background and Text Size Validation", function() { ); //Toggle to JS mode - cy.get(widgetsPage.cellBackgroundToggle) - .click() - .wait(200); + cy.get(widgetsPage.cellBackgroundToggle).click().wait(200); //Check if the typed color red is reflecting in the background color and in the evaluated value cy.updateCodeInput(widgetsPage.cellBackground, "red"); @@ -63,14 +61,12 @@ describe("Text Widget Cell Background and Text Size Validation", function() { cy.get(commonlocators.evaluatedCurrentValue).should("not.exist"); }); - it("Change the text sizes", function() { + it("Change the text sizes", function () { cy.openPropertyPane("textwidget"); cy.moveToStyleTab(); //Check the label text size with dropdown - cy.get(widgetsPage.textSizeNew) - .last() - .click({ force: true }); + cy.get(widgetsPage.textSizeNew).last().click({ force: true }); cy.wait(100); cy.selectTextSize("S"); @@ -82,9 +78,7 @@ describe("Text Widget Cell Background and Text Size Validation", function() { ); //Toggle JS mode - cy.get(widgetsPage.toggleTextSizeNew) - .click() - .wait(200); + cy.get(widgetsPage.toggleTextSizeNew).click().wait(200); //Check if the typed size HEADING2 is reflecting in the background color and in the evaluated value cy.updateCodeInput(".t--property-control-fontsize", "18px"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/TextWidget_LintErrorValidation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/TextWidget_LintErrorValidation_spec.js index a3287e60de..fb01740756 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/TextWidget_LintErrorValidation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/TextWidget_LintErrorValidation_spec.js @@ -1,11 +1,11 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const dsl = require("../../../../../fixtures/textLintErrorDsl.json"); -describe("Linting warning validation with text widget", function() { +describe("Linting warning validation with text widget", function () { before(() => { cy.addDsl(dsl); }); - it("Linting Error validation on mouseover and errorlog tab", function() { + it("Linting Error validation on mouseover and errorlog tab", function () { cy.openPropertyPane("textwidget"); /** * @param{Text} Random Text @@ -19,12 +19,8 @@ describe("Linting warning validation with text widget", function() { .wait(500); //lint mark validation - cy.get(commonlocators.lintError) - .first() - .should("be.visible"); - cy.get(commonlocators.lintError) - .last() - .should("be.visible"); + cy.get(commonlocators.lintError).first().should("be.visible"); + cy.get(commonlocators.lintError).last().should("be.visible"); cy.get(commonlocators.lintError) .first() @@ -45,13 +41,9 @@ describe("Linting warning validation with text widget", function() { .should("be.visible") .contains("'lintErrror' is not defined."); - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); - cy.get(commonlocators.errorTab) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); cy.get(commonlocators.debugErrorMsg).should("have.length", 3); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_new_feature_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_new_feature_spec.js index 8227daae81..9dd751a46d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_new_feature_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_new_feature_spec.js @@ -3,7 +3,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const publishPage = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/textDsl.json"); -describe("Text Widget color/font/alignment Functionality", function() { +describe("Text Widget color/font/alignment Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -11,7 +11,7 @@ describe("Text Widget color/font/alignment Functionality", function() { beforeEach(() => { cy.openPropertyPane("textwidget"); }); - it("Test to validate parsing link", function() { + it("Test to validate parsing link", function () { // Add link to text widget cy.testCodeMirror("app.appsmith.com"); // check if it's a link when no http or https is passed, @@ -40,7 +40,7 @@ describe("Text Widget color/font/alignment Functionality", function() { cy.closePropertyPane(); }); - it("Text-TextStyle Heading, Text Name Validation", function() { + it("Text-TextStyle Heading, Text Name Validation", function () { //changing the Text Name and verifying cy.widgetText( this.data.TextName, @@ -64,7 +64,7 @@ describe("Text Widget color/font/alignment Functionality", function() { cy.get(publishPage.backToEditor).click({ force: true }); }); - it("Test to validate text format", function() { + it("Test to validate text format", function () { cy.moveToStyleTab(); //Changing the Text Style's and validating cy.get(widgetsPage.italics).click({ force: true }); @@ -78,12 +78,10 @@ describe("Text Widget color/font/alignment Functionality", function() { cy.closePropertyPane(); }); - it("Test to validate color changes in text and background", function() { + it("Test to validate color changes in text and background", function () { cy.moveToStyleTab(); //Changing the Text Style's and validating - cy.get(widgetsPage.textColor) - .first() - .click({ force: true }); + cy.get(widgetsPage.textColor).first().click({ force: true }); cy.selectColor("textcolor"); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); @@ -119,23 +117,17 @@ describe("Text Widget color/font/alignment Functionality", function() { cy.readTextDataValidateCSS("color", "rgb(128, 0, 128)"); }); - it("Test to validate text alignment", function() { - cy.get(widgetsPage.centerAlign) - .first() - .click({ force: true }); + it("Test to validate text alignment", function () { + cy.get(widgetsPage.centerAlign).first().click({ force: true }); cy.readTextDataValidateCSS("text-align", "center"); - cy.get(widgetsPage.rightAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.rightAlign).first().click({ force: true }); cy.readTextDataValidateCSS("text-align", "right"); - cy.get(widgetsPage.leftAlign) - .first() - .click({ force: true }); + cy.get(widgetsPage.leftAlign).first().click({ force: true }); cy.readTextDataValidateCSS("text-align", "left"); cy.closePropertyPane(); }); - it("Test to validate enable scroll feature", function() { + it("Test to validate enable scroll feature", function () { cy.moveToContentTab(); cy.get(".t--button-group-SCROLL").click({ force: true }); cy.wait("@updateLayout"); @@ -145,7 +137,7 @@ describe("Text Widget color/font/alignment Functionality", function() { cy.get(commonlocators.headingTextStyle).scrollIntoView({ duration: 2000 }); cy.closePropertyPane(); }); - it("Test border width, color and verity", function() { + it("Test border width, color and verity", function () { cy.moveToStyleTab(); cy.testJsontext("borderwidth", "10"); cy.wait("@updateLayout"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_spec.js index 716973eed3..c2dcf1a61a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_spec.js @@ -3,7 +3,7 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); const publishPage = require("../../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../../fixtures/displayWidgetDsl.json"); -describe("Text Widget Functionality", function() { +describe("Text Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); @@ -12,7 +12,7 @@ describe("Text Widget Functionality", function() { cy.openPropertyPane("textwidget"); }); - it("Text-TextStyle Heading, Text Name Validation", function() { + it("Text-TextStyle Heading, Text Name Validation", function () { //changing the Text Name and verifying cy.widgetText( this.data.TextName, @@ -34,7 +34,7 @@ describe("Text Widget Functionality", function() { .should("have.css", "font-size", "16px"); }); - it("Text Email Parsing Validation", function() { + it("Text Email Parsing Validation", function () { cy.testCodeMirror("ab.end@domain.com"); cy.wait("@updateLayout"); cy.PublishtheApp(); @@ -45,7 +45,7 @@ describe("Text Widget Functionality", function() { ); }); - it("Text-TextStyle Label Validation", function() { + it("Text-TextStyle Label Validation", function () { cy.testCodeMirror(this.data.TextLabelValue); cy.moveToStyleTab(); //Changing the Text Style's and validating @@ -60,7 +60,7 @@ describe("Text Widget Functionality", function() { .should("have.css", "font-size", "14px"); }); - it("Text-TextStyle Body Validation", function() { + it("Text-TextStyle Body Validation", function () { cy.moveToStyleTab(); cy.ChangeTextStyle( this.data.TextBody, @@ -73,11 +73,9 @@ describe("Text Widget Functionality", function() { .should("have.css", "font-size", "20px"); }); - it("Text widget depends on itself", function() { + it("Text widget depends on itself", function () { cy.testJsontext("text", `{{${this.data.TextName}}}`); - cy.get(commonlocators.toastBody) - .first() - .contains("Cyclic"); + cy.get(commonlocators.toastBody).first().contains("Cyclic"); cy.PublishtheApp(); cy.get(commonlocators.bodyTextStyle).should( "have.text", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_truncate_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_truncate_spec.js index fb5b9cdd92..b88939e885 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_truncate_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Text/Text_truncate_spec.js @@ -1,12 +1,12 @@ const dsl = require("../../../../../fixtures/textNewDsl.json"); const commonlocators = require("../../../../../locators/commonlocators.json"); -describe("Text Widget Truncate Functionality", function() { +describe("Text Widget Truncate Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Check default overflow property is No overflow", function() { + it("Check default overflow property is No overflow", function () { cy.openPropertyPane("textwidget"); cy.get(".t--button-group-NONE") .last() @@ -14,7 +14,7 @@ describe("Text Widget Truncate Functionality", function() { cy.closePropertyPane(); }); - it("Validate long text is not truncating in default", function() { + it("Validate long text is not truncating in default", function () { cy.get( `.appsmith_widget_${dsl.dsl.children[0].widgetId} .t--draggable-textwidget`, ).click({ @@ -31,7 +31,7 @@ describe("Text Widget Truncate Functionality", function() { ).should("not.exist"); }); - it("Enable Truncate Text option and Validate", function() { + it("Enable Truncate Text option and Validate", function () { cy.wait(2000); cy.get("body").type("{esc}"); cy.get(".t--button-group-TRUNCATE").click({ force: true }); @@ -42,7 +42,7 @@ describe("Text Widget Truncate Functionality", function() { cy.closePropertyPane(); }); - it("Open modal on click and Validate", function() { + it("Open modal on click and Validate", function () { cy.get( `.appsmith_widget_${dsl.dsl.children[0].widgetId} .t--widget-textwidget-truncate`, ).click(); @@ -54,7 +54,7 @@ describe("Text Widget Truncate Functionality", function() { }); }); - it("Add Long Text to large text box and validate", function() { + it("Add Long Text to large text box and validate", function () { cy.get( `.appsmith_widget_${dsl.dsl.children[1].widgetId} .t--draggable-textwidget`, ).click({ diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetCopyPaste_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetCopyPaste_spec.js index f025c505b0..ecb1a117dd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetCopyPaste_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetCopyPaste_spec.js @@ -5,13 +5,13 @@ const dsl = require("../../../../fixtures/WidgetCopyPaste.json"); const generatePage = require("../../../../locators/GeneratePage.json"); const widgetSelector = (name) => `[data-widgetname-cy="${name}"]`; -describe("Widget Copy paste", function() { +describe("Widget Copy paste", function () { const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; before(() => { cy.addDsl(dsl); }); - it("1. When non Layout widget is selected, it should place below the widget selected", function() { + it("1. When non Layout widget is selected, it should place below the widget selected", function () { // Selection cy.get(`#${dsl.dsl.children[1].widgetId}`).click({ ctrlKey: true, @@ -42,7 +42,7 @@ describe("Widget Copy paste", function() { }); }); - it("2. When Layout widget is selected, it should place it inside the layout widget", function() { + it("2. When Layout widget is selected, it should place it inside the layout widget", function () { cy.get(`#div-selection-0`).click({ force: true, }); @@ -61,7 +61,7 @@ describe("Widget Copy paste", function() { .should("have.length", 1); }); - it("3. When widget inside the layout widget is selected, then it should paste inside the layout widget below the selected widget", function() { + it("3. When widget inside the layout widget is selected, then it should paste inside the layout widget below the selected widget", function () { cy.get(`#div-selection-0`).click({ force: true, }); @@ -110,7 +110,7 @@ describe("Widget Copy paste", function() { .should("have.length", 2); }); - it("6. Should be able to paste list widget inside another list widget", function() { + it("6. Should be able to paste list widget inside another list widget", function () { //clean up cy.get(`#div-selection-0`).click({ force: true, @@ -137,7 +137,7 @@ describe("Widget Copy paste", function() { .should("have.length", 1); }); - it("7. Should be able to paste widget on the initial generate Page", function() { + it("7. Should be able to paste widget on the initial generate Page", function () { cy.Createpage("NewPage", false); //paste diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetGrouping_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetGrouping_spec.js index 30b63e48c6..a1a9447512 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetGrouping_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetGrouping_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/widgetSelection.json"); -describe("Widget Grouping", function() { +describe("Widget Grouping", function () { before(() => { cy.addDsl(dsl); }); - it("Select widgets using cmd + click and group using cmd + G", function() { + it("Select widgets using cmd + click and group using cmd + G", function () { // Selection cy.get(`#${dsl.dsl.children[2].widgetId}`).click({ ctrlKey: true, diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetSelection_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetSelection_spec.js index 628c962605..e82726fd74 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetSelection_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/WidgetSelection_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/widgetSelection.json"); -describe("Widget Selection", function() { +describe("Widget Selection", function () { before(() => { cy.addDsl(dsl); }); - it("1. Multi Select widgets using cmd + click", function() { + it("1. Multi Select widgets using cmd + click", function () { cy.get(`#${dsl.dsl.children[0].widgetId}`).click({ ctrlKey: true, }); @@ -25,7 +25,7 @@ describe("Widget Selection", function() { cy.get(`.t--multi-selection-box`).should("have.length", 1); }); - it("2. Select widgets using cmd + click and open property pane by clicking on the widget from right side panel", function() { + it("2. Select widgets using cmd + click and open property pane by clicking on the widget from right side panel", function () { // Selection cy.get(`#${dsl.dsl.children[0].widgetId}`).click({ ctrlKey: true, @@ -47,13 +47,11 @@ describe("Widget Selection", function() { cy.get(`.t--property-pane-view`).should("have.length", 1); }); - it("3. Should not select widgets if we hit CTRL + A on other Pages", function() { + it("3. Should not select widgets if we hit CTRL + A on other Pages", function () { // Switch to the Explorer Pane cy.get("#switcher--explorer").click(); // Click to create a New Data Source - cy.get(".t--entity-add-btn") - .eq(3) - .click(); + cy.get(".t--entity-add-btn").eq(3).click(); // Hit CTRL +A cy.get("body").type("{ctrl}{a}"); // Switch to the Canvas diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/deprecatedWidgets_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/deprecatedWidgets_spec.js index b0827cc10d..ae0a96a394 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/deprecatedWidgets_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/deprecatedWidgets_spec.js @@ -1,11 +1,11 @@ const dsl = require("../../../../fixtures/deprecatedWidgets.json"); -describe("Deprecation warning feature", function() { +describe("Deprecation warning feature", function () { before(() => { cy.addDsl(dsl); }); - it("should have deprecation warning on all the deprecated widgets", function() { + it("should have deprecation warning on all the deprecated widgets", function () { cy.get(`#div-selection-0`).click({ force: true, }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateAppWithSameNameInWorkspace_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateAppWithSameNameInWorkspace_spec.js index 9b42f2a062..f7117a5724 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateAppWithSameNameInWorkspace_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateAppWithSameNameInWorkspace_spec.js @@ -1,11 +1,11 @@ /// -describe("Create workspace and a new app / delete and recreate app", function() { +describe("Create workspace and a new app / delete and recreate app", function () { let workspaceId; let appid; let newWorkspaceName; - it("1. Create app within an workspace and delete and re-create another app with same name", function() { + it("1. Create app within an workspace and delete and re-create another app with same name", function () { cy.NavigateToHome(); cy.generateUUID().then((uid) => { workspaceId = uid; diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateSameAppInDiffWorkspace_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateSameAppInDiffWorkspace_spec.js index c74df42fa7..bb5632e8f0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateSameAppInDiffWorkspace_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateSameAppInDiffWorkspace_spec.js @@ -1,6 +1,6 @@ /// -describe("Create app same name in different workspace", function() { +describe("Create app same name in different workspace", function () { let workspaceId; let appid; let newWorkspaceName; @@ -21,7 +21,7 @@ describe("Create app same name in different workspace", function() { }); }); }); - it("1. create app with same name in a different workspace", function() { + it("1. create app with same name in a different workspace", function () { cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); cy.wait("@applications").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/DeleteWorkspace_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/DeleteWorkspace_spec.js index 0b6ad43c8d..651c696677 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/DeleteWorkspace_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/DeleteWorkspace_spec.js @@ -2,10 +2,10 @@ import homePage from "../../../../locators/HomePage"; import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Delete workspace test spec", function() { +describe("Delete workspace test spec", function () { let newWorkspaceName; - it("1. Should delete the workspace", function() { + it("1. Should delete the workspace", function () { cy.visit("/applications"); _.agHelper.GenerateUUID(); cy.get("@guid").then((uid) => { @@ -19,7 +19,7 @@ describe("Delete workspace test spec", function() { }); }); - it("2. Should show option to delete workspace for an admin user", function() { + it("2. Should show option to delete workspace for an admin user", function () { cy.visit("/applications"); cy.wait(2000); cy.generateUUID().then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LeaveWorkspaceTest_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LeaveWorkspaceTest_spec.js index 358ece13d1..74dbc51594 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LeaveWorkspaceTest_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LeaveWorkspaceTest_spec.js @@ -2,10 +2,10 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let HomePage = ObjectsRegistry.HomePage; -describe("Leave workspace test spec", function() { +describe("Leave workspace test spec", function () { let newWorkspaceName; - it("1. Only admin user can not leave workspace validation", function() { + it("1. Only admin user can not leave workspace validation", function () { cy.visit("/applications"); cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { @@ -22,7 +22,7 @@ describe("Leave workspace test spec", function() { }); }); - it("2. Bug 17235 & 17987 - Non admin users can only access leave workspace popup menu validation", function() { + it("2. Bug 17235 & 17987 - Non admin users can only access leave workspace popup menu validation", function () { cy.visit("/applications"); cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LoginFromUIApp_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LoginFromUIApp_spec.js index 4ecd69c8e1..37bbfd50aa 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LoginFromUIApp_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/LoginFromUIApp_spec.js @@ -3,8 +3,8 @@ const pages = require("../../../../locators/Pages.json"); let pageid; -describe("Login from UI and check the functionality", function() { - it("Login/create page/delete page/delete app from UI", function() { +describe("Login from UI and check the functionality", function () { + it("Login/create page/delete page/delete app from UI", function () { const appname = localStorage.getItem("AppName"); cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.SearchApp(appname); @@ -13,16 +13,10 @@ describe("Login from UI and check the functionality", function() { cy.generateUUID().then((uid) => { pageid = uid; cy.Createpage(pageid); - cy.get(`.t--entity-name`) - .contains(pageid) - .trigger("mouseover"); + cy.get(`.t--entity-name`).contains(pageid).trigger("mouseover"); cy.hoverAndClick(); - cy.get(pages.deletePage) - .first() - .click({ force: true }); - cy.get(pages.deletePageConfirm) - .first() - .click({ force: true }); + cy.get(pages.deletePage).first().click({ force: true }); + cy.get(pages.deletePageConfirm).first().click({ force: true }); cy.wait(2000); }); cy.wait("@deletePage"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/MemberRoles_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/MemberRoles_Spec.ts index 15f45ffd7f..e8e78b2af4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/MemberRoles_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/MemberRoles_Spec.ts @@ -43,16 +43,14 @@ describe("Create new workspace and invite user & validate all roles", () => { _.homePage.Signout(); }); - it("3. Login as Invited user and validate Viewer role", function() { + it("3. Login as Invited user and validate Viewer role", function () { _.homePage.LogintoApp( Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"), "App Viewer", ); _.homePage.FilterApplication(appid, workspaceId); - cy.get(_.homePage._applicationCard) - .first() - .trigger("mouseover"); + cy.get(_.homePage._applicationCard).first().trigger("mouseover"); cy.get(_.homePage._appHoverIcon("edit")).should("not.exist"); // verify only viewer role is visible _.agHelper.GetNClick(_.homePage._shareWorkspace(workspaceId)); @@ -68,7 +66,7 @@ describe("Create new workspace and invite user & validate all roles", () => { _.homePage.Signout(false); }); - it("4. Login as Workspace owner and Update the Invited user role to Developer", function() { + it("4. Login as Workspace owner and Update the Invited user role to Developer", function () { _.homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); _.homePage.FilterApplication(appid, workspaceId); _.homePage.UpdateUserRoleInWorkspace( @@ -80,16 +78,14 @@ describe("Create new workspace and invite user & validate all roles", () => { _.homePage.Signout(); }); - it("5. Login as Invited user and validate Developer role", function() { + it("5. Login as Invited user and validate Developer role", function () { _.homePage.LogintoApp( Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"), "Developer", ); _.homePage.FilterApplication(appid, workspaceId); - cy.get(_.homePage._applicationCard) - .first() - .trigger("mouseover"); + cy.get(_.homePage._applicationCard).first().trigger("mouseover"); _.agHelper.GetNClick(_.homePage._appHoverIcon("edit")); // cy.xpath(_.homePage._editPageLanding).should("exist"); _.agHelper.Sleep(2000); @@ -103,7 +99,7 @@ describe("Create new workspace and invite user & validate all roles", () => { _.homePage.Signout(); }); - it("6. Login as Workspace owner and Update the Invited user role to Administrator", function() { + it("6. Login as Workspace owner and Update the Invited user role to Administrator", function () { _.homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); _.homePage.FilterApplication(appid, workspaceId); _.homePage.UpdateUserRoleInWorkspace( @@ -115,7 +111,7 @@ describe("Create new workspace and invite user & validate all roles", () => { _.homePage.Signout(); }); - it("7. Login as Invited user and validate Administrator role", function() { + it("7. Login as Invited user and validate Administrator role", function () { _.homePage.LogintoApp( Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1"), @@ -129,9 +125,7 @@ describe("Create new workspace and invite user & validate all roles", () => { _.agHelper.GetNClick(HomePage.closeBtn); _.agHelper.Sleep(); _.homePage.FilterApplication(appid, workspaceId); - cy.get(_.homePage._applicationCard) - .first() - .trigger("mouseover"); + cy.get(_.homePage._applicationCard).first().trigger("mouseover"); _.agHelper.GetNClick(_.homePage._appHoverIcon("edit")); // cy.xpath(_.homePage._editPageLanding).should("exist"); _.agHelper.Sleep(2000); @@ -146,7 +140,7 @@ describe("Create new workspace and invite user & validate all roles", () => { _.homePage.Signout(); }); - it("8. Login as Workspace owner and verify all 3 users are present", function() { + it("8. Login as Workspace owner and verify all 3 users are present", function () { _.homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); _.homePage.FilterApplication(appid, workspaceId); _.homePage.UpdateUserRoleInWorkspace( @@ -157,7 +151,7 @@ describe("Create new workspace and invite user & validate all roles", () => { ); _.homePage.FilterApplication(appid, workspaceId); _.homePage.OpenMembersPageForWorkspace(workspaceId); - cy.get(_.homePage._usersEmailList).then(function($list) { + cy.get(_.homePage._usersEmailList).then(function ($list) { expect($list).to.have.length(3); expect($list.eq(0)).to.contain(Cypress.env("USERNAME")); expect($list.eq(1)).to.contain(Cypress.env("TESTUSERNAME1")); @@ -179,7 +173,8 @@ describe("Create new workspace and invite user & validate all roles", () => { it("10. Login as App Viewer, Verify leave workspace flow", () => { _.homePage.LogintoApp( Cypress.env("TESTUSERNAME2"), - Cypress.env("TESTPASSWORD2"), "App Viewer" + Cypress.env("TESTPASSWORD2"), + "App Viewer", ); _.homePage.FilterApplication(appid, workspaceId); _.homePage.LeaveWorkspace(workspaceId); diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/ShareAppTests_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/ShareAppTests_spec.js index cc0a5f4374..17386f280f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/ShareAppTests_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/ShareAppTests_spec.js @@ -5,13 +5,13 @@ const publish = require("../../../../locators/publishWidgetspage.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let HomePage = ObjectsRegistry.HomePage; -describe("Create new workspace and share with a user", function() { +describe("Create new workspace and share with a user", function () { let workspaceId; let appid; let currentUrl; let newWorkspaceName; - it("1. Create workspace and then share with a user from Application share option within application", function() { + it("1. Create workspace and then share with a user from Application share option within application", function () { cy.NavigateToHome(); cy.generateUUID().then((uid) => { workspaceId = uid; @@ -38,22 +38,20 @@ describe("Create new workspace and share with a user", function() { cy.LogOut(); }); - it("2. login as Invited user and then validate viewer privilage", function() { + it("2. login as Invited user and then validate viewer privilage", function () { cy.LogintoApp(Cypress.env("TESTUSERNAME1"), Cypress.env("TESTPASSWORD1")); cy.get(homePage.searchInput).type(appid); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.appsContainer).contains(workspaceId); - cy.xpath(homePage.ShareBtn) - .first() - .should("be.visible"); + cy.xpath(homePage.ShareBtn).first().should("be.visible"); cy.get(homePage.applicationCard).trigger("mouseover"); cy.get(homePage.appEditIcon).should("not.exist"); cy.launchApp(appid); cy.LogOut(); }); - it("3. Enable public access to Application", function() { + it("3. Enable public access to Application", function () { cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); cy.wait("@applications").should( @@ -80,7 +78,7 @@ describe("Create new workspace and share with a user", function() { cy.LogOut(); }); - it("4. Open the app without login and validate public access of Application", function() { + it("4. Open the app without login and validate public access of Application", function () { cy.visit(currentUrl); cy.wait("@getPagesForViewApp").should( "have.nested.property", @@ -98,7 +96,7 @@ describe("Create new workspace and share with a user", function() { cy.get(".t--comment-mode-switch-toggle").should("not.exist"); }); - it("5. login as uninvited user and then validate public access of Application", function() { + it("5. login as uninvited user and then validate public access of Application", function () { cy.LoginFromAPI(Cypress.env("TESTUSERNAME2"), Cypress.env("TESTPASSWORD2")); cy.visit(currentUrl); cy.wait("@getPagesForViewApp").should( @@ -115,7 +113,7 @@ describe("Create new workspace and share with a user", function() { cy.LogOut(); }); - it("login as Owner and disable public access", function() { + it("login as Owner and disable public access", function () { cy.LoginFromAPI(Cypress.env("USERNAME"), Cypress.env("PASSWORD")); cy.visit("/applications"); cy.wait("@applications").should( @@ -135,7 +133,7 @@ describe("Create new workspace and share with a user", function() { cy.LogOut(); }); - it("6. login as uninvited user, validate public access disable feature ", function() { + it("6. login as uninvited user, validate public access disable feature ", function () { cy.LoginFromAPI(Cypress.env("TESTUSERNAME2"), Cypress.env("TESTPASSWORD2")); cy.visit(currentUrl); cy.wait("@getPagesForViewApp").should( @@ -146,7 +144,7 @@ describe("Create new workspace and share with a user", function() { cy.LogOut(); }); - it("7. visit the app as anonymous user and validate redirection to login page", function() { + it("7. visit the app as anonymous user and validate redirection to login page", function () { cy.visit(currentUrl); cy.wait("@getPagesForViewApp").should( "have.nested.property", diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/UpdateWorkspaceTests_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/UpdateWorkspaceTests_spec.js index f1cc99ef5c..c05fd4b846 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/UpdateWorkspaceTests_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/UpdateWorkspaceTests_spec.js @@ -1,10 +1,10 @@ import homePage from "../../../../locators/HomePage"; -describe("Update Workspace", function() { +describe("Update Workspace", function () { let workspaceId; let newWorkspaceName; - it("1. Open the workspace general settings and update workspace name. The update should reflect in the workspace. It should also reflect in the workspace names on the left side and the workspace dropdown. ", function() { + it("1. Open the workspace general settings and update workspace name. The update should reflect in the workspace. It should also reflect in the workspace names on the left side and the workspace dropdown. ", function () { cy.NavigateToHome(); cy.generateUUID().then((uid) => { workspaceId = uid; @@ -37,7 +37,7 @@ describe("Update Workspace", function() { }); }); - it("2. Open the workspace general settings and update workspace email. The update should reflect in the workspace.", function() { + it("2. Open the workspace general settings and update workspace email. The update should reflect in the workspace.", function () { cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { newWorkspaceName = interception.response.body.data.name; @@ -69,7 +69,7 @@ describe("Update Workspace", function() { ); }); - it("3. Upload logo / delete logo and validate", function() { + it("3. Upload logo / delete logo and validate", function () { const fixturePath = "appsmithlogo.png"; cy.xpath(homePage.uploadLogo).attachFile(fixturePath); cy.wait("@updateLogo").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceImportApplication_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceImportApplication_spec.js index e1460747dc..62ca06b666 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceImportApplication_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/WorkspaceImportApplication_spec.js @@ -1,7 +1,7 @@ import homePage from "../../../../locators/HomePage"; const dsl = require("../../../../fixtures/displayWidgetDsl.json"); -describe("Workspace Import Application", function() { +describe("Workspace Import Application", function () { let workspaceId; let newWorkspaceName; let appname; @@ -10,19 +10,15 @@ describe("Workspace Import Application", function() { cy.addDsl(dsl); }); - it("Can Import Application from json", function() { + it("Can Import Application from json", function () { cy.NavigateToHome(); appname = localStorage.getItem("AppName"); cy.get(homePage.searchInput).type(appname); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); cy.get(homePage.exportAppFromMenu).click({ force: true }); cy.get(homePage.searchInput).clear(); cy.get(`a[id=t--export-app-link]`).then((anchor) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspace_validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspace_validation_spec.js index 112f1e9d8b..36077ee22e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspace_validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/Workspace_validation_spec.js @@ -2,10 +2,10 @@ import homePage from "../../../../locators/HomePage"; -describe("Workspace name validation spec", function() { +describe("Workspace name validation spec", function () { let workspaceId; let newWorkspaceName; - it("1. create workspace with leading space validation", function() { + it("1. create workspace with leading space validation", function () { cy.NavigateToHome(); cy.createWorkspace(); cy.wait("@createWorkspace").then((interception) => { @@ -17,13 +17,11 @@ describe("Workspace name validation spec", function() { .find(homePage.workspaceNamePopover) .find(homePage.optionsIcon) .click({ force: true }); - cy.get(homePage.renameWorkspaceInput) - .should("be.visible") - .type(" "); + cy.get(homePage.renameWorkspaceInput).should("be.visible").type(" "); cy.get(".error-message").should("be.visible"); }); }); - it("2. creates workspace and checks that workspace name is editable and create workspace with special characters validation", function() { + it("2. creates workspace and checks that workspace name is editable and create workspace with special characters validation", function () { cy.createWorkspace(); cy.generateUUID().then((uid) => { workspaceId = @@ -39,9 +37,7 @@ describe("Workspace name validation spec", function() { .scrollIntoView() .should("be.visible") .within(() => { - cy.get(homePage.shareUserIcons) - .first() - .should("be.visible"); + cy.get(homePage.shareUserIcons).first().should("be.visible"); }); cy.navigateToWorkspaceSettings(workspaceId); // checking parent's() since the child() inherits css from it diff --git a/app/client/cypress/integration/Regression_TestSuite/EnterpriseTests/AdminSettings/Admin_settings_spec.js b/app/client/cypress/integration/Regression_TestSuite/EnterpriseTests/AdminSettings/Admin_settings_spec.js index 4f5f15ca03..4483f1525d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/EnterpriseTests/AdminSettings/Admin_settings_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/EnterpriseTests/AdminSettings/Admin_settings_spec.js @@ -2,7 +2,7 @@ const EnterpriseAdminSettingsLocators = require("../../../../locators/Enterprise import adminsSettings from "../../../../locators/AdminsSettings"; import { REPO, CURRENT_REPO } from "../../../../fixtures/REPO"; -describe("Admin settings page", function() { +describe("Admin settings page", function () { beforeEach(() => { cy.intercept("GET", "/api/v1/admin/env", { body: { responseMeta: { status: 200, success: true }, data: {} }, diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_All_Verb_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_All_Verb_spec.js index cbb7f3320a..e4714f6de3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_All_Verb_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_All_Verb_spec.js @@ -6,12 +6,12 @@ const agHelper = ObjectsRegistry.AggregateHelper, apiPage = ObjectsRegistry.ApiPage, dataSources = ObjectsRegistry.DataSources; -describe("API Panel Test Functionality", function() { - afterEach(function() { +describe("API Panel Test Functionality", function () { + afterEach(function () { agHelper.ActionContextMenuWithInPane("Delete"); }); - it("1. PUT Action test API feature", function() { + it("1. PUT Action test API feature", function () { apiPage.CreateAndFillApi( testdata.baseUrl + testdata.echoMethod, "", @@ -36,7 +36,7 @@ describe("API Panel Test Functionality", function() { cy.ResponseCheck("updatedAt"); }); - it("2. Post Action test API feature", function() { + it("2. Post Action test API feature", function () { apiPage.CreateAndFillApi( testdata.baseUrl + testdata.echoMethod, "", @@ -61,7 +61,7 @@ describe("API Panel Test Functionality", function() { cy.ResponseCheck("createdAt"); }); - it("3. PATCH Action test API feature", function() { + it("3. PATCH Action test API feature", function () { apiPage.CreateAndFillApi( testdata.baseUrl + testdata.echoMethod, "", @@ -86,7 +86,7 @@ describe("API Panel Test Functionality", function() { cy.ResponseCheck("updatedAt"); }); - it("4. Delete Action test API feature", function() { + it("4. Delete Action test API feature", function () { apiPage.CreateAndFillApi( testdata.baseUrl + testdata.echoMethod, "", @@ -110,7 +110,7 @@ describe("API Panel Test Functionality", function() { cy.ResponseStatusCheck("200"); }); - it("5. Test GET Action for mock API with header and pagination", function() { + it("5. Test GET Action for mock API with header and pagination", function () { //const apiname = "SecondAPI"; apiPage.CreateAndFillApi(testdata.baseUrl + testdata.methods); apiPage.EnterHeader(testdata.headerKey, testdata.headerValue); @@ -147,7 +147,7 @@ describe("API Panel Test Functionality", function() { cy.ResponseCheck(testdata.responsetext); }); - it("6. API check with query params test API feature", function() { + it("6. API check with query params test API feature", function () { apiPage.CreateAndFillApi(testdata.baseUrl + testdata.queryAndValue); apiPage.EnterHeader(testdata.headerKey, testdata.headerValue); agHelper.AssertAutoSave(); @@ -162,7 +162,7 @@ describe("API Panel Test Functionality", function() { cy.ResponseCheck(testdata.responsetext3); }); - it("7. API check with Invalid Header", function() { + it("7. API check with Invalid Header", function () { apiPage.CreateAndFillApi(testdata.baseUrl + testdata.methods); apiPage.EnterHeader(testdata.headerKey, testdata.invalidValue); agHelper.AssertAutoSave(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Bugs_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Bugs_Spec.js index 8f1b1e9d94..fd2b682f58 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Bugs_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Bugs_Spec.js @@ -9,7 +9,7 @@ let apiPage = ObjectsRegistry.ApiPage, ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators; -describe("Rest Bugs tests", function() { +describe("Rest Bugs tests", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -18,7 +18,7 @@ describe("Rest Bugs tests", function() { agHelper.SaveLocalStorageCache(); }); - it("Bug 5550: Not able to run APIs in parallel", function() { + it("Bug 5550: Not able to run APIs in parallel", function () { cy.addDsl(dslParallel); cy.wait(8000); //settling time for dsl! cy.get(".bp3-spinner").should("not.exist"); @@ -129,7 +129,7 @@ describe("Rest Bugs tests", function() { // }) }); - it("Bug 6863: Clicking on 'debug' crashes the appsmith application", function() { + it("Bug 6863: Clicking on 'debug' crashes the appsmith application", function () { cy.startErrorRoutes(); cy.CreatePage(); cy.wait("@createPage").should( @@ -144,12 +144,8 @@ describe("Rest Bugs tests", function() { ); apiPage.RunAPI(false); cy.wait("@postExecuteError"); - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); - cy.get(commonlocators.errorTab) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); + cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); cy.get(commonlocators.debuggerLabel) .invoke("text") .then(($text) => { @@ -157,7 +153,7 @@ describe("Rest Bugs tests", function() { }); }); - it("Bug 4775: No Cyclical dependency when Api returns an error", function() { + it("Bug 4775: No Cyclical dependency when Api returns an error", function () { cy.addDsl(dslTable); cy.wait(5000); //settling time for dsl! cy.get(".bp3-spinner").should("not.exist"); @@ -180,12 +176,8 @@ describe("Rest Bugs tests", function() { locator._specificToast("Cyclic dependency found while evaluating"), ); cy.ResponseStatusCheck("404 NOT_FOUND"); - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); - cy.get(commonlocators.errorTab) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); + cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); cy.get(commonlocators.debuggerLabel) .invoke("text") .then(($text) => { @@ -200,7 +192,7 @@ describe("Rest Bugs tests", function() { }); }); - it("Bug 13515: API Response gets garbled if encoded with gzip", function() { + it("Bug 13515: API Response gets garbled if encoded with gzip", function () { apiPage.CreateAndFillApi( "https://postman-echo.com/gzip", "GarbledResponseAPI", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_ContextMenu_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_ContextMenu_spec.js index a793f92843..6d40426a72 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_ContextMenu_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_ContextMenu_spec.js @@ -5,8 +5,8 @@ const apiwidget = require("../../../../locators/apiWidgetslocator.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let ee = ObjectsRegistry.EntityExplorer; -describe("API Panel Test Functionality ", function() { - it("Test API copy/Move/delete feature", function() { +describe("API Panel Test Functionality ", function () { + it("Test API copy/Move/delete feature", function () { cy.Createpage("SecondPage"); cy.NavigateToAPI_Panel(); cy.CreateAPI("FirstAPI"); @@ -22,9 +22,7 @@ describe("API Panel Test Functionality ", function() { cy.get("body").click(0, 0); ee.ActionContextMenuByEntityName("FirstAPICopy", "Move to page", "Page1"); cy.wait(2000); - cy.get(".t--entity-name") - .contains("FirstAPICopy") - .click({ force: true }); + cy.get(".t--entity-name").contains("FirstAPICopy").click({ force: true }); cy.get(apiwidget.resourceUrl).should("contain.text", "{{ '/random' }}"); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_CurlPOSTImport_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_CurlPOSTImport_spec.js index c03aaec15f..610a0a0667 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_CurlPOSTImport_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_CurlPOSTImport_spec.js @@ -3,8 +3,8 @@ const pages = require("../../../../locators/Pages.json"); import ApiEditor from "../../../../locators/ApiEditor"; import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Test curl import flow", function() { - it("Test curl import flow for POST action with JSON body", function() { +describe("Test curl import flow", function () { + it("Test curl import flow for POST action with JSON body", function () { cy.fixture("datasources").then((datasourceFormData) => { localStorage.setItem("ApiPaneV2", "ApiPaneV2"); cy.NavigateToApiEditor(); @@ -35,7 +35,7 @@ describe("Test curl import flow", function() { }); }); - it("Test curl import flow for POST action with multipart form data", function() { + it("Test curl import flow for POST action with multipart form data", function () { localStorage.setItem("ApiPaneV2", "ApiPaneV2"); cy.NavigateToApiEditor(); cy.get(pages.integrationCreateNew) diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_DefaultContentType_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_DefaultContentType_spec.js index 1ef4013cf5..6fa641753b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_DefaultContentType_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_DefaultContentType_spec.js @@ -3,8 +3,8 @@ const apiwidget = require("../../../../locators/apiWidgetslocator.json"); import appPage from "../../../../locators/CMSApplocators"; import apiEditor from "../../../../locators/ApiEditor"; -describe("API Panel request body", function() { - it("Check whether the default content-type changes on changing method types and remains unchanged on switching to GET", function() { +describe("API Panel request body", function () { + it("Check whether the default content-type changes on changing method types and remains unchanged on switching to GET", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("FirstAPI"); @@ -35,12 +35,8 @@ describe("API Panel request body", function() { cy.get(apiEditor.bodyTypeSelected).should("have.text", "JSON"); // Changing method type to GET - cy.get(apiEditor.ApiVerb) - .first() - .click(); - cy.xpath(appPage.selectGet) - .first() - .click(); + cy.get(apiEditor.ApiVerb).first().click(); + cy.xpath(appPage.selectGet).first().click(); // Checking Header for GET Type cy.contains(apiEditor.headersTab).click(); @@ -54,7 +50,7 @@ describe("API Panel request body", function() { cy.DeleteAPI(); }); - it("Bug 14624 - Verifying the content-type none is not added", function() { + it("Bug 14624 - Verifying the content-type none is not added", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("FirstAPI"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Edit_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Edit_spec.js index 78341c59de..c72455584a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Edit_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Edit_spec.js @@ -3,11 +3,11 @@ const apiwidget = require("../../../../locators/apiWidgetslocator.json"); const dsl = require("../../../../fixtures/uiBindDsl.json"); const explorer = require("../../../../locators/explorerlocators.json"); -describe("API Panel Test Functionality", function() { +describe("API Panel Test Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Test Search API fetaure", function() { + it("Test Search API fetaure", function () { cy.log("Login Successful"); cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); @@ -30,15 +30,13 @@ describe("API Panel Test Functionality", function() { cy.hoverAndClick(); cy.selectAction("Edit Name"); //cy.RenameEntity(tabname); - cy.get(explorer.editEntity) - .last() - .type("SecondAPI", { force: true }); + cy.get(explorer.editEntity).last().type("SecondAPI", { force: true }); cy.DeleteAPI(); cy.wait(2000); cy.get(".t--entity-name:contains('SecondAPI')").should("not.exist"); }); - it("Should update loading state after cancellation of confirmation for run query", function() { + it("Should update loading state after cancellation of confirmation for run query", function () { cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); cy.CreateAPI("FirstAPI"); @@ -50,16 +48,11 @@ describe("API Panel Test Functionality", function() { cy.get(apiwidget.settings).click({ force: true }); cy.get(apiwidget.confirmBeforeExecute).click({ force: true }); cy.get(apiwidget.runQueryButton).click(); - cy.get(".bp3-dialog") - .find("button") - .contains("No") - .click(); - cy.get(apiwidget.runQueryButton) - .children() - .should("have.length", 1); + cy.get(".bp3-dialog").find("button").contains("No").click(); + cy.get(apiwidget.runQueryButton).children().should("have.length", 1); }); - it("Should not crash on key delete", function() { + it("Should not crash on key delete", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("CrashTestAPI"); cy.SelectAction(testdata.postAction); @@ -74,7 +67,7 @@ describe("API Panel Test Functionality", function() { cy.get(apiwidget.headerKey).should("have.value", ""); }); - it("Should correctly parse query params", function() { + it("Should correctly parse query params", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("APIWithQueryParams"); cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methodWithQueryParam); @@ -84,7 +77,7 @@ describe("API Panel Test Functionality", function() { }); }); - it("Shows evaluated value pane when url field is focused", function() { + it("Shows evaluated value pane when url field is focused", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("TestAPI"); cy.get(".CodeMirror textarea") diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_MultiPart_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_MultiPart_Spec.ts index 16a37b3c50..9913aa7ab4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_MultiPart_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_MultiPart_Spec.ts @@ -31,7 +31,7 @@ describe("Validate API request body panel", () => { agHelper.ActionContextMenuWithInPane("Delete"); }); - it("2. Checks whether No body error message is shown when None API body content type is selected", function() { + it("2. Checks whether No body error message is shown when None API body content type is selected", function () { apiPage.CreateApi("FirstAPI", "GET"); apiPage.SelectPaneTab("Body"); apiPage.SelectSubTab("NONE"); @@ -39,7 +39,7 @@ describe("Validate API request body panel", () => { agHelper.ActionContextMenuWithInPane("Delete"); }); - it("3. Checks whether header content type is being changed when FORM_URLENCODED API body content type is selected", function() { + it("3. Checks whether header content type is being changed when FORM_URLENCODED API body content type is selected", function () { apiPage.CreateApi("FirstAPI", "POST"); apiPage.SelectPaneTab("Body"); apiPage.SelectSubTab("JSON"); @@ -56,7 +56,7 @@ describe("Validate API request body panel", () => { agHelper.ActionContextMenuWithInPane("Delete"); }); - it("4. Checks whether header content type is being changed when MULTIPART_FORM_DATA API body content type is selected", function() { + it("4. Checks whether header content type is being changed when MULTIPART_FORM_DATA API body content type is selected", function () { apiPage.CreateApi("FirstAPI", "POST"); apiPage.SelectPaneTab("Body"); apiPage.SelectSubTab("JSON"); @@ -73,7 +73,7 @@ describe("Validate API request body panel", () => { agHelper.ActionContextMenuWithInPane("Delete"); }); - it("5. Checks whether content type 'FORM_URLENCODED' is preserved when user selects None API body content type", function() { + it("5. Checks whether content type 'FORM_URLENCODED' is preserved when user selects None API body content type", function () { apiPage.CreateApi("FirstAPI", "POST"); apiPage.SelectPaneTab("Body"); apiPage.SelectSubTab("FORM_URLENCODED"); @@ -82,7 +82,7 @@ describe("Validate API request body panel", () => { agHelper.ActionContextMenuWithInPane("Delete"); }); - it("6. Checks whether content type 'MULTIPART_FORM_DATA' is preserved when user selects None API body content type", function() { + it("6. Checks whether content type 'MULTIPART_FORM_DATA' is preserved when user selects None API body content type", function () { apiPage.CreateApi("FirstAPI", "POST"); apiPage.SelectPaneTab("Body"); apiPage.SelectSubTab("MULTIPART_FORM_DATA"); @@ -170,7 +170,7 @@ describe("Validate API request body panel", () => { agHelper.ClickButton("Select Files"); agHelper.UploadFile(imageNameToUpload); agHelper.ValidateNetworkExecutionSuccess("@postExecute", false); - + deployMode.DeployApp(locator._spanButton("Select Files")); agHelper.ClickButton("Select Files"); agHelper.UploadFile(imageNameToUpload); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Mustache_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Mustache_spec.js index ad025273d5..b589d7d91a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Mustache_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Mustache_spec.js @@ -4,11 +4,11 @@ const dsl = require("../../../../fixtures/commondsl.json"); const widgetsPage = require("../../../../locators/Widgets.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Moustache test Functionality", function() { +describe("Moustache test Functionality", function () { beforeEach(() => { cy.addDsl(dsl); }); - it("Moustache test Functionality", function() { + it("Moustache test Functionality", function () { cy.openPropertyPane("textwidget"); cy.widgetText("Api", widgetsPage.textWidget, widgetsPage.textInputval); cy.testCodeMirror(testdata.methods); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_RequestBody_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_RequestBody_spec.js index 43d12b1039..9d47136cf9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_RequestBody_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_RequestBody_spec.js @@ -2,8 +2,8 @@ const testdata = require("../../../../fixtures/testdata.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json"); import apiEditor from "../../../../locators/ApiEditor"; -describe("API Panel request body", function() { - it("Check whether input exists when form-encoded is selected", function() { +describe("API Panel request body", function () { + it("Check whether input exists when form-encoded is selected", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI("FirstAPI"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Response_View_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Response_View_spec.js index 4dc90b7705..4ac3291cc3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Response_View_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Response_View_spec.js @@ -6,8 +6,8 @@ const testUrl1 = const agHelper = ObjectsRegistry.AggregateHelper, apiPage = ObjectsRegistry.ApiPage; -describe("Bug 14666: Api Response Test Functionality ", function() { - it("Test table loading when data is in array format", function() { +describe("Bug 14666: Api Response Test Functionality ", function () { + it("Test table loading when data is in array format", function () { cy.log("Login Successful"); cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); @@ -18,7 +18,7 @@ describe("Bug 14666: Api Response Test Functionality ", function() { cy.DeleteAPI(); }); - it("Test table loading when data is not in array format", function() { + it("Test table loading when data is not in array format", function () { cy.log("Login Successful"); cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Search_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Search_spec.js index a8be4be4ef..d418ba0747 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Search_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Search_spec.js @@ -7,8 +7,8 @@ const testUrl2 = "http://host.docker.internal:5001/v1/dynamicrecords/getstudents"; const testUrl3 = "http://host.docker.internal:5001//v1/dynamicrecords/getrecordsArray"; -describe("API Panel Test Functionality ", function() { - it("Test Search API fetaure", function() { +describe("API Panel Test Functionality ", function () { + it("Test Search API fetaure", function () { cy.log("Login Successful"); cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); @@ -26,7 +26,7 @@ describe("API Panel Test Functionality ", function() { cy.DeleteAPIFromSideBar(); }); - it("if suggested widgets section alwas appears for all 3 modes", function() { + it("if suggested widgets section alwas appears for all 3 modes", function () { cy.log("Login Successful"); cy.createAndFillApi(testUrl1, ""); cy.RunAPI(); @@ -39,7 +39,7 @@ describe("API Panel Test Functionality ", function() { cy.get(ApiEditor.tableResponseTab).click(); cy.checkIfApiPaneIsVisible(); }); - it("Bug 14242: Appsmith crash when create an API pointing to Github hosted json", function() { + it("Bug 14242: Appsmith crash when create an API pointing to Github hosted json", function () { cy.NavigateToAPI_Panel(); cy.generateUUID().then((uid) => { APIName = uid; diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Styles_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Styles_spec.js index e631f37661..01c25d28c9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Styles_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Styles_spec.js @@ -5,7 +5,7 @@ const commonLocators = require("../../../../locators/commonlocators.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let ee = ObjectsRegistry.EntityExplorer; -describe("Validate API Panel CSS Styles", function() { +describe("Validate API Panel CSS Styles", function () { const backgroundColorGray200 = "rgb(231, 231, 231)"; const backgroundColorwhite = "rgb(255, 255, 255)"; const fontColorGray800 = "rgb(57, 57, 57)"; @@ -16,19 +16,17 @@ describe("Validate API Panel CSS Styles", function() { cy.CreateAPI("test_styles"); }); - it("1.Quick access command background color", function() { + it("1.Quick access command background color", function () { //Get the first key component (can be any of key value component) //eq(1) is used because eq(0) is API serach bar. - cy.get(ApiEditor.codeEditorWrapper) - .eq(1) - .click(); + cy.get(ApiEditor.codeEditorWrapper).eq(1).click(); //Check color and background-color of binding prompt cy.get(DynamicInput.bindingPrompt) .should("have.css", "color", fontColorGray800) .should("have.css", "background-color", backgroundColorGray200); }); - it("2.HTTP method dropdown hover and selected background should be gray", function() { + it("2.HTTP method dropdown hover and selected background should be gray", function () { //Click on API http selector cy.get(ApiEditor.ApiVerb).click(); //Default selection GET background-color check @@ -45,12 +43,10 @@ describe("Validate API Panel CSS Styles", function() { .click(); }); - it("3.Commands help button center align", function() { + it("3.Commands help button center align", function () { //Get the first key component (can be any of key value component) //eq(1) is used because eq(0) is API serach bar. - cy.get(ApiEditor.codeEditorWrapper) - .eq(1) - .realHover(); + cy.get(ApiEditor.codeEditorWrapper).eq(1).realHover(); //Get the slash icon component and check background //Check center alignment //Get width and height (have use inner function because values are not accessible outside functional scope); @@ -77,20 +73,16 @@ describe("Validate API Panel CSS Styles", function() { ); }); - it("4.Select Datasource dropdown binding prompt background color", function() { + it("4.Select Datasource dropdown binding prompt background color", function () { cy.generateUUID().then((appName1) => { cy.generateUUID().then((appName2) => { //Create two datasource for testing binding prompt background-color cy.createNewAuthApiDatasource(appName1); cy.createNewAuthApiDatasource(appName2); ee.ExpandCollapseEntity("Queries/JS"); - cy.get(commonLocators.entityName) - .contains("test_styles") - .click(); + cy.get(commonLocators.entityName).contains("test_styles").click(); //Click on API search editor - cy.get(ApiEditor.codeEditorWrapper) - .first() - .click(); + cy.get(ApiEditor.codeEditorWrapper).first().click(); //First hint for search background-color test cy.get(ApiEditor.apiSearchHint) .first() @@ -122,8 +114,6 @@ describe("Validate API Panel CSS Styles", function() { cy.get(".t--application-edit-menu li") .contains("Delete Application") .click(); - cy.get(".t--application-edit-menu li") - .contains("Are you sure?") - .click(); + cy.get(".t--application-edit-menu li").contains("Are you sure?").click(); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Unique_name_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Unique_name_spec.js index eab2bd7ce5..6fc3bfb822 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Unique_name_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Unique_name_spec.js @@ -1,4 +1,4 @@ -describe("Name uniqueness test", function() { +describe("Name uniqueness test", function () { it("Test api name unique error", () => { cy.log("Login Successful"); cy.NavigateToAPI_Panel(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/CurlImportFlow_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/CurlImportFlow_spec.js index eeaee1e62b..46f2d0f463 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/CurlImportFlow_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/CurlImportFlow_spec.js @@ -4,8 +4,8 @@ const globalSearchLocators = require("../../../../locators/GlobalSearch.json"); import ApiEditor from "../../../../locators/ApiEditor"; import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Test curl import flow", function() { - it("Test curl import flow Run and Delete", function() { +describe("Test curl import flow", function () { + it("Test curl import flow Run and Delete", function () { cy.fixture("datasources").then((datasourceFormData) => { localStorage.setItem("ApiPaneV2", "ApiPaneV2"); cy.NavigateToApiEditor(); @@ -30,20 +30,16 @@ describe("Test curl import flow", function() { cy.RunAPI(); cy.ResponseStatusCheck("200 OK"); cy.get(ApiEditor.formActionButtons).should("be.visible"); - cy.get(ApiEditor.ApiActionMenu) - .first() - .click(); + cy.get(ApiEditor.ApiActionMenu).first().click(); cy.get(ApiEditor.ApiDeleteBtn).click(); - cy.get(ApiEditor.ApiDeleteBtn) - .contains("Are you sure?") - .click(); + cy.get(ApiEditor.ApiDeleteBtn).contains("Are you sure?").click(); cy.wait("@deleteAction"); cy.get("@deleteAction").then((response) => { cy.expect(response.response.body.responseMeta.success).to.eq(true); }); }); }); - it("Bug:15175 Creating new cURL import query from entity explorer crashes the app", function() { + it("Bug:15175 Creating new cURL import query from entity explorer crashes the app", function () { cy.fixture("datasources").then((datasourceFormData) => { cy.CheckAndUnfoldEntityItem("Pages"); cy.get(`.t--entity-name:contains("Page1")`) diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/ArangoDataSourceStub_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/ArangoDataSourceStub_spec.js index 56add028f6..a2e6761c9c 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/ArangoDataSourceStub_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/ArangoDataSourceStub_spec.js @@ -4,12 +4,12 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper, dataSources = ObjectsRegistry.DataSources; -describe("Arango datasource test cases", function() { +describe("Arango datasource test cases", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create, test, save then delete a Arango datasource", function() { + it("1. Create, test, save then delete a Arango datasource", function () { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("ArangoDB"); agHelper.RenameWithInPane("ArangoWithnoTrailing", false); @@ -21,7 +21,7 @@ describe("Arango datasource test cases", function() { dataSources.DeleteDatasouceFromActiveTab("ArangoWithnoTrailing"); }); - it("2. Create with trailing white spaces in host address and database name, test, save then delete a Arango datasource", function() { + it("2. Create with trailing white spaces in host address and database name, test, save then delete a Arango datasource", function () { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("ArangoDB"); agHelper.RenameWithInPane("ArangoWithTrailing", false); @@ -32,10 +32,8 @@ describe("Arango datasource test cases", function() { cy.testSaveDatasource(false); }); - it("3. Create a new query from the datasource editor", function() { - cy.get(datasource.createQuery) - .last() - .click(); + it("3. Create a new query from the datasource editor", function () { + cy.get(datasource.createQuery).last().click(); cy.wait("@createNewApi").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/AuthenticatedApiDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/AuthenticatedApiDatasource_spec.js index 0988cc9bc9..051cf322ac 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/AuthenticatedApiDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/AuthenticatedApiDatasource_spec.js @@ -6,12 +6,12 @@ const testdata = require("../../../../fixtures/testdata.json"); import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSources = ObjectsRegistry.DataSources; -describe("Authenticated API Datasource", function() { +describe("Authenticated API Datasource", function () { const URL = datasourceFormData["authenticatedApiUrl"]; const headers = "Headers"; const queryParams = "Query Params"; - it("1. Bug: 12045 - No Blank screen diplay after New Authentication API datasource creation", function() { + it("1. Bug: 12045 - No Blank screen diplay after New Authentication API datasource creation", function () { cy.NavigateToAPI_Panel(); cy.get(apiwidget.createAuthApiDatasource).click(); cy.renameDatasource("FakeAuthenticatedApi"); @@ -20,7 +20,7 @@ describe("Authenticated API Datasource", function() { cy.contains(URL); }); - it("2. Bug: 12045 - No Blank screen diplay after editing/opening existing Authentication API datasource", function() { + it("2. Bug: 12045 - No Blank screen diplay after editing/opening existing Authentication API datasource", function () { cy.xpath("//span[text()='EDIT']/parent::a").click(); cy.get(datasourceEditor.url).type("/users"); cy.get(".t--save-datasource").click({ force: true }); @@ -28,7 +28,7 @@ describe("Authenticated API Datasource", function() { cy.deleteDatasource("FakeAuthenticatedApi"); }); - it("3. Bug: 14181 -Make sure the datasource view mode page does not contain labels with no value.", function() { + it("3. Bug: 14181 -Make sure the datasource view mode page does not contain labels with no value.", function () { cy.NavigateToAPI_Panel(); cy.get(apiwidget.createAuthApiDatasource).click(); cy.renameDatasource("FakeAuthenticatedApi"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/AuthenticatedApiWithOAuth_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/AuthenticatedApiWithOAuth_spec.ts index c95058e798..e86e352a1d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/AuthenticatedApiWithOAuth_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/AuthenticatedApiWithOAuth_spec.ts @@ -1,11 +1,10 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; //import * as _ from "@ObjectsCore"; -describe("Authentiacted Api with OAuth 2.O authorization code test cases", function() { - it("1. Create & Save an Authenticated API with OAuth 2.O authorization code", function() { - +describe("Authentiacted Api with OAuth 2.O authorization code test cases", function () { + it("1. Create & Save an Authenticated API with OAuth 2.O authorization code", function () { // Create OAuth client - cy.fixture("datasources").then((datasourceFormData : any) => { + cy.fixture("datasources").then((datasourceFormData: any) => { _.dataSources.CreateOAuthClient("authorization_code"); // Create datasource _.agHelper.GenerateUUID(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/DSAutosaveImprovements_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/DSAutosaveImprovements_spec.ts index 2e72cfdd53..1194d73f88 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/DSAutosaveImprovements_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/DSAutosaveImprovements_spec.ts @@ -5,7 +5,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, let dsName: any; -describe("Datasource Autosave Improvements Tests", function() { +describe("Datasource Autosave Improvements Tests", function () { it("1. Test to verify that delete button is disabled when datasource is in temporary state.", () => { dataSources.NavigateToDSCreateNew(); agHelper.GenerateUUID(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/DatasourceForm_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/DatasourceForm_spec.js index fde1ed4a38..f447198959 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/DatasourceForm_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/DatasourceForm_spec.js @@ -6,27 +6,23 @@ let agHelper = ObjectsRegistry.AggregateHelper, locator = ObjectsRegistry.CommonLocators, ee = ObjectsRegistry.EntityExplorer; -describe("Datasource form related tests", function() { +describe("Datasource form related tests", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Check whether the number of key value pairs is equal to number of delete buttons", function() { + it("1. Check whether the number of key value pairs is equal to number of delete buttons", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI(); //Not giving name to enable for cypress re-attempt cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods); - cy.get(".t--store-as-datasource") - .trigger("click") - .wait(1000); + cy.get(".t--store-as-datasource").trigger("click").wait(1000); agHelper.AssertElementAbsence( locator._specificToast("Duplicate key error"), ); //verifying there is no error toast, Bug 14566 - cy.get(".t--add-field") - .first() - .click(); + cy.get(".t--add-field").first().click(); // Two array pairs for headers key,value should have 2 delete buttons as per new uqi designs, so the first header can also be deleted : Bug #14804 cy.get(".t--headers-array .t--delete-field") @@ -34,17 +30,15 @@ describe("Datasource form related tests", function() { .should("have.length", 2); }); - it("2. Check if save button is disabled", function() { + it("2. Check if save button is disabled", function () { cy.get(".t--save-datasource").should("not.be.disabled"); dataSource.SaveDSFromDialog(); }); - it("3. Check if saved api as a datasource does not fail on cloning", function() { + it("3. Check if saved api as a datasource does not fail on cloning", function () { cy.NavigateToAPI_Panel(); ee.ExpandCollapseEntity("Queries/JS"); - cy.get(".t--entity-name") - .contains("Api") - .trigger("mouseover"); + cy.get(".t--entity-name").contains("Api").trigger("mouseover"); cy.hoverAndClickParticularIndex(1); cy.get('.single-select:contains("Copy to page")').click(); cy.get('.single-select:contains("Page1")').click({ force: true }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/ElasticSearchDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/ElasticSearchDatasource_spec.js index b1faffde40..d7c972a937 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/ElasticSearchDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/ElasticSearchDatasource_spec.js @@ -4,12 +4,12 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let elasticSearchName; let dataSource = ObjectsRegistry.DataSources; -describe("Elastic search datasource tests", function() { +describe("Elastic search datasource tests", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create elastic search datasource", function() { + it("1. Create elastic search datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.ElasticSearch).trigger("click", { force: true }); cy.generateUUID().then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/FirestoreStub_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/FirestoreStub_Spec.ts index a70fa675b5..b6cf2d902a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/FirestoreStub_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/FirestoreStub_Spec.ts @@ -3,11 +3,11 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSources = ObjectsRegistry.DataSources, agHelper = ObjectsRegistry.AggregateHelper; -describe("Firestore stub", function() { +describe("Firestore stub", function () { before(() => { dataSources.StartInterceptRoutesForFirestore(); }); - it("1. Create, test, save then delete a Firestore datasource", function() { + it("1. Create, test, save then delete a Firestore datasource", function () { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("Firestore"); agHelper.RenameWithInPane("Firestore-Stub", false); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/GoogleSheetsStub_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/GoogleSheetsStub_spec.ts index af423e234a..4e5f412771 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/GoogleSheetsStub_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/GoogleSheetsStub_spec.ts @@ -3,8 +3,8 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSources = ObjectsRegistry.DataSources, agHelper = ObjectsRegistry.AggregateHelper; -describe("Google Sheets datasource test cases", function() { - it("1. Create Google Sheets datasource", function() { +describe("Google Sheets datasource test cases", function () { + it("1. Create Google Sheets datasource", function () { cy.intercept("GET", "/api/v1/users/features", { fixture: "featureFlags.json", }).as("featureFlags"); @@ -21,7 +21,7 @@ describe("Google Sheets datasource test cases", function() { function VerifyFunctionDropdown(scopeOptions: string[]) { agHelper.GetNClick(dataSources._gsScopeDropdown); - cy.get(dataSources._gsScopeOptions).then(function($ele) { + cy.get(dataSources._gsScopeOptions).then(function ($ele) { expect($ele.eq(0).text()).to.be.oneOf(scopeOptions); expect($ele.eq(1).text()).to.be.oneOf(scopeOptions); expect($ele.eq(2).text()).to.be.oneOf(scopeOptions); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/GraphQL_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/GraphQL_spec.ts index 065e5a0cb4..4b186951e9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/GraphQL_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/GraphQL_spec.ts @@ -39,7 +39,7 @@ const GRAPHQL_LIMIT_DATA = [ }, ]; -describe("GraphQL Datasource Implementation", function() { +describe("GraphQL Datasource Implementation", function () { before(() => { appName = localStorage.getItem("AppName") || ""; _.agHelper.GenerateUUID(); @@ -50,7 +50,7 @@ describe("GraphQL Datasource Implementation", function() { _.dataSources.CreateDataSource("UnAuthenticatedGraphQL"); }); - it("1. Should execute the API and validate the response", function() { + it("1. Should execute the API and validate the response", function () { _.apiPage.SelectPaneTab("Body"); _.dataSources.UpdateGraphqlQueryAndVariable({ query: GRAPHQL_QUERY, @@ -64,7 +64,7 @@ describe("GraphQL Datasource Implementation", function() { _.agHelper.ActionContextMenuWithInPane("Delete"); }); - it("2. Pagination for limit based should work without offset", function() { + it("2. Pagination for limit based should work without offset", function () { /* Create an API */ _.dataSources.CreateDataSource("UnAuthenticatedGraphQL"); _.apiPage.SelectPaneTab("Body"); @@ -92,7 +92,7 @@ describe("GraphQL Datasource Implementation", function() { _.agHelper.ActionContextMenuWithInPane("Delete"); }); - it("3. Pagination for limit based should work with offset", function() { + it("3. Pagination for limit based should work with offset", function () { /* Create an API */ _.dataSources.CreateDataSource("UnAuthenticatedGraphQL"); _.apiPage.SelectPaneTab("Body"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MongoDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MongoDatasource_spec.js index d124e21a1c..0b7c3d93d3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MongoDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MongoDatasource_spec.js @@ -1,18 +1,18 @@ const datasource = require("../../../../locators/DatasourcesEditor.json"); -describe("Create, test, save then delete a mongo datasource", function() { +describe("Create, test, save then delete a mongo datasource", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create, test, save then delete a mongo datasource", function() { + it("1. Create, test, save then delete a mongo datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MongoDB).click(); cy.fillMongoDatasourceForm(); cy.testSaveDeleteDatasource(); }); - it("2. Create with trailing white spaces in host address and database name, test, save then delete a mongo datasource", function() { + it("2. Create with trailing white spaces in host address and database name, test, save then delete a mongo datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MongoDB).click(); cy.fillMongoDatasourceForm(true); //fills form with trailing white spaces diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MsSQLDataSourceStub_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MsSQLDataSourceStub_spec.js index cbc7807f9f..f32bb2bb05 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MsSQLDataSourceStub_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MsSQLDataSourceStub_spec.js @@ -4,12 +4,12 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSource = ObjectsRegistry.DataSources; let datasourceName; -describe("MsSQL datasource test cases", function() { +describe("MsSQL datasource test cases", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create, test, save then delete a MsSQL datasource", function() { + it("1. Create, test, save then delete a MsSQL datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MsSQL).click(); cy.fillMsSQLDatasourceForm(); @@ -24,7 +24,7 @@ describe("MsSQL datasource test cases", function() { }); }); - it("2. Create with trailing white spaces in host address and database name, test, save then delete a MsSQL datasource", function() { + it("2. Create with trailing white spaces in host address and database name, test, save then delete a MsSQL datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MsSQL).click(); cy.fillMsSQLDatasourceForm(true); @@ -39,10 +39,8 @@ describe("MsSQL datasource test cases", function() { }); }); - it("3. Create a new query from the datasource editor", function() { - cy.get(datasource.createQuery) - .last() - .click(); + it("3. Create a new query from the datasource editor", function () { + cy.get(datasource.createQuery).last().click(); cy.wait("@createNewApi").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQLDataSourceStub_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQLDataSourceStub_spec.js index 6059221283..4ce41b1b21 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQLDataSourceStub_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQLDataSourceStub_spec.js @@ -4,12 +4,12 @@ let dataSource = ObjectsRegistry.DataSources; let datasourceName; -describe("MySQL datasource test cases", function() { +describe("MySQL datasource test cases", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create, test, save then delete a MySQL datasource", function() { + it("1. Create, test, save then delete a MySQL datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MySQL).click(); cy.fillMySQLDatasourceForm(); @@ -24,7 +24,7 @@ describe("MySQL datasource test cases", function() { }); }); - it("2. Create with trailing white spaces in host address and database name, test, save then delete a MySQL datasource", function() { + it("2. Create with trailing white spaces in host address and database name, test, save then delete a MySQL datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MySQL).click(); cy.fillMySQLDatasourceForm(true); @@ -39,10 +39,8 @@ describe("MySQL datasource test cases", function() { }); }); - it("3. Create a new query from the datasource editor", function() { - cy.get(datasource.createQuery) - .last() - .click(); + it("3. Create a new query from the datasource editor", function () { + cy.get(datasource.createQuery).last().click(); cy.wait("@createNewApi").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQLNoiseTest_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQLNoiseTest_spec.js index 47403d961e..50dfbdd91b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQLNoiseTest_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQLNoiseTest_spec.js @@ -3,7 +3,7 @@ const datasourceEditor = require("../../../../locators/DatasourcesEditor.json"); const dsl = require("../../../../fixtures/noiseDsl.json"); const commonlocators = require("../../../../locators/commonlocators.json"); -describe("MySQL noise test", function() { +describe("MySQL noise test", function () { let datasourceName; beforeEach(() => { @@ -11,7 +11,7 @@ describe("MySQL noise test", function() { cy.startRoutesForDatasource(); }); - it("Verify after killing MySQL session, app should not crash", function() { + it("Verify after killing MySQL session, app should not crash", function () { cy.NavigateToDatasourceEditor(); cy.get(datasourceEditor.MySQL).click(); cy.generateUUID().then((uid) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQL_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQL_spec.js index 0904b14ba2..311df56444 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQL_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/MySQL_spec.js @@ -4,12 +4,12 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSource = ObjectsRegistry.DataSources; let datasourceName; -describe("MySQL datasource test cases", function() { +describe("MySQL datasource test cases", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create, test, save then delete a MySQL datasource", function() { + it("1. Create, test, save then delete a MySQL datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MySQL).click(); cy.fillMySQLDatasourceForm(); @@ -21,7 +21,7 @@ describe("MySQL datasource test cases", function() { }); }); - it("2. Create with trailing white spaces in host address and database name, test, save then delete a MySQL datasource", function() { + it("2. Create with trailing white spaces in host address and database name, test, save then delete a MySQL datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MySQL).click(); cy.fillMySQLDatasourceForm(true); @@ -32,11 +32,9 @@ describe("MySQL datasource test cases", function() { cy.testSaveDatasource(); }); - it("3. Create a new query from the datasource editor", function() { + it("3. Create a new query from the datasource editor", function () { // cy.get(datasource.createQuery).click(); - cy.get(datasource.createQuery) - .last() - .click(); + cy.get(datasource.createQuery).last().click(); cy.wait("@createNewApi").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/PostgresDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/PostgresDatasource_spec.js index dd8ffe9555..88dead88fa 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/PostgresDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/PostgresDatasource_spec.js @@ -4,12 +4,12 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let dataSource = ObjectsRegistry.DataSources; let datasourceName; -describe("Postgres datasource test cases", function() { +describe("Postgres datasource test cases", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create, test, save then delete a postgres datasource", function() { + it("1. Create, test, save then delete a postgres datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); cy.fillPostgresDatasourceForm(); @@ -22,7 +22,7 @@ describe("Postgres datasource test cases", function() { }); }); - it("2. Create with trailing white spaces in host address and database name, test, save then delete a postgres datasource", function() { + it("2. Create with trailing white spaces in host address and database name, test, save then delete a postgres datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); cy.fillPostgresDatasourceForm(true); @@ -34,10 +34,8 @@ describe("Postgres datasource test cases", function() { }); }); - it("3. Create a new query from the datasource editor", function() { - cy.get(datasource.createQuery) - .last() - .click(); + it("3. Create a new query from the datasource editor", function () { + cy.get(datasource.createQuery).last().click(); cy.wait("@createNewApi").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RedshiftDataSourceStub_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RedshiftDataSourceStub_spec.js index ff16f19020..7deec46a7a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RedshiftDataSourceStub_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RedshiftDataSourceStub_spec.js @@ -1,12 +1,12 @@ const datasource = require("../../../../locators/DatasourcesEditor.json"); let datasourceName; -describe("Redshift datasource test cases", function() { +describe("Redshift datasource test cases", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create, test, save then delete a Redshift datasource", function() { + it("1. Create, test, save then delete a Redshift datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.Redshift).click(); cy.fillRedshiftDatasourceForm(); @@ -20,7 +20,7 @@ describe("Redshift datasource test cases", function() { cy.testSaveDatasource(false); }); - it("2. Create with trailing white spaces in host address and database name, test, save then delete a Redshift datasource", function() { + it("2. Create with trailing white spaces in host address and database name, test, save then delete a Redshift datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.Redshift).click(); cy.fillRedshiftDatasourceForm(true); @@ -35,10 +35,8 @@ describe("Redshift datasource test cases", function() { cy.deleteDatasource(datasourceName); }); - it("3. Create a new query from the datasource editor", function() { - cy.get(datasource.createQuery) - .last() - .click(); + it("3. Create a new query from the datasource editor", function () { + cy.get(datasource.createQuery).last().click(); cy.wait("@createNewApi").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RestApiDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RestApiDatasource_spec.js index 20e7f3bb03..ec96e07d11 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RestApiDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RestApiDatasource_spec.js @@ -4,19 +4,17 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let agHelper = ObjectsRegistry.AggregateHelper, locator = ObjectsRegistry.CommonLocators; -describe("Create a rest datasource", function() { +describe("Create a rest datasource", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("Create a rest datasource + Bug 14566", function() { + it("Create a rest datasource + Bug 14566", function () { cy.NavigateToAPI_Panel(); cy.CreateAPI(); cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods); cy.assertPageSave(); - cy.get(".t--store-as-datasource") - .trigger("click") - .wait(1000); + cy.get(".t--store-as-datasource").trigger("click").wait(1000); agHelper.AssertElementAbsence( locator._specificToast("Duplicate key error"), ); //verifying there is no error toast, Bug 14566 diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RestApiOAuth2Validation_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RestApiOAuth2Validation_spec.js index 52d43ccdcb..c5700cc017 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RestApiOAuth2Validation_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/RestApiOAuth2Validation_spec.js @@ -8,14 +8,14 @@ let agHelper = ObjectsRegistry.AggregateHelper, ee = ObjectsRegistry.EntityExplorer, datasources = ObjectsRegistry.DataSources; -describe("Datasource form OAuth2 client credentials related tests", function() { - it("1. Create an API with app url and save as Datasource for Client Credentials test", function() { +describe("Datasource form OAuth2 client credentials related tests", function () { + it("1. Create an API with app url and save as Datasource for Client Credentials test", function () { apiPage.CreateAndFillApi(testdata.appUrl, "TestOAuth"); agHelper.GetNClick(apiPage._saveAsDS); // agHelper.ValidateToastMessage("datasource created"); //verifying there is no error toast, Bug 14566 }); - it("2. Add Oauth details to datasource and save", function() { + it("2. Add Oauth details to datasource and save", function () { cy.get(datasource.saveBtn).should("not.be.disabled"); cy.addOAuth2ClientCredentialsDetails( testdata.accessTokenUrl, @@ -32,13 +32,13 @@ describe("Datasource form OAuth2 client credentials related tests", function() { agHelper.ActionContextMenuWithInPane("Delete", "Are you sure?"); }); - it("3. Create an API with app url and save as Datasource for Authorization code details test", function() { + it("3. Create an API with app url and save as Datasource for Authorization code details test", function () { apiPage.CreateAndFillApi(testdata.appUrl, "TestOAuth"); agHelper.GetNClick(apiPage._saveAsDS); // agHelper.ValidateToastMessage("datasource created"); //verifying there is no error toast, Bug 14566 }); - it("4. Add Oauth details to datasource and save", function() { + it("4. Add Oauth details to datasource and save", function () { cy.get(datasource.saveBtn).should("not.be.disabled"); cy.addOAuth2AuthorizationCodeDetails( testdata.accessTokenUrl, @@ -48,7 +48,7 @@ describe("Datasource form OAuth2 client credentials related tests", function() { ); }); - it("5. Validate save and Authorise", function() { + it("5. Validate save and Authorise", function () { cy.get(datasource.saveAndAuthorize).click(); cy.contains("#login-submit", "Login"); cy.url().should("include", "oauth.mocklab.io/oauth/authorize"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/SMTPDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/SMTPDatasource_spec.js index 67a7287cb8..f577af59f3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/SMTPDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/SMTPDatasource_spec.js @@ -4,7 +4,7 @@ const queryLocators = require("../../../../locators/QueryEditor.json"); const dsl = require("../../../../fixtures/SMTPTestdsl.json"); let datasourceName; -describe("SMTP datasource test cases using ted", function() { +describe("SMTP datasource test cases using ted", function () { let SMTPDatasourceName; beforeEach(() => { cy.startRoutesForDatasource(); @@ -13,7 +13,7 @@ describe("SMTP datasource test cases using ted", function() { cy.addDsl(dsl); }); - it("1. Create and configure smtp datasource and query, binding widgets to query fields", function() { + it("1. Create and configure smtp datasource and query, binding widgets to query fields", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.SMTP).click(); cy.generateUUID().then((uid) => { @@ -53,14 +53,10 @@ describe("SMTP datasource test cases using ted", function() { cy.wait(2000); }); - it("2. On canvas, passing wrong email address in widgets should give error", function() { + it("2. On canvas, passing wrong email address in widgets should give error", function () { // verify an error is thrown when recipient address is not added - cy.xpath("//input[@class='bp3-input']") - .eq(0) - .type("test@appsmith.com"); - cy.get("span.bp3-button-text:contains('Run query')") - .closest("div") - .click(); + cy.xpath("//input[@class='bp3-input']").eq(0).type("test@appsmith.com"); + cy.get("span.bp3-button-text:contains('Run query')").closest("div").click(); cy.wait("@postExecute").then(({ response }) => { expect(response.body.data.statusCode).to.eq("PE-ARG-5000"); expect(response.body.data.body).to.contain( @@ -68,15 +64,9 @@ describe("SMTP datasource test cases using ted", function() { ); }); // verify an error is thrown when sender address is not added - cy.xpath("//input[@class='bp3-input']") - .eq(0) - .clear(); - cy.xpath("//input[@class='bp3-input']") - .eq(1) - .type("qwerty@appsmith.com"); - cy.get("span.bp3-button-text:contains('Run query')") - .closest("div") - .click(); + cy.xpath("//input[@class='bp3-input']").eq(0).clear(); + cy.xpath("//input[@class='bp3-input']").eq(1).type("qwerty@appsmith.com"); + cy.get("span.bp3-button-text:contains('Run query')").closest("div").click(); cy.wait("@postExecute").then(({ response }) => { expect(response.body.data.statusCode).to.eq("PE-ARG-5000"); expect(response.body.data.body).to.contain( diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/Styles_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/Styles_spec.js index 126abb6907..a8a0d406a1 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/Styles_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datasources/Styles_spec.js @@ -1,7 +1,7 @@ import HomePage from "../../../../locators/HomePage"; const pages = require("../../../../locators/Pages.json"); -describe("Validate Datasource Panel Styles", function() { +describe("Validate Datasource Panel Styles", function () { const backgroundColorGray900 = "rgb(25, 25, 25)"; const backgroundColorGray700 = "rgb(87, 87, 87)"; const backgroundColorGray1 = "rgb(250, 250, 250)"; @@ -152,9 +152,7 @@ describe("Validate Datasource Panel Styles", function() { after(() => { //Delete Datasource - cy.get(".t--datasource-menu-option") - .eq(0) - .click(); + cy.get(".t--datasource-menu-option").eq(0).click(); cy.get(".t--datasource-option-delete").click(); cy.get(".t--datasource-option-delete").click(); //Delete Application @@ -162,8 +160,6 @@ describe("Validate Datasource Panel Styles", function() { cy.get(".t--application-edit-menu li") .contains("Delete Application") .click(); - cy.get(".t--application-edit-menu li") - .contains("Are you sure?") - .click(); + cy.get(".t--application-edit-menu li").contains("Are you sure?").click(); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datatypes/MySQL_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datatypes/MySQL_Spec.ts index b32f6b47f6..7a2e61133e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datatypes/MySQL_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datatypes/MySQL_Spec.ts @@ -10,7 +10,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, appSettings = ObjectsRegistry.AppSettings; -describe("MySQL Datatype tests", function() { +describe("MySQL Datatype tests", function () { before(() => { cy.fixture("Datatypes/mySQLdsl").then((val: any) => { agHelper.AddDsl(val); @@ -18,7 +18,7 @@ describe("MySQL Datatype tests", function() { appSettings.OpenPaneAndChangeTheme("Moon"); }); - it("1. Create Mysql DS", function() { + it("1. Create Mysql DS", function () { dataSources.CreateDataSource("MySql"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; @@ -88,7 +88,7 @@ describe("MySQL Datatype tests", function() { cy.wait(2000); inputData.result.forEach((res_array, i) => { res_array.forEach((value, j) => { - table.ReadTableRowColumnData(j, i, "v1",0).then(($cellData) => { + table.ReadTableRowColumnData(j, i, "v1", 0).then(($cellData) => { if (i === inputData.result.length - 1) { const obj = JSON.parse($cellData); expect(JSON.stringify(obj)).to.eq(JSON.stringify(value)); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datatypes/MySQL_false_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datatypes/MySQL_false_Spec.ts index 3f9b344174..e88ebd4aad 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datatypes/MySQL_false_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Datatypes/MySQL_false_Spec.ts @@ -10,8 +10,8 @@ const agHelper = ObjectsRegistry.AggregateHelper, locator = ObjectsRegistry.CommonLocators, deployMode = ObjectsRegistry.DeployMode; -describe("MySQL Datatype tests", function() { - it("1. Create Mysql DS", function() { +describe("MySQL Datatype tests", function () { + it("1. Create Mysql DS", function () { dataSources.CreateDataSource("MySql"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Mongo_Spec.ts index a52e3998ed..de6c9715d9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Mongo_Spec.ts @@ -16,7 +16,7 @@ describe("Validate Mongo CRUD with JSON Form", () => { //dataSources.StartDataSourceRoutes(); //already started in index.js beforeeach }); - beforeEach(function() { + beforeEach(function () { if (INTERCEPT.MONGO) { cy.log("Mongo DB is not found. Using intercept"); dataSources.StartInterceptRoutesForMongo(); @@ -62,7 +62,7 @@ describe("Validate Mongo CRUD with JSON Form", () => { // agHelper.NavigateBacktoEditor(); }); - it("2. Generate CRUD page from datasource present in ACTIVE section", function() { + it("2. Generate CRUD page from datasource present in ACTIVE section", function () { dataSources.NavigateFromActiveDS(dsName, false); agHelper.ValidateNetworkStatus("@getDatasourceStructure"); agHelper.GetNClick(dataSources._selectTableDropdown); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL1_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL1_Spec.ts index 1fc1de7299..2a009993d4 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL1_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL1_Spec.ts @@ -89,7 +89,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { }); }); - it("3. Generate CRUD page from datasource present in ACTIVE section", function() { + it("3. Generate CRUD page from datasource present in ACTIVE section", function () { dataSources.NavigateFromActiveDS(dsName, false); agHelper.ValidateNetworkStatus("@getDatasourceStructure"); agHelper.GetNClick(dataSources._selectTableDropdown); @@ -169,25 +169,25 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { //Validating loaded table agHelper.AssertElementExist(dataSources._selectedRow); - table.ReadTableRowColumnData(0, 0,"v1", 2000).then(($cellData) => { + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq("Classic Cars"); }); - table.ReadTableRowColumnData(1, 0,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(1, 0, "v1", 200).then(($cellData) => { expect($cellData).to.eq("Motorcycles"); }); - table.ReadTableRowColumnData(2, 0,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(2, 0, "v1", 200).then(($cellData) => { expect($cellData).to.eq("Planes"); }); - table.ReadTableRowColumnData(3, 0,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(3, 0, "v1", 200).then(($cellData) => { expect($cellData).to.eq("Ships"); }); - table.ReadTableRowColumnData(4, 0, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(4, 0, "v1", 200).then(($cellData) => { expect($cellData).to.eq("Trains"); }); - table.ReadTableRowColumnData(5, 0,"v1",200).then(($cellData) => { + table.ReadTableRowColumnData(5, 0, "v1", 200).then(($cellData) => { expect($cellData).to.eq("Trucks and Buses"); }); - table.ReadTableRowColumnData(6, 0,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(6, 0, "v1", 200).then(($cellData) => { expect($cellData).to.eq("Vintage Cars"); }); //Validating loaded JSON form @@ -233,7 +233,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { table.AssertSelectedRow(3); //validating update happened fine! - table.ReadTableRowColumnData(3, 2,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(3, 2, "v1", 200).then(($cellData) => { expect($cellData).to.eq( "The largest cruise ship is twice the length of the Washington Monument. Some cruise ships have virtual balconies.", ); @@ -268,7 +268,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { agHelper.AssertElementAbsence(ee._entityNameInExplorer("Stores")); }); - it("10. Verify application does not break when user runs the query with wrong table name", function() { + it("10. Verify application does not break when user runs the query with wrong table name", function () { ee.SelectEntityByName("DropProductlines", "Queries/JS"); dataSources.RunQuery(false); cy.wait("@postExecute").then(({ response }) => { @@ -303,13 +303,13 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { //Validating loaded table agHelper.AssertElementExist(dataSources._selectedRow); - table.ReadTableRowColumnData(0, 0,"v1", 2000).then(($cellData) => { + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq(col1Text); }); - table.ReadTableRowColumnData(0, 1,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { expect($cellData).to.eq(col2Text); }); - table.ReadTableRowColumnData(0, 2,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(0, 2, "v1", 200).then(($cellData) => { expect($cellData).to.eq(col3Text); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL2_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL2_Spec.ts index 5ec33b5b0a..c2e5c2d912 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL2_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL2_Spec.ts @@ -184,14 +184,14 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { agHelper.GetNClick(dataSources._refreshIcon); //Store Address deletion remains - table.ReadTableRowColumnData(4, 3,"v1", 2000).then(($cellData) => { + table.ReadTableRowColumnData(4, 3, "v1", 2000).then(($cellData) => { expect($cellData).to.eq(""); }); - table.ReadTableRowColumnData(7, 3,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(7, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq(""); }); - table.ReadTableRowColumnData(5, 0,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(5, 0, "v1", 200).then(($cellData) => { expect($cellData).not.eq("2132"); //Deleted record Store_ID }); @@ -320,7 +320,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { agHelper.ValidateNetworkStatus("@postExecute", 200); agHelper.Sleep(3000); //for Delete to reflect! table.AssertSelectedRow(0); //Control going back to 1st row in table - table.ReadTableRowColumnData(0, 0,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(0, 0, "v1", 200).then(($cellData) => { expect($cellData).not.eq("2105"); //Deleted record Store_ID }); }); @@ -376,13 +376,13 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { //Validating loaded table agHelper.AssertElementExist(dataSources._selectedRow); - table.ReadTableRowColumnData(0, 0,"v1", 2000).then(($cellData) => { + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq(col1Text); }); - table.ReadTableRowColumnData(0, 1,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { expect($cellData).to.eq(col2Text); }); - table.ReadTableRowColumnData(0, 2,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(0, 2, "v1", 200).then(($cellData) => { expect($cellData).to.eq(col3Text); }); @@ -400,18 +400,20 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { function generateStoresSecretInfo(rowIndex: number) { let secretInfo: string = ""; - table.ReadTableRowColumnData(rowIndex, 3,"v1", 200).then(($cellData: any) => { - var points = $cellData.match(/((.*))/).pop(); //(/(?<=\()).+?(?=\))/g) - let secretCode: string[] = (points as string).split(","); - secretCode[0] = secretCode[0].slice(0, 5); - secretCode[1] = secretCode[1].slice(0, 5); - secretInfo = secretCode[0] + secretCode[1]; - deployMode.EnterJSONInputValue("Store Secret Code", secretInfo); - cy.xpath(deployMode._jsonFormFieldByName("Store Secret Code", true)) - .invoke("attr", "type") - .should("eq", "password"); - cy.wrap(secretInfo).as("secretInfo"); - }); + table + .ReadTableRowColumnData(rowIndex, 3, "v1", 200) + .then(($cellData: any) => { + var points = $cellData.match(/((.*))/).pop(); //(/(?<=\()).+?(?=\))/g) + let secretCode: string[] = (points as string).split(","); + secretCode[0] = secretCode[0].slice(0, 5); + secretCode[1] = secretCode[1].slice(0, 5); + secretInfo = secretCode[0] + secretCode[1]; + deployMode.EnterJSONInputValue("Store Secret Code", secretInfo); + cy.xpath(deployMode._jsonFormFieldByName("Store Secret Code", true)) + .invoke("attr", "type") + .should("eq", "password"); + cy.wrap(secretInfo).as("secretInfo"); + }); } function updateNVerify( @@ -427,9 +429,11 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => { table.AssertSelectedRow(rowIndex); //validating update happened fine! - table.ReadTableRowColumnData(rowIndex, colIndex,"v1", 200).then(($cellData) => { - expect($cellData).to.eq(expectedTableData); - }); + table + .ReadTableRowColumnData(rowIndex, colIndex, "v1", 200) + .then(($cellData) => { + expect($cellData).to.eq(expectedTableData); + }); } function updatingStoreJSONPropertyFileds() { diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres1_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres1_Spec.ts index b6bd914631..d0d9d53751 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres1_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres1_Spec.ts @@ -80,7 +80,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { appSettings.OpenPaneAndChangeTheme("Sunrise"); }); - it("3. Generate CRUD page from datasource present in ACTIVE section", function() { + it("3. Generate CRUD page from datasource present in ACTIVE section", function () { dataSources.NavigateFromActiveDS(dsName, false); agHelper.ValidateNetworkStatus("@getDatasourceStructure"); agHelper.GetNClick(dataSources._selectTableDropdown); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres2_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres2_Spec.ts index 8141c6978c..397ddc85dd 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres2_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres2_Spec.ts @@ -622,7 +622,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { agHelper.AssertElementAbsence(ee._entityNameInExplorer("public.vessels")); }); - it("18. Verify application does not break when user runs the query with wrong table name", function() { + it("18. Verify application does not break when user runs the query with wrong table name", function () { ee.SelectEntityByName("DropVessels", "Queries/JS"); dataSources.RunQuery(false); cy.wait("@postExecute").then(({ response }) => { @@ -658,7 +658,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => { //Validating loaded table agHelper.AssertElementExist(dataSources._selectedRow); - table.ReadTableRowColumnData(0, 1,"v1", 4000).then(($cellData) => { + table.ReadTableRowColumnData(0, 1, "v1", 4000).then(($cellData) => { expect($cellData).to.eq(col1Text); }); table.ReadTableRowColumnData(0, 3, "v1", 200).then(($cellData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/S3_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/S3_Spec.js index c8e2c0454f..1ebb28a78a 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/S3_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/S3_Spec.js @@ -8,7 +8,7 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let ee = ObjectsRegistry.EntityExplorer; -describe("Generate New CRUD Page Inside from entity explorer", function() { +describe("Generate New CRUD Page Inside from entity explorer", function () { let datasourceName; beforeEach(() => { @@ -16,11 +16,9 @@ describe("Generate New CRUD Page Inside from entity explorer", function() { cy.startInterceptRoutesForS3(); }); - it("1. Create new app and Generate CRUD page using a new datasource", function() { + it("1. Create new app and Generate CRUD page using a new datasource", function () { cy.NavigateToHome(); - cy.get(homePage.createNew) - .first() - .click({ force: true }); + cy.get(homePage.createNew).first().click({ force: true }); cy.wait("@createNewApplication").should( "have.nested.property", @@ -83,7 +81,7 @@ describe("Generate New CRUD Page Inside from entity explorer", function() { cy.get("span:contains('GOT IT')").click(); }); - it("2. Generate CRUD page from datasource ACTIVE section", function() { + it("2. Generate CRUD page from datasource ACTIVE section", function () { // cy.NavigateToQueryEditor(); // cy.get(pages.integrationActiveTab) // .should("be.visible") @@ -135,11 +133,9 @@ describe("Generate New CRUD Page Inside from entity explorer", function() { cy.get("span:contains('GOT IT')").click(); }); - it("3. Add new Page and generate CRUD template using existing supported datasource & Bug 9649", function() { + it("3. Add new Page and generate CRUD template using existing supported datasource & Bug 9649", function () { cy.NavigateToDatasourceEditor(); - cy.get(datasourceEditor.AmazonS3) - .click({ force: true }) - .wait(1000); + cy.get(datasourceEditor.AmazonS3).click({ force: true }).wait(1000); cy.generateUUID().then((uid) => { datasourceName = `Amazon S3 MOCKDS ${uid}`; @@ -181,9 +177,7 @@ describe("Generate New CRUD Page Inside from entity explorer", function() { cy.get("@dSName").then((dbName) => { ee.AddNewPage("generate-page"); cy.get(generatePage.selectDatasourceDropdown).click(); - cy.get(generatePage.datasourceDropdownOption) - .contains(dbName) - .click(); + cy.get(generatePage.datasourceDropdownOption).contains(dbName).click(); }); // fetch bucket @@ -249,7 +243,7 @@ describe("Generate New CRUD Page Inside from entity explorer", function() { //cy.isNotInViewport("//div[text()='No data to display']") }); - it("4. Generate CRUD page from the page menu", function() { + it("4. Generate CRUD page from the page menu", function () { cy.GenerateCRUD(); cy.NavigateToDSGeneratePage(datasourceName); // fetch bucket diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/Fetch_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/Fetch_Spec.ts index 2c24578136..4d1b0f160f 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/Fetch_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/Fetch_Spec.ts @@ -6,7 +6,7 @@ const propertyPaneHelper = ObjectsRegistry.PropertyPane; const aggregateHelper = ObjectsRegistry.AggregateHelper; describe("Tests fetch calls", () => { - it("1. Ensures that cookies are not passed with fetch calls", function() { + it("1. Ensures that cookies are not passed with fetch calls", function () { jsEditor.CreateJSObject( `export default { myVar1: [], @@ -39,7 +39,7 @@ describe("Tests fetch calls", () => { jsEditor.RunJSObj(); agHelper.AssertContains("anonymousUser", "exist"); }); - it("2. Tests if fetch works with setTimeout", function() { + it("2. Tests if fetch works with setTimeout", function () { jsEditor.CreateJSObject( `export default { myVar1: [], @@ -72,7 +72,7 @@ describe("Tests fetch calls", () => { agHelper.AssertContains("anonymousUser", "exist"); }); - it("3. Tests if fetch works with store value", function() { + it("3. Tests if fetch works with store value", function () { explorerHelper.NavigateToSwitcher("widgets"); explorerHelper.DragDropWidgetNVerify("buttonwidget", 500, 200); explorerHelper.SelectEntityByName("Button1"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/JSFunctionExecution_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/JSFunctionExecution_spec.ts index 4d18360ebf..b73d367583 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/JSFunctionExecution_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/JSFunctionExecution_spec.ts @@ -14,7 +14,7 @@ let onPageLoadAndConfirmExecuteFunctionsLength: number, functionsLength: number, jsObj: string; -describe("JS Function Execution", function() { +describe("JS Function Execution", function () { interface IFunctionSettingData { name: string; onPageLoad: boolean; @@ -59,7 +59,7 @@ describe("JS Function Execution", function() { // sorts functions alphabetically const sortFunctions = (data: IFunctionSettingData[]) => data.sort((a, b) => a.name.localeCompare(b.name)); - cy.get(jsEditor._asyncJSFunctionSettings).then(function($lis) { + cy.get(jsEditor._asyncJSFunctionSettings).then(function ($lis) { const asyncFunctionLength = $lis.length; // Assert number of async functions expect(asyncFunctionLength).to.equal(functionsLength); @@ -72,7 +72,7 @@ describe("JS Function Execution", function() { }); } - it("1. Allows execution of js function when lint warnings(not errors) are present in code", function() { + it("1. Allows execution of js function when lint warnings(not errors) are present in code", function () { jsEditor.CreateJSObject( `export default { myFun1: ()=>{ @@ -93,7 +93,7 @@ describe("JS Function Execution", function() { agHelper.ActionContextMenuWithInPane("Delete", "", true); }); - it("2. Prevents execution of js function when parse errors are present in code", function() { + it("2. Prevents execution of js function when parse errors are present in code", function () { jsEditor.CreateJSObject( `export default { myFun1: ()=>>{ @@ -113,7 +113,7 @@ describe("JS Function Execution", function() { agHelper.ActionContextMenuWithInPane("Delete", "", true); }); - it("3. Prioritizes parse errors that render JS Object invalid over function execution parse errors in debugger callouts", function() { + it("3. Prioritizes parse errors that render JS Object invalid over function execution parse errors in debugger callouts", function () { const JSObjectWithFunctionExecutionParseErrors = `export default { myFun1 :()=>{ return f @@ -317,12 +317,13 @@ describe("JS Function Execution", function() { agHelper.ActionContextMenuWithInPane("Delete", "", true); }); - it("7. Maintains order of async functions in settings tab alphabetically at all times", function() { + it("7. Maintains order of async functions in settings tab alphabetically at all times", function () { functionsLength = FUNCTIONS_SETTINGS_DEFAULT_DATA.length; // Number of functions set to run on page load and should also confirm before execute - onPageLoadAndConfirmExecuteFunctionsLength = FUNCTIONS_SETTINGS_DEFAULT_DATA.filter( - (func) => func.onPageLoad && func.confirmBeforeExecute, - ).length; + onPageLoadAndConfirmExecuteFunctionsLength = + FUNCTIONS_SETTINGS_DEFAULT_DATA.filter( + (func) => func.onPageLoad && func.confirmBeforeExecute, + ).length; getJSObject = (data: IFunctionSettingData[]) => { let JS_OBJECT_BODY = `export default`; diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/PlatformFn_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/PlatformFn_spec.ts index 8c9430131a..df8b3b4488 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/PlatformFn_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/PlatformFn_spec.ts @@ -7,10 +7,10 @@ import { describe("Tests functionality of platform function", () => { it("1. Tests access to outer variable", () => { - cy.fixture("datasources").then((datasourceFormData : any) => { - apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "getAllUsers"); - jsEditor.CreateJSObject( - `export default { + cy.fixture("datasources").then((datasourceFormData: any) => { + apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "getAllUsers"); + jsEditor.CreateJSObject( + `export default { myFun1: () => { }, @@ -67,81 +67,83 @@ describe("Tests functionality of platform function", () => { showAlert("Hello").then(() => getAllUsers.run(() => showAlert("World"))); } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: false, - }, - ); - agHelper.Sleep(4000); - cy.url().then((url) => { - cy.visit(url, { - onBeforeLoad: (win) => { - const latitude = 48.71597183246423; - const longitude = 21.255670821215418; - cy.stub(win.navigator.geolocation, "getCurrentPosition").callsArgWith( - 0, - { - coords: { latitude, longitude }, - }, - ); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: false, }, - }); - - jsEditor.SelectFunctionDropdown("accessOuterVariableInsideGeoCb"); - jsEditor.RunJSObj(); - agHelper.AssertContains("Hello World from current position", "exist"); - - jsEditor.SelectFunctionDropdown("accessOuterVariableInsideSuccessCb"); - jsEditor.RunJSObj(); - agHelper.AssertContains("Hello World from success callback", "exist"); - jsEditor.SelectFunctionDropdown("accessOuterVariableInsideSetIntervalCb"); - jsEditor.RunJSObj(); - agHelper.AssertContains("Hello World from setInterval", "exist"); - jsEditor.SelectFunctionDropdown("accessSetIntervalFromSetTimeout"); - jsEditor.RunJSObj(); - agHelper.AssertContains( - "Hello World from setInterval inside setTimeout", - "exist", ); - jsEditor.SelectFunctionDropdown("executeTriggersOutsideReqResCycle"); - jsEditor.RunJSObj(); - agHelper.AssertContains("Hello", "exist"); - agHelper.AssertContains("World", "exist"); - - // Test for meta data - jsEditor.SelectFunctionDropdown("metaDataForSetTimeout"); - jsEditor.RunJSObj(); - debuggerHelper.ClickDebuggerIcon(); - agHelper.GetNClick(jsEditor._logsTab); - jsEditor.SelectFunctionDropdown("switchMetaData"); - jsEditor.RunJSObj(); agHelper.Sleep(4000); - debuggerHelper.filter("JSObject1.metaDataForSetTimeout"); - debuggerHelper.DoesConsoleLogExist("Hello from setTimeout"); + cy.url().then((url) => { + cy.visit(url, { + onBeforeLoad: (win) => { + const latitude = 48.71597183246423; + const longitude = 21.255670821215418; + cy.stub( + win.navigator.geolocation, + "getCurrentPosition", + ).callsArgWith(0, { + coords: { latitude, longitude }, + }); + }, + }); - jsEditor.SelectFunctionDropdown("metaDataForSetInterval"); - jsEditor.RunJSObj(); - debuggerHelper.ClickDebuggerIcon(); - agHelper.GetNClick(jsEditor._logsTab); - jsEditor.SelectFunctionDropdown("switchMetaData"); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); - debuggerHelper.filter("JSObject1.metaDataForSetInterval"); - debuggerHelper.DoesConsoleLogExist("Hello from setInterval"); + jsEditor.SelectFunctionDropdown("accessOuterVariableInsideGeoCb"); + jsEditor.RunJSObj(); + agHelper.AssertContains("Hello World from current position", "exist"); - jsEditor.SelectFunctionDropdown("metaDataApiTest"); - jsEditor.RunJSObj(); - debuggerHelper.ClickDebuggerIcon(); - agHelper.GetNClick(jsEditor._logsTab); - jsEditor.SelectFunctionDropdown("switchMetaData"); - jsEditor.RunJSObj(); - agHelper.Sleep(2000); - debuggerHelper.filter("JSObject1.metaDataApiTest"); - debuggerHelper.DoesConsoleLogExist("Hello from setTimeout inside API"); - }); + jsEditor.SelectFunctionDropdown("accessOuterVariableInsideSuccessCb"); + jsEditor.RunJSObj(); + agHelper.AssertContains("Hello World from success callback", "exist"); + jsEditor.SelectFunctionDropdown( + "accessOuterVariableInsideSetIntervalCb", + ); + jsEditor.RunJSObj(); + agHelper.AssertContains("Hello World from setInterval", "exist"); + jsEditor.SelectFunctionDropdown("accessSetIntervalFromSetTimeout"); + jsEditor.RunJSObj(); + agHelper.AssertContains( + "Hello World from setInterval inside setTimeout", + "exist", + ); + jsEditor.SelectFunctionDropdown("executeTriggersOutsideReqResCycle"); + jsEditor.RunJSObj(); + agHelper.AssertContains("Hello", "exist"); + agHelper.AssertContains("World", "exist"); + + // Test for meta data + jsEditor.SelectFunctionDropdown("metaDataForSetTimeout"); + jsEditor.RunJSObj(); + debuggerHelper.ClickDebuggerIcon(); + agHelper.GetNClick(jsEditor._logsTab); + jsEditor.SelectFunctionDropdown("switchMetaData"); + jsEditor.RunJSObj(); + agHelper.Sleep(4000); + debuggerHelper.filter("JSObject1.metaDataForSetTimeout"); + debuggerHelper.DoesConsoleLogExist("Hello from setTimeout"); + + jsEditor.SelectFunctionDropdown("metaDataForSetInterval"); + jsEditor.RunJSObj(); + debuggerHelper.ClickDebuggerIcon(); + agHelper.GetNClick(jsEditor._logsTab); + jsEditor.SelectFunctionDropdown("switchMetaData"); + jsEditor.RunJSObj(); + agHelper.Sleep(3000); + debuggerHelper.filter("JSObject1.metaDataForSetInterval"); + debuggerHelper.DoesConsoleLogExist("Hello from setInterval"); + + jsEditor.SelectFunctionDropdown("metaDataApiTest"); + jsEditor.RunJSObj(); + debuggerHelper.ClickDebuggerIcon(); + agHelper.GetNClick(jsEditor._logsTab); + jsEditor.SelectFunctionDropdown("switchMetaData"); + jsEditor.RunJSObj(); + agHelper.Sleep(2000); + debuggerHelper.filter("JSObject1.metaDataApiTest"); + debuggerHelper.DoesConsoleLogExist("Hello from setTimeout inside API"); + }); }); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/SetTimeout_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/SetTimeout_spec.ts index 7e63e1e883..35c80e4828 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/SetTimeout_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/JsFunctionExecution/SetTimeout_spec.ts @@ -5,9 +5,9 @@ const apiPage = ObjectsRegistry.ApiPage; const deployMode = ObjectsRegistry.DeployMode; const debuggerHelper = ObjectsRegistry.DebuggerHelper; -let userName : string; +let userName: string; -describe("Tests setTimeout API", function() { +describe("Tests setTimeout API", function () { it("1. Executes showAlert after 3 seconds and uses default value", () => { jsEditor.CreateJSObject( `export default { @@ -146,10 +146,10 @@ describe("Tests setTimeout API", function() { }); it("6. Access to args passed into success/error callback functions in API.run when using setTimeout", () => { - cy.fixture("datasources").then((datasourceFormData : any) => { - apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); - jsEditor.CreateJSObject( - `export default { + cy.fixture("datasources").then((datasourceFormData: any) => { + apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"]); + jsEditor.CreateJSObject( + `export default { myVar1: [], myVar2: {}, myFun1: (x) => { @@ -169,34 +169,39 @@ describe("Tests setTimeout API", function() { }); } }`, - { - paste: true, - completeReplace: true, - toRun: false, - shouldCreateNewJSObj: true, - prettify: true, - }, - ); - jsEditor.RenameJSObjFromPane("Timeouts"); - agHelper.Sleep(2000); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); + { + paste: true, + completeReplace: true, + toRun: false, + shouldCreateNewJSObj: true, + prettify: true, + }, + ); + jsEditor.RenameJSObjFromPane("Timeouts"); + agHelper.Sleep(2000); + jsEditor.RunJSObj(); + agHelper.Sleep(3000); - cy.wait("@postExecute").then((interception : any) => { //Js function to match any name returned from API - userName = JSON.stringify(interception.response.body.data.body[0].name).replace(/['"]+/g, '');//removing double quotes - agHelper.AssertContains(userName); - }); + cy.wait("@postExecute").then((interception: any) => { + //Js function to match any name returned from API + userName = JSON.stringify( + interception.response.body.data.body[0].name, + ).replace(/['"]+/g, ""); //removing double quotes + agHelper.AssertContains(userName); + }); - agHelper.Sleep(2000); - jsEditor.SelectFunctionDropdown("myFun2"); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); - cy.wait("@postExecute").then((interception : any) => { - userName = JSON.stringify(interception.response.body.data.body[0].name).replace(/['"]+/g, ''); - agHelper.AssertContains(userName); + agHelper.Sleep(2000); + jsEditor.SelectFunctionDropdown("myFun2"); + jsEditor.RunJSObj(); + agHelper.Sleep(3000); + cy.wait("@postExecute").then((interception: any) => { + userName = JSON.stringify( + interception.response.body.data.body[0].name, + ).replace(/['"]+/g, ""); + agHelper.AssertContains(userName); + }); }); }); - }); it("7. Verifies whether setTimeout executes on page load", () => { //apiPage.CreateAndFillApi(agHelper.mockApiUrl); @@ -221,11 +226,13 @@ describe("Tests setTimeout API", function() { ); jsEditor.EnableDisableAsyncFuncSettings("myFun1", true, false); deployMode.DeployApp(); - agHelper.Sleep(1000);//DeployApp already waiting 2000ms hence reducing it here to equate to 3000 timeout + agHelper.Sleep(1000); //DeployApp already waiting 2000ms hence reducing it here to equate to 3000 timeout agHelper.AssertContains("Success!"); agHelper.Sleep(1000); - cy.wait("@postExecute").then((interception : any) => { - userName = JSON.stringify(interception.response.body.data.body[0].name).replace(/['"]+/g, ''); + cy.wait("@postExecute").then((interception: any) => { + userName = JSON.stringify( + interception.response.body.data.body[0].name, + ).replace(/['"]+/g, ""); agHelper.AssertContains(userName); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/APIOnLoad_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/APIOnLoad_Spec.ts index 9e4b621d56..1169ed9410 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/APIOnLoad_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/APIOnLoad_Spec.ts @@ -6,17 +6,17 @@ const ee = ObjectsRegistry.EntityExplorer, propPane = ObjectsRegistry.PropertyPane, apiPage = ObjectsRegistry.ApiPage; -describe("JSObjects OnLoad Actions tests", function() { +describe("JSObjects OnLoad Actions tests", function () { before(() => { cy.fixture("tableWidgetDsl").then((val: any) => { agHelper.AddDsl(val); }); - cy.fixture("testdata").then(function(data: any) { + cy.fixture("testdata").then(function (data: any) { dataSet = data; }); }); - it("1. Api mapping on page load", function() { + it("1. Api mapping on page load", function () { ee.NavigateToSwitcher("explorer"); apiPage.CreateAndFillApi(dataSet.baseUrl + dataSet.methods, "PageLoadApi"); agHelper.PressEscape(); @@ -33,13 +33,13 @@ describe("JSObjects OnLoad Actions tests", function() { agHelper.ValidateNetworkStatus("@postExecute"); }); - it("2. Shows when API failed to load on page load.", function() { + it("2. Shows when API failed to load on page load.", function () { apiPage.CreateAndFillApi( "https://abc.com/" + dataSet.methods, "PageLoadApi2", ); apiPage.ToggleOnPageLoadRun(true); - ee.ExpandCollapseEntity("Widgets") + ee.ExpandCollapseEntity("Widgets"); ee.ExpandCollapseEntity("Container3"); ee.SelectEntityByName("Table1"); propPane.UpdatePropertyFieldValue( diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/ExecuteAction_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/ExecuteAction_Spec.ts index b75089b0b1..8da4834fb3 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/ExecuteAction_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/ExecuteAction_Spec.ts @@ -5,12 +5,12 @@ const agHelper = ObjectsRegistry.AggregateHelper, homePage = ObjectsRegistry.HomePage, deployMode = ObjectsRegistry.DeployMode; -describe("Execute Action Functionality", function() { +describe("Execute Action Functionality", function () { before(() => { homePage.ImportApp("executeAction.json"); }); - it("1. Checks whether execute action is getting called on page load only once", function() { + it("1. Checks whether execute action is getting called on page load only once", function () { agHelper.AssertElementVisible(locator._widgetInCanvas("textwidget")); deployMode.DeployApp(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad1_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad1_Spec.ts index 59a0a9225b..bdadf5b48b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad1_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad1_Spec.ts @@ -1,7 +1,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let dsName: any, jsName: any; -describe("JSObjects OnLoad Actions tests", function() { +describe("JSObjects OnLoad Actions tests", function () { beforeEach(() => { _.agHelper.RestoreLocalStorageCache(); }); @@ -21,7 +21,7 @@ describe("JSObjects OnLoad Actions tests", function() { }); }); - it("1. Tc 54, 55 - Verify User enables only 'Before Function calling' & OnPage Load is Automatically enable after mapping done on JSOBject", function() { + it("1. Tc 54, 55 - Verify User enables only 'Before Function calling' & OnPage Load is Automatically enable after mapping done on JSOBject", function () { _.jsEditor.CreateJSObject( `export default { getEmployee: async () => { @@ -54,7 +54,9 @@ describe("JSObjects OnLoad Actions tests", function() { ".getEmployee] will be executed automatically on page load", ); _.deployMode.DeployApp(); - _.agHelper.AssertElementVisible(_.jsEditor._dialog("Confirmation Dialog")); + _.agHelper.AssertElementVisible( + _.jsEditor._dialog("Confirmation Dialog"), + ); _.agHelper.AssertElementVisible( _.jsEditor._dialogBody((jsName as string) + ".getEmployee"), ); @@ -68,7 +70,7 @@ describe("JSObjects OnLoad Actions tests", function() { _.deployMode.NavigateBacktoEditor(); }); - it("2. Tc 54, 55 - Verify OnPage Load - auto enabled from above case for JSOBject", function() { + it("2. Tc 54, 55 - Verify OnPage Load - auto enabled from above case for JSOBject", function () { _.agHelper.AssertElementVisible(_.jsEditor._dialog("Confirmation Dialog")); _.agHelper.AssertElementVisible( _.jsEditor._dialogBody((jsName as string) + ".getEmployee"), @@ -80,8 +82,8 @@ describe("JSObjects OnLoad Actions tests", function() { _.jsEditor.VerifyAsyncFuncSettings("getEmployee", true, true); }); - it("3. Tc 56 - Verify OnPage Load - Enabled & Before Function calling Enabled for JSOBject & User clicks No & then Yes in Confirmation dialog", function() { - _.deployMode.DeployApp();//Adding this check since GetEmployee failure toast is always coming & making product flaky + it("3. Tc 56 - Verify OnPage Load - Enabled & Before Function calling Enabled for JSOBject & User clicks No & then Yes in Confirmation dialog", function () { + _.deployMode.DeployApp(); //Adding this check since GetEmployee failure toast is always coming & making product flaky //_.agHelper.WaitUntilAllToastsDisappear(); _.agHelper.AssertElementVisible(_.jsEditor._dialog("Confirmation Dialog")); _.agHelper.AssertElementVisible( @@ -113,7 +115,7 @@ describe("JSObjects OnLoad Actions tests", function() { }); //Skipping due to - "_.tableData":"ERROR: invalid input syntax for type smallint: "{}"" - it.skip("4. Tc 53 - Verify OnPage Load - Enabled & Disabling - Before Function calling for JSOBject", function() { + it.skip("4. Tc 53 - Verify OnPage Load - Enabled & Disabling - Before Function calling for JSOBject", function () { _.entityExplorer.SelectEntityByName(jsName as string, "Queries/JS"); _.jsEditor.EnableDisableAsyncFuncSettings("getEmployee", true, false); //_.jsEditor.RunJSObj(); //Even running JS functin before delpoying does not help @@ -124,7 +126,9 @@ describe("JSObjects OnLoad Actions tests", function() { _.jsEditor._dialogBody((jsName as string) + ".getEmployee"), ); // assert that on view mode, we don't get "successful run" toast message for onpageload actions - _.agHelper.AssertElementAbsence(_.locators._specificToast("ran successfully")); //failed toast is appearing hence skipping + _.agHelper.AssertElementAbsence( + _.locators._specificToast("ran successfully"), + ); //failed toast is appearing hence skipping _.agHelper.ValidateNetworkExecutionSuccess("@postExecute"); _.table.ReadTableRowColumnData(0, 0).then((cellData) => { expect(cellData).to.be.equal("2"); @@ -132,7 +136,7 @@ describe("JSObjects OnLoad Actions tests", function() { _.deployMode.NavigateBacktoEditor(); }); - it("5. Verify Error for OnPage Load - disable & Before Function calling enabled for JSOBject", function() { + it("5. Verify Error for OnPage Load - disable & Before Function calling enabled for JSOBject", function () { _.entityExplorer.SelectEntityByName(jsName as string, "Queries/JS"); _.jsEditor.EnableDisableAsyncFuncSettings("getEmployee", false, true); _.deployMode.DeployApp(_.locators._widgetInDeployed("tablewidget"), false); @@ -146,7 +150,7 @@ describe("JSObjects OnLoad Actions tests", function() { // _.agHelper.ClickButton("Yes"); }); - it("6. Tc 55 - Verify OnPage Load - Enabling & Before Function calling Enabling for JSOBject & deleting testdata", function() { + it("6. Tc 55 - Verify OnPage Load - Enabling & Before Function calling Enabling for JSOBject & deleting testdata", function () { // _.deployMode.DeployApp(_.locators._widgetInDeployed("tablewidget"), false); // _.agHelper.WaitUntilAllToastsDisappear(); //incase toast appears, GetEmployee failure toast is appearing // _.agHelper.AssertElementVisible(_.jsEditor._dialog("Confirmation Dialog")); @@ -174,7 +178,11 @@ describe("JSObjects OnLoad Actions tests", function() { "Are you sure?", true, ); - _.entityExplorer.ActionContextMenuByEntityName("GetEmployee", "Delete", "Are you sure?"); + _.entityExplorer.ActionContextMenuByEntityName( + "GetEmployee", + "Delete", + "Are you sure?", + ); }); it("7. Tc 60, 1912 - Verify JSObj calling API - OnPageLoad calls & Confirmation No then Yes!", () => { @@ -283,7 +291,9 @@ describe("JSObjects OnLoad Actions tests", function() { _.agHelper.ClickButton("No"); //_.agHelper.WaitUntilToastDisappear('The action "Quotes" has failed');No toast appears! - _.agHelper.AssertElementAbsence(_.jsEditor._dialogBody("WhatTrumpThinks")); //Since JS call is NO, dependent API confirmation should not appear + _.agHelper.AssertElementAbsence( + _.jsEditor._dialogBody("WhatTrumpThinks"), + ); //Since JS call is NO, dependent API confirmation should not appear _.agHelper.RefreshPage(); // _.agHelper.AssertElementVisible( @@ -530,7 +540,11 @@ describe("JSObjects OnLoad Actions tests", function() { "Delete", "Are you sure?", ); - _.entityExplorer.ActionContextMenuByEntityName("getBooks", "Delete", "Are you sure?"); + _.entityExplorer.ActionContextMenuByEntityName( + "getBooks", + "Delete", + "Are you sure?", + ); _.entityExplorer.ActionContextMenuByEntityName( jsName as string, "Delete", @@ -540,5 +554,4 @@ describe("JSObjects OnLoad Actions tests", function() { }); //it.skip("13. Tc # 57 - Multiple functions set to true for OnPageLoad & Confirmation before running + Bug 15340", () => {}); - }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad2_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad2_Spec.ts index ca48a566c9..608d0a54cb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad2_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad2_Spec.ts @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let datasourceName: any, jsName: any; -describe("JSObjects OnLoad Actions tests", function() { +describe("JSObjects OnLoad Actions tests", function () { before(() => { _.homePage.NavigateToHome(); _.homePage.CreateNewWorkspace("JSOnLoadTest"); @@ -264,7 +264,7 @@ describe("JSObjects OnLoad Actions tests", function() { asyncFunctions: string[], ) { cy.get(_.jsEditor._funcDropdown).click(); - cy.get(_.jsEditor._funcDropdownOptions).then(function($ele) { + cy.get(_.jsEditor._funcDropdownOptions).then(function ($ele) { expect($ele.eq(0).text()).to.be.oneOf(syncFunctions); expect($ele.eq(1).text()).to.be.oneOf(asyncFunctions); expect($ele.eq(2).text()).to.be.oneOf(asyncFunctions); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js index 2a049e094b..bff4eff962 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js @@ -15,7 +15,7 @@ Cyclic Dependency Error if occurs, Message would be shown in following 6 cases: 6. When updating Datasource query */ -describe("Cyclic Dependency Informational Error Messages", function() { +describe("Cyclic Dependency Informational Error Messages", function () { before(() => { //appId = localStorage.getItem("applicationId"); //cy.log("appID:" + appId); @@ -115,13 +115,10 @@ describe("Cyclic Dependency Informational Error Messages", function() { _.entityExplorer.SelectEntityByName(queryName, "Queries/JS"); // update query and check no cyclic dependency issue should occur cy.get(queryLocators.query).click({ force: true }); - cy.get(".CodeMirror textarea") - .first() - .focus() - .type(" ", { - force: true, - parseSpecialCharSequences: false, - }); + cy.get(".CodeMirror textarea").first().focus().type(" ", { + force: true, + parseSpecialCharSequences: false, + }); cy.wait("@saveAction").should( "have.nested.property", "response.body.data.errorReports.length", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/OnLoadActions_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/OnLoadActions_Spec.ts index eddefc9380..333b05620b 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/OnLoadActions_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/OnLoadActions_Spec.ts @@ -6,7 +6,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, locator = ObjectsRegistry.CommonLocators, deployMode = ObjectsRegistry.DeployMode; -describe("Layout OnLoad Actions tests", function() { +describe("Layout OnLoad Actions tests", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); }); @@ -15,28 +15,25 @@ describe("Layout OnLoad Actions tests", function() { agHelper.SaveLocalStorageCache(); }); - it("1. Bug 8595: OnPageLoad execution - when No api to run on Pageload", function() { + it("1. Bug 8595: OnPageLoad execution - when No api to run on Pageload", function () { cy.fixture("onPageLoadActionsDsl").then((val: any) => { agHelper.AddDsl(val); }); ee.SelectEntityByName("Widgets"); ee.SelectEntityByName("Page1"); cy.url().then((url) => { - const pageid = url - .split("/")[5] - ?.split("-") - .pop(); + const pageid = url.split("/")[5]?.split("-").pop(); cy.log(pageid + "page id"); cy.request("GET", "api/v1/pages/" + pageid).then((response) => { const respBody = JSON.stringify(response.body); - const _emptyResp = JSON.parse(respBody).data.layouts[0] - .layoutOnLoadActions; + const _emptyResp = + JSON.parse(respBody).data.layouts[0].layoutOnLoadActions; expect(JSON.parse(JSON.stringify(_emptyResp))).to.deep.eq([]); }); }); }); - it("2. Bug 8595: OnPageLoad execution - when Query Parmas added via Params tab", function() { + it("2. Bug 8595: OnPageLoad execution - when Query Parmas added via Params tab", function () { cy.fixture("onPageLoadActionsDsl").then((val: any) => { agHelper.AddDsl(val, locator._imageWidget); }); @@ -137,14 +134,14 @@ describe("Layout OnLoad Actions tests", function() { cy.wait("@viewPage").then(($response) => { const respBody = JSON.stringify($response.response?.body); - const _randomFlora = JSON.parse(respBody).data.layouts[0] - .layoutOnLoadActions[0]; - const _randomUser = JSON.parse(respBody).data.layouts[0] - .layoutOnLoadActions[1]; - const _genderize = JSON.parse(respBody).data.layouts[0] - .layoutOnLoadActions[2]; - const _suggestions = JSON.parse(respBody).data.layouts[0] - .layoutOnLoadActions[3]; + const _randomFlora = + JSON.parse(respBody).data.layouts[0].layoutOnLoadActions[0]; + const _randomUser = + JSON.parse(respBody).data.layouts[0].layoutOnLoadActions[1]; + const _genderize = + JSON.parse(respBody).data.layouts[0].layoutOnLoadActions[2]; + const _suggestions = + JSON.parse(respBody).data.layouts[0].layoutOnLoadActions[3]; // cy.log("_randomFlora is: " + JSON.stringify(_randomFlora)) // cy.log("_randomUser is: " + JSON.stringify(_randomUser)) // cy.log("_genderize is: " + JSON.stringify(_genderize)) @@ -172,7 +169,7 @@ describe("Layout OnLoad Actions tests", function() { deployMode.NavigateBacktoEditor(); }); - it("3. Bug 10049, 10055: Dependency not executed in expected order in layoutOnLoadActions when dependency added via URL", function() { + it("3. Bug 10049, 10055: Dependency not executed in expected order in layoutOnLoadActions when dependency added via URL", function () { ee.SelectEntityByName("Genderize", "Queries/JS"); ee.ActionContextMenuByEntityName("Genderize", "Delete", "Are you sure?"); @@ -190,14 +187,14 @@ describe("Layout OnLoad Actions tests", function() { agHelper.Sleep(5000); //for all api's to ccomplete call! cy.wait("@viewPage").then(($response) => { const respBody = JSON.stringify($response.response?.body); - const _randomFlora = JSON.parse(respBody).data.layouts[0] - .layoutOnLoadActions[0]; - const _randomUser = JSON.parse(respBody).data.layouts[0] - .layoutOnLoadActions[1]; - const _genderize = JSON.parse(respBody).data.layouts[0] - .layoutOnLoadActions[2]; - const _suggestions = JSON.parse(respBody).data.layouts[0] - .layoutOnLoadActions[3]; + const _randomFlora = + JSON.parse(respBody).data.layouts[0].layoutOnLoadActions[0]; + const _randomUser = + JSON.parse(respBody).data.layouts[0].layoutOnLoadActions[1]; + const _genderize = + JSON.parse(respBody).data.layouts[0].layoutOnLoadActions[2]; + const _suggestions = + JSON.parse(respBody).data.layouts[0].layoutOnLoadActions[3]; expect(JSON.parse(JSON.stringify(_randomFlora))[0]["name"]).to.eq( "RandomFlora", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/PostgresConnections_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/PostgresConnections_spec.ts index 670afe5d00..54328348c9 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/PostgresConnections_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/PostgresConnections_spec.ts @@ -8,7 +8,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, propPane = ObjectsRegistry.PropertyPane, deployMode = ObjectsRegistry.DeployMode; -describe("Test Postgres number of connections on page load + Bug 11572, Bug 11202", function() { +describe("Test Postgres number of connections on page load + Bug 11572, Bug 11202", function () { before(() => { agHelper.GenerateUUID(); cy.get("@guid").then((uid) => { @@ -78,7 +78,8 @@ describe("Test Postgres number of connections on page load + Bug 11572, Bug 1120 ".data.map( (obj) =>{ return {'label': obj.table_name, 'value': obj.table_name }})}}", ); propPane.UpdatePropertyFieldValue( - "Default Selected Value", "{{Query_" + i + ".data[" + (i - 1) + "].table_name}}", + "Default Selected Value", + "{{Query_" + i + ".data[" + (i - 1) + "].table_name}}", ); agHelper.ValidateNetworkStatus("@updateLayout", 200); } diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Params/ExecutionParams_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Params/ExecutionParams_spec.js index a5f69cf5ce..045c1a58eb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Params/ExecutionParams_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Params/ExecutionParams_spec.js @@ -3,7 +3,7 @@ const publishPage = require("../../../../locators/publishWidgetspage.json"); const queryLocators = require("../../../../locators/QueryEditor.json"); const datasource = require("../../../../locators/DatasourcesEditor.json"); -describe("API Panel Test Functionality", function() { +describe("API Panel Test Functionality", function () { let datasourceName; before(() => { cy.addDsl(dsl); @@ -11,7 +11,7 @@ describe("API Panel Test Functionality", function() { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create a postgres datasource", function() { + it("1. Create a postgres datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); cy.fillPostgresDatasourceForm(); @@ -25,9 +25,7 @@ describe("API Panel Test Functionality", function() { cy.NavigateToActiveDSQueryPane(datasourceName); cy.get(queryLocators.templateMenu).click(); cy.get(queryLocators.settings).click({ force: true }); - cy.get(queryLocators.switch) - .last() - .click({ force: true }); + cy.get(queryLocators.switch).last().click({ force: true }); cy.get(queryLocators.query).click({ force: true }); cy.get(".CodeMirror textarea") .first() @@ -40,15 +38,11 @@ describe("API Panel Test Functionality", function() { cy.runQuery(); }); - it("3. Will pass execution params", function() { + it("3. Will pass execution params", function () { cy.CheckAndUnfoldEntityItem("Widgets"); // Bind the table - cy.get(".t--entity-collapse-toggle") - .eq(2) - .click({ force: true }); - cy.get(".t--entity-name") - .contains("Table1") - .click({ force: true }); + cy.get(".t--entity-collapse-toggle").eq(2).click({ force: true }); + cy.get(".t--entity-name").contains("Table1").click({ force: true }); cy.EnableAllCodeEditors(); cy.testJsontext("tabledata", "{{Query1.data}}"); // Assert 'posts' data (default) @@ -56,9 +50,7 @@ describe("API Panel Test Functionality", function() { expect(cellData).to.be.equal("Test user 7"); }); // Choose static button - cy.get(".t--entity-name") - .contains("StaticButton") - .click({ force: true }); + cy.get(".t--entity-name").contains("StaticButton").click({ force: true }); // toggle js of onClick cy.get(".t--property-control-onclick") .find(".t--js-toggle") @@ -69,9 +61,7 @@ describe("API Panel Test Functionality", function() { "{{Query1.run(undefined, undefined, { tableName: 'users' })}}", ); // Choose dynamic button - cy.get(".t--entity-name") - .contains("DynamicButton") - .click({ force: true }); + cy.get(".t--entity-name").contains("DynamicButton").click({ force: true }); cy.wait(2000); // toggle js of onClick cy.get(".t--property-control-onclick").scrollIntoView(); @@ -93,9 +83,7 @@ describe("API Panel Test Functionality", function() { }); // Click Static button - cy.get(publishPage.buttonWidget) - .first() - .click(); + cy.get(publishPage.buttonWidget).first().click(); //Wait for postExecute to finish cy.wait("@postExecute").should( @@ -111,9 +99,7 @@ describe("API Panel Test Functionality", function() { }); // Click dynamic button - cy.get(publishPage.buttonWidget) - .eq(1) - .click(); + cy.get(publishPage.buttonWidget).eq(1).click(); //Wait for postExecute to finish cy.wait("@postExecute").should( diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Params/PassingParams_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Params/PassingParams_Spec.ts index 558244a004..08ceaf1313 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Params/PassingParams_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Params/PassingParams_Spec.ts @@ -9,7 +9,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("1. With Optional chaining : {{ this?.params?.condition }}", function() { + it("1. With Optional chaining : {{ this?.params?.condition }}", function () { _.dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; @@ -53,7 +53,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("2. With Optional chaining : {{ (function() { return this?.params?.condition })() }}", function() { + it("2. With Optional chaining : {{ (function() { return this?.params?.condition })() }}", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( @@ -68,7 +68,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("3. With Optional chaining : {{ (() => { return this?.params?.condition })() }}", function() { + it("3. With Optional chaining : {{ (() => { return this?.params?.condition })() }}", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( @@ -83,7 +83,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("4. With Optional chaining : {{ this?.params.condition }}", function() { + it("4. With Optional chaining : {{ this?.params.condition }}", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( @@ -98,7 +98,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("5. With Optional chaining : {{ (function() { return this?.params.condition })() }}", function() { + it("5. With Optional chaining : {{ (function() { return this?.params.condition })() }}", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( @@ -113,7 +113,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("6. With Optional chaining : {{ (() => { return this?.params.condition })() }}", function() { + it("6. With Optional chaining : {{ (() => { return this?.params.condition })() }}", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( @@ -128,7 +128,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("7. With No Optional chaining : {{ this.params.condition }}", function() { + it("7. With No Optional chaining : {{ this.params.condition }}", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( @@ -143,7 +143,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("8. With No Optional chaining : {{ (function() { return this.params.condition })() }}", function() { + it("8. With No Optional chaining : {{ (function() { return this.params.condition })() }}", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( @@ -158,7 +158,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("9. With No Optional chaining : {{ (() => { return this.params.condition })() }}", function() { + it("9. With No Optional chaining : {{ (() => { return this.params.condition })() }}", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( @@ -173,7 +173,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("10. With Optional chaining : {{ this.params.condition }} && direct paramter passed", function() { + it("10. With Optional chaining : {{ this.params.condition }} && direct paramter passed", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( @@ -182,9 +182,9 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", _.deployMode.DeployApp(_.locators._spanButton("Submit")); //Verifh when No selected option passed - cy.xpath( - _.locators._selectWidgetDropdownInDeployed("selectwidget"), - ).within(() => cy.get(_.locators._crossBtn).click()); + cy.xpath(_.locators._selectWidgetDropdownInDeployed("selectwidget")).within( + () => cy.get(_.locators._crossBtn).click(), + ); _.agHelper.ClickButton("Submit"); _.agHelper.ValidateNetworkExecutionSuccess("@postExecute"); _.table.ReadTableRowColumnData(0, 0, "v1", 2000).then((cellData) => { @@ -192,7 +192,7 @@ describe("[Bug] - 10784 - Passing params from JS to SQL query should not break", }); }); - it("11. With Optional chaining : {{ this.params.condition }} && no optional paramter passed", function() { + it("11. With Optional chaining : {{ this.params.condition }} && no optional paramter passed", function () { _.deployMode.NavigateBacktoEditor(); _.entityExplorer.SelectEntityByName("ParamsTest", "Queries/JS"); _.dataSources.EnterQuery( diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Array_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Array_Spec.ts index d22277241c..22827b5949 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Array_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Array_Spec.ts @@ -9,7 +9,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, appSettings = ObjectsRegistry.AppSettings; -describe("Array Datatype tests", function() { +describe("Array Datatype tests", function () { before(() => { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Binary_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Binary_Spec.ts index 50edb46ade..681c20babc 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Binary_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Binary_Spec.ts @@ -9,7 +9,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, appSettings = ObjectsRegistry.AppSettings; -describe("Binary Datatype tests", function() { +describe("Binary Datatype tests", function () { before(() => { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/BooleanEnum_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/BooleanEnum_Spec.ts index 95c79e7487..9b85edd1a6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/BooleanEnum_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/BooleanEnum_Spec.ts @@ -9,7 +9,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, appSettings = ObjectsRegistry.AppSettings; -describe("Boolean & Enum Datatype tests", function() { +describe("Boolean & Enum Datatype tests", function () { before(() => { cy.fixture("Datatypes/BooleanEnumDTdsl").then((val: any) => { agHelper.AddDsl(val); @@ -17,7 +17,7 @@ describe("Boolean & Enum Datatype tests", function() { appSettings.OpenPaneAndChangeThemeColors(-18, -20); }); - it("1. Create Postgress DS", function() { + it("1. Create Postgress DS", function () { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Character_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Character_Spec.ts index c2872341a6..f0a5a270d7 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Character_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Character_Spec.ts @@ -9,7 +9,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, appSettings = ObjectsRegistry.AppSettings; -describe("Character Datatype tests", function() { +describe("Character Datatype tests", function () { before(() => { cy.fixture("Datatypes/CharacterDTdsl").then((val: any) => { agHelper.AddDsl(val); @@ -17,7 +17,7 @@ describe("Character Datatype tests", function() { appSettings.OpenPaneAndChangeTheme("Pacific"); }); - it("1. Create Postgress DS", function() { + it("1. Create Postgress DS", function () { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/DateTime_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/DateTime_Spec.ts index 69f217fb9a..8779c85db8 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/DateTime_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/DateTime_Spec.ts @@ -9,7 +9,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, appSettings = ObjectsRegistry.AppSettings; -describe("DateTime Datatype tests", function() { +describe("DateTime Datatype tests", function () { before(() => { cy.fixture("Datatypes/DateTimeDTdsl").then((val: any) => { agHelper.AddDsl(val); @@ -17,7 +17,7 @@ describe("DateTime Datatype tests", function() { appSettings.OpenPaneAndChangeThemeColors(22, 32); }); - it("1. Create Postgress DS", function() { + it("1. Create Postgress DS", function () { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; @@ -146,7 +146,7 @@ describe("DateTime Datatype tests", function() { table.ReadTableRowColumnData(0, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq("1989-01-19"); //date format! }); - table.ReadTableRowColumnData(0, 4, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(0, 4, "v1", 200).then(($cellData) => { expect($cellData).to.eq("16:05:00"); //time format }); table.ReadTableRowColumnData(0, 6, "v1", 200).then(($cellData) => { @@ -176,18 +176,18 @@ describe("DateTime Datatype tests", function() { table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq("2"); //asserting serial column is inserting fine in sequence }); - table.ReadTableRowColumnData(1, 1, "v1",200).then(($ts) => { + table.ReadTableRowColumnData(1, 1, "v1", 200).then(($ts) => { table.ReadTableRowColumnData(1, 2, "v1", 200).then(($tstz) => { expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied }); }); - table.ReadTableRowColumnData(1, 3, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq("2045-12-29"); }); - table.ReadTableRowColumnData(1, 4, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { expect($cellData).to.eq("04:05:00"); }); - table.ReadTableRowColumnData(1, 6, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 6, "v1", 200).then(($cellData) => { expect($cellData).to.eq("0 years 0 mons 3 days 4 hours 5 mins 6.0 secs"); }); table.ReadTableRowColumnData(1, 7, "v1", 200).then(($cellData) => { @@ -214,21 +214,21 @@ describe("DateTime Datatype tests", function() { table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq("2"); //asserting serial column is same }); - table.ReadTableRowColumnData(1, 1, "v1",200).then(($ts) => { - table.ReadTableRowColumnData(1, 2, "v1",200).then(($tstz) => { + table.ReadTableRowColumnData(1, 1, "v1", 200).then(($ts) => { + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($tstz) => { expect($ts).to.not.eq($tstz); }); }); - table.ReadTableRowColumnData(1, 3, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq("2014-03-17"); }); - table.ReadTableRowColumnData(1, 4, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { expect($cellData).to.eq("04:05:06.789"); }); - table.ReadTableRowColumnData(1, 6, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 6, "v1", 200).then(($cellData) => { expect($cellData).to.eq("1 years 3 mons 2 days 6 hours 4 mins 5.0 secs"); }); - table.ReadTableRowColumnData(1, 7,"v1", 200).then(($cellData) => { + table.ReadTableRowColumnData(1, 7, "v1", 200).then(($cellData) => { expect($cellData).to.eq("17.03.2014"); }); agHelper @@ -263,20 +263,20 @@ describe("DateTime Datatype tests", function() { expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence }); table.ReadTableRowColumnData(1, 1, "v1", 200).then(($ts) => { - table.ReadTableRowColumnData(1, 2, "v1",200).then(($tstz) => { + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($tstz) => { expect($ts).to.not.eq($tstz); //ts & tstz not equal since tstz is time zone applied }); }); - table.ReadTableRowColumnData(1, 3, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq("1999-01-08"); }); - table.ReadTableRowColumnData(1, 4, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { expect($cellData).to.eq("18:14:16"); }); - table.ReadTableRowColumnData(1, 6, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 6, "v1", 200).then(($cellData) => { expect($cellData).to.eq("1 years 2 mons 0 days 0 hours 0 mins 0.0 secs"); }); - table.ReadTableRowColumnData(1, 7, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 7, "v1", 200).then(($cellData) => { expect($cellData).to.eq("08.01.1999"); }); agHelper diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Json_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Json_Spec.ts index a9d1eafc46..b187e957db 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Json_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Json_Spec.ts @@ -9,7 +9,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, appSettings = ObjectsRegistry.AppSettings; -describe("Json & JsonB Datatype tests", function() { +describe("Json & JsonB Datatype tests", function () { before(() => { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { @@ -511,10 +511,10 @@ describe("Json & JsonB Datatype tests", function() { agHelper.ClickButton("Insert"); agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); - table.ReadTableRowColumnData(2, 0,"v1", 2000).then(($cellData) => { + table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence }); - table.ReadTableRowColumnData(2, 1, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { expect($cellData).not.to.eq(""); }); }); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Numeric_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Numeric_Spec.ts index a32743867b..ca711e8abb 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Numeric_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Numeric_Spec.ts @@ -9,7 +9,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, deployMode = ObjectsRegistry.DeployMode, appSettings = ObjectsRegistry.AppSettings; -describe("Numeric Datatype tests", function() { +describe("Numeric Datatype tests", function () { before(() => { cy.fixture("Datatypes/NumericDTdsl").then((val: any) => { agHelper.AddDsl(val); @@ -17,7 +17,7 @@ describe("Numeric Datatype tests", function() { appSettings.OpenPaneAndChangeTheme("Moon"); }); - it("1. Create Postgress DS", function() { + it("1. Create Postgress DS", function () { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; @@ -123,7 +123,7 @@ describe("Numeric Datatype tests", function() { table.ReadTableRowColumnData(1, 1, "v1", 200).then(($cellData) => { expect($cellData).to.eq("-922337203685477"); //-9223372036854775808 }); - table.ReadTableRowColumnData(1, 2, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($cellData) => { expect($cellData).to.eq("232143455655456.34"); }); table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { @@ -145,7 +145,7 @@ describe("Numeric Datatype tests", function() { table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { expect($cellData).to.eq("12233720368547758"); }); - table.ReadTableRowColumnData(2, 2, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($cellData) => { expect($cellData).to.eq("877675655441232.1"); }); table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { @@ -162,7 +162,7 @@ describe("Numeric Datatype tests", function() { agHelper.EnterInputText("Numericid", "76542300099.10988", true); //76542300099.109876788 agHelper.ClickButton("Update"); agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery")); - table.ReadTableRowColumnData(2, 0, "v1",2000).then(($cellData) => { + table.ReadTableRowColumnData(2, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence }); table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { @@ -171,7 +171,7 @@ describe("Numeric Datatype tests", function() { table.ReadTableRowColumnData(2, 2, "v1", 200).then(($cellData) => { expect($cellData).to.eq("777675655441232.1"); }); - table.ReadTableRowColumnData(2, 3, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq("76542300099.10988"); }); }); @@ -182,10 +182,10 @@ describe("Numeric Datatype tests", function() { agHelper.ValidateNetworkStatus("@postExecute", 200); agHelper.ValidateNetworkStatus("@postExecute", 200); agHelper.Sleep(2500); //Allwowing time for delete to be success - table.ReadTableRowColumnData(1, 0, "v1",2000).then(($cellData) => { + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { expect($cellData).not.to.eq("2"); //asserting 2nd record is deleted }); - table.ReadTableRowColumnData(1, 0, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 0, "v1", 200).then(($cellData) => { expect($cellData).to.eq("3"); }); }); @@ -199,13 +199,13 @@ describe("Numeric Datatype tests", function() { agHelper.EnterInputText("Numericid", "66542300099.00088", true); //66542300099.0008767675 agHelper.ClickButton("Update"); agHelper.AssertElementVisible(locator._spanButton("Run UpdateQuery")); - table.ReadTableRowColumnData(1, 0, "v1",2000).then(($cellData) => { + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq("3"); //asserting serial column is inserting fine in sequence }); table.ReadTableRowColumnData(1, 1, "v1", 200).then(($cellData) => { expect($cellData).to.eq("11133720368547700"); }); - table.ReadTableRowColumnData(1, 2, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(1, 2, "v1", 200).then(($cellData) => { expect($cellData).to.eq("777575655441232.1"); }); table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { @@ -227,10 +227,10 @@ describe("Numeric Datatype tests", function() { table.ReadTableRowColumnData(2, 1, "v1", 200).then(($cellData) => { expect($cellData).to.eq("11111720368547700"); }); - table.ReadTableRowColumnData(2, 2, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(2, 2, "v1", 200).then(($cellData) => { expect($cellData).to.eq("8765456.987654345"); }); - table.ReadTableRowColumnData(2, 3, "v1",200).then(($cellData) => { + table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { expect($cellData).to.eq("87654356.98765436"); }); }); @@ -242,7 +242,7 @@ describe("Numeric Datatype tests", function() { table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { expect($cellData).not.to.eq("3"); //asserting 3rd record is deleted }); - table.ReadTableRowColumnData(1, 0, "v1",2000).then(($cellData) => { + table.ReadTableRowColumnData(1, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq("4"); }); }); @@ -262,7 +262,7 @@ describe("Numeric Datatype tests", function() { agHelper.EnterInputText("Numericid", "87654356.98765436"); // 87654356.9876543567 agHelper.ClickButton("Insert"); agHelper.AssertElementVisible(locator._spanButton("Run InsertQuery")); - table.ReadTableRowColumnData(0, 0, "v1",2000).then(($cellData) => { + table.ReadTableRowColumnData(0, 0, "v1", 2000).then(($cellData) => { expect($cellData).to.eq("5"); //asserting serial column is inserting fine in sequence }); table.ReadTableRowColumnData(0, 1, "v1", 200).then(($cellData) => { diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/UUID_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/UUID_Spec.ts index 08bbb587f8..c70fe7a138 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/UUID_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/UUID_Spec.ts @@ -10,7 +10,7 @@ const agHelper = ObjectsRegistry.AggregateHelper, apiPage = ObjectsRegistry.ApiPage, appSettings = ObjectsRegistry.AppSettings; -describe("UUID Datatype tests", function() { +describe("UUID Datatype tests", function () { before(() => { dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { @@ -221,9 +221,9 @@ describe("UUID Datatype tests", function() { it("9. Updating record - uuidtype - updating v4, guid", () => { //table.SelectTableRow(2); //As Table Selected row has issues due to fast selction - table.ReadTableRowColumnData(2, 1,"v1", 200).then(($oldV1) => { + table.ReadTableRowColumnData(2, 1, "v1", 200).then(($oldV1) => { table.ReadTableRowColumnData(2, 2, "v1", 200).then(($oldV4) => { - table.ReadTableRowColumnData(2, 3,"v1", 200).then(($oldguid) => { + table.ReadTableRowColumnData(2, 3, "v1", 200).then(($oldguid) => { agHelper.ClickButton("Run UpdateQuery"); agHelper.AssertElementVisible(locator._modal); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/AddWidgetTableAndBind_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/AddWidgetTableAndBind_spec.js index 24cda85b4f..8830c9dfe6 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/AddWidgetTableAndBind_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/AddWidgetTableAndBind_spec.js @@ -7,7 +7,7 @@ const testdata = require("../../../../fixtures/testdata.json"); let datasourceName; -describe("Addwidget from Query and bind with other widgets", function() { +describe("Addwidget from Query and bind with other widgets", function () { before(() => { cy.addDsl(dsl); }); @@ -56,9 +56,7 @@ describe("Addwidget from Query and bind with other widgets", function() { }); it("3. Input widget test with default value from table widget", () => { - cy.get(".t--entity-name") - .contains("Widgets") - .click(); + cy.get(".t--entity-name").contains("Widgets").click(); cy.SearchEntityandOpen("Input1"); cy.get(widgetsPage.defaultInput).type(testdata.addInputWidgetBinding); cy.wait("@updateLayout").should( @@ -68,7 +66,7 @@ describe("Addwidget from Query and bind with other widgets", function() { ); }); - it("4. validation of data displayed in input widget based on row data selected", function() { + it("4. validation of data displayed in input widget based on row data selected", function () { cy.isSelectRow(1); cy.readTableV2dataPublish("1", "0").then((tabData) => { const tabValue = tabData; diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/AddWidget_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/AddWidget_spec.js index 14af0b8d20..7a1440be1e 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/AddWidget_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/AddWidget_spec.js @@ -3,7 +3,7 @@ const queryEditor = require("../../../../locators/QueryEditor.json"); let datasourceName; -describe("Add widget - Postgress DataSource", function() { +describe("Add widget - Postgress DataSource", function () { beforeEach(() => { cy.startRoutesForDatasource(); cy.createPostgresDatasource(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/ConfirmRunAction_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/ConfirmRunAction_spec.js index d69ab67f1d..702554c052 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/ConfirmRunAction_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/ConfirmRunAction_spec.js @@ -2,7 +2,7 @@ const queryLocators = require("../../../../locators/QueryEditor.json"); const queryEditor = require("../../../../locators/QueryEditor.json"); let datasourceName; -describe("Confirm run action", function() { +describe("Confirm run action", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); @@ -22,17 +22,9 @@ describe("Confirm run action", function() { .focus() .type("select * from configs"); cy.get("li:contains('Settings')").click({ force: true }); - cy.get("[data-cy=confirmBeforeExecute]") - .find("span") - .click(); - cy.xpath(queryEditor.runQuery) - .last() - .click({ force: true }) - .wait(1000); - cy.get(".bp3-dialog") - .find("button") - .contains("Yes") - .click(); + cy.get("[data-cy=confirmBeforeExecute]").find("span").click(); + cy.xpath(queryEditor.runQuery).last().click({ force: true }).wait(1000); + cy.get(".bp3-dialog").find("button").contains("Yes").click(); cy.wait("@postExecute").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/DSDocs_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/DSDocs_Spec.ts index b8d25665ca..cfc96ca4ec 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/DSDocs_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/DSDocs_Spec.ts @@ -2,8 +2,8 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let dsName: any; -describe("Check datasource doc links", function() { - it("1. Verify Postgres documentation opens", function() { +describe("Check datasource doc links", function () { + it("1. Verify Postgres documentation opens", function () { _.dataSources.CreateDataSource("Postgres"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; @@ -16,7 +16,7 @@ describe("Check datasource doc links", function() { }); }); - it("2. Verify Mongo documentation opens", function() { + it("2. Verify Mongo documentation opens", function () { _.dataSources.CreateDataSource("Mongo"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; @@ -29,7 +29,7 @@ describe("Check datasource doc links", function() { }); }); - it("3. Verify MySQL documentation opens", function() { + it("3. Verify MySQL documentation opens", function () { _.dataSources.CreateDataSource("MySql"); cy.get("@dsName").then(($dsName) => { dsName = $dsName; diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js index 3c41e06ebd..77be4218ff 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js @@ -3,12 +3,12 @@ const datasource = require("../../../../locators/DatasourcesEditor.json"); let datasourceName; -describe("Create a query with a empty datasource, run, save the query", function() { +describe("Create a query with a empty datasource, run, save the query", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); - it("1. Create a empty datasource", function() { + it("1. Create a empty datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); cy.testSaveDatasource(false); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/EvaluatedValuePopUp_spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/EvaluatedValuePopUp_spec.ts index 756fc8cf31..002a347be2 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/EvaluatedValuePopUp_spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/EvaluatedValuePopUp_spec.ts @@ -1,7 +1,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; import formControls from "../../../../locators/FormControl.json"; -describe("Ensures evaluated popup is viewable when dynamic bindings are present and draggable", function() { +describe("Ensures evaluated popup is viewable when dynamic bindings are present and draggable", function () { it("shows evaluated pop up is visible and draggable", () => { _.dataSources.CreateDataSource("Mongo", true, true); _.dataSources.CreateQueryAfterDSSaved(); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/GoogleSheetsQuery_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/GoogleSheetsQuery_spec.js index b4b9c9fc7e..127b278b93 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/GoogleSheetsQuery_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/GoogleSheetsQuery_spec.js @@ -9,9 +9,9 @@ let pluginName = "Google Sheets"; let placeholderText = '{\n "name": {{nameInput.text}},\n "dob": {{dobPicker.formattedDate}},\n "gender": {{genderSelect.selectedOptionValue}} \n}'; -describe("Google Sheets datasource row objects placeholder", function() { +describe("Google Sheets datasource row objects placeholder", function () { //Skiiping due to open bug #18035: Should the Save button be renamed as "Save and Authorise" in case of Google sheets for datasource discard popup? - it.skip("Bug: 16391 - Google Sheets DS, placeholder objects keys should have quotes", function() { + it.skip("Bug: 16391 - Google Sheets DS, placeholder objects keys should have quotes", function () { // create new Google Sheets datasource dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn(pluginName); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.js index b855fe9e95..15aed5793d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.js @@ -7,7 +7,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; let datasourceName; -describe("Create a query with a mongo datasource, run, save and then delete the query", function() { +describe("Create a query with a mongo datasource, run, save and then delete the query", function () { // afterEach(function() { // if (this.currentTest.state === "failed") { // Cypress.runner.stop(); @@ -19,7 +19,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the // cy.actionContextMenuByEntityName(queryName); // }); - before("Creates a new Mongo datasource", function() { + before("Creates a new Mongo datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MongoDB).click(); cy.fillMongoDatasourceForm(); @@ -30,7 +30,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.testSaveDatasource(); }); - it("1. Validate Raw query command, run and then delete the query", function() { + it("1. Validate Raw query command, run and then delete the query", function () { cy.NavigateToActiveDSQueryPane(datasourceName); // cy.get("@getPluginForm").should( // "have.nested.property", @@ -62,7 +62,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.deleteQueryUsingContext(); }); - it("2. Validate Find documents command & Run and then delete the query", function() { + it("2. Validate Find documents command & Run and then delete the query", function () { cy.NavigateToActiveDSQueryPane(datasourceName); _.dataSources.SetQueryTimeout(20000); @@ -136,7 +136,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.deleteQueryUsingContext(); }); - it("3. Validate Count command & Run and then delete the query", function() { + it("3. Validate Count command & Run and then delete the query", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.ValidateAndSelectDropdownOption( formControls.commandDropdown, @@ -164,7 +164,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.deleteQueryUsingContext(); }); - it("4. Validate Distinct command & Run and then delete the query", function() { + it("4. Validate Distinct command & Run and then delete the query", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.ValidateAndSelectDropdownOption( formControls.commandDropdown, @@ -196,7 +196,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.deleteQueryUsingContext(); }); - it("5. Validate Aggregate command & Run and then delete the query", function() { + it("5. Validate Aggregate command & Run and then delete the query", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.ValidateAndSelectDropdownOption( formControls.commandDropdown, @@ -228,7 +228,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.deleteQueryUsingContext(); }); - it("6. Verify generation of NewPage from collection [Select] + Bug 12162", function() { + it("6. Verify generation of NewPage from collection [Select] + Bug 12162", function () { //Verifying Select from UI cy.NavigateToDSGeneratePage(datasourceName); cy.get(generatePage.selectTableDropdown).click(); @@ -277,9 +277,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.NavigateToActiveTab(); cy.contains(".t--datasource-name", datasourceName).click(); cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); cy.wait("@deleteDatasource").should( "have.nested.property", "response.body.responseMeta.status", @@ -292,7 +290,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the ); }); - it("8. Bug 7399: Validate Form based & Raw command based templates", function() { + it("8. Bug 7399: Validate Form based & Raw command based templates", function () { let id; _.entityExplorer.ExpandCollapseEntity("Datasources"); _.entityExplorer.ExpandCollapseEntity(`${datasourceName}`); @@ -300,9 +298,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the .invoke("show") .click({ force: true }); - cy.xpath("//div[text()='Find']") - .click() - .wait(100); //wait for Find form to open + cy.xpath("//div[text()='Find']").click().wait(100); //wait for Find form to open cy.EvaluatFieldValue(formControls.mongoCollection).then((colData) => { let localcolData = colData.replace("{", "").replace("}", ""); @@ -331,10 +327,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.wait("@postExecute").then(({ response }) => { expect(response.body.data.isExecutionSuccess).to.eq(true); expect(response.body.data.body[0]._id).to.eq( - id - .split(":")[1] - .trim() - .replace(/['"]+/g, ""), + id.split(":")[1].trim().replace(/['"]+/g, ""), ); }); @@ -367,10 +360,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.wait("@postExecute").then(({ response }) => { expect(response.body.data.isExecutionSuccess).to.eq(true); expect(response.body.data.body[0]._id).to.eq( - id - .split(":")[1] - .trim() - .replace(/['"]+/g, ""), + id.split(":")[1].trim().replace(/['"]+/g, ""), ); }); cy.CheckAndUnfoldEntityItem("Queries/JS"); @@ -382,9 +372,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.NavigateToActiveTab(); cy.contains(".t--datasource-name", datasourceName).click(); cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); // cy.wait("@deleteDatasource").should( // "have.nested.property", // "response.body.responseMeta.status", @@ -396,11 +384,9 @@ describe("Create a query with a mongo datasource, run, save and then delete the }); }); - it("10. Bug 6375: Cyclic Dependency error occurs and the app crashes when the user generate table and chart from mongo query", function() { + it("10. Bug 6375: Cyclic Dependency error occurs and the app crashes when the user generate table and chart from mongo query", function () { cy.NavigateToHome(); - cy.get(homePage.createNew) - .first() - .click({ force: true }); + cy.get(homePage.createNew).first().click({ force: true }); cy.wait("@createNewApplication").should( "have.nested.property", "response.body.responseMeta.status", @@ -472,9 +458,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.xpath("//div[text()='NonAsciiTest']").should("exist"); //Verifying Suggested Widgets functionality - cy.get(queryLocators.suggestedTableWidget) - .click() - .wait(1000); + cy.get(queryLocators.suggestedTableWidget).click().wait(1000); cy.wait("@updateLayout").then(({ response }) => { cy.log("1st Response is :" + JSON.stringify(response.body)); //expect(response.body.data.dsl.children[0].type).to.eq("TABLE_WIDGET"); @@ -482,9 +466,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the cy.CheckAndUnfoldEntityItem("Queries/JS"); cy.get("@entity").then((entityN) => cy.selectEntityByName(entityN)); - cy.get(queryLocators.suggestedWidgetChart) - .click() - .wait(1000); + cy.get(queryLocators.suggestedWidgetChart).click().wait(1000); cy.wait("@updateLayout").then(({ response }) => { cy.log("2nd Response is :" + JSON.stringify(response.body)); //expect(response.body.data.dsl.children[1].type).to.eq("CHART_WIDGET"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.ts b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.ts index b219eea85c..bcabe4671d 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.ts +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.ts @@ -17,7 +17,7 @@ describe("Validate Mongo Query Pane Validations", () => { //dataSources.StartDataSourceRoutes(); //already started in index.js beforeeach }); - beforeEach(function() { + beforeEach(function () { if (INTERCEPT.MONGO) { cy.log("Mongo DB is not found. Using intercept"); dataSources.StartInterceptRoutesForMongo(); @@ -651,7 +651,7 @@ describe("Validate Mongo Query Pane Validations", () => { agHelper.AssertElementAbsence(ee._entityNameInExplorer("AuthorNAwards")); }); - it("18. Verify application does not break when user runs the query with wrong collection name", function() { + it("18. Verify application does not break when user runs the query with wrong collection name", function () { const dropCollection = `{ "drop": "AuthorNAwards" }`; dataSources.NavigateFromActiveDS(dsName, true); dataSources.ValidateNSelectDropdown("Commands", "Find Document(s)", "Raw"); diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Postgres_Spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Postgres_Spec.js index 14c2cab849..7966b33c74 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Postgres_Spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Postgres_Spec.js @@ -7,14 +7,14 @@ import { ObjectsRegistry } from "../../../../support/Objects/Registry"; let ee = ObjectsRegistry.EntityExplorer; let datasourceName; -describe("Validate CRUD queries for Postgres along with UI flow verifications", function() { +describe("Validate CRUD queries for Postgres along with UI flow verifications", function () { // afterEach(function() { // if (this.currentTest.state === "failed") { // Cypress.runner.stop(); // } // }); - it("1. Creates a new Postgres datasource", function() { + it("1. Creates a new Postgres datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); cy.fillPostgresDatasourceForm(); @@ -130,7 +130,7 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications", cy.runAndDeleteQuery(); }); - it("8. Verify generation of NewPage from New table & perform Add/Update/Delete operations", function() { + it("8. Verify generation of NewPage from New table & perform Add/Update/Delete operations", function () { //Verifying Select from UI cy.NavigateToDSGeneratePage(datasourceName); cy.get(generatePage.selectTableDropdown).click(); @@ -280,9 +280,7 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications", cy.NavigateToActiveTab(); cy.contains(".t--datasource-name", datasourceName).click(); cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); cy.wait("@deleteDatasource").should( "have.nested.property", @@ -308,19 +306,15 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications", cy.deleteQueryUsingContext(); }); - it("11. Bug 9425: The application is breaking when user run the query with wrong table name", function() { + it("11. Bug 9425: The application is breaking when user run the query with wrong table name", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.get(queryLocators.templateMenu).click({ force: true }); cy.typeValueNValidate("select * from public.users limit 10"); cy.runQuery(); cy.typeValueNValidate("select * from public.users_crud limit 10"); cy.onlyQueryRun(); - cy.get(commonlocators.debugger) - .should("be.visible") - .click({ force: true }); - cy.get(commonlocators.errorTab) - .should("be.visible") - .click({ force: true }); + cy.get(commonlocators.debugger).should("be.visible").click({ force: true }); + cy.get(commonlocators.errorTab).should("be.visible").click({ force: true }); cy.get(commonlocators.debuggerLabel) .first() .invoke("text") @@ -330,7 +324,7 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications", cy.deleteQueryUsingContext(); }); - it("12. Bug 14493: The application is breaking when user runs the query with result as empty array", function() { + it("12. Bug 14493: The application is breaking when user runs the query with result as empty array", function () { cy.NavigateToActiveDSQueryPane(datasourceName); cy.get(queryLocators.templateMenu).click({ force: true }); cy.typeValueNValidate( diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/S3_1_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/S3_1_spec.js index ebb264a857..b548c7d452 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/S3_1_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/S3_1_spec.js @@ -10,7 +10,7 @@ import { WIDGET } from "../../../../locators/WidgetLocators"; let datasourceName; -describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", function() { +describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", function () { beforeEach(() => { cy.startRoutesForDatasource(); }); @@ -26,11 +26,9 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", // cy.actionContextMenuByEntityName(queryName); // }); - before("Creates a new Amazon S3 datasource", function() { + before("Creates a new Amazon S3 datasource", function () { cy.NavigateToDatasourceEditor(); - cy.get(datasource.AmazonS3) - .click({ force: true }) - .wait(1000); + cy.get(datasource.AmazonS3).click({ force: true }).wait(1000); cy.generateUUID().then((uid) => { datasourceName = `Amazon S3 CRUD ds ${uid}`; @@ -371,7 +369,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", cy.deleteQueryUsingContext(); //exeute actions & 200 response is verified in this method }); - it("4. Create new file in bucket for UI Operations & Verify Search, Delete operations from NewPage UI created in S3 ds & Bug 8686, 8684", function() { + it("4. Create new file in bucket for UI Operations & Verify Search, Delete operations from NewPage UI created in S3 ds & Bug 8686, 8684", function () { //Creating new file in bucket cy.NavigateToActiveDSQueryPane(datasourceName); cy.ValidateAndSelectDropdownOption( @@ -443,9 +441,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", cy.ClickGotIt(); //Verifying Searching File from UI - cy.xpath(queryLocators.searchFilefield) - .type("CRUD") - .wait(7000); //for search to finish + cy.xpath(queryLocators.searchFilefield).type("CRUD").wait(7000); //for search to finish cy.get(".t--widget-textwidget span:contains('CRUDNewPageFile')") .should("have.length", 1) @@ -456,9 +452,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", // cy.window().its('navigator.clipboard').invoke('readText').should('contain', 'CRUDNewPageFile') //Verifying DeleteFile icon from UI - cy.xpath(queryLocators.deleteFileicon) - .eq(0) - .click(); //Verifies 8684 + cy.xpath(queryLocators.deleteFileicon).eq(0).click(); //Verifies 8684 cy.VerifyErrorMsgAbsence("Cyclic dependency found while evaluating"); //Verifies 8686 expect( @@ -476,9 +470,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", cy.NavigateToActiveTab(); cy.contains(".t--datasource-name", datasourceName).click(); cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); cy.wait("@deleteDatasource").should( "have.nested.property", "response.body.responseMeta.status", @@ -491,7 +483,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", ); }); - it("6. Bug 9069, 9201, 6975, 9922, 3836, 6492, 11833: Upload/Update query is failing in S3 crud pages", function() { + it("6. Bug 9069, 9201, 6975, 9922, 3836, 6492, 11833: Upload/Update query is failing in S3 crud pages", function () { cy.NavigateToDSGeneratePage(datasourceName); cy.wait(5000); //for buckets to populate //Verifying List of Files from UI @@ -538,9 +530,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", .should("contain.text", "File Uploaded"); //Verifies bug # 6975 //Verifying Searching File from UI - cy.xpath(queryLocators.searchFilefield) - .type("AAAGlobeChri") - .wait(7000); //for search to finish + cy.xpath(queryLocators.searchFilefield).type("AAAGlobeChri").wait(7000); //for search to finish cy.get(`.t--widget-textwidget span:contains(${fixturePath})`) .should("have.length", 1) @@ -651,26 +641,20 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", formControls.s3BucketName, ); cy.runQuery(); - cy.xpath(queryLocators.suggestedWidgetDropdown) - .click() - .wait(1000); + cy.xpath(queryLocators.suggestedWidgetDropdown).click().wait(1000); cy.get(".t--draggable-selectwidget").validateWidgetExists(); _.entityExplorer.SelectEntityByName("Select1", "Widgets"); _.agHelper.GetNClick(_.propPane._deleteWidget); _.entityExplorer.SelectEntityByName($queryName, "Queries/JS"); - cy.get(queryLocators.suggestedTableWidget) - .click() - .wait(1000); + cy.get(queryLocators.suggestedTableWidget).click().wait(1000); cy.get(commonlocators.TableV2Row).validateWidgetExists(); _.entityExplorer.SelectEntityByName("Table1", "Widgets"); _.agHelper.GetNClick(_.propPane._deleteWidget); _.entityExplorer.SelectEntityByName($queryName, "Queries/JS"); - cy.xpath(queryLocators.suggestedWidgetText) - .click() - .wait(1000); + cy.xpath(queryLocators.suggestedWidgetText).click().wait(1000); cy.get(commonlocators.textWidget).validateWidgetExists(); _.entityExplorer.SelectEntityByName("Text1", "Widgets"); _.agHelper.GetNClick(_.propPane._deleteWidget); @@ -695,9 +679,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", ); cy.runQuery(); cy.clickButton("Select Widget"); - cy.xpath(queryLocators.snipeableTable) - .click() - .wait(1500); //wait for table to load! + cy.xpath(queryLocators.snipeableTable).click().wait(1500); //wait for table to load! cy.get(commonlocators.TableV2Row).validateWidgetExists(); @@ -715,9 +697,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", cy.NavigateToActiveTab(); cy.contains(".t--datasource-name", datasourceName).click({ force: true }); cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); // cy.wait("@deleteDatasource").should( // "have.nested.property", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/S3_2_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/S3_2_spec.js index 8a1868797c..67f42a1922 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/S3_2_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/S3_2_spec.js @@ -12,7 +12,7 @@ let agHelper = ObjectsRegistry.AggregateHelper, let datasourceName; -describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", function() { +describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", function () { beforeEach(() => { agHelper.RestoreLocalStorageCache(); cy.startRoutesForDatasource(); @@ -33,11 +33,9 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", // cy.actionContextMenuByEntityName(queryName); // }); - it("1. Creates a new Amazon S3 datasource", function() { + it("1. Creates a new Amazon S3 datasource", function () { cy.NavigateToDatasourceEditor(); - cy.get(datasource.AmazonS3) - .click({ force: true }) - .wait(1000); + cy.get(datasource.AmazonS3).click({ force: true }).wait(1000); cy.generateUUID().then((uid) => { datasourceName = `Amazon S3 CRUD ds ${uid}`; @@ -49,7 +47,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", cy.testSaveDatasource(); }); - it("2. Bug 9069, 9201, 6975, 9922, 3836, 6492, 11833: Upload/Update query is failing in S3 crud pages", function() { + it("2. Bug 9069, 9201, 6975, 9922, 3836, 6492, 11833: Upload/Update query is failing in S3 crud pages", function () { cy.NavigateToDSGeneratePage(datasourceName); cy.wait(3000); //Verifying List of Files from UI @@ -96,9 +94,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", .should("contain.text", "File Uploaded"); //Verifies bug # 6975 //Verifying Searching File from UI - cy.xpath(queryLocators.searchFilefield) - .type("AAAGlobeChri") - .wait(7000); //for search to finish + cy.xpath(queryLocators.searchFilefield).type("AAAGlobeChri").wait(7000); //for search to finish cy.get(`.t--widget-textwidget span:contains(${fixturePath})`) .should("have.length", 1) @@ -210,22 +206,16 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", // cy.wrap(entity).as("entity"); // }); cy.runQuery(); - cy.xpath(queryLocators.suggestedWidgetDropdown) - .click() - .wait(1000); + cy.xpath(queryLocators.suggestedWidgetDropdown).click().wait(1000); cy.get(".t--draggable-selectwidget").validateWidgetExists(); ee.SelectEntityByName("Query1", "Queries/JS"); //cy.get("@entity").then((entityN) => cy.selectEntityByName(entityN)); - cy.get(queryLocators.suggestedTableWidget) - .click() - .wait(1000); + cy.get(queryLocators.suggestedTableWidget).click().wait(1000); cy.get(commonlocators.TableV2Row).validateWidgetExists(); ee.SelectEntityByName("Query1", "Queries/JS"); - cy.xpath(queryLocators.suggestedWidgetText) - .click() - .wait(1000); + cy.xpath(queryLocators.suggestedWidgetText).click().wait(1000); cy.get(commonlocators.textWidget).validateWidgetExists(); ee.SelectEntityByName("Query1", "Queries/JS"); @@ -237,9 +227,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", ee.SelectEntityByName("Query1", "Queries/JS"); cy.runQuery(); cy.clickButton("Select Widget"); - cy.xpath(queryLocators.snipeableTable) - .click() - .wait(1500); //wait for table to load! + cy.xpath(queryLocators.snipeableTable).click().wait(1500); //wait for table to load! cy.get(commonlocators.TableRow).validateWidgetExists(); ee.SelectEntityByName("Query1", "Queries/JS"); @@ -254,9 +242,7 @@ describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", cy.NavigateToActiveTab(); cy.contains(".t--datasource-name", datasourceName).click({ force: true }); cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); // cy.wait("@deleteDatasource").should( // "have.nested.property", diff --git a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/SwitchDatasource_spec.js b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/SwitchDatasource_spec.js index 71267d94a9..7cd77ef3f0 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/SwitchDatasource_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/SwitchDatasource_spec.js @@ -1,7 +1,7 @@ const datasource = require("../../../../locators/DatasourcesEditor.json"); const queryLocators = require("../../../../locators/QueryEditor.json"); -describe("Switch datasource", function() { +describe("Switch datasource", function () { let postgresDatasourceName; let postgresDatasourceNameSecond; let mongoDatasourceName; @@ -10,7 +10,7 @@ describe("Switch datasource", function() { cy.startRoutesForDatasource(); }); - it("1. Create postgres datasource", function() { + it("1. Create postgres datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); cy.generateUUID().then((uid) => { @@ -27,7 +27,7 @@ describe("Switch datasource", function() { cy.testSaveDatasource(); }); - it("2. Create another postgres datasource", function() { + it("2. Create another postgres datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.PostgreSQL).click(); cy.generateUUID().then((uid) => { @@ -44,7 +44,7 @@ describe("Switch datasource", function() { cy.testSaveDatasource(); }); - it("3. Create mongo datasource", function() { + it("3. Create mongo datasource", function () { cy.NavigateToDatasourceEditor(); cy.get(datasource.MongoDB).click(); cy.generateUUID().then((uid) => { @@ -61,7 +61,7 @@ describe("Switch datasource", function() { cy.testSaveDatasource(); }); - it("4. By switching datasources execute a query with both the datasources", function() { + it("4. By switching datasources execute a query with both the datasources", function () { cy.NavigateToActiveDSQueryPane(postgresDatasourceName); cy.get(queryLocators.templateMenu).click({ force: true }); cy.get(".CodeMirror textarea") @@ -87,12 +87,12 @@ describe("Switch datasource", function() { ); }); - it("5. Confirm mongo datasource is not present in the switch datasources dropdown", function() { + it("5. Confirm mongo datasource is not present in the switch datasources dropdown", function () { cy.get(".t--switch-datasource").click(); cy.get(".t--datasource-option").should("not.have", mongoDatasourceName); }); - it("6. Delete the query and datasources", function() { + it("6. Delete the query and datasources", function () { cy.deleteQueryUsingContext(); cy.deleteDatasource(postgresDatasourceName); cy.deleteDatasource(postgresDatasourceNameSecond); diff --git a/app/client/cypress/integration/Regression_TestSuite/UpgradeAppsmith/UpgradeAppsimth_spec.js b/app/client/cypress/integration/Regression_TestSuite/UpgradeAppsmith/UpgradeAppsimth_spec.js index c05a0349ab..52baed67ba 100644 --- a/app/client/cypress/integration/Regression_TestSuite/UpgradeAppsmith/UpgradeAppsimth_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/UpgradeAppsmith/UpgradeAppsimth_spec.js @@ -62,9 +62,7 @@ describe("Upgrade appsmith version", () => { "have.value", ); - cy.get(".t--jsonformfield-label input") - .clear() - .type("DevelopmentUpdate"); + cy.get(".t--jsonformfield-label input").clear().type("DevelopmentUpdate"); agHelper.GetNClick(".t--jsonform-footer button", 1, true); agHelper.Sleep(2000); agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true, 1000); @@ -77,9 +75,7 @@ describe("Upgrade appsmith version", () => { //Resetting the data agHelper.GetNClick(".tbody>div", 1, true, 1000); - cy.get(".t--jsonformfield-label input") - .clear() - .type("Development"); + cy.get(".t--jsonformfield-label input").clear().type("Development"); agHelper.GetNClick(".t--jsonform-footer button", 1, true); agHelper.Sleep(2000); agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true, 1000); diff --git a/app/client/cypress/manual_TestSuite/API_Datasource_Spec.js b/app/client/cypress/manual_TestSuite/API_Datasource_Spec.js index 441da510bd..35fb0873bd 100644 --- a/app/client/cypress/manual_TestSuite/API_Datasource_Spec.js +++ b/app/client/cypress/manual_TestSuite/API_Datasource_Spec.js @@ -1,7 +1,7 @@ const commonlocators = require("../../../locators/commonlocators.json"); -describe("API associated with Datasource", function() { - it("Edit name of the Datasource from Pane and refeclected in the Page ", function() { +describe("API associated with Datasource", function () { + it("Edit name of the Datasource from Pane and refeclected in the Page ", function () { // Click on the API datasource // Click on Action icon (Three Dots) // Click on "Edit Name" @@ -9,14 +9,14 @@ describe("API associated with Datasource", function() { // Click on the datasource // Ensure the name is updated on the Page }); - it("Edit name of the Datasource from Page and refeclected in the Pane", function() { + it("Edit name of the Datasource from Page and refeclected in the Pane", function () { // Click on the API datasource // Navigate to respective // Click on "Edit " option next to the Name of the datasource // Rename the Datasource // Ensure the name is updated in the Pane }); - it("Edit the API Datasource", function() { + it("Edit the API Datasource", function () { // Click on the API datasource // Ensure navigation to respective page // Click on "EDIT" @@ -25,26 +25,26 @@ describe("API associated with Datasource", function() { // Click on Save // Ensure it is refelected in the API }); - it("Error on trying to Deleting an API Datasource when associated with API ", function() { + it("Error on trying to Deleting an API Datasource when associated with API ", function () { // Click on API associated Datasource // Navigate to respective page // Click on "Delete" // Ensure an error message is displayed to user }); - it("Adding the API to an exsisting Datasource", function() { + it("Adding the API to an exsisting Datasource", function () { // Click on exsisting Datasource // Navigate to Datasource list page // Click on "+ New API" // Ensure new API is added in the RHS Pane // Click on "Run" }); - it("Refresh an Datasource ", function() { + it("Refresh an Datasource ", function () { // Navigate to the Datasource // Click on Action icon (Three Dots) // Click on "Refresh" // Ensure loading icon }); - it("User must be displayed with error message when tried to run an empty API ", function() { + it("User must be displayed with error message when tried to run an empty API ", function () { // Navigate to the API // Click on "RUN" // Ensure an Information j /Ún80jq3message is dispalyed in the Response Body diff --git a/app/client/cypress/manual_TestSuite/Clipboard_Copy_Spec.js b/app/client/cypress/manual_TestSuite/Clipboard_Copy_Spec.js index b6b615dbfc..af4d499aab 100644 --- a/app/client/cypress/manual_TestSuite/Clipboard_Copy_Spec.js +++ b/app/client/cypress/manual_TestSuite/Clipboard_Copy_Spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../fixtures/tableWidgetDsl.json"); -describe("Test for Clipboard Copy", function() { - it(" Clipboard copy on selecting a row ", function() { +describe("Test for Clipboard Copy", function () { + it(" Clipboard copy on selecting a row ", function () { // Add a table widget // Click on the Property Pane // Naviagte to Action Items @@ -13,7 +13,7 @@ describe("Test for Clipboard Copy", function() { // Now paste the copied text // Ensure the text the same as written }); - it(" Clipboard copy by adding an action button", function() { + it(" Clipboard copy by adding an action button", function () { // Add a table widget // Click on the Property Pane // Naviagte to Action Items @@ -26,7 +26,7 @@ describe("Test for Clipboard Copy", function() { // Paste the text into the widget // Ensure the text the same as written }); - it(" Clipboard copy function by converting it to JS ", function() { + it(" Clipboard copy function by converting it to JS ", function () { // Add a table widget // Click on the Property Pane // Naviagte to Action Items diff --git a/app/client/cypress/manual_TestSuite/CommentedScriptFiles/Map_spec.js b/app/client/cypress/manual_TestSuite/CommentedScriptFiles/Map_spec.js index 119239e6bd..58c6f99e6e 100644 --- a/app/client/cypress/manual_TestSuite/CommentedScriptFiles/Map_spec.js +++ b/app/client/cypress/manual_TestSuite/CommentedScriptFiles/Map_spec.js @@ -4,12 +4,12 @@ const dsl = require("../../fixtures/Mapdsl.json"); const publishPage = require("../../locators/publishWidgetspage.json"); if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) { - describe("Map Widget Functionality", function() { + describe("Map Widget Functionality", function () { before(() => { cy.addDsl(dsl); }); - it("Map Widget Functionality", function() { + it("Map Widget Functionality", function () { cy.openPropertyPane("mapwidget"); /** * @param{Text} Random Text @@ -32,12 +32,8 @@ if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) { .type(JSON.stringify(this.data.marker), { parseSpecialCharSequences: false, }); - cy.get(viewWidgetsPage.zoomLevel) - .eq(0) - .click({ force: true }); - cy.get(viewWidgetsPage.zoomLevel) - .eq(1) - .click({ force: true }); + cy.get(viewWidgetsPage.zoomLevel).eq(0).click({ force: true }); + cy.get(viewWidgetsPage.zoomLevel).eq(1).click({ force: true }); cy.get(viewWidgetsPage.mapSearch) .click({ force: true }) .clear() @@ -45,7 +41,7 @@ if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) { .type("{enter}"); }); - it("Map-Enable Location,Map search and Create Marker Property Validation", function() { + it("Map-Enable Location,Map search and Create Marker Property Validation", function () { /** * Enable the Search Location checkbox and Validate the same in editor mode */ @@ -80,7 +76,7 @@ if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) { cy.get(publishPage.backToEditor).click(); }); - it("Map-Disable Location, Mapsearch and Create Marker Property Validation", function() { + it("Map-Disable Location, Mapsearch and Create Marker Property Validation", function () { cy.openPropertyPane("mapwidget"); /** * Disable the Search Location checkbox and Validate the same in editor mode @@ -110,7 +106,7 @@ if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) { cy.get(publishPage.backToEditor).click(); }); - it("Map-Initial location should work", function() { + it("Map-Initial location should work", function () { cy.openPropertyPane("mapwidget"); cy.get(viewWidgetsPage.mapinitialloc).should( @@ -127,7 +123,7 @@ if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) { .should("have.value", ""); }); - it("Map-Check Visible field Validation", function() { + it("Map-Check Visible field Validation", function () { //Check the disableed checkbox and Validate cy.CheckWidgetProperties(commonlocators.visibleCheckbox); cy.PublishtheApp(); @@ -135,7 +131,7 @@ if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) { cy.get(publishPage.backToEditor).click(); }); - it("Map-Unckeck Visible field Validation", function() { + it("Map-Unckeck Visible field Validation", function () { cy.openPropertyPane("mapwidget"); //Uncheck the disabled checkbox and validate cy.UncheckWidgetProperties(commonlocators.visibleCheckbox); diff --git a/app/client/cypress/manual_TestSuite/CommentedScriptFiles/Table_Duplicate_ColumnName_spec.js b/app/client/cypress/manual_TestSuite/CommentedScriptFiles/Table_Duplicate_ColumnName_spec.js index bead70e9a6..3b7052adbb 100644 --- a/app/client/cypress/manual_TestSuite/CommentedScriptFiles/Table_Duplicate_ColumnName_spec.js +++ b/app/client/cypress/manual_TestSuite/CommentedScriptFiles/Table_Duplicate_ColumnName_spec.js @@ -1,6 +1,6 @@ const dsl = require("../../fixtures/tableNewDsl.json"); -describe("prevent duplicate column name in table", function() { +describe("prevent duplicate column name in table", function () { before(() => { cy.addDsl(dsl); }); diff --git a/app/client/cypress/manual_TestSuite/Deletion _of_Duplicate_App.js b/app/client/cypress/manual_TestSuite/Deletion _of_Duplicate_App.js index fb479b90ee..2ee288e13b 100644 --- a/app/client/cypress/manual_TestSuite/Deletion _of_Duplicate_App.js +++ b/app/client/cypress/manual_TestSuite/Deletion _of_Duplicate_App.js @@ -1,7 +1,7 @@ import homePage from "../../../locators/HomePage"; -describe("Duplicate an application must duplicate every API ,Query widget and Datasource", function() { - it("Duplicating an application", function() { +describe("Duplicate an application must duplicate every API ,Query widget and Datasource", function () { + it("Duplicating an application", function () { // Navigate to home Page // Click on any application action icon (Three dots) // Click on "Duplicate" option diff --git a/app/client/cypress/manual_TestSuite/Duplicate_App_Spec.js b/app/client/cypress/manual_TestSuite/Duplicate_App_Spec.js index 094696e7b2..4c7d43bb4e 100644 --- a/app/client/cypress/manual_TestSuite/Duplicate_App_Spec.js +++ b/app/client/cypress/manual_TestSuite/Duplicate_App_Spec.js @@ -1,14 +1,14 @@ import homePage from "../../../locators/HomePage"; -describe("Duplicate an application must duplicate every API ,Query widget and Datasource", function() { - it("Duplicating an application", function() { +describe("Duplicate an application must duplicate every API ,Query widget and Datasource", function () { + it("Duplicating an application", function () { // Navigate to home Page // Click on any application action icon (Three dots) // Click on "Duplicate" option // Ensure the application gets copied // Ensure the name is appended with the word "Copy" }); - it("Deleting the duplicated Application ", function() { + it("Deleting the duplicated Application ", function () { // Navigate to home Page // Click on any application action icon (Three dots) // Click on "Duplicate" option @@ -20,7 +20,7 @@ describe("Duplicate an application must duplicate every API ,Query widget and Da // Ensure the App gets deleted }); - it(" Ensure only the original application is deleted and copy of it exists", function() { + it(" Ensure only the original application is deleted and copy of it exists", function () { // Navigate to home Page // Create an Application // Add a name to the application @@ -33,7 +33,7 @@ describe("Duplicate an application must duplicate every API ,Query widget and Da // Ensure only Original Application is deleted and not the child application }); - it(" Ensure only the Duplicate application is deleted and original Application of it exists", function() { + it(" Ensure only the Duplicate application is deleted and original Application of it exists", function () { // Navigate to home Page // Create an Application // Add a name to the application diff --git a/app/client/cypress/manual_TestSuite/Edit_Profile_Spec.js b/app/client/cypress/manual_TestSuite/Edit_Profile_Spec.js index daa1d378f5..3032e1ff25 100644 --- a/app/client/cypress/manual_TestSuite/Edit_Profile_Spec.js +++ b/app/client/cypress/manual_TestSuite/Edit_Profile_Spec.js @@ -1,14 +1,14 @@ const dsl = require("../../../fixtures/profileDsl.json"); -describe("Page functionality ", function() { - it("Profile Page", function() { +describe("Page functionality ", function () { + it("Profile Page", function () { // Click on Name // Navigate to "Edit Profile" // Ensure Display name and Email Id are displayed to user // Ensure Reset password link is disaplyed to user }); - it("Edit Display Name", function() { + it("Edit Display Name", function () { // Click on Name // Navigate to "Edit Profile" // Ensure Display name is editable @@ -17,7 +17,7 @@ describe("Page functionality ", function() { // Ensure the name of the is displayed in the droped }); - it("Edit Display Name", function() { + it("Edit Display Name", function () { // Click on Name // Navigate to "Edit Profile" // Ensure the "Reset Password" link is dispalyed to user diff --git a/app/client/cypress/manual_TestSuite/GoogleSheet_API_Spec.js b/app/client/cypress/manual_TestSuite/GoogleSheet_API_Spec.js index 3a43e1db1d..24f15529c9 100644 --- a/app/client/cypress/manual_TestSuite/GoogleSheet_API_Spec.js +++ b/app/client/cypress/manual_TestSuite/GoogleSheet_API_Spec.js @@ -2,8 +2,8 @@ const queryLocators = require("../../../locators/QueryEditor.json"); const queryEditor = require("../../../locators/QueryEditor.json"); let datasourceName; -describe("Test Ideas for GooglSheet API", function() { - it("Add a Datasource", function() { +describe("Test Ideas for GooglSheet API", function () { + it("Add a Datasource", function () { //Add the datasource to Email Id //Ensure different Email Id can be associate to different Email Id //Ensure Datasource has two action "Read Only" and "Read" @@ -11,19 +11,19 @@ describe("Test Ideas for GooglSheet API", function() { //Click on "Add API" }); - it("List API", function() { + it("List API", function () { //Select the Method "List Sheet" //Ensure response : URL and Name of the sheet //Ensure "Add Widget" is displayed to user //Ensure click on Add widget the data gets populated on the widget }); - it("Fetch a Sheet", function() { + it("Fetch a Sheet", function () { //Select the Method "Fetch Sheet" //Ensure response :id,name,createdTime,modifiedTime,permissions }); - it("Create New Sheet", function() { + it("Create New Sheet", function () { //Ensure the response is appropriate //Ensure to select the method //Ensure to select a new name to the spreadsheet @@ -33,7 +33,7 @@ describe("Test Ideas for GooglSheet API", function() { //Send the response body with defined value and ensure the data is added }); - it("Insert a sheet or Update a sheet", function() { + it("Insert a sheet or Update a sheet", function () { //Ensure to select the method //Ensure to add the spreadsheet URL //Ensure add the sheet name in which it needs to be inserted @@ -47,7 +47,7 @@ describe("Test Ideas for GooglSheet API", function() { //Ensure to update the "headername" }); - it("Bulk Insert or Bulk Update", function() { + it("Bulk Insert or Bulk Update", function () { //Ensure to select the method //Ensure to add the spreadsheet URL //Ensure add the Table Heading Row Index @@ -59,7 +59,7 @@ describe("Test Ideas for GooglSheet API", function() { //Add doc URL different and name of sheet that doesnt exsit in the doc and ensure the error is displayed }); - it("Delete a Row", function() { + it("Delete a Row", function () { //Ensure to select the method //Ensure to add the spreadsheet URL //Ensure to add the sheet name @@ -69,7 +69,7 @@ describe("Test Ideas for GooglSheet API", function() { //Enter index as on and check the first data value gets deleted }); - it("Delete a Sheet", function() { + it("Delete a Sheet", function () { //Ensure to select the method //Ensure to add the spreadsheet URL //Ensure to add the sheet name @@ -77,7 +77,7 @@ describe("Test Ideas for GooglSheet API", function() { //Choose Entity has Entire spreadsheet and try to deleted the sheet }); - it("Fetch Sheet Rows", function() { + it("Fetch Sheet Rows", function () { //Ensure to select the method //Ensure to add the spreadsheet URL //Ensure to add the sheet name diff --git a/app/client/cypress/manual_TestSuite/Invite_flow_Spec.js b/app/client/cypress/manual_TestSuite/Invite_flow_Spec.js index 648a8e2ac4..b3f3d9f188 100644 --- a/app/client/cypress/manual_TestSuite/Invite_flow_Spec.js +++ b/app/client/cypress/manual_TestSuite/Invite_flow_Spec.js @@ -1,40 +1,40 @@ import homePage from "../../../locators/HomePage"; -describe("adding role without Email Id", function() { - it("Empty Email ID Invite flow", function() { +describe("adding role without Email Id", function () { + it("Empty Email ID Invite flow", function () { // Navigate to Home Page // Click on "Share" option // Add Role from the dropdown // Ensure the "Invite" option is "Inactive" }); - it("Error message must be dispalyed to user on inappropriate Email ID", function() { + it("Error message must be dispalyed to user on inappropriate Email ID", function () { // Navigate to Home Page // Click on "Share" option // Add inappropriate Email Id // Select the "Role" // Ensure the "Invite" option is "Inactive" and error message is displayed to user }); - it("Clicking on the workspace list the user must be lead to workspace Station ", function() { + it("Clicking on the workspace list the user must be lead to workspace Station ", function () { // Navigate to Home Page // Navigate to Workspace list // Click on one of the workspace name // Ensure user is directed to the workspace }); - it("Admin can only assign another Admin ", function() { + it("Admin can only assign another Admin ", function () { // Navigate to Workspace Setting // Navigate to Members // Navigate to roles // Ensure your also an "Admin" // Change the role "Admin" }); - it("Ensure the user can not delete or create an application in the workspace", function() { + it("Ensure the user can not delete or create an application in the workspace", function () { // Navigate to Home page // Navigate to Members // Navigate to roles // Ensure role is "App Viewer" // Ensure user is not able to delete or add any user for the application }); - it("Ensure On invalid Email Id the box must get highlighted", function() { + it("Ensure On invalid Email Id the box must get highlighted", function () { // Navigate to Home page // Click on the Share option // Ensure the pop up opens diff --git a/app/client/cypress/manual_TestSuite/List_Widget_Spec.js b/app/client/cypress/manual_TestSuite/List_Widget_Spec.js index 720bd2ab87..b29237883a 100644 --- a/app/client/cypress/manual_TestSuite/List_Widget_Spec.js +++ b/app/client/cypress/manual_TestSuite/List_Widget_Spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../fixtures/ListWidgetDsl.json"); -describe("List Widget test ideas ", function() { - it("List widget background colour and deploy ", function() { +describe("List Widget test ideas ", function () { + it("List widget background colour and deploy ", function () { // Drag and drop a List widget // Open Property pane // Scroll down to Styles @@ -11,7 +11,7 @@ describe("List Widget test ideas ", function() { // Click on Deploy and ensure it is deployed appropriately }); - it("Adding large item Spacing for item card", function() { + it("Adding large item Spacing for item card", function () { // Drag and drop a List widget // Open Property pane // Scroll down to Styles @@ -19,7 +19,7 @@ describe("List Widget test ideas ", function() { // Ensure the cards get spaced appropriately }); - it("Binding an API data to list widget ", function() { + it("Binding an API data to list widget ", function () { //Add an API // Drag and drop a List widget // Open list Property pane @@ -28,7 +28,7 @@ describe("List Widget test ideas ", function() { // Bind the input widgte to the list widget }); - it("Copy Paste and Delete the List Widget ", function() { + it("Copy Paste and Delete the List Widget ", function () { // Drag and drop a List widget // Click on the property pane // Click on Copy the widget @@ -36,7 +36,7 @@ describe("List Widget test ideas ", function() { // Click on the delete option of the Parent widget }); - it("Renaming the widget from Property pane and Entity explorer ", function() { + it("Renaming the widget from Property pane and Entity explorer ", function () { // Drag and drop a List widget // Click on the property pane // Click name of the widget @@ -48,7 +48,7 @@ describe("List Widget test ideas ", function() { // Ensure the name of the widget is possible from both the place }); - it("Verify the Pagination functionlaity within List Widget", function() { + it("Verify the Pagination functionlaity within List Widget", function () { // Drag and Drop list Widget // Click on page 2 // Ensure list widget will be redirected to page 2 @@ -62,7 +62,7 @@ describe("List Widget test ideas ", function() { // Ensure the tool tip message is appropriate }); - it("Add new item in the list widget array object", function() { + it("Add new item in the list widget array object", function () { //Drag and drop list widget //Click to open an property pane //Expand Genearl section @@ -72,7 +72,7 @@ describe("List Widget test ideas ", function() { //Check for the new page is added upon adding new items }); - it("Adding apt widget into the List widget", function() { + it("Adding apt widget into the List widget", function () { //Drag and Drop List widget //Expand the section 1 size in the list widget //Ensure by exapdning section inside list widget the page size gets increased @@ -84,7 +84,7 @@ describe("List Widget test ideas ", function() { // Ensure text widget can be place inside the list widget }); - it("Adding unapt widget to identify the error message", function() { + it("Adding unapt widget to identify the error message", function () { //Drag and Drop List widget //Expand the section 1 size in the list widget //Drag and Drop widgets ie: Chart ,Date Picker radio button etc diff --git a/app/client/cypress/manual_TestSuite/Login_Spec.js b/app/client/cypress/manual_TestSuite/Login_Spec.js index 7df0239250..47f2478d71 100644 --- a/app/client/cypress/manual_TestSuite/Login_Spec.js +++ b/app/client/cypress/manual_TestSuite/Login_Spec.js @@ -3,8 +3,8 @@ const explorer = require("../../../locators/explorerlocators.json"); import homePage from "../../../locators/HomePage"; const loginPage = require("../../../locators/LoginPage.json"); -describe("Onboarding flow", function() { - it("Onboarding using Google Id ", function() { +describe("Onboarding flow", function () { + it("Onboarding using Google Id ", function () { // Navigate to Login Page // Click on "Sign In with Google" // Ensure user is navigated to Google Account @@ -15,7 +15,7 @@ describe("Onboarding flow", function() { // Click on Logout }); - it("Onboarding using Github ID ", function() { + it("Onboarding using Github ID ", function () { // Navigate to Login Page // Click on "Sign In with Github" // Ensure user is navigated to Github Account diff --git a/app/client/cypress/manual_TestSuite/Modal_Spec.js b/app/client/cypress/manual_TestSuite/Modal_Spec.js index 99f967b0a7..3cde39a2c4 100644 --- a/app/client/cypress/manual_TestSuite/Modal_Spec.js +++ b/app/client/cypress/manual_TestSuite/Modal_Spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../fixtures/ModalWidgetDsl.json"); -describe("Modal Functionality ", function() { - it("1. Collapse the tabs of Property pane", function() { +describe("Modal Functionality ", function () { + it("1. Collapse the tabs of Property pane", function () { // Add a modal widget from teh entity explorer // Click on the property Pane // Select Form Type as Modal Type @@ -18,7 +18,7 @@ describe("Modal Functionality ", function() { // Ensure the modal pop up }); - it("2. Rename a modal", function() { + it("2. Rename a modal", function () { // Click on the entity explore // Ensure modal is dispalyed to user // Rename the modal @@ -26,7 +26,7 @@ describe("Modal Functionality ", function() { // Click on the action button // Ensure the modal pop up }); - it("3. Convert Modal to ", function() { + it("3. Convert Modal to ", function () { // Click on the entity explore // Ensure modal is dispalyed to user // Add a button widget @@ -38,7 +38,7 @@ describe("Modal Functionality ", function() { // Click on the button // Ensure a form modal is dispalyed to user }); - it("4. Does not flicker when 'Show More' popover of a truncated text shows over it ", function() { + it("4. Does not flicker when 'Show More' popover of a truncated text shows over it ", function () { // Click on the entity explore // Ensure modal is dispalyed to user // Add a text widget diff --git a/app/client/cypress/manual_TestSuite/Mongo_Datasource_Spec.js b/app/client/cypress/manual_TestSuite/Mongo_Datasource_Spec.js index 71535487b0..42f03b577b 100644 --- a/app/client/cypress/manual_TestSuite/Mongo_Datasource_Spec.js +++ b/app/client/cypress/manual_TestSuite/Mongo_Datasource_Spec.js @@ -2,8 +2,8 @@ const queryLocators = require("../../../locators/QueryEditor.json"); const queryEditor = require("../../../locators/QueryEditor.json"); let datasourceName; -describe("Test Ideas for Mongo DB Form Input", function() { - it("Insert a Document", function() { +describe("Test Ideas for Mongo DB Form Input", function () { + it("Insert a Document", function () { //Ensure by choosing command as 'Insert a Document' the following fields will be displayed 'Collection Name' and 'Documents' //Click on Command and enter command name //Clicking on Collection name field ensure Evaluvated value popup appears and Evaluvated value should match @@ -13,7 +13,7 @@ describe("Test Ideas for Mongo DB Form Input", function() { //Try passing the invalid query in the document and run and verfiy the error message }); - it("Find One or More Document", function() { + it("Find One or More Document", function () { // Ensure by choosing command as 'Find one or more Document' the following fields will be displayed 'Collection Name' , 'Query' , 'Sort' , 'Projection' , 'Limit' and 'Skip' //Click on collection name and enter valid collection name (In which document is inserted ealrier) //Clicking on Collection Name field ensure Evaluvated value popup appears and Evaluvated value should match @@ -24,7 +24,7 @@ describe("Test Ideas for Mongo DB Form Input", function() { //Compare the response with the document inserted earlier and value should match }); - it("Update One Document", function() { + it("Update One Document", function () { //Ensure by choosing command as 'Update one Document' the following fields will be displayed 'Collection Name' , 'Query' , 'Sort' and 'Update' //Click on collection name and enter valid collection name (In which document is inserted ealrier) //Clicking on Collection Name field ensure Evaluvated value popup appears and Evaluvated value should match @@ -37,7 +37,7 @@ describe("Test Ideas for Mongo DB Form Input", function() { //Click on Update field and pass any invalid query and ensure query response with appropriate error message }); - it("Update One or More Document", function() { + it("Update One or More Document", function () { //Ensure by choosing command as 'Update one or More Document' the following fields will be displayed 'Collection Name' , 'Query' and 'Update' //Click on collection name and enter valid collection name (In which document is inserted ealrier) //Clicking on Collection Name field ensure Evaluvated value popup appears and Evaluvated value should match @@ -50,7 +50,7 @@ describe("Test Ideas for Mongo DB Form Input", function() { //Click on Update field and pass any invalid query and ensure query response with appropriate error message }); - it("Delet One or More Document", function() { + it("Delet One or More Document", function () { //Ensure by choosing command as 'Delete one or more Document' the following fields will be displayed 'Collection Name' , 'Query' and 'limit' //Ensure limit has two option 'Single Document' and 'All Matching document' //Click on collection name and enter valid collection name (In which document is inserted ealrier) @@ -64,13 +64,13 @@ describe("Test Ideas for Mongo DB Form Input", function() { //Repeat 'Find one or More Document' scenario and verify if the specified document is deleted }); - it("Perform Distinct Operation on a Document", function() { + it("Perform Distinct Operation on a Document", function () { //Ensure by choosing command as 'Count' the following fields will be displayed 'Collection Name' , 'Query' and 'Key/Field' //Click on collection name and enter valid collection name (In which document is inserted ealrier) //Clicking on Collection Name field ensure Evaluvated value popup appears and Evaluvated value should match }); - it("Perform Aggregate Operation on a Document", function() { + it("Perform Aggregate Operation on a Document", function () { //Ensure by choosing command as 'Count' the following fields will be displayed 'Collection Name' and 'Array of Pipelines' //Click on collection name and enter valid collection name (In which document is inserted ealrier) //Clicking on Collection Name field ensure Evaluvated value popup appears and Evaluvated value should match diff --git a/app/client/cypress/manual_TestSuite/Page_Features_Spec.js b/app/client/cypress/manual_TestSuite/Page_Features_Spec.js index dcc6b6893c..854443d260 100644 --- a/app/client/cypress/manual_TestSuite/Page_Features_Spec.js +++ b/app/client/cypress/manual_TestSuite/Page_Features_Spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../fixtures/pageWidgetDsl.json"); -describe("Page functionality ", function() { - it("Simple Page hide and show back", function() { +describe("Page functionality ", function () { + it("Simple Page hide and show back", function () { // Add addtional page // Navigate to Page 2 // Click on the Page2 functions (Three dots) @@ -15,7 +15,7 @@ describe("Page functionality ", function() { // Ensure the page is displayed to user }); - it("Adding the widgets and hiding the pages ", function() { + it("Adding the widgets and hiding the pages ", function () { // Add mulitple pages // Navigate to Page 3 // Add multiple widget on the page @@ -26,7 +26,7 @@ describe("Page functionality ", function() { // Ensure the pages other then the hidden page is dispalyed }); - it("Clone a page and hide the cloned page", function() { + it("Clone a page and hide the cloned page", function () { // Add mulitple pages // Navigate to Page 3 // Add multiple widget on the page diff --git a/app/client/cypress/manual_TestSuite/Query_Datasource_Spec.js b/app/client/cypress/manual_TestSuite/Query_Datasource_Spec.js index 681b2f7f8b..1ea190c11e 100644 --- a/app/client/cypress/manual_TestSuite/Query_Datasource_Spec.js +++ b/app/client/cypress/manual_TestSuite/Query_Datasource_Spec.js @@ -2,15 +2,15 @@ const queryLocators = require("../../../locators/QueryEditor.json"); const queryEditor = require("../../../locators/QueryEditor.json"); let datasourceName; -describe("Binding Datasource to Query", function() { - it("List of Datasource", function() { +describe("Binding Datasource to Query", function () { + it("List of Datasource", function () { // Navigate into the Application // Click on the '+' next to the Query option // Ensure list of Datasource is dispalyed to user // Ensure user is dispalyed with Edit datasource and New Query option }); - it("Adding new datasource with respect to query", function() { + it("Adding new datasource with respect to query", function () { // Navigate into the Application // Click on the '+' next to the Query option // Click on '+' new datasource @@ -19,7 +19,7 @@ describe("Binding Datasource to Query", function() { // Click on "Save" option }); - it("Adding an empty datasource", function() { + it("Adding an empty datasource", function () { // Navigate into the Application // Click on the '+' next to the Query option // Click on '+' new datasource @@ -29,7 +29,7 @@ describe("Binding Datasource to Query", function() { // Ensure an empty Datasource is saved }); - it("Test for incorrect datasource", function() { + it("Test for incorrect datasource", function () { // Navigate into the Application // Click on the '+' next to the Query option // Click on '+' new datasource diff --git a/app/client/cypress/manual_TestSuite/Share_User_Icon.js b/app/client/cypress/manual_TestSuite/Share_User_Icon.js index d833a4fc41..85c185fb32 100644 --- a/app/client/cypress/manual_TestSuite/Share_User_Icon.js +++ b/app/client/cypress/manual_TestSuite/Share_User_Icon.js @@ -1,7 +1,7 @@ import homePage from "../../../locators/HomePage"; -describe("Shared user icon ", function() { - it(" User Icon is disaplyed to user ", function() { +describe("Shared user icon ", function () { + it(" User Icon is disaplyed to user ", function () { // Navigate to home Page //Click on Share Icon // Click on Field to add an Email Id diff --git a/app/client/cypress/manual_TestSuite/Switch_Widget_Spec.js b/app/client/cypress/manual_TestSuite/Switch_Widget_Spec.js index 51195bf088..2f86a1db47 100644 --- a/app/client/cypress/manual_TestSuite/Switch_Widget_Spec.js +++ b/app/client/cypress/manual_TestSuite/Switch_Widget_Spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../fixtures/switchWidgetDsl.json"); -describe("Test to add switch widget in canvas", function() { - it(" Add a switch widget and bind it to action", function() { +describe("Test to add switch widget in canvas", function () { + it(" Add a switch widget and bind it to action", function () { // Add a switch widget // Click on the Property Pane // Naviagte to Action Items @@ -12,7 +12,7 @@ describe("Test to add switch widget in canvas", function() { // and observe the message is displyed to user }); - it(" Add a switch widget to a form to reset the widget", function() { + it(" Add a switch widget to a form to reset the widget", function () { // Add a Form widget // Add a switch widget // Navigate to Reset button of the Form @@ -27,7 +27,7 @@ describe("Test to add switch widget in canvas", function() { // and observe the the button becomes active }); - it(" Reset switch widget on date change", function() { + it(" Reset switch widget on date change", function () { // Add a Date Picker widget // Add a switch widget // Click on the Property Pane of Date Picker widget diff --git a/app/client/cypress/manual_TestSuite/Tab_Widget_Spec.js b/app/client/cypress/manual_TestSuite/Tab_Widget_Spec.js index 6e88a6da63..ac2e5b010e 100644 --- a/app/client/cypress/manual_TestSuite/Tab_Widget_Spec.js +++ b/app/client/cypress/manual_TestSuite/Tab_Widget_Spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../fixtures/TabWidgetDsl.json"); -describe("Tab widget", function() { - it("Movement of tabs inside Tab widget ", function() { +describe("Tab widget", function () { + it("Movement of tabs inside Tab widget ", function () { // Drag and drop the Tab widget // click on "Add a Tab" // Add multiple Tabs @@ -9,7 +9,7 @@ describe("Tab widget", function() { // and observe if the tab are moved in the same }); - it(" Deletion of Tabs and adding them back with Undo", function() { + it(" Deletion of Tabs and adding them back with Undo", function () { // Drag and drop the Tab widget // click on "Add a Tab" // Add multiple Tabs @@ -21,7 +21,7 @@ describe("Tab widget", function() { //and observe that the Tab is added back }); - it("Test Ideas for testing the Visible option for tabs ", function() { + it("Test Ideas for testing the Visible option for tabs ", function () { // Drag and drop the Tab widget // click on "Add a Tab" // Click on Property pane of the tab widget @@ -38,7 +38,7 @@ describe("Tab widget", function() { // Now observe the Tab must be visible and normal }); - it("Test Ideas for testing the Show Tabs Feature ", function() { + it("Test Ideas for testing the Show Tabs Feature ", function () { // Drag and drop the Tab widget // Click on Property pane of the tab widget // Scroll down to Show Tabs option @@ -53,7 +53,7 @@ describe("Tab widget", function() { // Now observe the Tab must be visible }); - it("Adding multiple widgets inside the Tab widget", function() { + it("Adding multiple widgets inside the Tab widget", function () { // Drag and drop the Tab widget // Ensure default 2 Tabs are dispalyed to user // Add date picker, Text and Button into Tab1 @@ -63,7 +63,7 @@ describe("Tab widget", function() { // Ensure the Tab widget with widgets are displayed to user }); - it("Adding action while changing the Tab ", function() { + it("Adding action while changing the Tab ", function () { // Drag and drop the Tab widget // Click on Property pane of the tab widget // Navigate to Action section @@ -74,7 +74,7 @@ describe("Tab widget", function() { // and observe the modal pop up is displayed to user }); - it("Binding the Tab to widget ", function() { + it("Binding the Tab to widget ", function () { // Drag and drop the Tab widget // Click on Property pane of the tab widget // Navigate to control pane diff --git a/app/client/cypress/manual_TestSuite/Table_Filter_Test_spec.js b/app/client/cypress/manual_TestSuite/Table_Filter_Test_spec.js index bd5fd602e7..dbd6d1ab8f 100644 --- a/app/client/cypress/manual_TestSuite/Table_Filter_Test_spec.js +++ b/app/client/cypress/manual_TestSuite/Table_Filter_Test_spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../fixtures/tableWidgetDsl.json"); -describe("Test for Table Filter ", function() { - it("Table Filter", function() { +describe("Test for Table Filter ", function () { + it("Table Filter", function () { //Add a table // click on the column action item // Click on Select a datatype diff --git a/app/client/cypress/manual_TestSuite/Text_Widget_Spec.js b/app/client/cypress/manual_TestSuite/Text_Widget_Spec.js index d180857d68..e373feb7a2 100644 --- a/app/client/cypress/manual_TestSuite/Text_Widget_Spec.js +++ b/app/client/cypress/manual_TestSuite/Text_Widget_Spec.js @@ -1,7 +1,7 @@ const homePage = require("../../../locators/Textwidget.json"); -describe("Test Ideas to test different feature of text widget ", function() { - it("Add New Text widget along with BG and text colour ", function() { +describe("Test Ideas to test different feature of text widget ", function () { + it("Add New Text widget along with BG and text colour ", function () { // Navigate to application // Drag and drop a Text Widget // Navigate to Property Pane @@ -11,7 +11,7 @@ describe("Test Ideas to test different feature of text widget ", function() { // Click on Deploy }); - it("Enable Scroll feature with text colour ", function() { + it("Enable Scroll feature with text colour ", function () { // Navigate to application // Drag and drop a Text Widget // Add a long text in the "Label" @@ -21,7 +21,7 @@ describe("Test Ideas to test different feature of text widget ", function() { // Click on deploy and check if it scrollable and colour selected is visible }); - it("Adding text Size to the Text along with BG colour ", function() { + it("Adding text Size to the Text along with BG colour ", function () { // Navigate to application // Drag and drop a Text Widget // Navigate to Property pane @@ -33,7 +33,7 @@ describe("Test Ideas to test different feature of text widget ", function() { // Ensure the text size varies accordingly }); - it("Adding Bold Font style and Centre Text Alignment ", function() { + it("Adding Bold Font style and Centre Text Alignment ", function () { // Navigate to application // Drag and drop a Text Widget // Navigate to Property pane @@ -45,7 +45,7 @@ describe("Test Ideas to test different feature of text widget ", function() { // Ensure the changes are visible to user }); - it("Adding Italic Font style and Text Alignment to exsisting text widget ", function() { + it("Adding Italic Font style and Text Alignment to exsisting text widget ", function () { // Navigate to already exsisting Text widget // Ensure the text is added // Navigate to Property pane @@ -55,7 +55,7 @@ describe("Test Ideas to test different feature of text widget ", function() { // Ensure the changes are visible to user }); - it("Expand and Contract text widget Property pane", function() { + it("Expand and Contract text widget Property pane", function () { // Navigate to already exsisting Text widget // Navigate to Property pane // Click on collapse option @@ -64,14 +64,14 @@ describe("Test Ideas to test different feature of text widget ", function() { //and ensure it collapses }); - it("Copy and paste a text widget", function() { + it("Copy and paste a text widget", function () { // Navigate to already exsisting Text widget // Ensure Clour and font feature exsists // Copy and paste the widget // Ensure the new widget retrives the feature exsisting from parent widget }); - it("Rename and search a text widget", function() { + it("Rename and search a text widget", function () { // Ensure there are multiple Text widget // Navigate to Entity Explorer // Search for "Text" keyword @@ -82,7 +82,7 @@ describe("Test Ideas to test different feature of text widget ", function() { // and observe the user is navigated to same text widget and properties of the widget does not change on renaming }); - it("Search and delete a text widget", function() { + it("Search and delete a text widget", function () { // Ensure there are multiple Text widget // Navigate to Entity Explorer // Search for "Text" keyword @@ -93,7 +93,7 @@ describe("Test Ideas to test different feature of text widget ", function() { // Click on Deploy adn ensure the Widget is delete }); - it("Search and delete a text widget", function() { + it("Search and delete a text widget", function () { // Ensure there are multiple Text widget // Navigate to Entity Explorer // Search for "Text" keyword diff --git a/app/client/cypress/manual_TestSuite/Workspace_Logo_Del.js b/app/client/cypress/manual_TestSuite/Workspace_Logo_Del.js index b4d7c63201..caf834f89f 100644 --- a/app/client/cypress/manual_TestSuite/Workspace_Logo_Del.js +++ b/app/client/cypress/manual_TestSuite/Workspace_Logo_Del.js @@ -1,7 +1,7 @@ import homePage from "../../../locators/HomePage"; -describe("Deletion of workspace Logo ", function() { - it(" workspace logo upload ", function() { +describe("Deletion of workspace Logo ", function () { + it(" workspace logo upload ", function () { //Click on the dropdown next to workspace Name // Navigate between tabs // Naviagte to General Tab diff --git a/app/client/cypress/manual_TestSuite/Workspace_Logo_Set.js b/app/client/cypress/manual_TestSuite/Workspace_Logo_Set.js index babcf3fa74..2ad0804b0b 100644 --- a/app/client/cypress/manual_TestSuite/Workspace_Logo_Set.js +++ b/app/client/cypress/manual_TestSuite/Workspace_Logo_Set.js @@ -1,7 +1,7 @@ import homePage from "../../../locators/HomePage"; -describe("insert workspace Logo ", function() { - it(" workspace logo upload ", function() { +describe("insert workspace Logo ", function () { + it(" workspace logo upload ", function () { //Click on the dropdown next to workspace Name // Navigate between tabs // Naviagte to General Tab diff --git a/app/client/cypress/manual_TestSuite/Workspace_Name_Spec.js b/app/client/cypress/manual_TestSuite/Workspace_Name_Spec.js index f373f0a1dd..f9292c18c1 100644 --- a/app/client/cypress/manual_TestSuite/Workspace_Name_Spec.js +++ b/app/client/cypress/manual_TestSuite/Workspace_Name_Spec.js @@ -1,14 +1,14 @@ import homePage from "../../../locators/HomePage"; -describe("Checking for error message on Workspace Name ", function() { - it("Ensure of Inactive Submit button ", function() { +describe("Checking for error message on Workspace Name ", function () { + it("Ensure of Inactive Submit button ", function () { // Navigate to home Page // Click on Create workspace // Type "Space" as first character // Ensure "Submit" button does not get Active // Now click on "X" (Close icon) ensure the pop up closes }); - it("Reuse the name of the deleted application name ", function() { + it("Reuse the name of the deleted application name ", function () { // Navigate to home Page // Create an Application by name "XYZ" // Add some widgets @@ -18,14 +18,14 @@ describe("Checking for error message on Workspace Name ", function() { // Enter the name "XYZ" // Ensure the application can be created with the same name }); - it("Adding Special Character ", function() { + it("Adding Special Character ", function () { // Navigate to home Page // Click on Create workspace // Add special as first character // Ensure "Submit" get Active // Now click outside and ensure the pop up closes }); - it("Reuse the name of the deleted application name on the other workspace", function() { + it("Reuse the name of the deleted application name on the other workspace", function () { // Navigate to home Page // Create an Application by name "XYZ" // Add some widgets @@ -35,14 +35,14 @@ describe("Checking for error message on Workspace Name ", function() { // Enter the name "XYZ" // Ensure the application can be created with the same name }); - it("User must not be able to add empty workspace name", function() { + it("User must not be able to add empty workspace name", function () { // Navigate to home Page // Click on the "Create Workspace" button // Ensure "Workspace Name" field is empty // Ensure "Submit" is inactive }); - it("Cancel creating an Workspace when the Workspace name is empty", function() { + it("Cancel creating an Workspace when the Workspace name is empty", function () { // Navigate to home Page // Click on the "Create Workspace" button // Ensure "Workspace Name" field is empty @@ -50,7 +50,7 @@ describe("Checking for error message on Workspace Name ", function() { // Observe the workspace is not created }); - it("Cancel creating an Workspace when the Workspace name is dually filled", function() { + it("Cancel creating an Workspace when the Workspace name is dually filled", function () { // Navigate to home Page // Click on the "Create Workspace" button // Ensure "Workspace Name" field is enterd respectively diff --git a/app/client/cypress/manual_TestSuite/new_Table_Spec.js b/app/client/cypress/manual_TestSuite/new_Table_Spec.js index 1af26c075a..ffce8445da 100644 --- a/app/client/cypress/manual_TestSuite/new_Table_Spec.js +++ b/app/client/cypress/manual_TestSuite/new_Table_Spec.js @@ -1,7 +1,7 @@ const dsl = require("../../../fixtures/tableWidgetDsl.json"); -describe("Table functionality ", function() { - it("Adding background Colour to table", function() { +describe("Table functionality ", function () { + it("Adding background Colour to table", function () { // Add a table // Click on the property pane // Scroll Styles @@ -12,12 +12,12 @@ describe("Table functionality ", function() { // Navigate to add background colour and Text colour // Ensure the row colour gets overlapped on table colour }); - it("Collapse the tabs of Property pane", function() { + it("Collapse the tabs of Property pane", function () { // Add a table // Click on the property pane // Collapse the General ,Action and Tab option }); - it("Bind the column with same name", function() { + it("Bind the column with same name", function () { // Add a table // Click on the property pane // Click on the Add new column @@ -28,7 +28,7 @@ describe("Table functionality ", function() { // Select the row from the binded table }); - it("Hide and created custom column ", function() { + it("Hide and created custom column ", function () { // Add a table // Click on the property pane // Click on the Add new column @@ -41,7 +41,7 @@ describe("Table functionality ", function() { // Ensure the hidden column is not displayed and custom column is disaplyed to user }); - it("Binding a widget to additional column ", function() { + it("Binding a widget to additional column ", function () { // Add an date widget // Add a table // Click on the property pane diff --git a/app/client/cypress/support/ApiCommands.js b/app/client/cypress/support/ApiCommands.js index 3726e912e3..03a83af4f0 100644 --- a/app/client/cypress/support/ApiCommands.js +++ b/app/client/cypress/support/ApiCommands.js @@ -46,10 +46,7 @@ Cypress.Commands.add("ResponseTextCheck", (textTocheck) => { }); Cypress.Commands.add("NavigateToAPI_Panel", () => { - cy.get(pages.addEntityAPI) - .last() - .should("be.visible") - .click({ force: true }); + cy.get(pages.addEntityAPI).last().should("be.visible").click({ force: true }); cy.get(pages.integrationCreateNew) .should("be.visible") .click({ force: true }); @@ -72,15 +69,10 @@ Cypress.Commands.add("CreateAPI", (apiname) => { }); Cypress.Commands.add("CreateSubsequentAPI", (apiname) => { - cy.get(apiwidget.createApiOnSideBar) - .first() - .click({ force: true }); + cy.get(apiwidget.createApiOnSideBar).first().click({ force: true }); cy.get(apiwidget.resourceUrl).should("be.visible"); // cy.get(ApiEditor.nameOfApi) - cy.get(apiwidget.apiTxt) - .clear() - .type(apiname) - .should("have.value", apiname); + cy.get(apiwidget.apiTxt).clear().type(apiname).should("have.value", apiname); cy.WaitAutoSave(); }); @@ -125,24 +117,15 @@ Cypress.Commands.add("SaveAndRunAPI", () => { Cypress.Commands.add( "validateRequest", (apiName, baseurl, path, verb, error = false) => { - cy.get(".react-tabs__tab") - .contains("Logs") - .click(); - cy.get("[data-cy=t--debugger-search]") - .clear() - .type(apiName); + cy.get(".react-tabs__tab").contains("Logs").click(); + cy.get("[data-cy=t--debugger-search]").clear().type(apiName); if (!error) { - cy.get(".object-key") - .last() - .contains("request") - .click(); + cy.get(".object-key").last().contains("request").click(); } cy.get(".string-value").contains(baseurl.concat(path)); cy.get(".string-value").contains(verb); - cy.get("[data-cy=t--tab-response]") - .first() - .click({ force: true }); + cy.get("[data-cy=t--tab-response]").first().click({ force: true }); }, ); @@ -168,9 +151,7 @@ Cypress.Commands.add("EditSourceDetail", (baseUrl, v1method) => { .click({ force: true }) .clear() .type(`{backspace}${baseUrl}`); - cy.xpath(apiwidget.autoSuggest) - .first() - .click({ force: true }); + cy.xpath(apiwidget.autoSuggest).first().click({ force: true }); cy.get(ApiEditor.ApiRunBtn).scrollIntoView(); cy.get(apiwidget.editResourceUrl) .first() @@ -181,18 +162,14 @@ Cypress.Commands.add("EditSourceDetail", (baseUrl, v1method) => { }); Cypress.Commands.add("switchToAPIInputTab", () => { - cy.get(apiwidget.apiInputTab) - .first() - .click({ force: true }); + cy.get(apiwidget.apiInputTab).first().click({ force: true }); }); Cypress.Commands.add("enterUrl", (baseUrl, url, value) => { - cy.get(url) - .first() - .type(baseUrl.concat(value), { - force: true, - parseSpecialCharSequences: false, - }); + cy.get(url).first().type(baseUrl.concat(value), { + force: true, + parseSpecialCharSequences: false, + }); }); Cypress.Commands.add( @@ -223,9 +200,7 @@ Cypress.Commands.add( Cypress.Commands.add("EnterSourceDetailsWithbody", (baseUrl, v1method) => { cy.enterDatasourceAndPath(baseUrl, v1method); - cy.get(apiwidget.addHeader) - .first() - .click({ first: true }); + cy.get(apiwidget.addHeader).first().click({ first: true }); }); Cypress.Commands.add("CreationOfUniqueAPIcheck", (apiname) => { @@ -252,9 +227,7 @@ Cypress.Commands.add("CreationOfUniqueAPIcheck", (apiname) => { }); Cypress.Commands.add("MoveAPIToHome", () => { - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); cy.get(apiwidget.copyTo).click({ force: true }); cy.get(apiwidget.home).click({ force: true }); cy.wait("@createNewApi").should( @@ -265,13 +238,9 @@ Cypress.Commands.add("MoveAPIToHome", () => { }); Cypress.Commands.add("MoveAPIToPage", (pageName) => { - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); cy.get(apiwidget.moveTo).click({ force: true }); - cy.get(apiwidget.page) - .contains(pageName) - .click({ force: true }); + cy.get(apiwidget.page).contains(pageName).click({ force: true }); cy.wait("@moveAction").should( "have.nested.property", "response.body.responseMeta.status", @@ -280,13 +249,9 @@ Cypress.Commands.add("MoveAPIToPage", (pageName) => { }); Cypress.Commands.add("copyEntityToPage", (pageName) => { - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); cy.get(apiwidget.copyTo).click({ force: true }); - cy.get(apiwidget.page) - .contains(pageName) - .click({ force: true }); + cy.get(apiwidget.page).contains(pageName).click({ force: true }); cy.wait("@createNewApi").should( "have.nested.property", "response.body.responseMeta.status", @@ -295,9 +260,7 @@ Cypress.Commands.add("copyEntityToPage", (pageName) => { }); Cypress.Commands.add("CopyAPIToHome", () => { - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); cy.get(apiwidget.copyTo).click({ force: true }); cy.get(apiwidget.home).click({ force: true }); cy.wait("@createNewApi").should( @@ -309,21 +272,15 @@ Cypress.Commands.add("CopyAPIToHome", () => { Cypress.Commands.add("RenameEntity", (value, selectFirst) => { if (selectFirst) { - cy.xpath(apiwidget.popover) - .first() - .click({ force: true }); + cy.xpath(apiwidget.popover).first().click({ force: true }); } else { - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); } cy.get(apiwidget.renameEntity).click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(explorer.editEntity) - .last() - .type(value, { force: true }); + cy.get(explorer.editEntity).last().type(value, { force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); }); @@ -375,9 +332,7 @@ Cypress.Commands.add("DeleteAPIFromSideBar", () => { }); Cypress.Commands.add("DeleteWidgetFromSideBar", () => { - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); cy.get(apiwidget.delete).click({ force: true }); cy.wait("@updateLayout").should( "have.nested.property", @@ -387,28 +342,20 @@ Cypress.Commands.add("DeleteWidgetFromSideBar", () => { }); Cypress.Commands.add("deleteEntity", () => { - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); cy.get(apiwidget.delete).click({ force: true }); cy.get(apiwidget.deleteConfirm).click({ force: true }); }); Cypress.Commands.add("deleteEntityWithoutConfirmation", () => { - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); cy.get(apiwidget.delete).click({ force: true }); }); Cypress.Commands.add("DeleteAPI", () => { cy.get(ApiEditor.ApiActionMenu).click({ multiple: true }); - cy.get(apiwidget.deleteAPI) - .first() - .click({ force: true }); - cy.get(apiwidget.deleteAPI) - .first() - .click({ force: true }); + cy.get(apiwidget.deleteAPI).first().click({ force: true }); + cy.get(apiwidget.deleteAPI).first().click({ force: true }); cy.wait("@deleteAction").should( "have.nested.property", "response.body.responseMeta.status", @@ -460,9 +407,7 @@ Cypress.Commands.add("createAndFillApi", (url, parameters) => { }); Cypress.Commands.add("callApi", (apiname) => { - cy.get(commonlocators.callApi) - .first() - .click({ force: true }); + cy.get(commonlocators.callApi).first().click({ force: true }); cy.get(commonlocators.singleSelectMenuItem) .contains("Execute a query") .click({ force: true }); diff --git a/app/client/cypress/support/Objects/mySqlData.ts b/app/client/cypress/support/Objects/mySqlData.ts index 88f1106592..d3a4bbc7dc 100644 --- a/app/client/cypress/support/Objects/mySqlData.ts +++ b/app/client/cypress/support/Objects/mySqlData.ts @@ -160,7 +160,7 @@ const mySqlData = { "", "abc", "c", - '{}', + "{}", ], ], falseResult: [ @@ -220,7 +220,7 @@ const mySqlData = { ["a", "abcdefghij", "012345", "false", "NulL"], ["a", "b", "c"], ["false", "true"], - [{"abc": "123"}, {}, [1, 2, 3, 4], [], ["a",true,0,12.34]], + [{ abc: "123" }, {}, [1, 2, 3, 4], [], ["a", true, 0, 12.34]], ], query: { createTable: `CREATE TABLE mysqlDTs (serialId SERIAL not null primary key, stinyint_column TINYINT, utinyint_column TINYINT UNSIGNED, diff --git a/app/client/cypress/support/Pages/AggregateHelper.ts b/app/client/cypress/support/Pages/AggregateHelper.ts index b25a139668..a99a99ca1d 100644 --- a/app/client/cypress/support/Pages/AggregateHelper.ts +++ b/app/client/cypress/support/Pages/AggregateHelper.ts @@ -74,10 +74,7 @@ export class AggregateHelper { let pageid: string, layoutId; const appId: string | null = localStorage.getItem("applicationId"); cy.url().then((url) => { - pageid = url - .split("/")[5] - ?.split("-") - .pop() as string; + pageid = url.split("/")[5]?.split("-").pop() as string; cy.log(pageid + "page id"); //Fetch the layout id cy.request("GET", "api/v1/pages/" + pageid).then((response) => { @@ -183,9 +180,7 @@ export class AggregateHelper { index = 0, ) { if (index >= 0) - this.GetElement(selector) - .eq(index) - .should(textPresence, text); + this.GetElement(selector).eq(index).should(textPresence, text); else this.GetElement(selector).should(textPresence, text); } @@ -262,11 +257,7 @@ export class AggregateHelper { public WaitUntilAllToastsDisappear() { cy.get(this.locator._toastContainer).waitUntil( - ($ele) => - cy - .wrap($ele) - .children() - .should("have.length", 0), + ($ele) => cy.wrap($ele).children().should("have.length", 0), { errorMsg: "Toasts did not disappear even after 10 seconds", timeout: 10000, @@ -380,19 +371,14 @@ export class AggregateHelper { ? this.locator._divWithClass(insideParent) + modeSelector : modeSelector; cy.log(finalSelector); - cy.xpath(finalSelector) - .eq(index) - .scrollIntoView() - .click(); + cy.xpath(finalSelector).eq(index).scrollIntoView().click(); cy.get(this.locator._dropDownValue(dropdownOption)).click({ force: true }); this.Sleep(); //for selected value to reflect! } public SelectDropdownList(ddName: string, dropdownOption: string) { this.GetNClick(this.locator._existingFieldTextByName(ddName)); - cy.get(this.locator._dropdownText) - .contains(dropdownOption) - .click(); + cy.get(this.locator._dropdownText).contains(dropdownOption).click(); } public SelectFromMultiSelect( @@ -465,10 +451,7 @@ export class AggregateHelper { } public ReadSelectedDropDownValue() { - return cy - .xpath(this.locator._selectedDropdownValue) - .first() - .invoke("text"); + return cy.xpath(this.locator._selectedDropdownValue).first().invoke("text"); } public EnterActionValue( @@ -592,15 +575,11 @@ export class AggregateHelper { const locator = selector.startsWith("//") ? cy.xpath(selector) : cy.get(selector); - return locator - .eq(index) - .focus() - .wait(100) - .type(value, { - parseSpecialCharSequences: parseSpecialCharSeq, - //delay: 3, - //force: true, - }); + return locator.eq(index).focus().wait(100).type(value, { + parseSpecialCharSequences: parseSpecialCharSeq, + //delay: 3, + //force: true, + }); } public ContainsNClick( @@ -630,9 +609,7 @@ export class AggregateHelper { public CheckUncheck(selector: string, check = true) { if (check) { - this.GetElement(selector) - .check({ force: true }) - .should("be.checked"); + this.GetElement(selector).check({ force: true }).should("be.checked"); } else { this.GetElement(selector) .uncheck({ force: true }) @@ -995,9 +972,7 @@ export class AggregateHelper { } public UploadFile(fixtureName: string, toClickUpload = true) { - cy.get(this.locator._uploadFiles) - .attachFile(fixtureName) - .wait(2000); + cy.get(this.locator._uploadFiles).attachFile(fixtureName).wait(2000); toClickUpload && this.GetNClick(this.locator._uploadBtn, 0, false); } @@ -1011,9 +986,7 @@ export class AggregateHelper { textOrValue: "text" | "val" = "text", index = 0, ) { - return this.GetElement(selector) - .eq(index) - .invoke(textOrValue); + return this.GetElement(selector).eq(index).invoke(textOrValue); } AssertHeight(selector: ElementType, height: number) { @@ -1057,9 +1030,7 @@ export class AggregateHelper { } public AssertElementExist(selector: ElementType, index = 0, timeout = 20000) { - return this.GetElement(selector, timeout) - .eq(index) - .should("exist"); + return this.GetElement(selector, timeout).eq(index).should("exist"); } public AssertElementLength( @@ -1068,9 +1039,7 @@ export class AggregateHelper { index: number | null = null, ) { if (index) - return this.GetElement(selector) - .eq(index) - .should("have.length", length); + return this.GetElement(selector).eq(index).should("have.length", length); else return this.GetElement(selector).should("have.length", length); } @@ -1102,9 +1071,7 @@ export class AggregateHelper { .contains(text) .should(exists); else - return this.GetElement(selector, timeout) - .contains(text) - .should(exists); + return this.GetElement(selector, timeout).contains(text).should(exists); } public ValidateURL(url: string) { @@ -1124,9 +1091,7 @@ export class AggregateHelper { | "bottom" | "bottomRight", ) { - return this.GetElement(selector) - .scrollTo(position) - .wait(2000); + return this.GetElement(selector).scrollTo(position).wait(2000); } public EnableAllEditors() { @@ -1152,13 +1117,9 @@ export class AggregateHelper { disabled = true, ) { if (disabled) { - return this.GetElement(selector) - .eq(index) - .should("be.disabled"); + return this.GetElement(selector).eq(index).should("be.disabled"); } else { - return this.GetElement(selector) - .eq(index) - .should("not.be.disabled"); + return this.GetElement(selector).eq(index).should("not.be.disabled"); } } diff --git a/app/client/cypress/support/Pages/ApiPage.ts b/app/client/cypress/support/Pages/ApiPage.ts index 0e159d7b16..b9ad3eaf3c 100644 --- a/app/client/cypress/support/Pages/ApiPage.ts +++ b/app/client/cypress/support/Pages/ApiPage.ts @@ -9,13 +9,29 @@ export class ApiPage { private _createapi = ".t--createBlankApiCard"; _resourceUrl = ".t--dataSourceField"; private _headerKey = (index: number) => - ".t--actionConfiguration\\.headers\\[" + index + "\\]\\.key\\." + index + ""; + ".t--actionConfiguration\\.headers\\[" + + index + + "\\]\\.key\\." + + index + + ""; private _headerValue = (index: number) => - ".t--actionConfiguration\\.headers\\[" + index + "\\]\\.value\\." + index + ""; + ".t--actionConfiguration\\.headers\\[" + + index + + "\\]\\.value\\." + + index + + ""; private _paramKey = (index: number) => - ".t--actionConfiguration\\.queryParameters\\[" + index + "\\]\\.key\\." + index + ""; + ".t--actionConfiguration\\.queryParameters\\[" + + index + + "\\]\\.key\\." + + index + + ""; private _paramValue = (index: number) => - ".t--actionConfiguration\\.queryParameters\\[" + index + "\\]\\.value\\." + index + ""; + ".t--actionConfiguration\\.queryParameters\\[" + + index + + "\\]\\.value\\." + + index + + ""; private _importedKey = (index: number, keyValueName: string) => `.t--${keyValueName}-key-${index}`; private _importedValue = (index: number, keyValueName: string) => @@ -154,9 +170,7 @@ export class ApiPage { this.SelectPaneTab("Body"); this.SelectSubTab(subTab); if (toTrash) { - cy.get(this._trashDelete) - .first() - .click(); + cy.get(this._trashDelete).first().click(); cy.xpath(this._visibleTextSpan("Add more")).click(); } this.agHelper.EnterValue(bKey, { @@ -167,9 +181,7 @@ export class ApiPage { this.agHelper.PressEscape(); if (type) { - cy.xpath(this._bodyTypeDropdown) - .eq(0) - .click(); + cy.xpath(this._bodyTypeDropdown).eq(0).click(); cy.xpath(this._visibleTextDiv(type)).click(); } this.agHelper.EnterValue(bValue, { @@ -202,9 +214,7 @@ export class ApiPage { SetAPITimeout(timeout: number) { this.SelectPaneTab("Settings"); - cy.xpath(this._queryTimeout) - .clear() - .type(timeout.toString(), { delay: 0 }); //Delay 0 to work like paste! + cy.xpath(this._queryTimeout).clear().type(timeout.toString(), { delay: 0 }); //Delay 0 to work like paste! this.agHelper.AssertAutoSave(); this.SelectPaneTab("Headers"); } @@ -368,9 +378,7 @@ export class ApiPage { public SelectAPIVerb(verb: "GET" | "POST" | "PUT" | "DELETE" | "PATCH") { cy.get(this._apiVerbDropdown).click(); - cy.xpath(this._verbToSelect(verb)) - .should("be.visible") - .click(); + cy.xpath(this._verbToSelect(verb)).should("be.visible").click(); } ResponseStatusCheck(statusCode: string) { @@ -378,9 +386,7 @@ export class ApiPage { this.agHelper.GetNAssertContains(this._responseStatus, statusCode); } public SelectPaginationTypeViaIndex(index: number) { - cy.get(this._paginationTypeLabels) - .eq(index) - .click({ force: true }); + cy.get(this._paginationTypeLabels).eq(index).click({ force: true }); } CreateAndFillGraphqlApi(url: string, apiName = "", queryTimeout = 10000) { diff --git a/app/client/cypress/support/Pages/AppSettings/AppSettings.ts b/app/client/cypress/support/Pages/AppSettings/AppSettings.ts index 6f8a326b6d..ab649474c3 100644 --- a/app/client/cypress/support/Pages/AppSettings/AppSettings.ts +++ b/app/client/cypress/support/Pages/AppSettings/AppSettings.ts @@ -68,18 +68,14 @@ export class AppSettings { ) { cy.location("pathname").then((pathname) => { if (customSlug && customSlug.length > 0) { - const pageId = pathname - .split("/")[2] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[2]?.split("-").pop(); expect(pathname).to.be.equal( - `/app/${customSlug}-${pageId}${editMode ? "/edit" : ""}`.toLowerCase(), + `/app/${customSlug}-${pageId}${ + editMode ? "/edit" : "" + }`.toLowerCase(), ); } else { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); expect(pathname).to.be.equal( `/app/${appName}/${pageName}-${pageId}${ editMode ? "/edit" : "" @@ -87,7 +83,7 @@ export class AppSettings { ); } }); - }; + } public AssertErrorMessage( fieldId: string, @@ -117,6 +113,4 @@ export class AppSettings { } }); } - - } diff --git a/app/client/cypress/support/Pages/AppSettings/PageSettings.ts b/app/client/cypress/support/Pages/AppSettings/PageSettings.ts index debe15f7f2..7475d9c5f8 100644 --- a/app/client/cypress/support/Pages/AppSettings/PageSettings.ts +++ b/app/client/cypress/support/Pages/AppSettings/PageSettings.ts @@ -10,11 +10,14 @@ export class PageSettings { _customSlugField: "#t--page-settings-custom-slug", _showPageNavSwitch: "#t--page-settings-show-nav-control", _setAsHomePageSwitch: "#t--page-settings-home-page-control", - _setHomePageToggle : ".bp3-control-indicator", + _setHomePageToggle: ".bp3-control-indicator", _homePageHeader: "#t--page-settings-default-page", }; - UpdatePageNameAndVerifyTextValue(newPageName: string, verifyPageNameAs: string) { + UpdatePageNameAndVerifyTextValue( + newPageName: string, + verifyPageNameAs: string, + ) { this.AssertPageValue( this.locators._pageNameField, newPageName, @@ -85,7 +88,10 @@ export class PageSettings { ); this.agHelper.PressEnter(); this.agHelper.ValidateNetworkStatus("@updatePage", 200); - this.appSettings.CheckUrl(appName as string, currentPageName as string); + this.appSettings.CheckUrl( + appName as string, + currentPageName as string, + ); } }); }); diff --git a/app/client/cypress/support/Pages/AppSettings/Utils.ts b/app/client/cypress/support/Pages/AppSettings/Utils.ts index dd1af382fb..d493af5e5e 100644 --- a/app/client/cypress/support/Pages/AppSettings/Utils.ts +++ b/app/client/cypress/support/Pages/AppSettings/Utils.ts @@ -6,18 +6,12 @@ export const checkUrl = ( ) => { cy.location("pathname").then((pathname) => { if (customSlug && customSlug.length > 0) { - const pageId = pathname - .split("/")[2] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[2]?.split("-").pop(); expect(pathname).to.be.equal( `/app/${customSlug}-${pageId}${editMode ? "/edit" : ""}`.toLowerCase(), ); } else { - const pageId = pathname - .split("/")[3] - ?.split("-") - .pop(); + const pageId = pathname.split("/")[3]?.split("-").pop(); expect(pathname).to.be.equal( `/app/${appName}/${pageName}-${pageId}${ editMode ? "/edit" : "" diff --git a/app/client/cypress/support/Pages/DataSources.ts b/app/client/cypress/support/Pages/DataSources.ts index 59085d1b20..45e7f3dfc4 100644 --- a/app/client/cypress/support/Pages/DataSources.ts +++ b/app/client/cypress/support/Pages/DataSources.ts @@ -275,9 +275,7 @@ export class DataSources { } public ExpandSection(index: number) { - cy.get(this._collapseContainer) - .eq(index) - .click(); + cy.get(this._collapseContainer).eq(index).click(); cy.get(this._collapseContainer) .eq(index) .find(this.locator._chevronUp) @@ -340,9 +338,7 @@ export class DataSources { : datasourceFormData["postgres-databaseName"]; cy.get(this._host).type(hostAddress); cy.get(this._port).type(datasourceFormData["postgres-port"].toString()); - cy.get(this._databaseName) - .clear() - .type(databaseName); + cy.get(this._databaseName).clear().type(databaseName); this.ExpandSectionByName(this._sectionAuthentication); cy.get(this._username).type( username == "" ? datasourceFormData["postgres-username"] : username, @@ -373,9 +369,7 @@ export class DataSources { : datasourceFormData["mysql-databaseName"]; cy.get(this._host).type(hostAddress); cy.get(this._port).type(datasourceFormData["mysql-port"].toString()); - cy.get(this._databaseName) - .clear() - .type(databaseName); + cy.get(this._databaseName).clear().type(databaseName); this.ExpandSectionByName(this._sectionAuthentication); cy.get(this._username).type(datasourceFormData["mysql-username"]); cy.get(this._password).type(datasourceFormData["mysql-password"]); @@ -578,9 +572,7 @@ export class DataSources { if (newValue) toChange = true; if (toChange) { cy.xpath(this._dropdownTitle(ddTitle)).click(); //to expand the dropdown - cy.xpath(this._visibleTextSpan(newValue)) - .last() - .click({ force: true }); //to select the new value + cy.xpath(this._visibleTextSpan(newValue)).last().click({ force: true }); //to select the new value } } @@ -621,10 +613,7 @@ export class DataSources { public ReadQueryTableResponse(index: number, timeout = 100) { //timeout can be sent higher values incase of larger tables this.agHelper.Sleep(timeout); //Settling time for table! - return cy - .xpath(this._queryTableResponse) - .eq(index) - .invoke("text"); + return cy.xpath(this._queryTableResponse).eq(index).invoke("text"); } public AssertQueryResponseHeaders(columnHeaders: string[]) { diff --git a/app/client/cypress/support/Pages/DeployModeHelper.ts b/app/client/cypress/support/Pages/DeployModeHelper.ts index 8ae9ff238c..fb322ca330 100644 --- a/app/client/cypress/support/Pages/DeployModeHelper.ts +++ b/app/client/cypress/support/Pages/DeployModeHelper.ts @@ -103,10 +103,7 @@ export class DeployMode { } public SelectJsonFormDropDown(dropdownOption: string, index = 0) { - cy.get(this._jsonSelectDropdown) - .eq(index) - .scrollIntoView() - .click(); + cy.get(this._jsonSelectDropdown).eq(index).scrollIntoView().click(); cy.get(this.locator._selectOptionValue(dropdownOption)).click({ force: true, }); diff --git a/app/client/cypress/support/Pages/EntityExplorer.ts b/app/client/cypress/support/Pages/EntityExplorer.ts index be829ab0f2..70102abf89 100644 --- a/app/client/cypress/support/Pages/EntityExplorer.ts +++ b/app/client/cypress/support/Pages/EntityExplorer.ts @@ -192,9 +192,7 @@ export class EntityExplorer { } public CreateNewDsQuery(dsName: string) { - cy.get(this.locator._createNew) - .last() - .click({ force: true }); + cy.get(this.locator._createNew).last().click({ force: true }); cy.xpath(this._visibleTextSpan(dsName)).click({ force: true }); } diff --git a/app/client/cypress/support/Pages/FakerHelper.ts b/app/client/cypress/support/Pages/FakerHelper.ts index f054519334..2347636fe8 100644 --- a/app/client/cypress/support/Pages/FakerHelper.ts +++ b/app/client/cypress/support/Pages/FakerHelper.ts @@ -11,7 +11,10 @@ export class FakerHelper { return faker.image.imageUrl(); } - public GetRandomText(textLength = 10, casing : "upper" | "lower" | "mixed" = "mixed") { + public GetRandomText( + textLength = 10, + casing: "upper" | "lower" | "mixed" = "mixed", + ) { return faker.random.alphaNumeric(textLength, { casing: casing }); } @@ -20,6 +23,6 @@ export class FakerHelper { } public GetRandomNumber(length = 6) { - return faker.random.numeric(length, {allowLeadingZeros: true}); + return faker.random.numeric(length, { allowLeadingZeros: true }); } } diff --git a/app/client/cypress/support/Pages/GitSync.ts b/app/client/cypress/support/Pages/GitSync.ts index 08127b1c7f..9c83749bda 100644 --- a/app/client/cypress/support/Pages/GitSync.ts +++ b/app/client/cypress/support/Pages/GitSync.ts @@ -149,99 +149,99 @@ export class GitSync { }); } - //#region Unused methods + //#region Unused methods - private AuthorizeLocalGitSSH(remoteUrl: string, assertConnect = true) { - let generatedKey; - this.OpenGitSyncModal(); - this.agHelper.AssertAttribute( - this._gitRepoInput, - "placeholder", - "git@example.com:user/repository.git", - ); - this.agHelper.TypeText(this._gitRepoInput, remoteUrl); + private AuthorizeLocalGitSSH(remoteUrl: string, assertConnect = true) { + let generatedKey; + this.OpenGitSyncModal(); + this.agHelper.AssertAttribute( + this._gitRepoInput, + "placeholder", + "git@example.com:user/repository.git", + ); + this.agHelper.TypeText(this._gitRepoInput, remoteUrl); - this.agHelper.ClickButton("Generate key"); + this.agHelper.ClickButton("Generate key"); - cy.wait(`@generateKey`).then((result: any) => { - generatedKey = result.response.body.data.publicKey; - generatedKey = generatedKey.slice(0, generatedKey.length - 1); - var formdata = new FormData(); - cy.log("generatedKey is " + generatedKey); - formdata.set("sshkey", generatedKey); - // fetch the generated key and post to the github repo - cy.request({ - method: "POST", - url: `http://${datasourceFormData["GITEA_API_BASE_TED"]}:${datasourceFormData["GITEA_API_PORT_TED"]}/v1/gitserver/addgitssh`, - //body: formdata, - body: { - sshkey: generatedKey, - }, - form: true, - // headers: { - // "Content-Type": "application/x-www-form-urlencoded" - // }, - }).then((response) => { - expect(response.status).to.equal(200); - }); - this.agHelper.GetNClick(this._useDefaultConfig); //Uncheck the Use default configuration - this.agHelper.TypeText( - this._gitConfigNameInput, - "testusername", - //`{selectall}${testUsername}`, - ); - this.agHelper.TypeText(this._gitConfigEmailInput, "test@test.com"); - this.agHelper.ClickButton("CONNECT"); - - if (assertConnect) { - //this.ReplaceForGit("cypress/fixtures/Bugs/GitConnectResponse.json", remoteUrl); - //cy.get('@connectGitLocalRepo').its('response.statusCode').should('equal', 200); - // cy.intercept("POST", "/api/v1/git/connect/app/*", { - // fixture: "/Bugs/GitConnectResponse.json", - // }); - this.agHelper.ValidateNetworkStatus("@connectGitLocalRepo"); - } - this.CloseGitSyncModal(); - }); - } - - private ReplaceForGit(fixtureFile: any, remoteUrl: string) { - let currentAppId, currentURL; - cy.readFile( - fixtureFile, - // (err: string) => { - // if (err) { - // return console.error(err); - // }} - ).then((data) => { - cy.url().then((url) => { - currentURL = url; - const myRegexp = /page-1(.*)/; - const match = myRegexp.exec(currentURL); - cy.log(currentURL + "currentURL from intercept is"); - currentAppId = match ? match[1].split("/")[1] : null; - data.data.id = currentAppId; - data.data.gitApplicationMetadata.defaultApplicationId = currentAppId; - data.data.gitApplicationMetadata.remoteUrl = remoteUrl; - cy.writeFile(fixtureFile, JSON.stringify(data)); - }); - }); - } - - private CreateLocalGithubRepo(repo: string) { - let remoteUrl: string = ""; + cy.wait(`@generateKey`).then((result: any) => { + generatedKey = result.response.body.data.publicKey; + generatedKey = generatedKey.slice(0, generatedKey.length - 1); + var formdata = new FormData(); + cy.log("generatedKey is " + generatedKey); + formdata.set("sshkey", generatedKey); + // fetch the generated key and post to the github repo cy.request({ - method: "GET", - url: - `http://${datasourceFormData["GITEA_API_BASE_TED"]}:${datasourceFormData["GITEA_API_PORT_TED"]}/v1/gitserver/addrepo?reponame=` + - repo, + method: "POST", + url: `http://${datasourceFormData["GITEA_API_BASE_TED"]}:${datasourceFormData["GITEA_API_PORT_TED"]}/v1/gitserver/addgitssh`, + //body: formdata, + body: { + sshkey: generatedKey, + }, + form: true, + // headers: { + // "Content-Type": "application/x-www-form-urlencoded" + // }, }).then((response) => { - remoteUrl = JSON.stringify(response.body).replace(/['"]+/g, ""); expect(response.status).to.equal(200); - //cy.log("remoteUrl is"+ remoteUrl); - cy.wrap(remoteUrl).as("remoteUrl"); }); - } + this.agHelper.GetNClick(this._useDefaultConfig); //Uncheck the Use default configuration + this.agHelper.TypeText( + this._gitConfigNameInput, + "testusername", + //`{selectall}${testUsername}`, + ); + this.agHelper.TypeText(this._gitConfigEmailInput, "test@test.com"); + this.agHelper.ClickButton("CONNECT"); - //#endregion + if (assertConnect) { + //this.ReplaceForGit("cypress/fixtures/Bugs/GitConnectResponse.json", remoteUrl); + //cy.get('@connectGitLocalRepo').its('response.statusCode').should('equal', 200); + // cy.intercept("POST", "/api/v1/git/connect/app/*", { + // fixture: "/Bugs/GitConnectResponse.json", + // }); + this.agHelper.ValidateNetworkStatus("@connectGitLocalRepo"); + } + this.CloseGitSyncModal(); + }); + } + + private ReplaceForGit(fixtureFile: any, remoteUrl: string) { + let currentAppId, currentURL; + cy.readFile( + fixtureFile, + // (err: string) => { + // if (err) { + // return console.error(err); + // }} + ).then((data) => { + cy.url().then((url) => { + currentURL = url; + const myRegexp = /page-1(.*)/; + const match = myRegexp.exec(currentURL); + cy.log(currentURL + "currentURL from intercept is"); + currentAppId = match ? match[1].split("/")[1] : null; + data.data.id = currentAppId; + data.data.gitApplicationMetadata.defaultApplicationId = currentAppId; + data.data.gitApplicationMetadata.remoteUrl = remoteUrl; + cy.writeFile(fixtureFile, JSON.stringify(data)); + }); + }); + } + + private CreateLocalGithubRepo(repo: string) { + let remoteUrl: string = ""; + cy.request({ + method: "GET", + url: + `http://${datasourceFormData["GITEA_API_BASE_TED"]}:${datasourceFormData["GITEA_API_PORT_TED"]}/v1/gitserver/addrepo?reponame=` + + repo, + }).then((response) => { + remoteUrl = JSON.stringify(response.body).replace(/['"]+/g, ""); + expect(response.status).to.equal(200); + //cy.log("remoteUrl is"+ remoteUrl); + cy.wrap(remoteUrl).as("remoteUrl"); + }); + } + + //#endregion } diff --git a/app/client/cypress/support/Pages/HomePage.ts b/app/client/cypress/support/Pages/HomePage.ts index 61c03920dd..f0f03fff90 100644 --- a/app/client/cypress/support/Pages/HomePage.ts +++ b/app/client/cypress/support/Pages/HomePage.ts @@ -153,12 +153,8 @@ export class HomePage { this.StubPostHeaderReq(); this.agHelper.AssertElementVisible(this._workspaceList(workspaceName)); this.agHelper.GetNClick(this._shareWorkspace(workspaceName), 0, true); - cy.xpath(this._email) - .click({ force: true }) - .type(email); - cy.xpath(this._selectRole) - .first() - .click({ force: true }); + cy.xpath(this._email).click({ force: true }).type(email); + cy.xpath(this._selectRole).first().click({ force: true }); this.agHelper.Sleep(500); cy.xpath(this._userRole(role)).click({ force: true }); this.agHelper.ClickButton("Invite"); @@ -180,9 +176,7 @@ export class HomePage { this.StubPostHeaderReq(); this.agHelper.AssertElementVisible(this._workspaceList(workspaceName)); this.agHelper.GetNClick(this._shareWorkspace(workspaceName), 0, true); - cy.xpath(this._email) - .click({ force: true }) - .type(text); + cy.xpath(this._email).click({ force: true }).type(text); this.agHelper.ClickButton("Invite"); cy.contains(text, { matchCase: false }); cy.contains(errorMessage, { matchCase: false }); @@ -203,9 +197,7 @@ export class HomePage { } public CreateNewApplication() { - cy.get(this._homePageAppCreateBtn) - .first() - .click({ force: true }); + cy.get(this._homePageAppCreateBtn).first().click({ force: true }); this.agHelper.ValidateNetworkStatus("@createNewApplication", 201); cy.get(this.locator._loading).should("not.exist"); } @@ -266,14 +258,10 @@ export class HomePage { role: "App Viewer" | "Developer" | "Administrator" = "Administrator", ) { this.agHelper.Sleep(); //waiting for window to load - cy.window() - .its("store") - .invoke("dispatch", { type: "LOGOUT_USER_INIT" }); + cy.window().its("store").invoke("dispatch", { type: "LOGOUT_USER_INIT" }); cy.wait("@postLogout"); cy.visit("/user/login"); - cy.get(this._username) - .should("be.visible") - .type(uname); + cy.get(this._username).should("be.visible").type(uname); cy.get(this._password).type(pswd, { log: false }); cy.get(this._submitBtn).click(); cy.wait("@getMe"); @@ -288,17 +276,12 @@ export class HomePage { cy.get(this._searchInput).type(appName); this.agHelper.Sleep(2000); cy.get(this._appContainer).contains(workspaceId); - cy.xpath(this.locator._spanButton("Share")) - .first() - .should("be.visible"); + cy.xpath(this.locator._spanButton("Share")).first().should("be.visible"); } //Maps to launchApp in command.js public LaunchAppFromAppHover() { - cy.get(this._appHoverIcon("view")) - .should("be.visible") - .first() - .click(); + cy.get(this._appHoverIcon("view")).should("be.visible").first().click(); cy.get(this.locator._loading).should("not.exist"); cy.wait("@getPagesForViewApp").should( "have.nested.property", @@ -323,9 +306,7 @@ export class HomePage { "response.body.responseMeta.status", 200, ); - cy.get(this._deleteUser(email)) - .last() - .click({ force: true }); + cy.get(this._deleteUser(email)).last().click({ force: true }); cy.get(this._leaveWorkspaceConfirmModal).should("be.visible"); cy.get(this._leaveWorkspaceConfirmButton).click({ force: true }); this.NavigateToHome(); @@ -343,9 +324,7 @@ export class HomePage { .find(this._optionsIcon) .click({ force: true }); - cy.xpath(this._visibleTextSpan("Members")) - .last() - .click({ force: true }); + cy.xpath(this._visibleTextSpan("Members")).last().click({ force: true }); cy.wait("@getMembers").should( "have.nested.property", "response.body.responseMeta.status", @@ -391,12 +370,8 @@ export class HomePage { public InviteUserToWorkspaceFromApp(email: string, role: string) { const successMessage = "The user has been invited successfully"; this.StubPostHeaderReq(); - cy.xpath(this._email) - .click({ force: true }) - .type(email); - cy.xpath(this._selectRole) - .first() - .click({ force: true }); + cy.xpath(this._email).click({ force: true }).type(email); + cy.xpath(this._selectRole).first().click({ force: true }); this.agHelper.Sleep(500); cy.xpath(this._userRole(role)).click({ force: true }); this.agHelper.ClickButton("Invite"); @@ -452,9 +427,7 @@ export class HomePage { cy.get(this._workspaceList(workspaceName)) .scrollIntoView() .should("be.visible"); - cy.get(this._optionsIcon) - .first() - .click({ force: true }); + cy.get(this._optionsIcon).first().click({ force: true }); cy.xpath(this._leaveWorkspace).click({ force: true }); cy.xpath(this._leaveWorkspaceConfirm).click({ force: true }); cy.wait("@leaveWorkspaceApiCall").should( diff --git a/app/client/cypress/support/Pages/InviteModal.ts b/app/client/cypress/support/Pages/InviteModal.ts index ff684dc5f6..732eba008a 100644 --- a/app/client/cypress/support/Pages/InviteModal.ts +++ b/app/client/cypress/support/Pages/InviteModal.ts @@ -35,9 +35,7 @@ export class InviteModal { this.OpenShareModal(); this.SelectEmbedTab(); this.embedSettings.ToggleShowNavigationBar(toShowNavBar); - cy.get(this.locators._previewEmbed) - .invoke("removeAttr", "target") - .click(); + cy.get(this.locators._previewEmbed).invoke("removeAttr", "target").click(); if (toShowNavBar === "true") { this.agHelper.AssertElementExist(this.commonLocators._backToEditor); this.deployPage.NavigateBacktoEditor(); diff --git a/app/client/cypress/support/Pages/JSEditor.ts b/app/client/cypress/support/Pages/JSEditor.ts index 1db4de4fb3..7f3de7a7bb 100644 --- a/app/client/cypress/support/Pages/JSEditor.ts +++ b/app/client/cypress/support/Pages/JSEditor.ts @@ -81,7 +81,10 @@ export class JSEditor { "')]//*[contains(text(),'" + jsFuncName + "')]"; - _dialogInDeployView = "//div[@class='bp3-dialog-body']//*[contains(text(), '" + Cypress.env("MESSAGES").QUERY_CONFIRMATION_MODAL_MESSAGE() +"')]"; + _dialogInDeployView = + "//div[@class='bp3-dialog-body']//*[contains(text(), '" + + Cypress.env("MESSAGES").QUERY_CONFIRMATION_MODAL_MESSAGE() + + "')]"; _funcDropdown = ".t--formActionButtons div[role='listbox']"; _funcDropdownOptions = ".ads-dropdown-options-wrapper div > span div"; _getJSFunctionSettingsId = (JSFunctionName: string) => @@ -116,15 +119,11 @@ export class JSEditor { //#region Page functions public NavigateToNewJSEditor() { - cy.get(this.locator._createNew) - .last() - .click({ force: true }); + cy.get(this.locator._createNew).last().click({ force: true }); cy.get(this._newJSobj).click({ force: true }); // Assert that the name of the JS Object is focused when newly created - cy.get(this._jsObjTxt) - .should("be.focused") - .type("{enter}"); + cy.get(this._jsObjTxt).should("be.focused").type("{enter}"); cy.wait(1000); @@ -254,7 +253,7 @@ export class JSEditor { public ValidateDefaultJSObjProperties(jsObjName: string) { this.ee.ActionContextMenuByEntityName(jsObjName, "Show Bindings"); - cy.get(this._propertyList).then(function($lis) { + cy.get(this._propertyList).then(function ($lis) { const bindingsLength = $lis.length; expect(bindingsLength).to.be.at.least(4); expect($lis.eq(0).text()).to.be.oneOf([ diff --git a/app/client/cypress/support/Pages/LibraryInstaller.ts b/app/client/cypress/support/Pages/LibraryInstaller.ts index 647f230b8c..141d293cc4 100644 --- a/app/client/cypress/support/Pages/LibraryInstaller.ts +++ b/app/client/cypress/support/Pages/LibraryInstaller.ts @@ -60,7 +60,7 @@ export class LibraryInstaller { ); } - public AssertLibraryinExplorer(libraryName: string){ + public AssertLibraryinExplorer(libraryName: string) { this._aggregateHelper.AssertElementExist( this.getLibraryLocatorInExplorer(libraryName), ); diff --git a/app/client/cypress/support/Pages/PropertyPane.ts b/app/client/cypress/support/Pages/PropertyPane.ts index d2ab250f6f..7ed133a900 100644 --- a/app/client/cypress/support/Pages/PropertyPane.ts +++ b/app/client/cypress/support/Pages/PropertyPane.ts @@ -107,15 +107,9 @@ export class PropertyPane { this.agHelper.GetNClick(this._colorPickerV2Popover); this.agHelper.GetNClick(this._colorPickerV2Color, colorIndex); } else { - this.agHelper - .GetElement(this._colorInput(type)) - .clear() - .wait(200); + this.agHelper.GetElement(this._colorInput(type)).clear().wait(200); this.agHelper.TypeText(this._colorInput(type), colorIndex); - this.agHelper - .GetElement(this._colorInput(type)) - .clear() - .wait(200); + this.agHelper.GetElement(this._colorInput(type)).clear().wait(200); this.agHelper.TypeText(this._colorInput(type), colorIndex); //this.agHelper.UpdateInput(this._colorInputField(type), colorIndex);//not working! } @@ -124,7 +118,7 @@ export class PropertyPane { public GetJSONFormConfigurationFileds() { const fieldNames: string[] = []; let fieldInvokeValue: string; - cy.xpath(this._jsonFieldConfigList).each(function($item) { + cy.xpath(this._jsonFieldConfigList).each(function ($item) { cy.wrap($item) .invoke("val") .then(($fieldName: any) => { @@ -170,15 +164,11 @@ export class PropertyPane { } public moveToContentTab() { - cy.get(this._contentTabBtn) - .first() - .click({ force: true }); + cy.get(this._contentTabBtn).first().click({ force: true }); } public moveToStyleTab() { - cy.get(this._styleTabBtn) - .first() - .click({ force: true }); + cy.get(this._styleTabBtn).first().click({ force: true }); } public SelectPropertiesDropDown( @@ -239,14 +229,9 @@ export class PropertyPane { public EvaluateExistingPropertyFieldValue(fieldName = "", currentValue = "") { let val: any; if (fieldName) { - cy.xpath(this.locator._existingFieldValueByName(fieldName)) - .eq(0) - .click(); + cy.xpath(this.locator._existingFieldValueByName(fieldName)).eq(0).click(); val = cy.get(fieldName).then(($field) => { - cy.wrap($field) - .find(".CodeMirror-code span") - .first() - .invoke("text"); + cy.wrap($field).find(".CodeMirror-code span").first().invoke("text"); }); } else { cy.xpath(this.locator._codeMirrorCode).click(); diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index 239071fe47..2fa1da1423 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -154,10 +154,7 @@ export class Table { 30000, ) .waitUntil(($ele) => - cy - .wrap($ele) - .children("span") - .should("not.be.empty"), + cy.wrap($ele).children("span").should("not.be.empty"), ); } @@ -167,9 +164,7 @@ export class Table { timeout: 10000, interval: 2000, }).then(($children) => { - cy.wrap($children) - .children() - .should("have.length", 0); //or below + cy.wrap($children).children().should("have.length", 0); //or below //expect($children).to.have.lengthOf(0) this.agHelper.Sleep(500); }); @@ -352,9 +347,7 @@ export class Table { } public SearchTable(searchTxt: string, index = 0) { - cy.get(this._searchText) - .eq(index) - .type(searchTxt); + cy.get(this._searchText).eq(index).type(searchTxt); } public RemoveSearchTextNVerify( @@ -424,9 +417,7 @@ export class Table { public DownloadFromTable(filetype: "Download as CSV" | "Download as Excel") { cy.get(this._downloadBtn).click({ force: true }); - cy.get(this._downloadOption) - .contains(filetype) - .click({ force: true }); + cy.get(this._downloadOption).contains(filetype).click({ force: true }); } public ValidateDownloadNVerify(fileName: string, textToBePresent: string) { @@ -481,9 +472,7 @@ export class Table { public AddColumn(colId: string) { cy.get(this._addColumn).scrollIntoView(); - cy.get(this._addColumn) - .should("be.visible") - .click({ force: true }); + cy.get(this._addColumn).should("be.visible").click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); cy.get(this._defaultColName).clear({ diff --git a/app/client/cypress/support/WorkspaceCommands.js b/app/client/cypress/support/WorkspaceCommands.js index a76faddd69..46574f8c27 100644 --- a/app/client/cypress/support/WorkspaceCommands.js +++ b/app/client/cypress/support/WorkspaceCommands.js @@ -89,9 +89,7 @@ Cypress.Commands.add("inviteUserForWorkspace", (workspaceName, email, role) => { .first() .should("be.visible") .click({ force: true }); - cy.xpath(homePage.email) - .click({ force: true }) - .type(email); + cy.xpath(homePage.email).click({ force: true }).type(email); cy.xpath(homePage.selectRole).click({ force: true }); cy.wait(500); cy.xpath(role).click({ force: true }); @@ -117,13 +115,9 @@ Cypress.Commands.add("CheckShareIcon", (workspaceName, count) => { Cypress.Commands.add("shareApp", (email, role) => { cy.stubPostHeaderReq(); - cy.xpath(homePage.email) - .click({ force: true }) - .type(email); + cy.xpath(homePage.email).click({ force: true }).type(email); cy.xpath(homePage.selectRole).should("be.visible"); - cy.xpath("//span[@name='expand-more']") - .last() - .click(); + cy.xpath("//span[@name='expand-more']").last().click(); cy.xpath(role).click({ force: true }); cy.xpath(homePage.inviteBtn).click({ force: true }); cy.wait("@mockPostInvite") @@ -135,9 +129,7 @@ Cypress.Commands.add("shareApp", (email, role) => { Cypress.Commands.add("shareAndPublic", (email, role) => { cy.stubPostHeaderReq(); - cy.xpath(homePage.email) - .click({ force: true }) - .type(email); + cy.xpath(homePage.email).click({ force: true }).type(email); cy.xpath(homePage.selectRole).click({ force: true }); cy.xpath(role).click({ force: true }); cy.xpath(homePage.inviteBtn).click({ force: true }); @@ -149,9 +141,7 @@ Cypress.Commands.add("shareAndPublic", (email, role) => { }); Cypress.Commands.add("enablePublicAccess", (editMode = false) => { - cy.get(homePage.enablePublicAccess) - .first() - .click({ force: true }); + cy.get(homePage.enablePublicAccess).first().click({ force: true }); cy.wait("@changeAccess").should( "have.nested.property", "response.body.responseMeta.status", @@ -161,9 +151,7 @@ Cypress.Commands.add("enablePublicAccess", (editMode = false) => { const closeButtonLocator = editMode ? homePage.editModeInviteModalCloseBtn : homePage.closeBtn; - cy.get(closeButtonLocator) - .first() - .click({ force: true }); + cy.get(closeButtonLocator).first().click({ force: true }); }); Cypress.Commands.add("deleteUserFromWorkspace", (workspaceName) => { @@ -183,15 +171,10 @@ Cypress.Commands.add("deleteUserFromWorkspace", (workspaceName) => { "response.body.responseMeta.status", 200, ); - cy.get(homePage.DeleteBtn) - .last() - .click({ force: true }); + cy.get(homePage.DeleteBtn).last().click({ force: true }); cy.get(homePage.leaveWorkspaceConfirmModal).should("be.visible"); cy.get(homePage.leaveWorkspaceConfirmButton).click({ force: true }); - cy.xpath(homePage.appHome) - .first() - .should("be.visible") - .click(); + cy.xpath(homePage.appHome).first().should("be.visible").click(); cy.wait("@applications").should( "have.nested.property", "response.body.responseMeta.status", @@ -220,9 +203,7 @@ Cypress.Commands.add( 200, ); cy.get(homePage.inviteUserMembersPage).click({ force: true }); - cy.xpath(homePage.email) - .click({ force: true }) - .type(email); + cy.xpath(homePage.email).click({ force: true }).type(email); cy.xpath(homePage.selectRole).click({ force: true }); cy.xpath(role).click({ force: true }); cy.xpath(homePage.inviteBtn).click({ force: true }); @@ -231,10 +212,7 @@ Cypress.Commands.add( .should("have.property", "origin", "Cypress"); cy.contains(email, { matchCase: false }); cy.get(".bp3-icon-small-cross").click({ force: true }); - cy.xpath(homePage.appHome) - .first() - .should("be.visible") - .click(); + cy.xpath(homePage.appHome).first().should("be.visible").click(); cy.wait("@applications").should( "have.nested.property", "response.body.responseMeta.status", @@ -244,10 +222,7 @@ Cypress.Commands.add( ); Cypress.Commands.add("launchApp", () => { - cy.get(homePage.appView) - .should("be.visible") - .first() - .click(); + cy.get(homePage.appView).should("be.visible").first().click(); cy.get("#loading").should("not.exist"); cy.wait("@getPagesForViewApp").should( "have.nested.property", @@ -299,9 +274,7 @@ Cypress.Commands.add("CreateAppForWorkspace", (workspaceName, appname) => { Cypress.Commands.add("CreateAppInFirstListedWorkspace", (appname) => { let applicationId; - cy.get(homePage.createNew) - .first() - .click({ force: true }); + cy.get(homePage.createNew).first().click({ force: true }); cy.wait("@createNewApplication").then((xhr) => { const response = xhr.response; expect(response.body.responseMeta.status).to.eq(201); @@ -339,9 +312,7 @@ Cypress.Commands.add("renameEntity", (entityName, renamedEntity) => { cy.get(".t--context-menu").click({ force: true }); }); cy.selectAction("Edit Name"); - cy.get(explorer.editEntity) - .last() - .type(`${renamedEntity}`, { force: true }); + cy.get(explorer.editEntity).last().type(`${renamedEntity}`, { force: true }); }); Cypress.Commands.add("leaveWorkspace", (newWorkspaceName) => { cy.openWorkspaceOptionsPopup(newWorkspaceName); diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index f7c8c74bd0..6e288175c4 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -91,21 +91,15 @@ Cypress.Commands.add( cy.get(publishWidgetspage.attributeValue) .contains(operator) .click({ force: true }); - cy.get(publishWidgetspage.attributesDropdown) - .last() - .click({ force: true }); + cy.get(publishWidgetspage.attributesDropdown).last().click({ force: true }); cy.get(publishWidgetspage.attributeValue) .contains(option) .click({ force: true }); - cy.get(publishWidgetspage.conditionDropdown) - .last() - .click({ force: true }); + cy.get(publishWidgetspage.conditionDropdown).last().click({ force: true }); cy.get(publishWidgetspage.attributeValue) .contains(condition) .click({ force: true }); - cy.get(publishWidgetspage.inputValue) - .last() - .type(value); + cy.get(publishWidgetspage.inputValue).last().type(value); }, ); @@ -200,19 +194,13 @@ Cypress.Commands.add("DeleteApp", (appName) => { .should("have.length", 1) .first() .click({ force: true }); - cy.get(homePage.deleteAppConfirm) - .should("be.visible") - .click({ force: true }); - cy.get(homePage.deleteApp) - .should("be.visible") - .click({ force: true }); + cy.get(homePage.deleteAppConfirm).should("be.visible").click({ force: true }); + cy.get(homePage.deleteApp).should("be.visible").click({ force: true }); }); Cypress.Commands.add("LogintoApp", (uname, pword) => { cy.wait(1000); //waiting for window to load - cy.window() - .its("store") - .invoke("dispatch", { type: "LOGOUT_USER_INIT" }); + cy.window().its("store").invoke("dispatch", { type: "LOGOUT_USER_INIT" }); cy.wait("@postLogout"); cy.visit("/user/login"); @@ -228,9 +216,7 @@ Cypress.Commands.add("LogintoApp", (uname, pword) => { }); Cypress.Commands.add("Signup", (uname, pword) => { - cy.window() - .its("store") - .invoke("dispatch", { type: "LOGOUT_USER_INIT" }); + cy.window().its("store").invoke("dispatch", { type: "LOGOUT_USER_INIT" }); cy.wait("@postLogout"); cy.visit("/user/signup"); @@ -274,30 +260,16 @@ Cypress.Commands.add("DeleteApp", (appName) => { cy.get(homePage.searchInput).type(appName); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.applicationCard) - .first() - .trigger("mouseover"); - cy.get(homePage.appMoreIcon) - .first() - .click({ force: true }); - cy.get(homePage.deleteAppConfirm) - .should("be.visible") - .click({ force: true }); - cy.get(homePage.deleteApp) - .contains("Are you sure?") - .click({ force: true }); + cy.get(homePage.applicationCard).first().trigger("mouseover"); + cy.get(homePage.appMoreIcon).first().click({ force: true }); + cy.get(homePage.deleteAppConfirm).should("be.visible").click({ force: true }); + cy.get(homePage.deleteApp).contains("Are you sure?").click({ force: true }); }); Cypress.Commands.add("DeletepageFromSideBar", () => { - cy.xpath(pages.popover) - .last() - .click({ force: true }); - cy.get(pages.deletePage) - .first() - .click({ force: true }); - cy.get(pages.deletePageConfirm) - .first() - .click({ force: true }); + cy.xpath(pages.popover).last().click({ force: true }); + cy.get(pages.deletePage).first().click({ force: true }); + cy.get(pages.deletePageConfirm).first().click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); }); @@ -338,9 +310,7 @@ Cypress.Commands.add("SearchApp", (appname) => { cy.get(homePage.applicationCard) .first() .trigger("mouseover", { force: true }); - cy.get(homePage.appEditIcon) - .first() - .click({ force: true }); + cy.get(homePage.appEditIcon).first().click({ force: true }); cy.get("#loading").should("not.exist"); // Wait added because after opening the application editor, sometimes it takes a little time. }); @@ -378,9 +348,7 @@ Cypress.Commands.add("GlobalSearchEntity", (apiname1, dontAssertVisibility) => { Cypress.Commands.add( "EditEntityNameByDoubleClick", (entityName, updatedName) => { - cy.get(explorer.entity) - .contains(entityName) - .dblclick({ force: true }); + cy.get(explorer.entity).contains(entityName).dblclick({ force: true }); cy.log(updatedName); cy.get(explorer.editEntityField) .clear() @@ -401,12 +369,8 @@ Cypress.Commands.add("WaitAutoSave", () => { }); Cypress.Commands.add("SelectAction", (action) => { - cy.get(ApiEditor.ApiVerb) - .first() - .click({ force: true }); - cy.xpath(action) - .should("be.visible") - .click({ force: true }); + cy.get(ApiEditor.ApiVerb).first().click({ force: true }); + cy.xpath(action).should("be.visible").click({ force: true }); }); Cypress.Commands.add("ClearSearch", () => { @@ -520,9 +484,7 @@ Cypress.Commands.add("clickTest", (testbutton) => { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.wait("@saveAction"); - cy.get(testbutton) - .first() - .click({ force: true }); + cy.get(testbutton).first().click({ force: true }); cy.wait("@postExecute"); }); @@ -585,9 +547,7 @@ Cypress.Commands.add("tabPopertyUpdate", (tabId, newTabName) => { cy.get("[data-rbd-draggable-id='" + tabId + "'] input").type(newTabName, { force: true, }); - cy.get(`.t--tabid-${tabId}`) - .contains(newTabName) - .should("be.visible"); + cy.get(`.t--tabid-${tabId}`).contains(newTabName).should("be.visible"); }); Cypress.Commands.add("generateUUID", () => { @@ -601,10 +561,7 @@ Cypress.Commands.add("addDsl", (dsl) => { appId = localStorage.getItem("applicationId"); cy.url().then((url) => { currentURL = url; - pageid = currentURL - .split("/")[5] - ?.split("-") - .pop(); + pageid = currentURL.split("/")[5]?.split("-").pop(); cy.log(pageidcopy + "page id copy"); cy.log(pageid + "page id"); appId = localStorage.getItem("applicationId"); @@ -616,7 +573,8 @@ Cypress.Commands.add("addDsl", (dsl) => { // Dumping the DSL to the created page cy.request({ method: "PUT", - url: "api/v1/layouts/" + + url: + "api/v1/layouts/" + layoutId + "/pages/" + pageid + @@ -654,23 +612,15 @@ Cypress.Commands.add("DeleteAppByApi", () => { }); Cypress.Commands.add("togglebar", (value) => { - cy.get(value) - .check({ force: true }) - .should("be.checked"); + cy.get(value).check({ force: true }).should("be.checked"); }); Cypress.Commands.add("radiovalue", (value, value2) => { - cy.get(value) - .click() - .clear() - .type(value2); + cy.get(value).click().clear().type(value2); }); Cypress.Commands.add("optionValue", (value, value2) => { - cy.get(value) - .click() - .clear() - .type(value2); + cy.get(value).click().clear().type(value2); }); Cypress.Commands.add("typeIntoDraftEditor", (selector, text) => { @@ -708,9 +658,7 @@ Cypress.Commands.add("NavigateToWidgetsInExplorer", () => { Cypress.Commands.add("NavigateToJSEditor", () => { cy.get(explorer.createNew).click({ force: true }); // 2 is the index value of the JS Object in omnibar ui - cy.get(".t--file-operation") - .eq(2) - .click({ force: true }); + cy.get(".t--file-operation").eq(2).click({ force: true }); }); Cypress.Commands.add("importCurl", () => { @@ -731,9 +679,7 @@ Cypress.Commands.add("NavigateToActiveTab", () => { }); Cypress.Commands.add("selectAction", (option) => { - cy.get(".single-select") - .contains(option) - .click({ force: true }); + cy.get(".single-select").contains(option).click({ force: true }); }); Cypress.Commands.add("deleteActionAndConfirm", () => { @@ -879,24 +825,18 @@ Cypress.Commands.add("isSelectRow", (index) => { }); Cypress.Commands.add("getDate", (date, dateFormate) => { - const eDate = dayjs() - .add(date, "days") - .format(dateFormate); + const eDate = dayjs().add(date, "days").format(dateFormate); return eDate; }); Cypress.Commands.add("setDate", (date, dateFormate) => { - const expDate = dayjs() - .add(date, "days") - .format(dateFormate); + const expDate = dayjs().add(date, "days").format(dateFormate); const sel = `.DayPicker-Day[aria-label=\"${expDate}\"]`; cy.get(sel).click(); }); Cypress.Commands.add("pageNo", (index) => { - cy.get(".page-item") - .first() - .click({ force: true }); + cy.get(".page-item").first().click({ force: true }); }); Cypress.Commands.add("pageNoValidate", (index) => { @@ -924,9 +864,7 @@ Cypress.Commands.add("validateEnableWidget", (widgetCss, disableCss) => { Cypress.Commands.add("validateHTMLText", (widgetCss, htmlTag, value) => { cy.get(widgetCss + " iframe").then(($iframe) => { const $body = $iframe.contents().find("body"); - cy.wrap($body) - .find(htmlTag) - .should("have.text", value); + cy.wrap($body).find(htmlTag).should("have.text", value); }); }); Cypress.Commands.add("setTinyMceContent", (tinyMceId, content) => { @@ -1088,9 +1026,7 @@ Cypress.Commands.add("startErrorRoutes", () => { }); Cypress.Commands.add("NavigateToPaginationTab", () => { - cy.get(ApiEditor.apiTab) - .contains("Pagination") - .click({ force: true }); + cy.get(ApiEditor.apiTab).contains("Pagination").click({ force: true }); cy.xpath(apiwidget.paginationWithUrl).click({ force: true }); }); @@ -1130,9 +1066,7 @@ Cypress.Commands.add( "ValidatePaginateResponseUrlData", (runTestCss, isNext) => { cy.CheckAndUnfoldEntityItem("Queries/JS"); - cy.get(".t--entity-name") - .contains("Api2") - .click({ force: true }); + cy.get(".t--entity-name").contains("Api2").click({ force: true }); cy.wait(3000); cy.NavigateToPaginationTab(); cy.RunAPI(); @@ -1147,9 +1081,7 @@ Cypress.Commands.add( ); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.get(ApiEditor.ApiRunBtn).should("not.be.disabled"); - cy.get(".t--entity-name") - .contains("Table1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Table1").click({ force: true }); cy.isSelectRow(0); if (isNext) { cy.wait("@postExecute").then((interception) => { @@ -1170,9 +1102,7 @@ Cypress.Commands.add( "ValidatePaginateResponseUrlDataV2", (runTestCss, isNext) => { cy.CheckAndUnfoldEntityItem("Queries/JS"); - cy.get(".t--entity-name") - .contains("Api2") - .click({ force: true }); + cy.get(".t--entity-name").contains("Api2").click({ force: true }); cy.wait(3000); cy.NavigateToPaginationTab(); cy.RunAPI(); @@ -1187,9 +1117,7 @@ Cypress.Commands.add( ); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.get(ApiEditor.ApiRunBtn).should("not.be.disabled"); - cy.get(".t--entity-name") - .contains("Table1") - .click({ force: true }); + cy.get(".t--entity-name").contains("Table1").click({ force: true }); cy.isSelectRow(0); if (isNext) { cy.wait("@postExecute").then((interception) => { @@ -1256,9 +1184,7 @@ Cypress.Commands.add( Cypress.Commands.add("updateMapType", (mapType) => { // Command to change the map chart type if the property pane of the map chart widget is opened. - cy.get(viewWidgetsPage.mapType) - .last() - .click({ force: true }); + cy.get(viewWidgetsPage.mapType).last().click({ force: true }); cy.get(commonlocators.dropdownmenu) .children() .contains(mapType) @@ -1279,9 +1205,7 @@ Cypress.Commands.add("createJSObject", (JSCode) => { .type("{downarrow}{downarrow}{downarrow}{downarrow} ") .type(JSCode); cy.wait(1000); - cy.get(jsEditorLocators.runButton) - .first() - .click(); + cy.get(jsEditorLocators.runButton).first().click(); }); Cypress.Commands.add("createSuperUser", () => { @@ -1306,24 +1230,16 @@ Cypress.Commands.add("createSuperUser", () => { cy.get(welcomePage.verifyPassword).type(Cypress.env("PASSWORD")); cy.get(welcomePage.nextButton).should("be.disabled"); cy.get(welcomePage.roleDropdown).click(); - cy.get(welcomePage.roleDropdownOption) - .eq(1) - .click(); + cy.get(welcomePage.roleDropdownOption).eq(1).click(); cy.get(welcomePage.nextButton).should("be.disabled"); cy.get(welcomePage.useCaseDropdown).click(); - cy.get(welcomePage.useCaseDropdownOption) - .eq(1) - .click(); + cy.get(welcomePage.useCaseDropdownOption).eq(1).click(); cy.get(welcomePage.nextButton).should("not.be.disabled"); cy.get(welcomePage.nextButton).click(); cy.get(welcomePage.newsLetter).should("be.visible"); cy.get(welcomePage.dataCollection).should("be.visible"); - cy.get(welcomePage.dataCollection) - .trigger("mouseover") - .click(); - cy.get(welcomePage.newsLetter) - .trigger("mouseover") - .click(); + cy.get(welcomePage.dataCollection).trigger("mouseover").click(); + cy.get(welcomePage.newsLetter).trigger("mouseover").click(); cy.get(welcomePage.createButton).should("be.visible"); cy.get(welcomePage.createButton).click(); cy.wait("@createSuperUser").then((interception) => { @@ -1581,15 +1497,10 @@ Cypress.Commands.add( if (fieldName) { cy.get(fieldName).click(); val = cy.get(fieldName).then(($field) => { - cy.wrap($field) - .find(".CodeMirror-code span") - .first() - .invoke("text"); + cy.wrap($field).find(".CodeMirror-code span").first().invoke("text"); }); } else { - cy.xpath("//div[@class='CodeMirror-code']") - .first() - .click(); + cy.xpath("//div[@class='CodeMirror-code']").first().click(); val = cy .xpath( "//div[@class='CodeMirror-code']//span[contains(@class,'cm-m-javascript')]", @@ -1614,7 +1525,7 @@ Cypress.Commands.add( ); // Cypress >=8.3.x onwards -cy.all = function(...commands) { +cy.all = function (...commands) { const _ = Cypress._; // eslint-disable-next-line const chain = cy.wrap(null, { log: false }); @@ -1682,9 +1593,7 @@ Cypress.Commands.add("VerifyErrorMsgPresence", (errorMsgToVerifyAbsence) => { Cypress.Commands.add("setQueryTimeout", (timeout) => { cy.get(queryLocators.settings).click(); - cy.xpath(queryLocators.queryTimeout) - .clear() - .type(timeout); + cy.xpath(queryLocators.queryTimeout).clear().type(timeout); cy.get(queryLocators.query).click(); }); @@ -1813,9 +1722,7 @@ Cypress.Commands.add("checkLabelForWidget", (options) => { // Set the label text cy.updateCodeInput(".t--property-control-text", labelText); // Assert label presence - cy.get(labelSelector) - .first() - .contains(labelText); + cy.get(labelSelector).first().contains(labelText); // Set the label position: Auto cy.get(".t--button-group-Auto").click({ force: true }); @@ -1835,9 +1742,7 @@ Cypress.Commands.add("checkLabelForWidget", (options) => { // Set the label alignment to RIGHT cy.get(labelAlignmentRightSelector).click(); // Assert label alignment - cy.get(labelSelector) - .first() - .should("have.css", "text-align", "right"); + cy.get(labelSelector).first().should("have.css", "text-align", "right"); // Set the label width to labelWidth cols cy.get(`[class*='t--property-control-width'] .bp3-input`) @@ -2005,23 +1910,17 @@ Cypress.Commands.add( ); Cypress.Commands.add("CreatePage", () => { - cy.get(pages.AddPage) - .first() - .click({ force: true }); + cy.get(pages.AddPage).first().click({ force: true }); cy.get("[data-cy='add-page']").click(); }); Cypress.Commands.add("GenerateCRUD", () => { - cy.get(pages.AddPage) - .first() - .click({ force: true }); + cy.get(pages.AddPage).first().click({ force: true }); cy.get("[data-cy='generate-page']").click(); }); Cypress.Commands.add("AddPageFromTemplate", () => { - cy.get(pages.AddPage) - .first() - .click({ force: true }); + cy.get(pages.AddPage).first().click({ force: true }); cy.get("[data-cy='add-page-from-template']").click(); }); @@ -2032,9 +1931,7 @@ Cypress.Commands.add(`verifyCallCount`, (alias, expectedNumberOfCalls) => { Cypress.Commands.add("LogintoAppTestUser", (uname, pword) => { cy.wait(1000); //waiting for window to load - cy.window() - .its("store") - .invoke("dispatch", { type: "LOGOUT_USER_INIT" }); + cy.window().its("store").invoke("dispatch", { type: "LOGOUT_USER_INIT" }); cy.wait("@postLogout"); cy.visit("/user/login"); @@ -2083,17 +1980,12 @@ Cypress.Commands.add("forceVisit", (url) => { }); Cypress.Commands.add("SelectDropDown", (dropdownOption) => { - cy.get(".t--widget-selectwidget button") - .first() - .scrollIntoView() - .click(); + cy.get(".t--widget-selectwidget button").first().scrollIntoView().click(); cy.get(".t--widget-selectwidget button .cancel-icon") .first() .click({ force: true }) .wait(1000); - cy.get(".t--widget-selectwidget button") - .first() - .click({ force: true }); + cy.get(".t--widget-selectwidget button").first().click({ force: true }); cy.document() .its("body") .find(".menu-item-link:contains('" + dropdownOption + "')") @@ -2114,9 +2006,7 @@ Cypress.Commands.add("RemoveMultiSelectItems", (dropdownOptions) => { Cypress.Commands.add("RemoveAllSelections", () => { cy.get(`.rc-select-selection-overflow-item .remove-icon`).each(($each) => { - cy.wrap($each) - .click({ force: true }) - .wait(1000); + cy.wrap($each).click({ force: true }).wait(1000); }); }); @@ -2148,12 +2038,7 @@ Cypress.Commands.add("SelectFromMultiSelect", (options) => { .find(option($each)) .check({ force: true }) .wait(1000); - cy.document() - .its("body") - .find(option($each)) - .should("be.checked"); + cy.document().its("body").find(option($each)).should("be.checked"); }); - cy.document() - .its("body") - .type("{esc}"); + cy.document().its("body").type("{esc}"); }); diff --git a/app/client/cypress/support/dataSourceCommands.js b/app/client/cypress/support/dataSourceCommands.js index 6babb8cc50..bc1f000c7e 100644 --- a/app/client/cypress/support/dataSourceCommands.js +++ b/app/client/cypress/support/dataSourceCommands.js @@ -48,9 +48,7 @@ Cypress.Commands.add("testSaveDeleteDatasource", () => { // delete datasource cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); cy.wait("@deleteDatasource").should( "have.nested.property", "response.body.responseMeta.status", @@ -60,18 +58,14 @@ Cypress.Commands.add("testSaveDeleteDatasource", () => { }); Cypress.Commands.add("NavigateToDatasourceEditor", () => { - cy.get(explorer.addDBQueryEntity) - .last() - .click({ force: true }); + cy.get(explorer.addDBQueryEntity).last().click({ force: true }); cy.get(pages.integrationCreateNew) .should("be.visible") .click({ force: true }); }); Cypress.Commands.add("NavigateToActiveDatasources", () => { - cy.get(explorer.addDBQueryEntity) - .last() - .click({ force: true }); + cy.get(explorer.addDBQueryEntity).last().click({ force: true }); cy.get(pages.integrationActiveTab) .should("be.visible") .click({ force: true }); @@ -147,9 +141,7 @@ Cypress.Commands.add( cy.get(datasourceEditor.host).type(hostAddress); cy.get(datasourceEditor.port).type(datasourceFormData["postgres-port"]); - cy.get(datasourceEditor.databaseName) - .clear() - .type(databaseName); + cy.get(datasourceEditor.databaseName).clear().type(databaseName); dataSources.ExpandSectionByName(datasourceEditor.sectionAuthentication); cy.get(datasourceEditor.username).type( datasourceFormData["postgres-username"], @@ -193,9 +185,7 @@ Cypress.Commands.add( cy.get(datasourceEditor.host).type(hostAddress); cy.get(datasourceEditor.port).type(datasourceFormData["mysql-port"]); - cy.get(datasourceEditor.databaseName) - .clear() - .type(databaseName); + cy.get(datasourceEditor.databaseName).clear().type(databaseName); dataSources.ExpandSectionByName(datasourceEditor.sectionAuthentication); cy.get(datasourceEditor.username).type( datasourceFormData["mysql-username"], @@ -218,9 +208,7 @@ Cypress.Commands.add( cy.get(datasourceEditor.host).type(hostAddress); cy.get(datasourceEditor.port).type(datasourceFormData["mssql-port"]); - cy.get(datasourceEditor.databaseName) - .clear() - .type(databaseName); + cy.get(datasourceEditor.databaseName).clear().type(databaseName); dataSources.ExpandSectionByName(datasourceEditor.sectionAuthentication); cy.get(datasourceEditor.username).type( datasourceFormData["mssql-username"], @@ -243,9 +231,7 @@ Cypress.Commands.add( cy.get(datasourceEditor.host).type(hostAddress); cy.get(datasourceEditor.port).type(datasourceFormData["arango-port"]); - cy.get(datasourceEditor.databaseName) - .clear() - .type(databaseName); + cy.get(datasourceEditor.databaseName).clear().type(databaseName); dataSources.ExpandSectionByName(datasourceEditor.sectionAuthentication); cy.get(datasourceEditor.username).type( @@ -269,9 +255,7 @@ Cypress.Commands.add( cy.get(datasourceEditor.host).type(hostAddress); cy.get(datasourceEditor.port).type(datasourceFormData["redshift-port"]); - cy.get(datasourceEditor.databaseName) - .clear() - .type(databaseName); + cy.get(datasourceEditor.databaseName).clear().type(databaseName); dataSources.ExpandSectionByName(datasourceEditor.sectionAuthentication); cy.get(datasourceEditor.username).type( datasourceFormData["redshift-username"], @@ -297,13 +281,9 @@ Cypress.Commands.add( ? `${datasourceFormData["mockDatabaseUsername"] + " "}` : datasourceFormData["mockDatabaseUsername"]; - cy.get(datasourceEditor["host"]) - .clear() - .type(userMockHostAddress); + cy.get(datasourceEditor["host"]).clear().type(userMockHostAddress); - cy.get(datasourceEditor["databaseName"]) - .clear() - .type(userMockDatabaseName); + cy.get(datasourceEditor["databaseName"]).clear().type(userMockDatabaseName); cy.get(datasourceEditor["sectionAuthentication"]).click(); @@ -311,9 +291,7 @@ Cypress.Commands.add( .clear() .type(datasourceFormData["mockDatabasePassword"]); - cy.get(datasourceEditor["username"]) - .clear() - .type(userMockDatabaseUsername); + cy.get(datasourceEditor["username"]).clear().type(userMockDatabaseUsername); }, ); @@ -351,9 +329,7 @@ Cypress.Commands.add("deleteDatasource", (datasourceName) => { .click({ force: true }); cy.contains(".t--datasource-name", datasourceName).click(); cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); cy.wait("@deleteDatasource").should( "have.nested.property", "response.body.responseMeta.status", @@ -371,9 +347,7 @@ Cypress.Commands.add("renameDatasource", (datasourceName) => { }); Cypress.Commands.add("fillAmazonS3DatasourceForm", () => { - cy.get(datasourceEditor.projectID) - .clear() - .type(Cypress.env("S3_ACCESS_KEY")); + cy.get(datasourceEditor.projectID).clear().type(Cypress.env("S3_ACCESS_KEY")); cy.get(datasourceEditor.serviceAccCredential) .clear() .type(Cypress.env("S3_SECRET_KEY")); @@ -387,12 +361,8 @@ Cypress.Commands.add("createAmazonS3Datasource", () => { }); Cypress.Commands.add("fillMongoDatasourceFormWithURI", () => { - cy.xpath(datasourceEditor["mongoUriDropdown"]) - .click() - .wait(500); - cy.xpath(datasourceEditor["mongoUriYes"]) - .click() - .wait(500); + cy.xpath(datasourceEditor["mongoUriDropdown"]).click().wait(500); + cy.xpath(datasourceEditor["mongoUriYes"]).click().wait(500); cy.xpath(datasourceEditor["mongoUriInput"]).type( datasourceFormData["mongo-uri"], ); @@ -428,23 +398,16 @@ Cypress.Commands.add("createNewAuthApiDatasource", (renameVal) => { Cypress.Commands.add("deleteAuthApiDatasource", (renameVal) => { //Navigate to active datasources panel. - cy.get(pages.addEntityAPI) - .last() - .should("be.visible") - .click({ force: true }); + cy.get(pages.addEntityAPI).last().should("be.visible").click({ force: true }); cy.get(pages.integrationActiveTab) .should("be.visible") .click({ force: true }); cy.get("#loading").should("not.exist"); //Select the datasource to delete - cy.get(".t--datasource-name") - .contains(renameVal) - .click(); + cy.get(".t--datasource-name").contains(renameVal).click(); //Click on delete and later confirm cy.get(".t--delete-datasource").click(); - cy.get(".t--delete-datasource") - .contains("Are you sure?") - .click(); + cy.get(".t--delete-datasource").contains("Are you sure?").click(); //Verify the status of deletion cy.wait("@deleteDatasource").should( "have.nested.property", @@ -485,9 +448,7 @@ Cypress.Commands.add("createGraphqlDatasource", (datasourceName) => { }); Cypress.Commands.add("createMockDatasource", (datasourceName) => { - cy.get(".t--mock-datasource") - .contains(datasourceName) - .click(); + cy.get(".t--mock-datasource").contains(datasourceName).click(); }); Cypress.Commands.add("datasourceCardContainerStyle", (tag) => { diff --git a/app/client/cypress/support/gitSync.js b/app/client/cypress/support/gitSync.js index ae9cfe9631..1784afa7bc 100644 --- a/app/client/cypress/support/gitSync.js +++ b/app/client/cypress/support/gitSync.js @@ -15,10 +15,7 @@ const commonLocators = require("../locators/commonlocators.json"); const GITHUB_API_BASE = "https://api.github.com"; Cypress.Commands.add("revokeAccessGit", (appName) => { - cy.xpath("//span[text()= `${appName}`]") - .parent() - .next() - .click(); + cy.xpath("//span[text()= `${appName}`]").parent().next().click(); cy.get(gitSyncLocators.disconnectAppNameInput).type(appName); cy.get(gitSyncLocators.disconnectButton).click(); cy.route("POST", "api/v1/git/disconnect/app/*").as("disconnect"); @@ -165,9 +162,7 @@ Cypress.Commands.add("switchGitBranch", (branch, expectError) => { cy.get(gitSyncLocators.branchButton).click({ force: true }); cy.get(gitSyncLocators.branchSearchInput).type(`{selectall}${branch}`); cy.wait(1000); - cy.get(gitSyncLocators.branchListItem) - .contains(branch) - .click(); + cy.get(gitSyncLocators.branchListItem).contains(branch).click(); if (!expectError) { // increasing timeout to reduce flakyness cy.get(".bp3-spinner", { timeout: 30000 }).should("exist"); @@ -265,9 +260,7 @@ Cypress.Commands.add( "createAppAndConnectGit", (appname, shouldConnect = true, assertConnectFailure) => { cy.get(homePage.homeIcon).click({ force: true }); - cy.get(homePage.createNew) - .first() - .click({ force: true }); + cy.get(homePage.createNew).first().click({ force: true }); cy.wait("@createNewApplication").should( "have.nested.property", "response.body.responseMeta.status", @@ -308,9 +301,7 @@ Cypress.Commands.add("merge", (destinationBranch) => { ); cy.wait(3000); cy.get(gitSyncLocators.mergeBranchDropdownDestination).click(); - cy.get(commonLocators.dropdownmenu) - .contains(destinationBranch) - .click(); + cy.get(commonLocators.dropdownmenu).contains(destinationBranch).click(); agHelper.AssertElementAbsence(gitSync._checkMergeability, 35000); cy.wait("@mergeStatus", { timeout: 35000 }).should( "have.nested.property", diff --git a/app/client/cypress/support/index.js b/app/client/cypress/support/index.js index 535a84659e..96014252a7 100644 --- a/app/client/cypress/support/index.js +++ b/app/client/cypress/support/index.js @@ -44,7 +44,7 @@ Cypress.on("fail", (error) => { Cypress.env("MESSAGES", MESSAGES); -before(function() { +before(function () { //console.warn = () => {}; //to remove all warnings in cypress console initLocalstorage(); initLocalstorageRegistry(); @@ -84,7 +84,7 @@ before(function() { }); }); -before(function() { +before(function () { //console.warn = () => {}; Cypress.Cookies.preserveOnce("SESSION", "remember_token"); const username = Cypress.env("USERNAME"); @@ -101,12 +101,12 @@ before(function() { localStorage.setItem("AppName", id); }); - cy.fixture("example").then(function(data) { + cy.fixture("example").then(function (data) { this.data = data; }); }); -beforeEach(function() { +beforeEach(function () { //cy.window().then((win) => (win.onbeforeunload = undefined)); if (!navigator.userAgent.includes("Cypress")) { window.addEventListener("beforeunload", this.beforeunloadFunction); @@ -121,7 +121,7 @@ beforeEach(function() { }); }); -after(function() { +after(function () { //-- Deleting the application by Api---// cy.DeleteAppByApi(); //-- LogOut Application---// diff --git a/app/client/cypress/support/queryCommands.js b/app/client/cypress/support/queryCommands.js index 15ffefae80..4f0ceb918f 100644 --- a/app/client/cypress/support/queryCommands.js +++ b/app/client/cypress/support/queryCommands.js @@ -24,9 +24,7 @@ export const initLocalstorage = () => { }; Cypress.Commands.add("NavigateToQueryEditor", () => { - cy.get(explorer.addDBQueryEntity) - .last() - .click({ force: true }); + cy.get(explorer.addDBQueryEntity).last().click({ force: true }); }); Cypress.Commands.add("NavigateToQueriesInExplorer", () => { @@ -94,17 +92,12 @@ Cypress.Commands.add("runQuery", (expectedRes = true) => { }); Cypress.Commands.add("onlyQueryRun", () => { - cy.xpath(queryEditor.runQuery) - .last() - .click({ force: true }) - .wait(1000); + cy.xpath(queryEditor.runQuery).last().click({ force: true }).wait(1000); cy.get(".cs-spinner").should("not.exist"); }); Cypress.Commands.add("RunQueryWithoutWaitingForResolution", () => { - cy.xpath(queryEditor.runQuery) - .last() - .click({ force: true }); + cy.xpath(queryEditor.runQuery).last().click({ force: true }); }); Cypress.Commands.add("hoverAndClick", () => { @@ -113,9 +106,7 @@ Cypress.Commands.add("hoverAndClick", () => { .should("be.hidden") .invoke("show") .click({ force: true }); - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); }); Cypress.Commands.add("hoverAndClickParticularIndex", (index) => { @@ -138,13 +129,9 @@ Cypress.Commands.add("deleteQuery", () => { }); Cypress.Commands.add("deleteQueryUsingContext", () => { - cy.get(queryEditor.queryMoreAction) - .first() - .click(); + cy.get(queryEditor.queryMoreAction).first().click(); cy.get(queryEditor.deleteUsingContext).click(); - cy.get(queryEditor.deleteUsingContext) - .contains("Are you sure?") - .click(); + cy.get(queryEditor.deleteUsingContext).contains("Are you sure?").click(); cy.wait("@deleteAction").should( "have.nested.property", "response.body.responseMeta.status", @@ -191,9 +178,7 @@ Cypress.Commands.add("CreateMockQuery", (queryName) => { }); Cypress.Commands.add("ValidateQueryParams", (param) => { - cy.xpath(apiwidget.paramsTab) - .should("be.visible") - .click({ force: true }); + cy.xpath(apiwidget.paramsTab).should("be.visible").click({ force: true }); cy.validateCodeEditorContent(apiwidget.paramKey, param.key); cy.validateCodeEditorContent(apiwidget.paramValue, param.value); @@ -247,10 +232,7 @@ Cypress.Commands.add( Cypress.Commands.add( "TargetFormControlAndSwitchViewType", (formControlIdentifier, newViewType) => { - cy.get(formControlIdentifier) - .scrollIntoView() - .should("be.visible") - .click(); + cy.get(formControlIdentifier).scrollIntoView().should("be.visible").click(); if (newViewType === "json") { cy.get(formControlIdentifier) @@ -297,11 +279,7 @@ Cypress.Commands.add("NavigateToAction", (actionName) => { .click(); }); Cypress.Commands.add("SelecJSFunctionAndRun", (functionName) => { - cy.xpath("//span[@name='expand-more']") - .first() - .click(); + cy.xpath("//span[@name='expand-more']").first().click(); cy.get(`[data-cy='t--dropdown-option-${functionName}']`).click(); - cy.get(jsEditorLocators.runButton) - .first() - .click(); + cy.get(jsEditorLocators.runButton).first().click(); }); diff --git a/app/client/cypress/support/themeCommands.js b/app/client/cypress/support/themeCommands.js index 278119b640..4b87b40d0a 100644 --- a/app/client/cypress/support/themeCommands.js +++ b/app/client/cypress/support/themeCommands.js @@ -7,44 +7,32 @@ require("cypress-file-upload"); const themelocator = require("../locators/ThemeLocators.json"); Cypress.Commands.add("borderMouseover", (index, text) => { - cy.get(themelocator.border) - .eq(index) - .trigger("mouseover"); + cy.get(themelocator.border).eq(index).trigger("mouseover"); cy.wait(1000); cy.get(themelocator.popover).contains(text); }); Cypress.Commands.add("shadowMouseover", (index, text) => { - cy.get(themelocator.shadow) - .eq(index) - .trigger("mouseover"); + cy.get(themelocator.shadow).eq(index).trigger("mouseover"); cy.wait(1000); cy.get(themelocator.popover).contains(text); }); Cypress.Commands.add("colorMouseover", (index, text) => { - cy.get(themelocator.color) - .eq(index) - .trigger("mouseover"); + cy.get(themelocator.color).eq(index).trigger("mouseover"); cy.wait(2000); cy.get(themelocator.popover).contains(text); }); Cypress.Commands.add("validateColor", (index, text) => { - cy.get(themelocator.color) - .eq(index) - .click({ force: true }); + cy.get(themelocator.color).eq(index).click({ force: true }); cy.wait(1000); cy.get(themelocator.inputColor).should("have.value", text); cy.wait(1000); }); Cypress.Commands.add("chooseColor", (index, color) => { - cy.get(themelocator.colorPicker) - .eq(index) - .click({ force: true }); - cy.get(color) - .last() - .click(); + cy.get(themelocator.colorPicker).eq(index).click({ force: true }); + cy.get(color).last().click(); cy.wait(2000); }); diff --git a/app/client/cypress/support/widgetCommands.js b/app/client/cypress/support/widgetCommands.js index ddb06670aa..f13c88098e 100644 --- a/app/client/cypress/support/widgetCommands.js +++ b/app/client/cypress/support/widgetCommands.js @@ -28,13 +28,8 @@ export const initLocalstorage = () => { }; Cypress.Commands.add("changeZoomLevel", (zoomValue) => { - cy.get(commonlocators.changeZoomlevel) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains(zoomValue) - .click(); + cy.get(commonlocators.changeZoomlevel).last().click(); + cy.get(".t--dropdown-option").children().contains(zoomValue).click(); cy.wait("@updateLayout").should( "have.nested.property", "response.body.responseMeta.status", @@ -53,13 +48,8 @@ Cypress.Commands.add( "changeColumnType", (dataType, doesPropertyTabExist = true) => { if (doesPropertyTabExist) cy.moveToContentTab(); - cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains(dataType) - .click(); + cy.get(commonlocators.changeColType).last().click(); + cy.get(".t--dropdown-option").children().contains(dataType).click(); cy.wait("@updateLayout").should( "have.nested.property", "response.body.responseMeta.status", @@ -78,9 +68,7 @@ Cypress.Commands.add( ); Cypress.Commands.add("switchToPaginationTab", () => { - cy.get(apiwidget.paginationTab) - .first() - .click({ force: true }); + cy.get(apiwidget.paginationTab).first().click({ force: true }); }); Cypress.Commands.add("selectDateFormat", (value) => { @@ -94,13 +82,8 @@ Cypress.Commands.add("selectDateFormat", (value) => { }); Cypress.Commands.add("selectDropdownValue", (element, value) => { - cy.get(element) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains(value) - .click(); + cy.get(element).last().click(); + cy.get(".t--dropdown-option").children().contains(value).click(); }); Cypress.Commands.add("assertDateFormat", () => { @@ -110,9 +93,7 @@ Cypress.Commands.add("assertDateFormat", () => { .then((text) => { const firstTxt = text; cy.log("date time : ", firstTxt); - cy.get(commonlocators.labelTextStyle) - .first() - .should("contain", firstTxt); + cy.get(commonlocators.labelTextStyle).first().should("contain", firstTxt); cy.get(commonlocators.labelTextStyle) .last() .invoke("text") @@ -129,13 +110,9 @@ Cypress.Commands.add("selectPaginationType", (option) => { }); Cypress.Commands.add("copyJSObjectToPage", (pageName) => { - cy.xpath(apiwidget.popover) - .last() - .click({ force: true }); + cy.xpath(apiwidget.popover).last().click({ force: true }); cy.get(apiwidget.copyTo).click({ force: true }); - cy.get(apiwidget.page) - .contains(pageName) - .click(); + cy.get(apiwidget.page).contains(pageName).click(); cy.wait("@createNewJSCollection").should( "have.nested.property", "response.body.responseMeta.status", @@ -144,20 +121,14 @@ Cypress.Commands.add("copyJSObjectToPage", (pageName) => { }); Cypress.Commands.add("AddActionWithModal", () => { - cy.get(commonlocators.dropdownSelectButton) - .last() - .click(); - cy.get(".single-select") - .contains("Open modal") - .click({ force: true }); + cy.get(commonlocators.dropdownSelectButton).last().click(); + cy.get(".single-select").contains("Open modal").click({ force: true }); cy.get(modalWidgetPage.selectModal).click(); cy.get(modalWidgetPage.createModalButton).click({ force: true }); }); Cypress.Commands.add("createModal", (ModalName) => { - cy.get(widgetsPage.actionSelect) - .first() - .click({ force: true }); + cy.get(widgetsPage.actionSelect).first().click({ force: true }); cy.selectOnClickOption("Open modal"); cy.get(modalWidgetPage.selectModal).click(); cy.wait(2000); @@ -188,9 +159,7 @@ Cypress.Commands.add("createModal", (ModalName) => { }); Cypress.Commands.add("createModalWithIndex", (ModalName, index) => { - cy.get(widgetsPage.actionSelect) - .eq(index) - .click({ force: true }); + cy.get(widgetsPage.actionSelect).eq(index).click({ force: true }); cy.selectOnClickOption("Open modal"); cy.get(modalWidgetPage.selectModal).click(); cy.wait(2000); @@ -263,13 +232,8 @@ Cypress.Commands.add("EditWidgetPropertiesUsingJS", (checkboxCss, inputJS) => { Cypress.Commands.add( "ChangeTextStyle", (dropDownValue, textStylecss, labelName) => { - cy.get(commonlocators.dropDownIcon) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains(dropDownValue) - .click(); + cy.get(commonlocators.dropDownIcon).last().click(); + cy.get(".t--dropdown-option").children().contains(dropDownValue).click(); cy.get(textStylecss).should("have.text", labelName); }, ); @@ -279,9 +243,7 @@ Cypress.Commands.add("widgetText", (text, inputcss, innercss) => { .click({ force: true }) .type(text, { delay: 300 }) .type("{enter}"); - cy.get(inputcss) - .first() - .click({ force: true }); + cy.get(inputcss).first().click({ force: true }); cy.contains(innercss, text); }); @@ -297,9 +259,7 @@ Cypress.Commands.add("verifyUpdatedWidgetName", (text, txtToVerify) => { }); Cypress.Commands.add("verifyWidgetText", (text, inputcss, innercss) => { - cy.get(inputcss) - .first() - .trigger("mouseover", { force: true }); + cy.get(inputcss).first().trigger("mouseover", { force: true }); cy.contains(innercss, text); }); @@ -346,24 +306,18 @@ Cypress.Commands.add("testCodeMirror", (value) => { .type(`{${modifierKey}}a`) .then(($cm) => { if ($cm.val() !== "") { - cy.get(".CodeMirror textarea") - .first() - .clear({ - force: true, - }); + cy.get(".CodeMirror textarea").first().clear({ + force: true, + }); } - cy.get(".CodeMirror textarea") - .first() - .type(value, { - force: true, - parseSpecialCharSequences: false, - }); + cy.get(".CodeMirror textarea").first().type(value, { + force: true, + parseSpecialCharSequences: false, + }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(".CodeMirror textarea") - .first() - .should("have.value", value); + cy.get(".CodeMirror textarea").first().should("have.value", value); }); }); @@ -377,18 +331,14 @@ Cypress.Commands.add("updateComputedValue", (value) => { cy.focused().then(($cm) => { if ($cm.contents !== "") { cy.log("The field is empty"); - cy.get(".CodeMirror textarea") - .first() - .clear({ - force: true, - }); - } - cy.get(".CodeMirror textarea") - .first() - .type(value, { + cy.get(".CodeMirror textarea").first().clear({ force: true, - parseSpecialCharSequences: false, }); + } + cy.get(".CodeMirror textarea").first().type(value, { + force: true, + parseSpecialCharSequences: false, + }); }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(1000); @@ -401,11 +351,9 @@ Cypress.Commands.add("clearComputedValueFirst", () => { .type("{uparrow}", { force: true }) .type("{ctrl}{shift}{downarrow}", { force: true }); cy.focused().then(() => { - cy.get(".CodeMirror textarea") - .first() - .clear({ - force: true, - }); + cy.get(".CodeMirror textarea").first().clear({ + force: true, + }); cy.log("The field is empty"); }); cy.wait(1000); @@ -420,11 +368,9 @@ Cypress.Commands.add("updateComputedValueV2", (value) => { cy.focused().then(($cm) => { if ($cm.contents !== "") { cy.log("The field is empty"); - cy.get(".CodeMirror textarea") - .first() - .clear({ - force: true, - }); + cy.get(".CodeMirror textarea").first().clear({ + force: true, + }); } cy.get(".t--property-control-computedvalue .CodeMirror textarea") .first() @@ -445,11 +391,9 @@ Cypress.Commands.add("testCodeMirrorWithIndex", (value, index) => { .type("{ctrl}{shift}{downarrow}", { force: true }) .then(($cm) => { if ($cm.val() !== "") { - cy.get(".CodeMirror textarea") - .eq(index) - .clear({ - force: true, - }); + cy.get(".CodeMirror textarea").eq(index).clear({ + force: true, + }); } cy.get(".CodeMirror textarea") @@ -462,9 +406,7 @@ Cypress.Commands.add("testCodeMirrorWithIndex", (value, index) => { }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); - cy.get(".CodeMirror textarea") - .eq(index) - .should("have.value", value); + cy.get(".CodeMirror textarea").eq(index).should("have.value", value); }); }); @@ -476,11 +418,9 @@ Cypress.Commands.add("testCodeMirrorLast", (value) => { .type("{ctrl}{shift}{downarrow}", { force: true }) .then(($cm) => { if ($cm.val() !== "") { - cy.get(".CodeMirror textarea") - .last() - .clear({ - force: true, - }); + cy.get(".CodeMirror textarea").last().clear({ + force: true, + }); } cy.get(".CodeMirror textarea") @@ -493,9 +433,7 @@ Cypress.Commands.add("testCodeMirrorLast", (value) => { }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); - cy.get(".CodeMirror textarea") - .last() - .should("have.value", value); + cy.get(".CodeMirror textarea").last().should("have.value", value); }); }); @@ -665,18 +603,14 @@ Cypress.Commands.add("toggleJsAndUpdate", (endp, value) => { cy.focused().then(($cm) => { if ($cm.contents !== "") { cy.log("The field is empty"); - cy.get(".CodeMirror textarea") - .last() - .clear({ - force: true, - }); - } - cy.get(".CodeMirror textarea") - .last() - .type(value, { + cy.get(".CodeMirror textarea").last().clear({ force: true, - parseSpecialCharSequences: false, }); + } + cy.get(".CodeMirror textarea").last().type(value, { + force: true, + parseSpecialCharSequences: false, + }); }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); @@ -691,18 +625,14 @@ Cypress.Commands.add("toggleJsAndUpdateWithIndex", (endp, value, index) => { cy.focused().then(($cm) => { if ($cm.contents !== "") { cy.log("The field is empty"); - cy.get(".CodeMirror textarea") - .eq(index) - .clear({ - force: true, - }); - } - cy.get(".CodeMirror textarea") - .eq(index) - .type(value, { + cy.get(".CodeMirror textarea").eq(index).clear({ force: true, - parseSpecialCharSequences: false, }); + } + cy.get(".CodeMirror textarea").eq(index).type(value, { + force: true, + parseSpecialCharSequences: false, + }); }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); @@ -746,9 +676,7 @@ Cypress.Commands.add("tableColumnPopertyUpdate", (colId, newColName) => { cy.get("[data-rbd-draggable-id='" + colId + "'] input").type(newColName, { force: true, }); - cy.get(".draggable-header ") - .contains(newColName) - .should("be.visible"); + cy.get(".draggable-header ").contains(newColName).should("be.visible"); }); Cypress.Commands.add("tableV2ColumnPopertyUpdate", (colId, newColName) => { @@ -768,9 +696,7 @@ Cypress.Commands.add("tableV2ColumnPopertyUpdate", (colId, newColName) => { force: true, }, ); - cy.get(".draggable-header ") - .contains(newColName) - .should("be.visible"); + cy.get(".draggable-header ").contains(newColName).should("be.visible"); }); Cypress.Commands.add("backFromPropertyPanel", () => { @@ -799,9 +725,7 @@ Cypress.Commands.add("showColumn", (colId) => { cy.get("[data-rbd-draggable-id='" + colId + "'] .t--show-column-btn").click({ force: true, }); - cy.get(".draggable-header ") - .contains(colId) - .should("be.visible"); + cy.get(".draggable-header ").contains(colId).should("be.visible"); }); Cypress.Commands.add("deleteColumn", (colId) => { cy.backFromPropertyPanel(); @@ -851,9 +775,7 @@ Cypress.Commands.add("makeColumnVisible", (colId) => { Cypress.Commands.add("addColumn", (colId) => { cy.get(widgetsPage.addColumn).scrollIntoView(); - cy.get(widgetsPage.addColumn) - .should("be.visible") - .click({ force: true }); + cy.get(widgetsPage.addColumn).should("be.visible").click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); cy.get(widgetsPage.defaultColName).clear({ @@ -864,9 +786,7 @@ Cypress.Commands.add("addColumn", (colId) => { Cypress.Commands.add("addColumnV2", (colId) => { cy.get(widgetsPage.addColumn).scrollIntoView(); - cy.get(widgetsPage.addColumn) - .should("be.visible") - .click({ force: true }); + cy.get(widgetsPage.addColumn).should("be.visible").click({ force: true }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(3000); cy.get(widgetsPage.defaultColNameV2).clear({ @@ -909,9 +829,7 @@ Cypress.Commands.add("addAction", (value, property) => { let dropdownSelect = commonlocators.dropdownSelectButton; if (property) dropdownSelect = `.t--property-control-${property} ${dropdownSelect}`; - cy.get(dropdownSelect) - .last() - .click(); + cy.get(dropdownSelect).last().click(); cy.get(commonlocators.chooseAction) .children() .contains("Show message") @@ -931,9 +849,7 @@ Cypress.Commands.add("addEvent", (value, selector) => { }); Cypress.Commands.add("onTableAction", (value, value1, value2) => { - cy.get(commonlocators.dropdownSelectButton) - .eq(value) - .click(); + cy.get(commonlocators.dropdownSelectButton).eq(value).click(); cy.get(commonlocators.chooseAction) .children() .contains("Show message") @@ -949,13 +865,8 @@ Cypress.Commands.add("selectShowMsg", () => { }); Cypress.Commands.add("addSuccessMessage", (value) => { - cy.get(commonlocators.chooseMsgType) - .last() - .click({ force: true }); - cy.get(commonlocators.chooseAction) - .children() - .contains("Success") - .click(); + cy.get(commonlocators.chooseMsgType).last().click({ force: true }); + cy.get(commonlocators.chooseAction).children().contains("Success").click(); cy.enterActionValue(value); }); @@ -967,13 +878,8 @@ Cypress.Commands.add("selectResetWidget", () => { }); Cypress.Commands.add("selectWidgetForReset", (value) => { - cy.get(commonlocators.chooseWidget) - .last() - .click({ force: true }); - cy.get(commonlocators.chooseAction) - .children() - .contains(value) - .click(); + cy.get(commonlocators.chooseWidget).last().click({ force: true }); + cy.get(commonlocators.chooseAction).children().contains(value).click(); }); Cypress.Commands.add("SetDateToToday", () => { @@ -994,19 +900,15 @@ Cypress.Commands.add("enterActionValue", (value, property) => { .type("{ctrl}{shift}{downarrow}") .then(($cm) => { if ($cm.val() !== "") { - cy.get(codeMirrorTextArea) - .last() - .clear({ - force: true, - }); + cy.get(codeMirrorTextArea).last().clear({ + force: true, + }); } - cy.get(codeMirrorTextArea) - .last() - .type(value, { - force: true, - parseSpecialCharSequences: false, - }); + cy.get(codeMirrorTextArea).last().type(value, { + force: true, + parseSpecialCharSequences: false, + }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); }); @@ -1043,23 +945,17 @@ Cypress.Commands.add("enterNavigatePageName", (value) => { .type("{ctrl}{shift}{downarrow}") .then(($cm) => { if ($cm.val() !== "") { - cy.get(".CodeMirror textarea") - .first() - .clear({ - force: true, - }); - } - cy.get(".CodeMirror textarea") - .first() - .type(value, { + cy.get(".CodeMirror textarea").first().clear({ force: true, - parseSpecialCharSequences: false, }); + } + cy.get(".CodeMirror textarea").first().type(value, { + force: true, + parseSpecialCharSequences: false, + }); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(200); - cy.get(".CodeMirror textarea") - .first() - .should("have.value", value); + cy.get(".CodeMirror textarea").first().should("have.value", value); }); cy.root(); }); @@ -1079,9 +975,7 @@ Cypress.Commands.add("ClearDateFooter", () => { Cypress.Commands.add("DeleteModal", () => { cy.get(widgetsPage.textbuttonWidget).dblclick("topRight", { force: true }); - cy.get(widgetsPage.deleteWidget) - .first() - .click({ force: true }); + cy.get(widgetsPage.deleteWidget).first().click({ force: true }); }); Cypress.Commands.add("Createpage", (pageName, navigateToCanvasPage = true) => { @@ -1154,23 +1048,16 @@ Cypress.Commands.add("treeMultiSelectDropdown", (text) => { Cypress.Commands.add("dropdownDynamicUpdated", (text) => { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(commonlocators.dropdownmenu) - .contains(text) - .click({ force: true }); + cy.get(commonlocators.dropdownmenu).contains(text).click({ force: true }); cy.xpath(commonlocators.dropDownOptSelected).should("have.text", text); }); Cypress.Commands.add("selectTextSize", (text) => { - cy.get(".t--dropdown-option") - .first() - .contains(text) - .click({ force: true }); + cy.get(".t--dropdown-option").first().contains(text).click({ force: true }); }); Cypress.Commands.add("selectTxtSize", (text) => { - cy.get(".t--dropdown-option") - .contains(text) - .click({ force: true }); + cy.get(".t--dropdown-option").contains(text).click({ force: true }); }); Cypress.Commands.add("getAlert", (alertcss) => { @@ -1180,9 +1067,7 @@ Cypress.Commands.add("getAlert", (alertcss) => { .click({ force: true }) .should("have.text", "Show Alert"); - cy.get(alertcss) - .click({ force: true }) - .type("hello"); + cy.get(alertcss).click({ force: true }).type("hello"); cy.get(".t--open-dropdown-Select-type").click({ force: true }); cy.get(".bp3-popover-content .bp3-menu li") .contains("Success") @@ -1190,29 +1075,19 @@ Cypress.Commands.add("getAlert", (alertcss) => { }); Cypress.Commands.add("togglebar", (value) => { - cy.get(value) - .check({ force: true }) - .should("be.checked"); + cy.get(value).check({ force: true }).should("be.checked"); }); Cypress.Commands.add("togglebarDisable", (value) => { - cy.get(value) - .uncheck({ force: true }) - .should("not.checked"); + cy.get(value).uncheck({ force: true }).should("not.checked"); }); Cypress.Commands.add( "getAlert", (alertcss, propertyControl = commonlocators.dropdownSelectButton) => { - cy.get(propertyControl) - .first() - .click({ force: true }); - cy.get(widgetsPage.menubar) - .contains("Show message") - .click({ force: true }); + cy.get(propertyControl).first().click({ force: true }); + cy.get(widgetsPage.menubar).contains("Show message").click({ force: true }); - cy.get(alertcss) - .click({ force: true }) - .type("hello"); + cy.get(alertcss).click({ force: true }).type("hello"); cy.get(".t--open-dropdown-Select-type").click({ force: true }); cy.get(".bp3-popover-content .bp3-menu li") .contains("Success") @@ -1259,14 +1134,8 @@ Cypress.Commands.add("tabVerify", (index, text) => { Cypress.Commands.add("openPropertyPane", (widgetType) => { const selector = `.t--draggable-${widgetType}`; cy.wait(500); - cy.get(selector) - .first() - .trigger("mouseover", { force: true }) - .wait(500); - cy.get(`${selector}:first-of-type`) - .first() - .click({ force: true }) - .wait(500); + cy.get(selector).first().trigger("mouseover", { force: true }).wait(500); + cy.get(`${selector}:first-of-type`).first().click({ force: true }).wait(500); cy.get(".t--widget-propertypane-toggle > .t--widget-name") .first() .click({ force: true }); @@ -1277,14 +1146,8 @@ Cypress.Commands.add("openPropertyPane", (widgetType) => { Cypress.Commands.add("openPropertyPaneFromModal", (widgetType) => { const selector = `.t--draggable-${widgetType}`; cy.wait(500); - cy.get(selector) - .first() - .trigger("mouseover", { force: true }) - .wait(500); - cy.get(`${selector}:first-of-type`) - .first() - .click({ force: true }) - .wait(500); + cy.get(selector).first().trigger("mouseover", { force: true }).wait(500); + cy.get(`${selector}:first-of-type`).first().click({ force: true }).wait(500); cy.get(".t--widget-propertypane-toggle > .t--widget-name") .last() .click({ force: true }); @@ -1315,10 +1178,7 @@ Cypress.Commands.add("openPropertyPaneCopy", (widgetType) => { cy.SearchEntityandOpen(widgetType); } else { const selector = `.t--draggable-${widgetType}`; - cy.get(selector) - .last() - .trigger("mouseover", { force: true }) - .wait(500); + cy.get(selector).last().trigger("mouseover", { force: true }).wait(500); cy.get(`${selector}:first-of-type`) .first() .click({ force: true }) @@ -1375,9 +1235,7 @@ Cypress.Commands.add("deleteWidget", () => { Cypress.Commands.add("UpdateChartType", (typeOfChart) => { // Command to change the chart type if the property pane of the chart widget is opened. - cy.get(viewWidgetsPage.chartType) - .last() - .click({ force: true }); + cy.get(viewWidgetsPage.chartType).last().click({ force: true }); cy.get(commonlocators.dropdownmenu) .children() .contains(typeOfChart) @@ -1390,9 +1248,7 @@ Cypress.Commands.add("UpdateChartType", (typeOfChart) => { }); Cypress.Commands.add("alertValidate", (text) => { - cy.get(commonlocators.success) - .should("be.visible") - .and("have.text", text); + cy.get(commonlocators.success).should("be.visible").and("have.text", text); }); Cypress.Commands.add("ExportVerify", (togglecss, name) => { @@ -1468,10 +1324,7 @@ Cypress.Commands.add( (rowNum, colNum, index) => { // const selector = `.t--widget-tablewidget .e-gridcontent.e-lib.e-droppable td[index=${rowNum}][aria-colindex=${colNum}]`; const selector = `.t--widget-tablewidget .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}] div`; - const tabVal = cy - .get(selector) - .eq(index) - .invoke("text"); + const tabVal = cy.get(selector).eq(index).invoke("text"); return tabVal; }, ); @@ -1480,10 +1333,7 @@ Cypress.Commands.add( "readTableV2dataFromSpecificIndex", (rowNum, colNum, index) => { const selector = `.t--widget-tablewidgetv2 .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}]`; - const tabVal = cy - .get(selector) - .eq(index) - .invoke("text"); + const tabVal = cy.get(selector).eq(index).invoke("text"); return tabVal; }, ); @@ -1501,10 +1351,7 @@ Cypress.Commands.add("tablefirstdataRow", () => { Cypress.Commands.add("scrollTabledataPublish", (rowNum, colNum) => { const selector = `.t--widget-tablewidget .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}] div div`; - const tabVal = cy - .get(selector) - .scrollIntoView() - .invoke("text"); + const tabVal = cy.get(selector).scrollIntoView().invoke("text"); return tabVal; }); @@ -1521,10 +1368,7 @@ Cypress.Commands.add("readTableV2LinkPublish", (rowNum, colNum) => { }); Cypress.Commands.add("assertEvaluatedValuePopup", (expectedType) => { - cy.get(commonlocators.evaluatedTypeTitle) - .first() - .find("span") - .click(); + cy.get(commonlocators.evaluatedTypeTitle).first().find("span").click(); cy.get(dynamicInputLocators.evaluatedValue) .should("be.visible") .find("pre") @@ -1554,11 +1398,9 @@ Cypress.Commands.add("clearPropertyValue", (value) => { cy.focused().then(($cm) => { if ($cm.contents !== "") { cy.log("The field is empty"); - cy.get(".CodeMirror textarea") - .eq(value) - .clear({ - force: true, - }); + cy.get(".CodeMirror textarea").eq(value).clear({ + force: true, + }); } }); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -1698,15 +1540,11 @@ Cypress.Commands.add("discardTableRow", (x, y) => { }); Cypress.Commands.add("moveToStyleTab", () => { - cy.get(commonlocators.propertyStyle) - .first() - .click({ force: true }); + cy.get(commonlocators.propertyStyle).first().click({ force: true }); }); Cypress.Commands.add("moveToContentTab", () => { - cy.get(commonlocators.propertyContent) - .first() - .click({ force: true }); + cy.get(commonlocators.propertyContent).first().click({ force: true }); }); Cypress.Commands.add("openPropertyPaneWithIndex", (widgetType, index) => { @@ -1771,9 +1609,9 @@ Cypress.Commands.add("checkMaxDefaultValue", (endp, value) => { }); Cypress.Commands.add("freezeColumnFromDropdown", (columnName, direction) => { - cy.get( - `[data-header=${columnName}] .header-menu .bp3-popover2-target`, - ).click({ force: true }); + cy.get(`[data-header=${columnName}] .header-menu .bp3-popover2-target`).click( + { force: true }, + ); cy.get(".bp3-menu") .contains(`Freeze column ${direction}`) .click({ force: true }); @@ -1816,10 +1654,8 @@ Cypress.Commands.add( cy.wait(1000); cy.readLocalColumnOrder(columnOrderKey).then((tableWidgetOrder) => { if (tableWidgetOrder) { - const { - leftOrder: observedLeftOrder, - rightOrder: observedRightOrder, - } = tableWidgetOrder; + const { leftOrder: observedLeftOrder, rightOrder: observedRightOrder } = + tableWidgetOrder; if (direction === "left") { expect(expectedOrder).to.be.deep.equal(observedLeftOrder); } @@ -1831,11 +1667,7 @@ Cypress.Commands.add( }, ); Cypress.Commands.add("findAndExpandEvaluatedTypeTitle", () => { - cy.get(commonlocators.evaluatedTypeTitle) - .first() - .next() - .find("span") - .click(); + cy.get(commonlocators.evaluatedTypeTitle).first().next().find("span").click(); }); /** @@ -1844,9 +1676,10 @@ Cypress.Commands.add("findAndExpandEvaluatedTypeTitle", () => { */ Cypress.Commands.add("dragAndDropColumn", (sourceColumn, targetColumn) => { const dataTransfer = new DataTransfer(); - cy.get( - `[data-header="${sourceColumn}"] [draggable='true']`, - ).trigger("dragstart", { force: true, dataTransfer }); + cy.get(`[data-header="${sourceColumn}"] [draggable='true']`).trigger( + "dragstart", + { force: true, dataTransfer }, + ); cy.get(`[data-header="${targetColumn}"] [draggable='true']`).trigger("drop", { force: true, diff --git a/app/client/generators/utils/widgetExists.js b/app/client/generators/utils/widgetExists.js index 9aa1fbb9e4..50c7ef1dca 100644 --- a/app/client/generators/utils/widgetExists.js +++ b/app/client/generators/utils/widgetExists.js @@ -1,9 +1,9 @@ -const fs = require('fs'); -const path = require('path'); -const widgets = fs.readdirSync(path.join(__dirname, '../../src/widgets')); +const fs = require("fs"); +const path = require("path"); +const widgets = fs.readdirSync(path.join(__dirname, "../../src/widgets")); function widgetExists(widget) { - return widgets.indexOf(widget) >= 0; + return widgets.indexOf(widget) >= 0; } module.exports = widgetExists; diff --git a/app/client/package.json b/app/client/package.json index b58adaecdd..9576c7b804 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -97,7 +97,7 @@ "papaparse": "^5.3.2", "path-to-regexp": "^6.2.0", "popper.js": "^1.15.0", - "prettier": "^1.18.2", + "prettier": "^2.8.4", "prismjs": "^1.27.0", "proxy-memoize": "^1.2.0", "punycode": "^2.1.1", @@ -266,12 +266,12 @@ "cypress-xpath": "^1.4.0", "diff": "^5.0.0", "dotenv": "^8.1.0", - "eslint": "8.3.0", - "eslint-config-prettier": "^6.12.0", + "eslint": "^8.35.0", + "eslint-config-prettier": "^8.6.0", "eslint-import-resolver-babel-module": "^5.3.1", "eslint-plugin-cypress": "^2.11.2", "eslint-plugin-import": "^2.25.2", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.30.0", "eslint-plugin-react-hooks": "^2.3.0", "eslint-plugin-sort-destructure-keys": "^1.3.5", diff --git a/app/client/packages/storybook/.storybook/styles.css b/app/client/packages/storybook/.storybook/styles.css index f520f52dae..0407df39c4 100644 --- a/app/client/packages/storybook/.storybook/styles.css +++ b/app/client/packages/storybook/.storybook/styles.css @@ -2,17 +2,20 @@ @import url("../../wds/src/styles/tokens/semantic.css"); @import url("../../wds/src/styles/globals.css"); -html, body, #root { +html, +body, +#root { height: 100%; width: 100%; } -*, :after, :before { +*, +:after, +:before { border: 0 solid #e4e4e7; box-sizing: border-box; } - .innerZoomElementWrapper > * { - overflow:hidden; + overflow: hidden; } diff --git a/app/client/packages/wds/src/styles/tokens/raw.css b/app/client/packages/wds/src/styles/tokens/raw.css index 982ab21014..eeaff2ec11 100644 --- a/app/client/packages/wds/src/styles/tokens/raw.css +++ b/app/client/packages/wds/src/styles/tokens/raw.css @@ -61,4 +61,3 @@ --wds-v2-spacing-2: calc(var(--wds-v2-spacing-root) * 2); --wds-v2-spacing-4: calc(var(--wds-v2-spacing-root) * 4); } - diff --git a/app/client/packages/wds/src/utils/createTokens.ts b/app/client/packages/wds/src/utils/createTokens.ts index d196d07ad8..1c710b4ee7 100644 --- a/app/client/packages/wds/src/utils/createTokens.ts +++ b/app/client/packages/wds/src/utils/createTokens.ts @@ -25,9 +25,8 @@ export const createTokens = css` const lightAccentColor = lightenColor(color); const accentActiveColor = darkenColor(accentHoverColor); const lightAccentHoverColor = calulateHoverColor(lightAccentColor); - const complementaryAccentColor = getComplementaryGrayscaleColor( - accentColor, - ); + const complementaryAccentColor = + getComplementaryGrayscaleColor(accentColor); const lightAcctentActiveColor = darkenColor(lightAccentHoverColor, 0.03); const onAccentBorderColor = darkenColor(color, 0.1); const onAccentLightBorderColor = lightenColor(color, 0.98); diff --git a/app/client/public/404.css b/app/client/public/404.css index 3c267c1f2c..1cb1ba9c0b 100644 --- a/app/client/public/404.css +++ b/app/client/public/404.css @@ -1,11 +1,13 @@ -body, html { +body, +html { height: 100%; overflow-x: hidden; width: 100%; background-color: #fff; margin: 0; color: #182026; - font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, + Ubuntu, Cantarell, Open Sans, Helvetica Neue, Icons16, sans-serif; font-size: 14px; font-weight: 400; letter-spacing: 0; @@ -64,7 +66,7 @@ body, html { } .body-text { - margin: 8px 0 0 ; + margin: 8px 0 0; } .button-container { @@ -111,4 +113,3 @@ body, html { color: #f86a2b; border: 1.2px solid #f86a2b; } - diff --git a/app/client/public/libraries/fast-csv@4.3.6.js b/app/client/public/libraries/fast-csv@4.3.6.js index 634b5ef4b5..3064eb268d 100644 --- a/app/client/public/libraries/fast-csv@4.3.6.js +++ b/app/client/public/libraries/fast-csv@4.3.6.js @@ -1 +1,8086 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).fastCsv=e()}}(function(){return function(){return function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){return i(t[s][1][e]||e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;se?(i=!0,n(e)):(r&&r.forEach(e=>{this.push(t.from(e,"utf8"))}),i=!0,n()))}catch(e){if(i)throw e;n(e)}}_flush(e){this.rowFormatter.finish((r,n)=>r?e(r):(n&&n.forEach(e=>{this.push(t.from(e,"utf8"))}),e()))}}}).call(this,e("buffer").Buffer)},{"./formatter":6,buffer:37,stream:62}],3:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FormatterOptions=void 0;r.FormatterOptions=class{constructor(e={}){var t;this.objectMode=!0,this.delimiter=",",this.rowDelimiter="\n",this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\ufeff",this.alwaysWriteHeaders=!1,Object.assign(this,e||{}),void 0===(null==e?void 0:e.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==e?void 0:e.quote)?this.quote='"':!1===(null==e?void 0:e.quote)&&(this.quote=""),"string"!=typeof(null==e?void 0:e.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null===(t=e.writeHeaders)||void 0===t||t),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],4:[function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.FieldFormatter=void 0;const i=n(e("lodash.isboolean")),o=n(e("lodash.isnil")),s=n(e("lodash.escaperegexp"));r.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,null!==e.headers&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");const t=`[${e.delimiter}${s.default(e.rowDelimiter)}|\r|\n]`;this.ESCAPE_REGEXP=new RegExp(t)}set headers(e){this._headers=e}shouldQuote(e,t){const r=t?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(r)?r:Array.isArray(r)?r[e]:null!==this._headers&&r[this._headers[e]]}format(e,t,r){const n=`${o.default(e)?"":e}`.replace(/\0/g,""),{formatterOptions:i}=this;return""!==i.quote&&-1!==n.indexOf(i.quote)?this.quoteField(n.replace(this.REPLACE_REGEXP,i.escapedQuote)):-1!==n.search(this.ESCAPE_REGEXP)||this.shouldQuote(t,r)?this.quoteField(n):n}quoteField(e){const{quote:t}=this.formatterOptions;return`${t}${e}${t}`}}},{"lodash.escaperegexp":26,"lodash.isboolean":28,"lodash.isnil":31}],5:[function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.RowFormatter=void 0;const i=n(e("lodash.isfunction")),o=n(e("lodash.isequal")),s=e("./FieldFormatter"),a=e("../types");class u{constructor(e){this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new s.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,null!==this.headers&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}static isRowHashArray(e){return!!Array.isArray(e)&&(Array.isArray(e[0])&&2===e[0].length)}static isRowArray(e){return Array.isArray(e)&&!this.isRowHashArray(e)}static gatherHeaders(e){return u.isRowHashArray(e)?e.map(e=>e[0]):Array.isArray(e)?e:Object.keys(e)}static createTransform(e){return a.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:(t,r)=>{e(t,r)}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=u.createTransform(e)}format(e,t){this.callTransformer(e,(r,n)=>{if(r)return t(r);if(!e)return t(null);const i=[];if(n){const{shouldFormatColumns:e,headers:t}=this.checkHeaders(n);if(this.shouldWriteHeaders&&t&&!this.hasWrittenHeaders&&(i.push(this.formatColumns(t,!0)),this.hasWrittenHeaders=!0),e){const e=this.gatherColumns(n);i.push(this.formatColumns(e,!1))}}return t(null,i)})}finish(e){const t=[];if(this.formatterOptions.alwaysWriteHeaders&&0===this.rowCount){if(!this.headers)return e(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));t.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&t.push(this.formatterOptions.rowDelimiter),e(null,t)}checkHeaders(e){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const t=u.gatherHeaders(e);return this.headers=t,this.fieldFormatter.headers=t,this.shouldWriteHeaders?{shouldFormatColumns:!o.default(t,e),headers:t}:{shouldFormatColumns:!0,headers:null}}gatherColumns(e){if(null===this.headers)throw new Error("Headers is currently null");return Array.isArray(e)?u.isRowHashArray(e)?this.headers.map((t,r)=>{const n=e[r];return n?n[1]:""}):u.isRowArray(e)&&!this.shouldWriteHeaders?e:this.headers.map((t,r)=>e[r]):this.headers.map(t=>e[t])}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}formatColumns(e,t){const r=e.map((e,r)=>this.fieldFormatter.format(e,r,t)).join(this.formatterOptions.delimiter),{rowCount:n}=this;return this.rowCount+=1,n?[this.formatterOptions.rowDelimiter,r].join(""):r}}r.RowFormatter=u},{"../types":8,"./FieldFormatter":4,"lodash.isequal":29,"lodash.isfunction":30}],6:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FieldFormatter=r.RowFormatter=void 0;var n=e("./RowFormatter");Object.defineProperty(r,"RowFormatter",{enumerable:!0,get:function(){return n.RowFormatter}});var i=e("./FieldFormatter");Object.defineProperty(r,"FieldFormatter",{enumerable:!0,get:function(){return i.FieldFormatter}})},{"./FieldFormatter":4,"./RowFormatter":5}],7:[function(e,t,r){(function(t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),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 r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.writeToPath=r.writeToString=r.writeToBuffer=r.writeToStream=r.write=r.format=r.FormatterOptions=r.CsvFormatterStream=void 0;const a=e("util"),u=e("stream"),f=o(e("fs")),l=e("./FormatterOptions"),c=e("./CsvFormatterStream");s(e("./types"),r);var h=e("./CsvFormatterStream");Object.defineProperty(r,"CsvFormatterStream",{enumerable:!0,get:function(){return h.CsvFormatterStream}});var d=e("./FormatterOptions");Object.defineProperty(r,"FormatterOptions",{enumerable:!0,get:function(){return d.FormatterOptions}}),r.format=(e=>new c.CsvFormatterStream(new l.FormatterOptions(e))),r.write=((e,t)=>{const n=r.format(t),i=a.promisify((e,t)=>{n.write(e,void 0,t)});return e.reduce((e,t)=>e.then(()=>i(t)),Promise.resolve()).then(()=>n.end()).catch(e=>{n.emit("error",e)}),n}),r.writeToStream=((e,t,n)=>r.write(t,n).pipe(e)),r.writeToBuffer=((e,n={})=>{const i=[],o=new u.Writable({write(e,t,r){i.push(e),r()}});return new Promise((s,a)=>{o.on("error",a).on("finish",()=>s(t.concat(i))),r.write(e,n).pipe(o)})}),r.writeToString=((e,t)=>r.writeToBuffer(e,t).then(e=>e.toString())),r.writeToPath=((e,t,n)=>{const i=f.createWriteStream(e,{encoding:"utf8"});return r.write(t,n).pipe(i)})}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":2,"./FormatterOptions":3,"./types":8,buffer:37,fs:36,stream:62,util:68}],8:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isSyncTransform=void 0,r.isSyncTransform=(e=>1===e.length)},{}],9:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CsvParserStream=void 0;const n=e("string_decoder"),i=e("stream"),o=e("./transforms"),s=e("./parser");class a extends i.Transform{constructor(e){super({objectMode:e.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=e,this.parser=new s.Parser(e),this.headerTransformer=new o.HeaderTransformer(e),this.decoder=new n.StringDecoder(e.encoding),this.rowTransformerValidator=new o.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(e){return this.rowTransformerValidator.rowTransform=e,this}validate(e){return this.rowTransformerValidator.rowValidator=e,this}emit(e,...t){return"end"===e?(this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1):super.emit(e,...t)}_transform(e,t,r){if(this.hasHitRowLimit)return r();const n=a.wrapDoneCallback(r);try{const{lines:t}=this,r=t+this.decoder.write(e),i=this.parse(r,!0);return this.processRows(i,n)}catch(e){return n(e)}}_flush(e){const t=a.wrapDoneCallback(e);if(this.hasHitRowLimit)return t();try{const e=this.lines+this.decoder.end(),r=this.parse(e,!1);return this.processRows(r,t)}catch(e){return t(e)}}parse(e,t){if(!e)return[];const{line:r,rows:n}=this.parser.parse(e,t);return this.lines=r,n}processRows(e,r){const n=e.length,i=o=>{const s=e=>e?r(e):o%100!=0?i(o+1):void t(()=>i(o+1));if(this.checkAndEmitHeaders(),o>=n||this.hasHitRowLimit)return r();if(this.parsedLineCount+=1,this.shouldSkipLine)return s();const a=e[o];this.rowCount+=1,this.parsedRowCount+=1;const u=this.rowCount;return this.transformRow(a,(e,t)=>{if(e)return this.rowCount-=1,s(e);if(!t)return s(new Error("expected transform result"));if(t.isValid){if(t.row)return this.pushRow(t.row,s)}else this.emit("data-invalid",t.row,u,t.reason);return s()})};i(0)}transformRow(e,t){try{this.headerTransformer.transform(e,(r,n)=>r?t(r):n?n.isValid?n.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(n.row,t):this.skipRow(t):(this.rowCount-=1,this.parsedRowCount-=1,t(null,{row:null,isValid:!0})):this.shouldEmitRows?t(null,{isValid:!1,row:e}):this.skipRow(t):t(new Error("Expected result from header transform")))}catch(e){t(e)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(e){return this.rowCount-=1,e(null,{row:null,isValid:!0})}pushRow(e,t){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),t()}catch(e){t(e)}}static wrapDoneCallback(e){let t=!1;return(r,...n)=>{if(r){if(t)throw r;return t=!0,void e(r)}e(...n)}}}r.CsvParserStream=a}).call(this,e("timers").setImmediate)},{"./parser":21,"./transforms":24,stream:62,string_decoder:63,timers:64}],10:[function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ParserOptions=void 0;const i=n(e("lodash.escaperegexp")),o=n(e("lodash.isnil"));r.ParserOptions=class{constructor(e){var t;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,e||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!==(t=this.escape)&&void 0!==t?t:this.quote,this.supportsComments=!o.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},{"lodash.escaperegexp":26,"lodash.isnil":31}],11:[function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),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 r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.parseString=r.parseFile=r.parseStream=r.parse=r.ParserOptions=r.CsvParserStream=void 0;const a=o(e("fs")),u=e("stream"),f=e("./ParserOptions"),l=e("./CsvParserStream");s(e("./types"),r);var c=e("./CsvParserStream");Object.defineProperty(r,"CsvParserStream",{enumerable:!0,get:function(){return c.CsvParserStream}});var h=e("./ParserOptions");Object.defineProperty(r,"ParserOptions",{enumerable:!0,get:function(){return h.ParserOptions}}),r.parse=(e=>new l.CsvParserStream(new f.ParserOptions(e))),r.parseStream=((e,t)=>e.pipe(new l.CsvParserStream(new f.ParserOptions(t)))),r.parseFile=((e,t={})=>a.createReadStream(e).pipe(new l.CsvParserStream(new f.ParserOptions(t)))),r.parseString=((e,t)=>{const r=new u.Readable;return r.push(e),r.push(null),r.pipe(new l.CsvParserStream(new f.ParserOptions(t)))})},{"./CsvParserStream":9,"./ParserOptions":10,"./types":25,fs:36,stream:62}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Parser=void 0;const n=e("./Scanner"),i=e("./RowParser"),o=e("./Token");class s{constructor(e){this.parserOptions=e,this.rowParser=new i.RowParser(this.parserOptions)}static removeBOM(e){return e&&65279===e.charCodeAt(0)?e.slice(1):e}parse(e,t){const r=new n.Scanner({line:s.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:t});return this.parserOptions.supportsComments?this.parseWithComments(r):this.parseWithoutComments(r)}parseWithoutComments(e){const t=[];let r=!0;for(;r;)r=this.parseRow(e,t);return{line:e.line,rows:t}}parseWithComments(e){const{parserOptions:t}=this,r=[];for(let n=e.nextCharacterToken;null!==n;n=e.nextCharacterToken)if(o.Token.isTokenComment(n,t)){if(null===e.advancePastLine())return{line:e.lineFromCursor,rows:r};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:r};e.truncateToCursor()}else if(!this.parseRow(e,r))break;return{line:e.line,rows:r}}parseRow(e,t){if(!e.nextNonSpaceToken)return!1;const r=this.rowParser.parse(e);return null!==r&&(!(!this.parserOptions.ignoreEmpty||!i.RowParser.isEmptyRow(r))||(t.push(r),!0))}}r.Parser=s},{"./RowParser":13,"./Scanner":14,"./Token":15}],13:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RowParser=void 0;const n=e("./column"),i=e("./Token"),o="";r.RowParser=class{constructor(e){this.parserOptions=e,this.columnParser=new n.ColumnParser(e)}static isEmptyRow(e){return e.join(o).replace(/\s+/g,o)===o}parse(e){const{parserOptions:t}=this,{hasMoreData:r}=e,n=e,o=[];let s=this.getStartToken(n,o);for(;s;){if(i.Token.isTokenRowDelimiter(s))return n.advancePastToken(s),!n.hasMoreCharacters&&i.Token.isTokenCarriageReturn(s,t)&&r?null:(n.truncateToCursor(),o);if(!this.shouldSkipColumnParse(n,s,o)){const e=this.columnParser.parse(n);if(null===e)return null;o.push(e)}s=n.nextNonSpaceToken}return r?null:(n.truncateToCursor(),o)}getStartToken(e,t){const r=e.nextNonSpaceToken;return null!==r&&i.Token.isTokenDelimiter(r,this.parserOptions)?(t.push(""),e.nextNonSpaceToken):r}shouldSkipColumnParse(e,t,r){const{parserOptions:n}=this;if(i.Token.isTokenDelimiter(t,n)){e.advancePastToken(t);const o=e.nextCharacterToken;if(!e.hasMoreCharacters||null!==o&&i.Token.isTokenRowDelimiter(o))return r.push(""),!0;if(null!==o&&i.Token.isTokenDelimiter(o,n))return r.push(""),!0}return!1}}},{"./Token":15,"./column":20}],14:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Scanner=void 0;const n=e("./Token"),i=/((?:\r\n)|\n|\r)/;r.Scanner=class{constructor(e){this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:e}=this,t=this.parserOptions.NEXT_TOKEN_REGEXP;if(-1===e.search(t))return null;const r=t.exec(e);if(null==r)return null;const i=r[1],o=this.cursor+(r.index||0);return new n.Token({token:i,startCursor:o,endCursor:o+i.length-1})}get nextCharacterToken(){const{cursor:e,lineLength:t}=this;return t<=e?null:new n.Token({token:this.line[e],startCursor:e,endCursor:e})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const e=i.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(e){return this.cursor=e,this}advanceToToken(e){return this.cursor=e.startCursor,this}advancePastToken(e){return this.cursor=e.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":15}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Token=void 0;r.Token=class{constructor(e){this.token=e.token,this.startCursor=e.startCursor,this.endCursor=e.endCursor}static isTokenRowDelimiter(e){const t=e.token;return"\r"===t||"\n"===t||"\r\n"===t}static isTokenCarriageReturn(e,t){return e.token===t.carriageReturn}static isTokenComment(e,t){return t.supportsComments&&!!e&&e.token===t.comment}static isTokenEscapeCharacter(e,t){return e.token===t.escapeChar}static isTokenQuote(e,t){return e.token===t.quote}static isTokenDelimiter(e,t){return e.token===t.delimiter}}},{}],16:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ColumnFormatter=void 0;r.ColumnFormatter=class{constructor(e){e.trim?this.format=(e=>e.trim()):e.ltrim?this.format=(e=>e.trimLeft()):e.rtrim?this.format=(e=>e.trimRight()):this.format=(e=>e)}}},{}],17:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ColumnParser=void 0;const n=e("./NonQuotedColumnParser"),i=e("./QuotedColumnParser"),o=e("../Token");r.ColumnParser=class{constructor(e){this.parserOptions=e,this.quotedColumnParser=new i.QuotedColumnParser(e),this.nonQuotedColumnParser=new n.NonQuotedColumnParser(e)}parse(e){const{nextNonSpaceToken:t}=e;return null!==t&&o.Token.isTokenQuote(t,this.parserOptions)?(e.advanceToToken(t),this.quotedColumnParser.parse(e)):this.nonQuotedColumnParser.parse(e)}}},{"../Token":15,"./NonQuotedColumnParser":18,"./QuotedColumnParser":19}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.NonQuotedColumnParser=void 0;const n=e("./ColumnFormatter"),i=e("../Token");r.NonQuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const{parserOptions:t}=this,r=[];let n=e.nextCharacterToken;for(;n&&!i.Token.isTokenDelimiter(n,t)&&!i.Token.isTokenRowDelimiter(n);n=e.nextCharacterToken)r.push(n.token),e.advancePastToken(n);return this.columnFormatter.format(r.join(""))}}},{"../Token":15,"./ColumnFormatter":16}],19:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.QuotedColumnParser=void 0;const n=e("./ColumnFormatter"),i=e("../Token");r.QuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const t=e.cursor,{foundClosingQuote:r,col:n}=this.gatherDataBetweenQuotes(e);if(!r){if(e.advanceTo(t),!e.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${e.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(e),n}gatherDataBetweenQuotes(e){const{parserOptions:t}=this;let r=!1,n=!1;const o=[];let s=e.nextCharacterToken;for(;!n&&null!==s;s=e.nextCharacterToken){const a=i.Token.isTokenQuote(s,t);if(!r&&a)r=!0;else if(r)if(i.Token.isTokenEscapeCharacter(s,t)){e.advancePastToken(s);const r=e.nextCharacterToken;null!==r&&(i.Token.isTokenQuote(r,t)||i.Token.isTokenEscapeCharacter(r,t))?(o.push(r.token),s=r):a?n=!0:o.push(s.token)}else a?n=!0:o.push(s.token);e.advancePastToken(s)}return{col:this.columnFormatter.format(o.join("")),foundClosingQuote:n}}checkForMalformedColumn(e){const{parserOptions:t}=this,{nextNonSpaceToken:r}=e;if(r){const n=i.Token.isTokenDelimiter(r,t),o=i.Token.isTokenRowDelimiter(r);if(!n&&!o){const n=e.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${t.escapedDelimiter}' OR new line got: '${r.token}'. at '${n}`)}e.advanceToToken(r)}else e.hasMoreData||e.advancePastLine()}}},{"../Token":15,"./ColumnFormatter":16}],20:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ColumnFormatter=r.QuotedColumnParser=r.NonQuotedColumnParser=r.ColumnParser=void 0;var n=e("./ColumnParser");Object.defineProperty(r,"ColumnParser",{enumerable:!0,get:function(){return n.ColumnParser}});var i=e("./NonQuotedColumnParser");Object.defineProperty(r,"NonQuotedColumnParser",{enumerable:!0,get:function(){return i.NonQuotedColumnParser}});var o=e("./QuotedColumnParser");Object.defineProperty(r,"QuotedColumnParser",{enumerable:!0,get:function(){return o.QuotedColumnParser}});var s=e("./ColumnFormatter");Object.defineProperty(r,"ColumnFormatter",{enumerable:!0,get:function(){return s.ColumnFormatter}})},{"./ColumnFormatter":16,"./ColumnParser":17,"./NonQuotedColumnParser":18,"./QuotedColumnParser":19}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.QuotedColumnParser=r.NonQuotedColumnParser=r.ColumnParser=r.Token=r.Scanner=r.RowParser=r.Parser=void 0;var n=e("./Parser");Object.defineProperty(r,"Parser",{enumerable:!0,get:function(){return n.Parser}});var i=e("./RowParser");Object.defineProperty(r,"RowParser",{enumerable:!0,get:function(){return i.RowParser}});var o=e("./Scanner");Object.defineProperty(r,"Scanner",{enumerable:!0,get:function(){return o.Scanner}});var s=e("./Token");Object.defineProperty(r,"Token",{enumerable:!0,get:function(){return s.Token}});var a=e("./column");Object.defineProperty(r,"ColumnParser",{enumerable:!0,get:function(){return a.ColumnParser}}),Object.defineProperty(r,"NonQuotedColumnParser",{enumerable:!0,get:function(){return a.NonQuotedColumnParser}}),Object.defineProperty(r,"QuotedColumnParser",{enumerable:!0,get:function(){return a.QuotedColumnParser}})},{"./Parser":12,"./RowParser":13,"./Scanner":14,"./Token":15,"./column":20}],22:[function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.HeaderTransformer=void 0;const i=n(e("lodash.isundefined")),o=n(e("lodash.isfunction")),s=n(e("lodash.uniq")),a=n(e("lodash.groupby"));r.HeaderTransformer=class{constructor(e){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=e,!0===e.headers?this.shouldUseFirstRow=!0:Array.isArray(e.headers)?this.setHeaders(e.headers):o.default(e.headers)&&(this.headersTransform=e.headers)}transform(e,t){return this.shouldMapRow(e)?t(null,this.processRow(e)):t(null,{row:null,isValid:!0})}shouldMapRow(e){const{parserOptions:t}=this;if(!this.headersTransform&&t.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(e)){if(this.headersTransform)this.setHeaders(this.headersTransform(e));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(e)}return!1}return!0}processRow(e){if(!this.headers)return{row:e,isValid:!0};const{parserOptions:t}=this;if(!t.discardUnmappedColumns&&e.length>this.headersLength){if(!t.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${e.length}`);return{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}}return t.strictColumnHandling&&e.length!!e);if(s.default(r).length!==r.length){const e=a.default(r),t=Object.keys(e).filter(t=>e[t].length>1);throw new Error(`Duplicate headers found ${JSON.stringify(t)}`)}this.headers=e,this.receivedHeaders=!0,this.headersLength=(null===(t=this.headers)||void 0===t?void 0:t.length)||0}}},{"lodash.groupby":27,"lodash.isfunction":30,"lodash.isundefined":32,"lodash.uniq":33}],23:[function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.RowTransformerValidator=void 0;const i=n(e("lodash.isfunction")),o=e("../types");class s{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(e){return o.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:e}static createValidator(e){return o.isSyncValidate(e)?(t,r)=>{r(null,{row:t,isValid:e(t)})}:(t,r)=>{e(t,(e,n,i)=>e?r(e):r(null,n?{row:t,isValid:n,reason:i}:{row:t,isValid:!1,reason:i}))}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=s.createTransform(e)}set rowValidator(e){if(!i.default(e))throw new TypeError("The validate should be a function");this._rowValidator=s.createValidator(e)}transformAndValidate(e,t){return this.callTransformer(e,(e,r)=>e?t(e):r?this.callValidator(r,(e,n)=>e?t(e):n&&!n.isValid?t(null,{row:r,isValid:!1,reason:n.reason}):t(null,{row:r,isValid:!0})):t(null,{row:null,isValid:!0}))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}callValidator(e,t){return this._rowValidator?this._rowValidator(e,t):t(null,{row:e,isValid:!0})}}r.RowTransformerValidator=s},{"../types":25,"lodash.isfunction":30}],24:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.HeaderTransformer=r.RowTransformerValidator=void 0;var n=e("./RowTransformerValidator");Object.defineProperty(r,"RowTransformerValidator",{enumerable:!0,get:function(){return n.RowTransformerValidator}});var i=e("./HeaderTransformer");Object.defineProperty(r,"HeaderTransformer",{enumerable:!0,get:function(){return i.HeaderTransformer}})},{"./HeaderTransformer":22,"./RowTransformerValidator":23}],25:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isSyncValidate=r.isSyncTransform=void 0,r.isSyncTransform=(e=>1===e.length),r.isSyncValidate=(e=>1===e.length)},{}],26:[function(e,t,r){(function(e){var r=1/0,n="[object Symbol]",i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source),s="object"==typeof e&&e&&e.Object===Object&&e,a="object"==typeof self&&self&&self.Object===Object&&self,u=s||a||Function("return this")(),f=Object.prototype.toString,l=u.Symbol,c=l?l.prototype:void 0,h=c?c.toString:void 0;function d(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==n}(e))return h?h.call(e):"";var t=e+"";return"0"==t&&1/e==-r?"-0":t}t.exports=function(e){var t;return(e=null==(t=e)?"":d(t))&&o.test(e)?e.replace(i,"\\$&"):e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,t,r){(function(e){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,u=1/0,f=9007199254740991,l="[object Arguments]",c="[object Array]",h="[object Boolean]",d="[object Date]",p="[object Error]",y="[object Function]",m="[object GeneratorFunction]",g="[object Map]",b="[object Number]",v="[object Object]",w="[object RegExp]",_="[object Set]",j="[object String]",T="[object Symbol]",O="[object ArrayBuffer]",S="[object DataView]",C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k=/^\w*$/,E=/^\./,P=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,A=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[l]=M[c]=M[O]=M[h]=M[S]=M[d]=M[p]=M[y]=M[g]=M[b]=M[v]=M[w]=M[_]=M[j]=M["[object WeakMap]"]=!1;var F="object"==typeof e&&e&&e.Object===Object&&e,L="object"==typeof self&&self&&self.Object===Object&&self,B=F||L||Function("return this")(),U="object"==typeof r&&r&&!r.nodeType&&r,D=U&&"object"==typeof t&&t&&!t.nodeType&&t,N=D&&D.exports===U&&F.process,I=function(){try{return N&&N.binding("util")}catch(e){}}(),H=I&&I.isTypedArray;function q(e,t,r,n){for(var i=-1,o=e?e.length:0;++i-1},Se.prototype.set=function(e,t){var r=this.__data__,n=xe(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Ce.prototype.clear=function(){this.__data__={hash:new Oe,map:new(ce||Se),string:new Oe}},Ce.prototype.delete=function(e){return ze(this,e).delete(e)},Ce.prototype.get=function(e){return ze(this,e).get(e)},Ce.prototype.has=function(e){return ze(this,e).has(e)},Ce.prototype.set=function(e,t){return ze(this,e).set(e,t),this},ke.prototype.add=ke.prototype.push=function(e){return this.__data__.set(e,o),this},ke.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.clear=function(){this.__data__=new Se},Ee.prototype.delete=function(e){return this.__data__.delete(e)},Ee.prototype.get=function(e){return this.__data__.get(e)},Ee.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Se){var i=r.__data__;if(!ce||i.lengthf))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var h=-1,d=!0,p=i&s?new ke:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=f}function lt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ct(e){return!!e&&"object"==typeof e}function ht(e){return"symbol"==typeof e||ct(e)&&ne.call(e)==T}var dt=H?function(e){return function(t){return e(t)}}(H):function(e){return ct(e)&&ft(e.length)&&!!M[ne.call(e)]};function pt(e){return at(e)?Pe(e):He(e)}function yt(e){return e}t.exports=rt}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(e,t,r){var n="[object Boolean]",i=Object.prototype.toString;t.exports=function(e){return!0===e||!1===e||function(e){return!!e&&"object"==typeof e}(e)&&i.call(e)==n}},{}],29:[function(e,t,r){(function(e){var n=200,i="__lodash_hash_undefined__",o=1,s=2,a=9007199254740991,u="[object Arguments]",f="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",y="[object GeneratorFunction]",m="[object Map]",g="[object Number]",b="[object Null]",v="[object Object]",w="[object Proxy]",_="[object RegExp]",j="[object Set]",T="[object String]",O="[object Symbol]",S="[object Undefined]",C="[object ArrayBuffer]",k="[object DataView]",E=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[u]=x[f]=x[C]=x[c]=x[k]=x[h]=x[d]=x[p]=x[m]=x[g]=x[v]=x[_]=x[j]=x[T]=x["[object WeakMap]"]=!1;var R="object"==typeof e&&e&&e.Object===Object&&e,A="object"==typeof self&&self&&self.Object===Object&&self,M=R||A||Function("return this")(),F="object"==typeof r&&r&&!r.nodeType&&r,L=F&&"object"==typeof t&&t&&!t.nodeType&&t,B=L&&L.exports===F,U=B&&R.process,D=function(){try{return U&&U.binding&&U.binding("util")}catch(e){}}(),N=D&&D.isTypedArray;function I(e,t){for(var r=-1,n=null==e?0:e.length;++rf))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var h=-1,d=!0,p=r&s?new Ce:void 0;for(a.set(e,t),a.set(t,e);++h-1},Oe.prototype.set=function(e,t){var r=this.__data__,n=Pe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Se.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(ce||Oe),string:new Te}},Se.prototype.delete=function(e){var t=Ue(this,e).delete(e);return this.size-=t?1:0,t},Se.prototype.get=function(e){return Ue(this,e).get(e)},Se.prototype.has=function(e){return Ue(this,e).has(e)},Se.prototype.set=function(e,t){var r=Ue(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,i),this},Ce.prototype.has=function(e){return this.__data__.has(e)},ke.prototype.clear=function(){this.__data__=new Oe,this.size=0},ke.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ke.prototype.get=function(e){return this.__data__.get(e)},ke.prototype.has=function(e){return this.__data__.has(e)},ke.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Oe){var i=r.__data__;if(!ce||i.length-1&&e%1==0&&e-1&&e%1==0&&e<=a}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Je(e){return null!=e&&"object"==typeof e}var Ye=N?function(e){return function(t){return e(t)}}(N):function(e){return Je(e)&&Ge(e.length)&&!!x[xe(e)]};function Ke(e){return null!=(t=e)&&Ge(t.length)&&!Qe(t)?Ee(e):Fe(e);var t}t.exports=function(e,t){return Ae(e,t)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],30:[function(e,t,r){(function(e){var r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Null]",s="[object Proxy]",a="[object Undefined]",u="object"==typeof e&&e&&e.Object===Object&&e,f="object"==typeof self&&self&&self.Object===Object&&self,l=u||f||Function("return this")(),c=Object.prototype,h=c.hasOwnProperty,d=c.toString,p=l.Symbol,y=p?p.toStringTag:void 0;function m(e){return null==e?void 0===e?a:o:y&&y in Object(e)?function(e){var t=h.call(e,y),r=e[y];try{e[y]=void 0;var n=!0}catch(e){}var i=d.call(e);n&&(t?e[y]=r:delete e[y]);return i}(e):function(e){return d.call(e)}(e)}t.exports=function(e){if(!function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}(e))return!1;var t=m(e);return t==n||t==i||t==r||t==s}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],31:[function(e,t,r){t.exports=function(e){return null==e}},{}],32:[function(e,t,r){t.exports=function(e){return void 0===e}},{}],33:[function(e,t,r){(function(e){var r=200,n="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",s=/^\[object .+?Constructor\]$/,a="object"==typeof e&&e&&e.Object===Object&&e,u="object"==typeof self&&self&&self.Object===Object&&self,f=a||u||Function("return this")();function l(e,t){return!!(e?e.length:0)&&function(e,t,r){if(t!=t)return function(e,t,r,n){var i=e.length,o=r+(n?1:-1);for(;n?o--:++o-1}function c(e,t,r){for(var n=-1,i=e?e.length:0;++n-1},x.prototype.set=function(e,t){var r=this.__data__,n=M(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new P,map:new(C||x),string:new P}},R.prototype.delete=function(e){return B(this,e).delete(e)},R.prototype.get=function(e){return B(this,e).get(e)},R.prototype.has=function(e){return B(this,e).has(e)},R.prototype.set=function(e,t){return B(this,e).set(e,t),this},A.prototype.add=A.prototype.push=function(e){return this.__data__.set(e,n),this},A.prototype.has=function(e){return this.__data__.has(e)};var L=k&&1/p(new k([,-0]))[1]==1/0?function(e){return new k(e)}:function(){};function B(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return F(r)?r:void 0}function D(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=function(e){return e&&e.length?function(e,t,n){var i=-1,o=l,s=e.length,a=!0,u=[],f=u;if(n)a=!1,o=c;else if(s>=r){var h=t?null:L(e);if(h)return p(h);a=!1,o=d,f=new A}else f=t?[]:u;e:for(;++i0?s-4:s;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],35:[function(e,t,r){},{}],36:[function(e,t,r){arguments[4][35][0].apply(r,arguments)},{dup:35}],37:[function(e,t,r){(function(t){"use strict";var n=e("base64-js"),i=e("ieee754");r.Buffer=t,r.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return r.__proto__=t.prototype,r}function t(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return a(e,t,r)}function a(e,r,n){if("string"==typeof e)return function(e,r){"string"==typeof r&&""!==r||(r="utf8");if(!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|h(e,r),i=s(n),o=i.write(e,r);o!==n&&(i=i.slice(0,o));return i}(e,r);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer))return function(e,r,n){if(r<0||e.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function h(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(o)return i?-1:B(e).length;r=(""+r).toLowerCase(),o=!0}}function d(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function p(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),I(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:y(e,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):y(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var c=!0,h=0;hi&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function j(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(l=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=c}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return j(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),""},t.prototype.compare=function(e,r,n,i,o){if(N(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(this===e)return 0;for(var s=(o>>>=0)-(i>>>=0),a=(n>>>=0)-(r>>>=0),u=Math.min(s,a),f=this.slice(i,o),l=e.slice(r,n),c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return g(this,e,t,r);case"ascii":return b(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function S(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function x(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||re.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function A(e,t,r,n,o){return t=+t,r>>>=0,o||R(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,o){return t=+t,r>>>=0,o||R(e,0,r,8),i.write(e,t,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},t.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},t.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||x(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n)||x(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,r){return A(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return A(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,i){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r=0;--s)e[s+r]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,i),r);return o},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var o=e.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(e=o)}}else"number"==typeof e&&(e&=255);if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=r;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function N(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function I(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":34,buffer:37,ieee754:40}],38:[function(e,t,r){(function(e){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":42}],39:[function(e,t,r){var n=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var a,u=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),a=0===f.x}catch(e){a=!1}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,r,i){var o,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]):(s=e._events=n(null),e._eventsCount=0),a){if("function"==typeof a?a=s[t]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),!a.warned&&(o=l(e))&&o>0&&a.length>o){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else a=s[t]=r,++e._eventsCount;return e}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(r=s[e]))return!1;var f="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=m(e,n),o=0;o=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},s.prototype.listenerCount=y,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],40:[function(e,t,r){r.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,l=-7,c=r?i-1:0,h=r?-1:1,d=e[t+c];for(c+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+c],c+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+c],c+=h,l-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=f}return(d?-1:1)*s*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var s,a,u,f=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=l?(a=0,s=l):s+c>=1?(a=(t*u-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;e[r+d]=255&s,d+=p,s/=256,f-=8);e[r+d-p]|=128*y}},{}],41:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],42:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],43:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],44:[function(e,t,r){(function(e){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s1)for(var r=1;r0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?_(e,s,t,!1):C(e,s)):_(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=j?e=j:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(S,e):S(e))}function S(e){d("emit readable"),e.emit("readable"),x(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(k,e,t))}function k(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=f.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function A(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(M,t,e))}function M(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function F(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?A(this):O(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&A(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&A(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:v;function f(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",m),e.removeListener("unpipe",f),n.removeListener("end",l),n.removeListener("end",v),n.removeListener("data",y),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",f);var c=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,x(e))}}(n);e.on("drain",c);var h=!1;var p=!1;function y(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==F(o.pipes,e))&&!h&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function m(t){d("onerror",t),v(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),v()}function b(){d("onfinish"),e.removeListener("close",g),v()}function v(){d("unpipe"),n.unpipe(e)}return n.on("data",y),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",b),e.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?i:o.nextTick;b.WritableState=g;var f=e("core-util-is");f.inherits=e("inherits");var l={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),h=e("safe-buffer").Buffer,d=n.Uint8Array||function(){};var p,y=e("./internal/streams/destroy");function m(){}function g(t,r){a=a||e("./_stream_duplex"),t=t||{};var n=r instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,f=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(f||0===f)?f:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(O,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),O(e,t))}(e,r,n,t,i);else{var s=j(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?u(w,e,r,s,i):w(e,r,s,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(a=a||e("./_stream_duplex"),!(p.call(b,this)||this instanceof a))return new b(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),c.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,l=r.encoding,c=r.callback;if(v(e,t,!1,t.objectMode?1:f.length,f,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function j(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),O(e,t)})}function O(e,t){var r=j(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(T,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}f.inherits(b,c),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===b&&(e&&e._writableState instanceof g)}})):p=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof d);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=m),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":47,"./internal/streams/destroy":53,"./internal/streams/stream":54,_process:45,"core-util-is":38,inherits:41,"process-nextick-args":44,"safe-buffer":55,timers:64,"util-deprecate":65}],52:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,i=a,t.copy(r,i),a+=s.data.length,s=s.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":55,util:35}],53:[function(e,t,r){"use strict";var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":44}],54:[function(e,t,r){t.exports=e("events").EventEmitter},{events:39}],55:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:37}],56:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=f,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":55}],57:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":58}],58:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":47,"./lib/_stream_passthrough.js":48,"./lib/_stream_readable.js":49,"./lib/_stream_transform.js":50,"./lib/_stream_writable.js":51}],59:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":58}],60:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":51}],61:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:37}],62:[function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),e.removeListener("error",f),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",f),e.on("error",f),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},{events:39,inherits:41,"readable-stream/duplex.js":46,"readable-stream/passthrough.js":57,"readable-stream/readable.js":58,"readable-stream/transform.js":59,"readable-stream/writable.js":60}],63:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{dup:56,"safe-buffer":61}],64:[function(e,t,r){(function(t,n){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,s=Array.prototype.slice,a={},u=0;function f(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new f(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new f(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof t?t:function(e){var t=u++,n=!(arguments.length<2)&&s.call(arguments,1);return a[t]=!0,i(function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":45,timers:64}],65:[function(e,t,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],66:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],67:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],68:[function(e,t,r){(function(t,n){var i=/%[sdj%]/g;r.format=function(e){if(!g(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,e,n.depth)}function u(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function f(e,t){return e}function l(e,t,n){if(e.customInspect&&t&&T(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return g(i)||(i=l(e,i,n)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,t);if(o)return o;var s=Object.keys(t),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),j(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(t);if(0===s.length){if(T(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(v(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(_(t))return e.stylize(Date.prototype.toString.call(t),"date");if(j(t))return c(t)}var f,w="",O=!1,S=["{","}"];(d(t)&&(O=!0,S=["[","]"]),T(t))&&(w=" [Function"+(t.name?": "+t.name:"")+"]");return v(t)&&(w=" "+RegExp.prototype.toString.call(t)),_(t)&&(w=" "+Date.prototype.toUTCString.call(t)),j(t)&&(w=" "+c(t)),0!==s.length||O&&0!=t.length?n<0?v(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),f=O?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(f,w,S)):S[0]+w+S[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),k(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=y(r)?l(e,u.value,null):l(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function y(e){return null===e}function m(e){return"number"==typeof e}function g(e){return"string"==typeof e}function b(e){return void 0===e}function v(e){return w(e)&&"[object RegExp]"===O(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===O(e)}function j(e){return w(e)&&("[object Error]"===O(e)||e instanceof Error)}function T(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(b(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var n=t.pid;s[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else s[e]=function(){};return s[e]},r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=p,r.isNull=y,r.isNullOrUndefined=function(e){return null==e},r.isNumber=m,r.isString=g,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=b,r.isRegExp=v,r.isObject=w,r.isDate=_,r.isError=j,r.isFunction=T,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":"),[e.getDate(),C[e.getMonth()],t].join(" ")),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":67,_process:45,inherits:66}]},{},[1])(1)}); \ No newline at end of file +!(function (e) { + if ("object" == typeof exports && "undefined" != typeof module) + module.exports = e(); + else if ("function" == typeof define && define.amd) define([], e); + else { + ("undefined" != typeof window + ? window + : "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : this + ).fastCsv = e(); + } +})(function () { + return (function () { + return function e(t, r, n) { + function i(s, a) { + if (!r[s]) { + if (!t[s]) { + var u = "function" == typeof require && require; + if (!a && u) return u(s, !0); + if (o) return o(s, !0); + var f = new Error("Cannot find module '" + s + "'"); + throw ((f.code = "MODULE_NOT_FOUND"), f); + } + var l = (r[s] = { exports: {} }); + t[s][0].call( + l.exports, + function (e) { + return i(t[s][1][e] || e); + }, + l, + l.exports, + e, + t, + r, + n, + ); + } + return r[s].exports; + } + for ( + var o = "function" == typeof require && require, s = 0; + s < n.length; + s++ + ) + i(n[s]); + return i; + }; + })()( + { + 1: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.CsvParserStream = + r.ParserOptions = + r.parseFile = + r.parseStream = + r.parseString = + r.parse = + r.FormatterOptions = + r.CsvFormatterStream = + r.writeToPath = + r.writeToString = + r.writeToBuffer = + r.writeToStream = + r.write = + r.format = + void 0); + var n = e("@fast-csv/format"); + Object.defineProperty(r, "format", { + enumerable: !0, + get: function () { + return n.format; + }, + }), + Object.defineProperty(r, "write", { + enumerable: !0, + get: function () { + return n.write; + }, + }), + Object.defineProperty(r, "writeToStream", { + enumerable: !0, + get: function () { + return n.writeToStream; + }, + }), + Object.defineProperty(r, "writeToBuffer", { + enumerable: !0, + get: function () { + return n.writeToBuffer; + }, + }), + Object.defineProperty(r, "writeToString", { + enumerable: !0, + get: function () { + return n.writeToString; + }, + }), + Object.defineProperty(r, "writeToPath", { + enumerable: !0, + get: function () { + return n.writeToPath; + }, + }), + Object.defineProperty(r, "CsvFormatterStream", { + enumerable: !0, + get: function () { + return n.CsvFormatterStream; + }, + }), + Object.defineProperty(r, "FormatterOptions", { + enumerable: !0, + get: function () { + return n.FormatterOptions; + }, + }); + var i = e("@fast-csv/parse"); + Object.defineProperty(r, "parse", { + enumerable: !0, + get: function () { + return i.parse; + }, + }), + Object.defineProperty(r, "parseString", { + enumerable: !0, + get: function () { + return i.parseString; + }, + }), + Object.defineProperty(r, "parseStream", { + enumerable: !0, + get: function () { + return i.parseStream; + }, + }), + Object.defineProperty(r, "parseFile", { + enumerable: !0, + get: function () { + return i.parseFile; + }, + }), + Object.defineProperty(r, "ParserOptions", { + enumerable: !0, + get: function () { + return i.ParserOptions; + }, + }), + Object.defineProperty(r, "CsvParserStream", { + enumerable: !0, + get: function () { + return i.CsvParserStream; + }, + }); + }, + { "@fast-csv/format": 7, "@fast-csv/parse": 11 }, + ], + 2: [ + function (e, t, r) { + (function (t) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.CsvFormatterStream = void 0); + const n = e("stream"), + i = e("./formatter"); + r.CsvFormatterStream = class extends n.Transform { + constructor(e) { + super({ writableObjectMode: e.objectMode }), + (this.hasWrittenBOM = !1), + (this.formatterOptions = e), + (this.rowFormatter = new i.RowFormatter(e)), + (this.hasWrittenBOM = !e.writeBOM); + } + transform(e) { + return (this.rowFormatter.rowTransform = e), this; + } + _transform(e, r, n) { + let i = !1; + try { + this.hasWrittenBOM || + (this.push(this.formatterOptions.BOM), + (this.hasWrittenBOM = !0)), + this.rowFormatter.format(e, (e, r) => + e + ? ((i = !0), n(e)) + : (r && + r.forEach((e) => { + this.push(t.from(e, "utf8")); + }), + (i = !0), + n()), + ); + } catch (e) { + if (i) throw e; + n(e); + } + } + _flush(e) { + this.rowFormatter.finish((r, n) => + r + ? e(r) + : (n && + n.forEach((e) => { + this.push(t.from(e, "utf8")); + }), + e()), + ); + } + }; + }).call(this, e("buffer").Buffer); + }, + { "./formatter": 6, buffer: 37, stream: 62 }, + ], + 3: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.FormatterOptions = void 0); + r.FormatterOptions = class { + constructor(e = {}) { + var t; + (this.objectMode = !0), + (this.delimiter = ","), + (this.rowDelimiter = "\n"), + (this.quote = '"'), + (this.escape = this.quote), + (this.quoteColumns = !1), + (this.quoteHeaders = this.quoteColumns), + (this.headers = null), + (this.includeEndRowDelimiter = !1), + (this.writeBOM = !1), + (this.BOM = "\ufeff"), + (this.alwaysWriteHeaders = !1), + Object.assign(this, e || {}), + void 0 === (null == e ? void 0 : e.quoteHeaders) && + (this.quoteHeaders = this.quoteColumns), + !0 === (null == e ? void 0 : e.quote) + ? (this.quote = '"') + : !1 === (null == e ? void 0 : e.quote) && (this.quote = ""), + "string" != typeof (null == e ? void 0 : e.escape) && + (this.escape = this.quote), + (this.shouldWriteHeaders = + !!this.headers && + (null === (t = e.writeHeaders) || void 0 === t || t)), + (this.headers = Array.isArray(this.headers) + ? this.headers + : null), + (this.escapedQuote = `${this.escape}${this.quote}`); + } + }; + }, + {}, + ], + 4: [ + function (e, t, r) { + "use strict"; + var n = + (this && this.__importDefault) || + function (e) { + return e && e.__esModule ? e : { default: e }; + }; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.FieldFormatter = void 0); + const i = n(e("lodash.isboolean")), + o = n(e("lodash.isnil")), + s = n(e("lodash.escaperegexp")); + r.FieldFormatter = class { + constructor(e) { + (this._headers = null), + (this.formatterOptions = e), + null !== e.headers && (this.headers = e.headers), + (this.REPLACE_REGEXP = new RegExp(e.quote, "g")); + const t = `[${e.delimiter}${s.default(e.rowDelimiter)}|\r|\n]`; + this.ESCAPE_REGEXP = new RegExp(t); + } + set headers(e) { + this._headers = e; + } + shouldQuote(e, t) { + const r = t + ? this.formatterOptions.quoteHeaders + : this.formatterOptions.quoteColumns; + return i.default(r) + ? r + : Array.isArray(r) + ? r[e] + : null !== this._headers && r[this._headers[e]]; + } + format(e, t, r) { + const n = `${o.default(e) ? "" : e}`.replace(/\0/g, ""), + { formatterOptions: i } = this; + return "" !== i.quote && -1 !== n.indexOf(i.quote) + ? this.quoteField( + n.replace(this.REPLACE_REGEXP, i.escapedQuote), + ) + : -1 !== n.search(this.ESCAPE_REGEXP) || this.shouldQuote(t, r) + ? this.quoteField(n) + : n; + } + quoteField(e) { + const { quote: t } = this.formatterOptions; + return `${t}${e}${t}`; + } + }; + }, + { + "lodash.escaperegexp": 26, + "lodash.isboolean": 28, + "lodash.isnil": 31, + }, + ], + 5: [ + function (e, t, r) { + "use strict"; + var n = + (this && this.__importDefault) || + function (e) { + return e && e.__esModule ? e : { default: e }; + }; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.RowFormatter = void 0); + const i = n(e("lodash.isfunction")), + o = n(e("lodash.isequal")), + s = e("./FieldFormatter"), + a = e("../types"); + class u { + constructor(e) { + (this.rowCount = 0), + (this.formatterOptions = e), + (this.fieldFormatter = new s.FieldFormatter(e)), + (this.headers = e.headers), + (this.shouldWriteHeaders = e.shouldWriteHeaders), + (this.hasWrittenHeaders = !1), + null !== this.headers && + (this.fieldFormatter.headers = this.headers), + e.transform && (this.rowTransform = e.transform); + } + static isRowHashArray(e) { + return ( + !!Array.isArray(e) && Array.isArray(e[0]) && 2 === e[0].length + ); + } + static isRowArray(e) { + return Array.isArray(e) && !this.isRowHashArray(e); + } + static gatherHeaders(e) { + return u.isRowHashArray(e) + ? e.map((e) => e[0]) + : Array.isArray(e) + ? e + : Object.keys(e); + } + static createTransform(e) { + return a.isSyncTransform(e) + ? (t, r) => { + let n = null; + try { + n = e(t); + } catch (e) { + return r(e); + } + return r(null, n); + } + : (t, r) => { + e(t, r); + }; + } + set rowTransform(e) { + if (!i.default(e)) + throw new TypeError("The transform should be a function"); + this._rowTransform = u.createTransform(e); + } + format(e, t) { + this.callTransformer(e, (r, n) => { + if (r) return t(r); + if (!e) return t(null); + const i = []; + if (n) { + const { shouldFormatColumns: e, headers: t } = + this.checkHeaders(n); + if ( + (this.shouldWriteHeaders && + t && + !this.hasWrittenHeaders && + (i.push(this.formatColumns(t, !0)), + (this.hasWrittenHeaders = !0)), + e) + ) { + const e = this.gatherColumns(n); + i.push(this.formatColumns(e, !1)); + } + } + return t(null, i); + }); + } + finish(e) { + const t = []; + if ( + this.formatterOptions.alwaysWriteHeaders && + 0 === this.rowCount + ) { + if (!this.headers) + return e( + new Error( + "`alwaysWriteHeaders` option is set to true but `headers` option not provided.", + ), + ); + t.push(this.formatColumns(this.headers, !0)); + } + return ( + this.formatterOptions.includeEndRowDelimiter && + t.push(this.formatterOptions.rowDelimiter), + e(null, t) + ); + } + checkHeaders(e) { + if (this.headers) + return { shouldFormatColumns: !0, headers: this.headers }; + const t = u.gatherHeaders(e); + return ( + (this.headers = t), + (this.fieldFormatter.headers = t), + this.shouldWriteHeaders + ? { shouldFormatColumns: !o.default(t, e), headers: t } + : { shouldFormatColumns: !0, headers: null } + ); + } + gatherColumns(e) { + if (null === this.headers) + throw new Error("Headers is currently null"); + return Array.isArray(e) + ? u.isRowHashArray(e) + ? this.headers.map((t, r) => { + const n = e[r]; + return n ? n[1] : ""; + }) + : u.isRowArray(e) && !this.shouldWriteHeaders + ? e + : this.headers.map((t, r) => e[r]) + : this.headers.map((t) => e[t]); + } + callTransformer(e, t) { + return this._rowTransform ? this._rowTransform(e, t) : t(null, e); + } + formatColumns(e, t) { + const r = e + .map((e, r) => this.fieldFormatter.format(e, r, t)) + .join(this.formatterOptions.delimiter), + { rowCount: n } = this; + return ( + (this.rowCount += 1), + n ? [this.formatterOptions.rowDelimiter, r].join("") : r + ); + } + } + r.RowFormatter = u; + }, + { + "../types": 8, + "./FieldFormatter": 4, + "lodash.isequal": 29, + "lodash.isfunction": 30, + }, + ], + 6: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.FieldFormatter = r.RowFormatter = void 0); + var n = e("./RowFormatter"); + Object.defineProperty(r, "RowFormatter", { + enumerable: !0, + get: function () { + return n.RowFormatter; + }, + }); + var i = e("./FieldFormatter"); + Object.defineProperty(r, "FieldFormatter", { + enumerable: !0, + get: function () { + return i.FieldFormatter; + }, + }); + }, + { "./FieldFormatter": 4, "./RowFormatter": 5 }, + ], + 7: [ + function (e, t, r) { + (function (t) { + "use strict"; + var n = + (this && this.__createBinding) || + (Object.create + ? function (e, t, r, n) { + void 0 === n && (n = r), + Object.defineProperty(e, n, { + enumerable: !0, + get: function () { + return t[r]; + }, + }); + } + : function (e, t, r, n) { + void 0 === n && (n = r), (e[n] = t[r]); + }), + 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 r in e) + "default" !== r && + Object.prototype.hasOwnProperty.call(e, r) && + n(t, e, r); + return i(t, e), t; + }, + s = + (this && this.__exportStar) || + function (e, t) { + for (var r in e) + "default" === r || + Object.prototype.hasOwnProperty.call(t, r) || + n(t, e, r); + }; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.writeToPath = + r.writeToString = + r.writeToBuffer = + r.writeToStream = + r.write = + r.format = + r.FormatterOptions = + r.CsvFormatterStream = + void 0); + const a = e("util"), + u = e("stream"), + f = o(e("fs")), + l = e("./FormatterOptions"), + c = e("./CsvFormatterStream"); + s(e("./types"), r); + var h = e("./CsvFormatterStream"); + Object.defineProperty(r, "CsvFormatterStream", { + enumerable: !0, + get: function () { + return h.CsvFormatterStream; + }, + }); + var d = e("./FormatterOptions"); + Object.defineProperty(r, "FormatterOptions", { + enumerable: !0, + get: function () { + return d.FormatterOptions; + }, + }), + (r.format = (e) => + new c.CsvFormatterStream(new l.FormatterOptions(e))), + (r.write = (e, t) => { + const n = r.format(t), + i = a.promisify((e, t) => { + n.write(e, void 0, t); + }); + return ( + e + .reduce((e, t) => e.then(() => i(t)), Promise.resolve()) + .then(() => n.end()) + .catch((e) => { + n.emit("error", e); + }), + n + ); + }), + (r.writeToStream = (e, t, n) => r.write(t, n).pipe(e)), + (r.writeToBuffer = (e, n = {}) => { + const i = [], + o = new u.Writable({ + write(e, t, r) { + i.push(e), r(); + }, + }); + return new Promise((s, a) => { + o.on("error", a).on("finish", () => s(t.concat(i))), + r.write(e, n).pipe(o); + }); + }), + (r.writeToString = (e, t) => + r.writeToBuffer(e, t).then((e) => e.toString())), + (r.writeToPath = (e, t, n) => { + const i = f.createWriteStream(e, { encoding: "utf8" }); + return r.write(t, n).pipe(i); + }); + }).call(this, e("buffer").Buffer); + }, + { + "./CsvFormatterStream": 2, + "./FormatterOptions": 3, + "./types": 8, + buffer: 37, + fs: 36, + stream: 62, + util: 68, + }, + ], + 8: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.isSyncTransform = void 0), + (r.isSyncTransform = (e) => 1 === e.length); + }, + {}, + ], + 9: [ + function (e, t, r) { + (function (t) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.CsvParserStream = void 0); + const n = e("string_decoder"), + i = e("stream"), + o = e("./transforms"), + s = e("./parser"); + class a extends i.Transform { + constructor(e) { + super({ objectMode: e.objectMode }), + (this.lines = ""), + (this.rowCount = 0), + (this.parsedRowCount = 0), + (this.parsedLineCount = 0), + (this.endEmitted = !1), + (this.headersEmitted = !1), + (this.parserOptions = e), + (this.parser = new s.Parser(e)), + (this.headerTransformer = new o.HeaderTransformer(e)), + (this.decoder = new n.StringDecoder(e.encoding)), + (this.rowTransformerValidator = + new o.RowTransformerValidator()); + } + get hasHitRowLimit() { + return ( + this.parserOptions.limitRows && + this.rowCount >= this.parserOptions.maxRows + ); + } + get shouldEmitRows() { + return this.parsedRowCount > this.parserOptions.skipRows; + } + get shouldSkipLine() { + return this.parsedLineCount <= this.parserOptions.skipLines; + } + transform(e) { + return (this.rowTransformerValidator.rowTransform = e), this; + } + validate(e) { + return (this.rowTransformerValidator.rowValidator = e), this; + } + emit(e, ...t) { + return "end" === e + ? (this.endEmitted || + ((this.endEmitted = !0), + super.emit("end", this.rowCount)), + !1) + : super.emit(e, ...t); + } + _transform(e, t, r) { + if (this.hasHitRowLimit) return r(); + const n = a.wrapDoneCallback(r); + try { + const { lines: t } = this, + r = t + this.decoder.write(e), + i = this.parse(r, !0); + return this.processRows(i, n); + } catch (e) { + return n(e); + } + } + _flush(e) { + const t = a.wrapDoneCallback(e); + if (this.hasHitRowLimit) return t(); + try { + const e = this.lines + this.decoder.end(), + r = this.parse(e, !1); + return this.processRows(r, t); + } catch (e) { + return t(e); + } + } + parse(e, t) { + if (!e) return []; + const { line: r, rows: n } = this.parser.parse(e, t); + return (this.lines = r), n; + } + processRows(e, r) { + const n = e.length, + i = (o) => { + const s = (e) => + e + ? r(e) + : o % 100 != 0 + ? i(o + 1) + : void t(() => i(o + 1)); + if ( + (this.checkAndEmitHeaders(), + o >= n || this.hasHitRowLimit) + ) + return r(); + if (((this.parsedLineCount += 1), this.shouldSkipLine)) + return s(); + const a = e[o]; + (this.rowCount += 1), (this.parsedRowCount += 1); + const u = this.rowCount; + return this.transformRow(a, (e, t) => { + if (e) return (this.rowCount -= 1), s(e); + if (!t) return s(new Error("expected transform result")); + if (t.isValid) { + if (t.row) return this.pushRow(t.row, s); + } else this.emit("data-invalid", t.row, u, t.reason); + return s(); + }); + }; + i(0); + } + transformRow(e, t) { + try { + this.headerTransformer.transform(e, (r, n) => + r + ? t(r) + : n + ? n.isValid + ? n.row + ? this.shouldEmitRows + ? this.rowTransformerValidator.transformAndValidate( + n.row, + t, + ) + : this.skipRow(t) + : ((this.rowCount -= 1), + (this.parsedRowCount -= 1), + t(null, { row: null, isValid: !0 })) + : this.shouldEmitRows + ? t(null, { isValid: !1, row: e }) + : this.skipRow(t) + : t(new Error("Expected result from header transform")), + ); + } catch (e) { + t(e); + } + } + checkAndEmitHeaders() { + !this.headersEmitted && + this.headerTransformer.headers && + ((this.headersEmitted = !0), + this.emit("headers", this.headerTransformer.headers)); + } + skipRow(e) { + return ( + (this.rowCount -= 1), e(null, { row: null, isValid: !0 }) + ); + } + pushRow(e, t) { + try { + this.parserOptions.objectMode + ? this.push(e) + : this.push(JSON.stringify(e)), + t(); + } catch (e) { + t(e); + } + } + static wrapDoneCallback(e) { + let t = !1; + return (r, ...n) => { + if (r) { + if (t) throw r; + return (t = !0), void e(r); + } + e(...n); + }; + } + } + r.CsvParserStream = a; + }).call(this, e("timers").setImmediate); + }, + { + "./parser": 21, + "./transforms": 24, + stream: 62, + string_decoder: 63, + timers: 64, + }, + ], + 10: [ + function (e, t, r) { + "use strict"; + var n = + (this && this.__importDefault) || + function (e) { + return e && e.__esModule ? e : { default: e }; + }; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.ParserOptions = void 0); + const i = n(e("lodash.escaperegexp")), + o = n(e("lodash.isnil")); + r.ParserOptions = class { + constructor(e) { + var t; + if ( + ((this.objectMode = !0), + (this.delimiter = ","), + (this.ignoreEmpty = !1), + (this.quote = '"'), + (this.escape = null), + (this.escapeChar = this.quote), + (this.comment = null), + (this.supportsComments = !1), + (this.ltrim = !1), + (this.rtrim = !1), + (this.trim = !1), + (this.headers = null), + (this.renameHeaders = !1), + (this.strictColumnHandling = !1), + (this.discardUnmappedColumns = !1), + (this.carriageReturn = "\r"), + (this.encoding = "utf8"), + (this.limitRows = !1), + (this.maxRows = 0), + (this.skipLines = 0), + (this.skipRows = 0), + Object.assign(this, e || {}), + this.delimiter.length > 1) + ) + throw new Error("delimiter option must be one character long"); + (this.escapedDelimiter = i.default(this.delimiter)), + (this.escapeChar = + null !== (t = this.escape) && void 0 !== t ? t : this.quote), + (this.supportsComments = !o.default(this.comment)), + (this.NEXT_TOKEN_REGEXP = new RegExp( + `([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`, + )), + this.maxRows > 0 && (this.limitRows = !0); + } + }; + }, + { "lodash.escaperegexp": 26, "lodash.isnil": 31 }, + ], + 11: [ + function (e, t, r) { + "use strict"; + var n = + (this && this.__createBinding) || + (Object.create + ? function (e, t, r, n) { + void 0 === n && (n = r), + Object.defineProperty(e, n, { + enumerable: !0, + get: function () { + return t[r]; + }, + }); + } + : function (e, t, r, n) { + void 0 === n && (n = r), (e[n] = t[r]); + }), + 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 r in e) + "default" !== r && + Object.prototype.hasOwnProperty.call(e, r) && + n(t, e, r); + return i(t, e), t; + }, + s = + (this && this.__exportStar) || + function (e, t) { + for (var r in e) + "default" === r || + Object.prototype.hasOwnProperty.call(t, r) || + n(t, e, r); + }; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.parseString = + r.parseFile = + r.parseStream = + r.parse = + r.ParserOptions = + r.CsvParserStream = + void 0); + const a = o(e("fs")), + u = e("stream"), + f = e("./ParserOptions"), + l = e("./CsvParserStream"); + s(e("./types"), r); + var c = e("./CsvParserStream"); + Object.defineProperty(r, "CsvParserStream", { + enumerable: !0, + get: function () { + return c.CsvParserStream; + }, + }); + var h = e("./ParserOptions"); + Object.defineProperty(r, "ParserOptions", { + enumerable: !0, + get: function () { + return h.ParserOptions; + }, + }), + (r.parse = (e) => new l.CsvParserStream(new f.ParserOptions(e))), + (r.parseStream = (e, t) => + e.pipe(new l.CsvParserStream(new f.ParserOptions(t)))), + (r.parseFile = (e, t = {}) => + a + .createReadStream(e) + .pipe(new l.CsvParserStream(new f.ParserOptions(t)))), + (r.parseString = (e, t) => { + const r = new u.Readable(); + return ( + r.push(e), + r.push(null), + r.pipe(new l.CsvParserStream(new f.ParserOptions(t))) + ); + }); + }, + { + "./CsvParserStream": 9, + "./ParserOptions": 10, + "./types": 25, + fs: 36, + stream: 62, + }, + ], + 12: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.Parser = void 0); + const n = e("./Scanner"), + i = e("./RowParser"), + o = e("./Token"); + class s { + constructor(e) { + (this.parserOptions = e), + (this.rowParser = new i.RowParser(this.parserOptions)); + } + static removeBOM(e) { + return e && 65279 === e.charCodeAt(0) ? e.slice(1) : e; + } + parse(e, t) { + const r = new n.Scanner({ + line: s.removeBOM(e), + parserOptions: this.parserOptions, + hasMoreData: t, + }); + return this.parserOptions.supportsComments + ? this.parseWithComments(r) + : this.parseWithoutComments(r); + } + parseWithoutComments(e) { + const t = []; + let r = !0; + for (; r; ) r = this.parseRow(e, t); + return { line: e.line, rows: t }; + } + parseWithComments(e) { + const { parserOptions: t } = this, + r = []; + for ( + let n = e.nextCharacterToken; + null !== n; + n = e.nextCharacterToken + ) + if (o.Token.isTokenComment(n, t)) { + if (null === e.advancePastLine()) + return { line: e.lineFromCursor, rows: r }; + if (!e.hasMoreCharacters) + return { line: e.lineFromCursor, rows: r }; + e.truncateToCursor(); + } else if (!this.parseRow(e, r)) break; + return { line: e.line, rows: r }; + } + parseRow(e, t) { + if (!e.nextNonSpaceToken) return !1; + const r = this.rowParser.parse(e); + return ( + null !== r && + (!( + !this.parserOptions.ignoreEmpty || !i.RowParser.isEmptyRow(r) + ) || + (t.push(r), !0)) + ); + } + } + r.Parser = s; + }, + { "./RowParser": 13, "./Scanner": 14, "./Token": 15 }, + ], + 13: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.RowParser = void 0); + const n = e("./column"), + i = e("./Token"), + o = ""; + r.RowParser = class { + constructor(e) { + (this.parserOptions = e), + (this.columnParser = new n.ColumnParser(e)); + } + static isEmptyRow(e) { + return e.join(o).replace(/\s+/g, o) === o; + } + parse(e) { + const { parserOptions: t } = this, + { hasMoreData: r } = e, + n = e, + o = []; + let s = this.getStartToken(n, o); + for (; s; ) { + if (i.Token.isTokenRowDelimiter(s)) + return ( + n.advancePastToken(s), + !n.hasMoreCharacters && + i.Token.isTokenCarriageReturn(s, t) && + r + ? null + : (n.truncateToCursor(), o) + ); + if (!this.shouldSkipColumnParse(n, s, o)) { + const e = this.columnParser.parse(n); + if (null === e) return null; + o.push(e); + } + s = n.nextNonSpaceToken; + } + return r ? null : (n.truncateToCursor(), o); + } + getStartToken(e, t) { + const r = e.nextNonSpaceToken; + return null !== r && + i.Token.isTokenDelimiter(r, this.parserOptions) + ? (t.push(""), e.nextNonSpaceToken) + : r; + } + shouldSkipColumnParse(e, t, r) { + const { parserOptions: n } = this; + if (i.Token.isTokenDelimiter(t, n)) { + e.advancePastToken(t); + const o = e.nextCharacterToken; + if ( + !e.hasMoreCharacters || + (null !== o && i.Token.isTokenRowDelimiter(o)) + ) + return r.push(""), !0; + if (null !== o && i.Token.isTokenDelimiter(o, n)) + return r.push(""), !0; + } + return !1; + } + }; + }, + { "./Token": 15, "./column": 20 }, + ], + 14: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.Scanner = void 0); + const n = e("./Token"), + i = /((?:\r\n)|\n|\r)/; + r.Scanner = class { + constructor(e) { + (this.cursor = 0), + (this.line = e.line), + (this.lineLength = this.line.length), + (this.parserOptions = e.parserOptions), + (this.hasMoreData = e.hasMoreData), + (this.cursor = e.cursor || 0); + } + get hasMoreCharacters() { + return this.lineLength > this.cursor; + } + get nextNonSpaceToken() { + const { lineFromCursor: e } = this, + t = this.parserOptions.NEXT_TOKEN_REGEXP; + if (-1 === e.search(t)) return null; + const r = t.exec(e); + if (null == r) return null; + const i = r[1], + o = this.cursor + (r.index || 0); + return new n.Token({ + token: i, + startCursor: o, + endCursor: o + i.length - 1, + }); + } + get nextCharacterToken() { + const { cursor: e, lineLength: t } = this; + return t <= e + ? null + : new n.Token({ + token: this.line[e], + startCursor: e, + endCursor: e, + }); + } + get lineFromCursor() { + return this.line.substr(this.cursor); + } + advancePastLine() { + const e = i.exec(this.lineFromCursor); + return e + ? ((this.cursor += (e.index || 0) + e[0].length), this) + : this.hasMoreData + ? null + : ((this.cursor = this.lineLength), this); + } + advanceTo(e) { + return (this.cursor = e), this; + } + advanceToToken(e) { + return (this.cursor = e.startCursor), this; + } + advancePastToken(e) { + return (this.cursor = e.endCursor + 1), this; + } + truncateToCursor() { + return ( + (this.line = this.lineFromCursor), + (this.lineLength = this.line.length), + (this.cursor = 0), + this + ); + } + }; + }, + { "./Token": 15 }, + ], + 15: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.Token = void 0); + r.Token = class { + constructor(e) { + (this.token = e.token), + (this.startCursor = e.startCursor), + (this.endCursor = e.endCursor); + } + static isTokenRowDelimiter(e) { + const t = e.token; + return "\r" === t || "\n" === t || "\r\n" === t; + } + static isTokenCarriageReturn(e, t) { + return e.token === t.carriageReturn; + } + static isTokenComment(e, t) { + return t.supportsComments && !!e && e.token === t.comment; + } + static isTokenEscapeCharacter(e, t) { + return e.token === t.escapeChar; + } + static isTokenQuote(e, t) { + return e.token === t.quote; + } + static isTokenDelimiter(e, t) { + return e.token === t.delimiter; + } + }; + }, + {}, + ], + 16: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.ColumnFormatter = void 0); + r.ColumnFormatter = class { + constructor(e) { + e.trim + ? (this.format = (e) => e.trim()) + : e.ltrim + ? (this.format = (e) => e.trimLeft()) + : e.rtrim + ? (this.format = (e) => e.trimRight()) + : (this.format = (e) => e); + } + }; + }, + {}, + ], + 17: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.ColumnParser = void 0); + const n = e("./NonQuotedColumnParser"), + i = e("./QuotedColumnParser"), + o = e("../Token"); + r.ColumnParser = class { + constructor(e) { + (this.parserOptions = e), + (this.quotedColumnParser = new i.QuotedColumnParser(e)), + (this.nonQuotedColumnParser = new n.NonQuotedColumnParser(e)); + } + parse(e) { + const { nextNonSpaceToken: t } = e; + return null !== t && o.Token.isTokenQuote(t, this.parserOptions) + ? (e.advanceToToken(t), this.quotedColumnParser.parse(e)) + : this.nonQuotedColumnParser.parse(e); + } + }; + }, + { + "../Token": 15, + "./NonQuotedColumnParser": 18, + "./QuotedColumnParser": 19, + }, + ], + 18: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.NonQuotedColumnParser = void 0); + const n = e("./ColumnFormatter"), + i = e("../Token"); + r.NonQuotedColumnParser = class { + constructor(e) { + (this.parserOptions = e), + (this.columnFormatter = new n.ColumnFormatter(e)); + } + parse(e) { + if (!e.hasMoreCharacters) return null; + const { parserOptions: t } = this, + r = []; + let n = e.nextCharacterToken; + for ( + ; + n && + !i.Token.isTokenDelimiter(n, t) && + !i.Token.isTokenRowDelimiter(n); + n = e.nextCharacterToken + ) + r.push(n.token), e.advancePastToken(n); + return this.columnFormatter.format(r.join("")); + } + }; + }, + { "../Token": 15, "./ColumnFormatter": 16 }, + ], + 19: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.QuotedColumnParser = void 0); + const n = e("./ColumnFormatter"), + i = e("../Token"); + r.QuotedColumnParser = class { + constructor(e) { + (this.parserOptions = e), + (this.columnFormatter = new n.ColumnFormatter(e)); + } + parse(e) { + if (!e.hasMoreCharacters) return null; + const t = e.cursor, + { foundClosingQuote: r, col: n } = + this.gatherDataBetweenQuotes(e); + if (!r) { + if ((e.advanceTo(t), !e.hasMoreData)) + throw new Error( + `Parse Error: missing closing: '${ + this.parserOptions.quote || "" + }' in line: at '${e.lineFromCursor.replace( + /[\r\n]/g, + "\\n'", + )}'`, + ); + return null; + } + return this.checkForMalformedColumn(e), n; + } + gatherDataBetweenQuotes(e) { + const { parserOptions: t } = this; + let r = !1, + n = !1; + const o = []; + let s = e.nextCharacterToken; + for (; !n && null !== s; s = e.nextCharacterToken) { + const a = i.Token.isTokenQuote(s, t); + if (!r && a) r = !0; + else if (r) + if (i.Token.isTokenEscapeCharacter(s, t)) { + e.advancePastToken(s); + const r = e.nextCharacterToken; + null !== r && + (i.Token.isTokenQuote(r, t) || + i.Token.isTokenEscapeCharacter(r, t)) + ? (o.push(r.token), (s = r)) + : a + ? (n = !0) + : o.push(s.token); + } else a ? (n = !0) : o.push(s.token); + e.advancePastToken(s); + } + return { + col: this.columnFormatter.format(o.join("")), + foundClosingQuote: n, + }; + } + checkForMalformedColumn(e) { + const { parserOptions: t } = this, + { nextNonSpaceToken: r } = e; + if (r) { + const n = i.Token.isTokenDelimiter(r, t), + o = i.Token.isTokenRowDelimiter(r); + if (!n && !o) { + const n = e.lineFromCursor + .substr(0, 10) + .replace(/[\r\n]/g, "\\n'"); + throw new Error( + `Parse Error: expected: '${t.escapedDelimiter}' OR new line got: '${r.token}'. at '${n}`, + ); + } + e.advanceToToken(r); + } else e.hasMoreData || e.advancePastLine(); + } + }; + }, + { "../Token": 15, "./ColumnFormatter": 16 }, + ], + 20: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.ColumnFormatter = + r.QuotedColumnParser = + r.NonQuotedColumnParser = + r.ColumnParser = + void 0); + var n = e("./ColumnParser"); + Object.defineProperty(r, "ColumnParser", { + enumerable: !0, + get: function () { + return n.ColumnParser; + }, + }); + var i = e("./NonQuotedColumnParser"); + Object.defineProperty(r, "NonQuotedColumnParser", { + enumerable: !0, + get: function () { + return i.NonQuotedColumnParser; + }, + }); + var o = e("./QuotedColumnParser"); + Object.defineProperty(r, "QuotedColumnParser", { + enumerable: !0, + get: function () { + return o.QuotedColumnParser; + }, + }); + var s = e("./ColumnFormatter"); + Object.defineProperty(r, "ColumnFormatter", { + enumerable: !0, + get: function () { + return s.ColumnFormatter; + }, + }); + }, + { + "./ColumnFormatter": 16, + "./ColumnParser": 17, + "./NonQuotedColumnParser": 18, + "./QuotedColumnParser": 19, + }, + ], + 21: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.QuotedColumnParser = + r.NonQuotedColumnParser = + r.ColumnParser = + r.Token = + r.Scanner = + r.RowParser = + r.Parser = + void 0); + var n = e("./Parser"); + Object.defineProperty(r, "Parser", { + enumerable: !0, + get: function () { + return n.Parser; + }, + }); + var i = e("./RowParser"); + Object.defineProperty(r, "RowParser", { + enumerable: !0, + get: function () { + return i.RowParser; + }, + }); + var o = e("./Scanner"); + Object.defineProperty(r, "Scanner", { + enumerable: !0, + get: function () { + return o.Scanner; + }, + }); + var s = e("./Token"); + Object.defineProperty(r, "Token", { + enumerable: !0, + get: function () { + return s.Token; + }, + }); + var a = e("./column"); + Object.defineProperty(r, "ColumnParser", { + enumerable: !0, + get: function () { + return a.ColumnParser; + }, + }), + Object.defineProperty(r, "NonQuotedColumnParser", { + enumerable: !0, + get: function () { + return a.NonQuotedColumnParser; + }, + }), + Object.defineProperty(r, "QuotedColumnParser", { + enumerable: !0, + get: function () { + return a.QuotedColumnParser; + }, + }); + }, + { + "./Parser": 12, + "./RowParser": 13, + "./Scanner": 14, + "./Token": 15, + "./column": 20, + }, + ], + 22: [ + function (e, t, r) { + "use strict"; + var n = + (this && this.__importDefault) || + function (e) { + return e && e.__esModule ? e : { default: e }; + }; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.HeaderTransformer = void 0); + const i = n(e("lodash.isundefined")), + o = n(e("lodash.isfunction")), + s = n(e("lodash.uniq")), + a = n(e("lodash.groupby")); + r.HeaderTransformer = class { + constructor(e) { + (this.headers = null), + (this.receivedHeaders = !1), + (this.shouldUseFirstRow = !1), + (this.processedFirstRow = !1), + (this.headersLength = 0), + (this.parserOptions = e), + !0 === e.headers + ? (this.shouldUseFirstRow = !0) + : Array.isArray(e.headers) + ? this.setHeaders(e.headers) + : o.default(e.headers) && (this.headersTransform = e.headers); + } + transform(e, t) { + return this.shouldMapRow(e) + ? t(null, this.processRow(e)) + : t(null, { row: null, isValid: !0 }); + } + shouldMapRow(e) { + const { parserOptions: t } = this; + if ( + !this.headersTransform && + t.renameHeaders && + !this.processedFirstRow + ) { + if (!this.receivedHeaders) + throw new Error( + "Error renaming headers: new headers must be provided in an array", + ); + return (this.processedFirstRow = !0), !1; + } + if (!this.receivedHeaders && Array.isArray(e)) { + if (this.headersTransform) + this.setHeaders(this.headersTransform(e)); + else { + if (!this.shouldUseFirstRow) return !0; + this.setHeaders(e); + } + return !1; + } + return !0; + } + processRow(e) { + if (!this.headers) return { row: e, isValid: !0 }; + const { parserOptions: t } = this; + if (!t.discardUnmappedColumns && e.length > this.headersLength) { + if (!t.strictColumnHandling) + throw new Error( + `Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${e.length}`, + ); + return { + row: e, + isValid: !1, + reason: `Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`, + }; + } + return t.strictColumnHandling && e.length < this.headersLength + ? { + row: e, + isValid: !1, + reason: `Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`, + } + : { row: this.mapHeaders(e), isValid: !0 }; + } + mapHeaders(e) { + const t = {}, + { headers: r, headersLength: n } = this; + for (let o = 0; o < n; o += 1) { + const n = r[o]; + if (!i.default(n)) { + const r = e[o]; + i.default(r) ? (t[n] = "") : (t[n] = r); + } + } + return t; + } + setHeaders(e) { + var t; + const r = e.filter((e) => !!e); + if (s.default(r).length !== r.length) { + const e = a.default(r), + t = Object.keys(e).filter((t) => e[t].length > 1); + throw new Error(`Duplicate headers found ${JSON.stringify(t)}`); + } + (this.headers = e), + (this.receivedHeaders = !0), + (this.headersLength = + (null === (t = this.headers) || void 0 === t + ? void 0 + : t.length) || 0); + } + }; + }, + { + "lodash.groupby": 27, + "lodash.isfunction": 30, + "lodash.isundefined": 32, + "lodash.uniq": 33, + }, + ], + 23: [ + function (e, t, r) { + "use strict"; + var n = + (this && this.__importDefault) || + function (e) { + return e && e.__esModule ? e : { default: e }; + }; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.RowTransformerValidator = void 0); + const i = n(e("lodash.isfunction")), + o = e("../types"); + class s { + constructor() { + (this._rowTransform = null), (this._rowValidator = null); + } + static createTransform(e) { + return o.isSyncTransform(e) + ? (t, r) => { + let n = null; + try { + n = e(t); + } catch (e) { + return r(e); + } + return r(null, n); + } + : e; + } + static createValidator(e) { + return o.isSyncValidate(e) + ? (t, r) => { + r(null, { row: t, isValid: e(t) }); + } + : (t, r) => { + e(t, (e, n, i) => + e + ? r(e) + : r( + null, + n + ? { row: t, isValid: n, reason: i } + : { row: t, isValid: !1, reason: i }, + ), + ); + }; + } + set rowTransform(e) { + if (!i.default(e)) + throw new TypeError("The transform should be a function"); + this._rowTransform = s.createTransform(e); + } + set rowValidator(e) { + if (!i.default(e)) + throw new TypeError("The validate should be a function"); + this._rowValidator = s.createValidator(e); + } + transformAndValidate(e, t) { + return this.callTransformer(e, (e, r) => + e + ? t(e) + : r + ? this.callValidator(r, (e, n) => + e + ? t(e) + : n && !n.isValid + ? t(null, { row: r, isValid: !1, reason: n.reason }) + : t(null, { row: r, isValid: !0 }), + ) + : t(null, { row: null, isValid: !0 }), + ); + } + callTransformer(e, t) { + return this._rowTransform ? this._rowTransform(e, t) : t(null, e); + } + callValidator(e, t) { + return this._rowValidator + ? this._rowValidator(e, t) + : t(null, { row: e, isValid: !0 }); + } + } + r.RowTransformerValidator = s; + }, + { "../types": 25, "lodash.isfunction": 30 }, + ], + 24: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.HeaderTransformer = r.RowTransformerValidator = void 0); + var n = e("./RowTransformerValidator"); + Object.defineProperty(r, "RowTransformerValidator", { + enumerable: !0, + get: function () { + return n.RowTransformerValidator; + }, + }); + var i = e("./HeaderTransformer"); + Object.defineProperty(r, "HeaderTransformer", { + enumerable: !0, + get: function () { + return i.HeaderTransformer; + }, + }); + }, + { "./HeaderTransformer": 22, "./RowTransformerValidator": 23 }, + ], + 25: [ + function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", { value: !0 }), + (r.isSyncValidate = r.isSyncTransform = void 0), + (r.isSyncTransform = (e) => 1 === e.length), + (r.isSyncValidate = (e) => 1 === e.length); + }, + {}, + ], + 26: [ + function (e, t, r) { + (function (e) { + var r = 1 / 0, + n = "[object Symbol]", + i = /[\\^$.*+?()[\]{}|]/g, + o = RegExp(i.source), + s = "object" == typeof e && e && e.Object === Object && e, + a = + "object" == typeof self && + self && + self.Object === Object && + self, + u = s || a || Function("return this")(), + f = Object.prototype.toString, + l = u.Symbol, + c = l ? l.prototype : void 0, + h = c ? c.toString : void 0; + function d(e) { + if ("string" == typeof e) return e; + if ( + (function (e) { + return ( + "symbol" == typeof e || + ((function (e) { + return !!e && "object" == typeof e; + })(e) && + f.call(e) == n) + ); + })(e) + ) + return h ? h.call(e) : ""; + var t = e + ""; + return "0" == t && 1 / e == -r ? "-0" : t; + } + t.exports = function (e) { + var t; + return (e = null == (t = e) ? "" : d(t)) && o.test(e) + ? e.replace(i, "\\$&") + : e; + }; + }).call( + this, + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + {}, + ], + 27: [ + function (e, t, r) { + (function (e) { + var n = 200, + i = "Expected a function", + o = "__lodash_hash_undefined__", + s = 1, + a = 2, + u = 1 / 0, + f = 9007199254740991, + l = "[object Arguments]", + c = "[object Array]", + h = "[object Boolean]", + d = "[object Date]", + p = "[object Error]", + y = "[object Function]", + m = "[object GeneratorFunction]", + g = "[object Map]", + b = "[object Number]", + v = "[object Object]", + w = "[object RegExp]", + _ = "[object Set]", + j = "[object String]", + T = "[object Symbol]", + O = "[object ArrayBuffer]", + S = "[object DataView]", + C = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + k = /^\w*$/, + E = /^\./, + P = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + x = /\\(\\)?/g, + R = /^\[object .+?Constructor\]$/, + A = /^(?:0|[1-9]\d*)$/, + M = {}; + (M["[object Float32Array]"] = + M["[object Float64Array]"] = + M["[object Int8Array]"] = + M["[object Int16Array]"] = + M["[object Int32Array]"] = + M["[object Uint8Array]"] = + M["[object Uint8ClampedArray]"] = + M["[object Uint16Array]"] = + M["[object Uint32Array]"] = + !0), + (M[l] = + M[c] = + M[O] = + M[h] = + M[S] = + M[d] = + M[p] = + M[y] = + M[g] = + M[b] = + M[v] = + M[w] = + M[_] = + M[j] = + M["[object WeakMap]"] = + !1); + var F = "object" == typeof e && e && e.Object === Object && e, + L = + "object" == typeof self && + self && + self.Object === Object && + self, + B = F || L || Function("return this")(), + U = "object" == typeof r && r && !r.nodeType && r, + D = U && "object" == typeof t && t && !t.nodeType && t, + N = D && D.exports === U && F.process, + I = (function () { + try { + return N && N.binding("util"); + } catch (e) {} + })(), + H = I && I.isTypedArray; + function q(e, t, r, n) { + for (var i = -1, o = e ? e.length : 0; ++i < o; ) { + var s = e[i]; + t(n, s, r(s), e); + } + return n; + } + function W(e, t) { + for (var r = -1, n = e ? e.length : 0; ++r < n; ) + if (t(e[r], r, e)) return !0; + return !1; + } + function z(e) { + var t = !1; + if (null != e && "function" != typeof e.toString) + try { + t = !!(e + ""); + } catch (e) {} + return t; + } + function V(e) { + var t = -1, + r = Array(e.size); + return ( + e.forEach(function (e, n) { + r[++t] = [n, e]; + }), + r + ); + } + function $(e) { + var t = -1, + r = Array(e.size); + return ( + e.forEach(function (e) { + r[++t] = e; + }), + r + ); + } + var Q, + G, + X, + J = Array.prototype, + Y = Function.prototype, + K = Object.prototype, + Z = B["__core-js_shared__"], + ee = (Q = /[^.]+$/.exec((Z && Z.keys && Z.keys.IE_PROTO) || "")) + ? "Symbol(src)_1." + Q + : "", + te = Y.toString, + re = K.hasOwnProperty, + ne = K.toString, + ie = RegExp( + "^" + + te + .call(re) + .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&") + .replace( + /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, + "$1.*?", + ) + + "$", + ), + oe = B.Symbol, + se = B.Uint8Array, + ae = K.propertyIsEnumerable, + ue = J.splice, + fe = + ((G = Object.keys), + (X = Object), + function (e) { + return G(X(e)); + }), + le = Ve(B, "DataView"), + ce = Ve(B, "Map"), + he = Ve(B, "Promise"), + de = Ve(B, "Set"), + pe = Ve(B, "WeakMap"), + ye = Ve(Object, "create"), + me = Ze(le), + ge = Ze(ce), + be = Ze(he), + ve = Ze(de), + we = Ze(pe), + _e = oe ? oe.prototype : void 0, + je = _e ? _e.valueOf : void 0, + Te = _e ? _e.toString : void 0; + function Oe(e) { + var t = -1, + r = e ? e.length : 0; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } + } + function Se(e) { + var t = -1, + r = e ? e.length : 0; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } + } + function Ce(e) { + var t = -1, + r = e ? e.length : 0; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } + } + function ke(e) { + var t = -1, + r = e ? e.length : 0; + for (this.__data__ = new Ce(); ++t < r; ) this.add(e[t]); + } + function Ee(e) { + this.__data__ = new Se(e); + } + function Pe(e, t) { + var r = + st(e) || ot(e) + ? (function (e, t) { + for (var r = -1, n = Array(e); ++r < e; ) n[r] = t(r); + return n; + })(e.length, String) + : [], + n = r.length, + i = !!n; + for (var o in e) + (!t && !re.call(e, o)) || + (i && ("length" == o || Qe(o, n))) || + r.push(o); + return r; + } + function xe(e, t) { + for (var r = e.length; r--; ) if (it(e[r][0], t)) return r; + return -1; + } + function Re(e, t, r, n) { + return ( + Fe(e, function (e, i, o) { + t(n, e, r(e), o); + }), + n + ); + } + (Oe.prototype.clear = function () { + this.__data__ = ye ? ye(null) : {}; + }), + (Oe.prototype.delete = function (e) { + return this.has(e) && delete this.__data__[e]; + }), + (Oe.prototype.get = function (e) { + var t = this.__data__; + if (ye) { + var r = t[e]; + return r === o ? void 0 : r; + } + return re.call(t, e) ? t[e] : void 0; + }), + (Oe.prototype.has = function (e) { + var t = this.__data__; + return ye ? void 0 !== t[e] : re.call(t, e); + }), + (Oe.prototype.set = function (e, t) { + return (this.__data__[e] = ye && void 0 === t ? o : t), this; + }), + (Se.prototype.clear = function () { + this.__data__ = []; + }), + (Se.prototype.delete = function (e) { + var t = this.__data__, + r = xe(t, e); + return !( + r < 0 || (r == t.length - 1 ? t.pop() : ue.call(t, r, 1), 0) + ); + }), + (Se.prototype.get = function (e) { + var t = this.__data__, + r = xe(t, e); + return r < 0 ? void 0 : t[r][1]; + }), + (Se.prototype.has = function (e) { + return xe(this.__data__, e) > -1; + }), + (Se.prototype.set = function (e, t) { + var r = this.__data__, + n = xe(r, e); + return n < 0 ? r.push([e, t]) : (r[n][1] = t), this; + }), + (Ce.prototype.clear = function () { + this.__data__ = { + hash: new Oe(), + map: new (ce || Se)(), + string: new Oe(), + }; + }), + (Ce.prototype.delete = function (e) { + return ze(this, e).delete(e); + }), + (Ce.prototype.get = function (e) { + return ze(this, e).get(e); + }), + (Ce.prototype.has = function (e) { + return ze(this, e).has(e); + }), + (Ce.prototype.set = function (e, t) { + return ze(this, e).set(e, t), this; + }), + (ke.prototype.add = ke.prototype.push = + function (e) { + return this.__data__.set(e, o), this; + }), + (ke.prototype.has = function (e) { + return this.__data__.has(e); + }), + (Ee.prototype.clear = function () { + this.__data__ = new Se(); + }), + (Ee.prototype.delete = function (e) { + return this.__data__.delete(e); + }), + (Ee.prototype.get = function (e) { + return this.__data__.get(e); + }), + (Ee.prototype.has = function (e) { + return this.__data__.has(e); + }), + (Ee.prototype.set = function (e, t) { + var r = this.__data__; + if (r instanceof Se) { + var i = r.__data__; + if (!ce || i.length < n - 1) return i.push([e, t]), this; + r = this.__data__ = new Ce(i); + } + return r.set(e, t), this; + }); + var Ae, + Me, + Fe = + ((Ae = function (e, t) { + return e && Le(e, t, pt); + }), + function (e, t) { + if (null == e) return e; + if (!at(e)) return Ae(e, t); + for ( + var r = e.length, n = Me ? r : -1, i = Object(e); + (Me ? n-- : ++n < r) && !1 !== t(i[n], n, i); + + ); + return e; + }), + Le = (function (e) { + return function (t, r, n) { + for ( + var i = -1, o = Object(t), s = n(t), a = s.length; + a--; + + ) { + var u = s[e ? a : ++i]; + if (!1 === r(o[u], u, o)) break; + } + return t; + }; + })(); + function Be(e, t) { + for ( + var r = 0, n = (t = Ge(t, e) ? [t] : qe(t)).length; + null != e && r < n; + + ) + e = e[Ke(t[r++])]; + return r && r == n ? e : void 0; + } + function Ue(e, t) { + return null != e && t in Object(e); + } + function De(e, t, r, n, i) { + return ( + e === t || + (null == e || null == t || (!lt(e) && !ct(t)) + ? e != e && t != t + : (function (e, t, r, n, i, o) { + var u = st(e), + f = st(t), + y = c, + m = c; + u || (y = (y = $e(e)) == l ? v : y); + f || (m = (m = $e(t)) == l ? v : m); + var C = y == v && !z(e), + k = m == v && !z(t), + E = y == m; + if (E && !C) + return ( + o || (o = new Ee()), + u || dt(e) + ? We(e, t, r, n, i, o) + : (function (e, t, r, n, i, o, u) { + switch (r) { + case S: + if ( + e.byteLength != t.byteLength || + e.byteOffset != t.byteOffset + ) + return !1; + (e = e.buffer), (t = t.buffer); + case O: + return !( + e.byteLength != t.byteLength || + !n(new se(e), new se(t)) + ); + case h: + case d: + case b: + return it(+e, +t); + case p: + return ( + e.name == t.name && e.message == t.message + ); + case w: + case j: + return e == t + ""; + case g: + var f = V; + case _: + var l = o & a; + if ((f || (f = $), e.size != t.size && !l)) + return !1; + var c = u.get(e); + if (c) return c == t; + (o |= s), u.set(e, t); + var y = We(f(e), f(t), n, i, o, u); + return u.delete(e), y; + case T: + if (je) return je.call(e) == je.call(t); + } + return !1; + })(e, t, y, r, n, i, o) + ); + if (!(i & a)) { + var P = C && re.call(e, "__wrapped__"), + x = k && re.call(t, "__wrapped__"); + if (P || x) { + var R = P ? e.value() : e, + A = x ? t.value() : t; + return o || (o = new Ee()), r(R, A, n, i, o); + } + } + if (!E) return !1; + return ( + o || (o = new Ee()), + (function (e, t, r, n, i, o) { + var s = i & a, + u = pt(e), + f = u.length, + l = pt(t).length; + if (f != l && !s) return !1; + for (var c = f; c--; ) { + var h = u[c]; + if (!(s ? h in t : re.call(t, h))) return !1; + } + var d = o.get(e); + if (d && o.get(t)) return d == t; + var p = !0; + o.set(e, t), o.set(t, e); + for (var y = s; ++c < f; ) { + h = u[c]; + var m = e[h], + g = t[h]; + if (n) + var b = s + ? n(g, m, h, t, e, o) + : n(m, g, h, e, t, o); + if ( + !(void 0 === b ? m === g || r(m, g, n, i, o) : b) + ) { + p = !1; + break; + } + y || (y = "constructor" == h); + } + if (p && !y) { + var v = e.constructor, + w = t.constructor; + v != w && + "constructor" in e && + "constructor" in t && + !( + "function" == typeof v && + v instanceof v && + "function" == typeof w && + w instanceof w + ) && + (p = !1); + } + return o.delete(e), o.delete(t), p; + })(e, t, r, n, i, o) + ); + })(e, t, De, r, n, i)) + ); + } + function Ne(e) { + return ( + !(!lt(e) || ((t = e), ee && ee in t)) && + (ut(e) || z(e) ? ie : R).test(Ze(e)) + ); + var t; + } + function Ie(e) { + return "function" == typeof e + ? e + : null == e + ? yt + : "object" == typeof e + ? st(e) + ? (function (e, t) { + if (Ge(e) && Xe(t)) return Je(Ke(e), t); + return function (r) { + var n = (function (e, t, r) { + var n = null == e ? void 0 : Be(e, t); + return void 0 === n ? r : n; + })(r, e); + return void 0 === n && n === t + ? (function (e, t) { + return ( + null != e && + (function (e, t, r) { + t = Ge(t, e) ? [t] : qe(t); + var n, + i = -1, + o = t.length; + for (; ++i < o; ) { + var s = Ke(t[i]); + if (!(n = null != e && r(e, s))) break; + e = e[s]; + } + if (n) return n; + return ( + !!(o = e ? e.length : 0) && + ft(o) && + Qe(s, o) && + (st(e) || ot(e)) + ); + })(e, t, Ue) + ); + })(r, e) + : De(t, n, void 0, s | a); + }; + })(e[0], e[1]) + : (function (e) { + var t = (function (e) { + var t = pt(e), + r = t.length; + for (; r--; ) { + var n = t[r], + i = e[n]; + t[r] = [n, i, Xe(i)]; + } + return t; + })(e); + if (1 == t.length && t[0][2]) return Je(t[0][0], t[0][1]); + return function (r) { + return ( + r === e || + (function (e, t, r, n) { + var i = r.length, + o = i, + u = !n; + if (null == e) return !o; + for (e = Object(e); i--; ) { + var f = r[i]; + if (u && f[2] ? f[1] !== e[f[0]] : !(f[0] in e)) + return !1; + } + for (; ++i < o; ) { + var l = (f = r[i])[0], + c = e[l], + h = f[1]; + if (u && f[2]) { + if (void 0 === c && !(l in e)) return !1; + } else { + var d = new Ee(); + if (n) var p = n(c, h, l, e, t, d); + if (!(void 0 === p ? De(h, c, n, s | a, d) : p)) + return !1; + } + } + return !0; + })(r, e, t) + ); + }; + })(e) + : Ge((t = e)) + ? ((r = Ke(t)), + function (e) { + return null == e ? void 0 : e[r]; + }) + : (function (e) { + return function (t) { + return Be(t, e); + }; + })(t); + var t, r; + } + function He(e) { + if ( + ((r = (t = e) && t.constructor), + (n = ("function" == typeof r && r.prototype) || K), + t !== n) + ) + return fe(e); + var t, + r, + n, + i = []; + for (var o in Object(e)) + re.call(e, o) && "constructor" != o && i.push(o); + return i; + } + function qe(e) { + return st(e) ? e : Ye(e); + } + function We(e, t, r, n, i, o) { + var u = i & a, + f = e.length, + l = t.length; + if (f != l && !(u && l > f)) return !1; + var c = o.get(e); + if (c && o.get(t)) return c == t; + var h = -1, + d = !0, + p = i & s ? new ke() : void 0; + for (o.set(e, t), o.set(t, e); ++h < f; ) { + var y = e[h], + m = t[h]; + if (n) var g = u ? n(m, y, h, t, e, o) : n(y, m, h, e, t, o); + if (void 0 !== g) { + if (g) continue; + d = !1; + break; + } + if (p) { + if ( + !W(t, function (e, t) { + if (!p.has(t) && (y === e || r(y, e, n, i, o))) + return p.add(t); + }) + ) { + d = !1; + break; + } + } else if (y !== m && !r(y, m, n, i, o)) { + d = !1; + break; + } + } + return o.delete(e), o.delete(t), d; + } + function ze(e, t) { + var r, + n, + i = e.__data__; + return ( + "string" == (n = typeof (r = t)) || + "number" == n || + "symbol" == n || + "boolean" == n + ? "__proto__" !== r + : null === r + ) + ? i["string" == typeof t ? "string" : "hash"] + : i.map; + } + function Ve(e, t) { + var r = (function (e, t) { + return null == e ? void 0 : e[t]; + })(e, t); + return Ne(r) ? r : void 0; + } + var $e = function (e) { + return ne.call(e); + }; + function Qe(e, t) { + return ( + !!(t = null == t ? f : t) && + ("number" == typeof e || A.test(e)) && + e > -1 && + e % 1 == 0 && + e < t + ); + } + function Ge(e, t) { + if (st(e)) return !1; + var r = typeof e; + return ( + !( + "number" != r && + "symbol" != r && + "boolean" != r && + null != e && + !ht(e) + ) || + k.test(e) || + !C.test(e) || + (null != t && e in Object(t)) + ); + } + function Xe(e) { + return e == e && !lt(e); + } + function Je(e, t) { + return function (r) { + return ( + null != r && r[e] === t && (void 0 !== t || e in Object(r)) + ); + }; + } + ((le && $e(new le(new ArrayBuffer(1))) != S) || + (ce && $e(new ce()) != g) || + (he && "[object Promise]" != $e(he.resolve())) || + (de && $e(new de()) != _) || + (pe && "[object WeakMap]" != $e(new pe()))) && + ($e = function (e) { + var t = ne.call(e), + r = t == v ? e.constructor : void 0, + n = r ? Ze(r) : void 0; + if (n) + switch (n) { + case me: + return S; + case ge: + return g; + case be: + return "[object Promise]"; + case ve: + return _; + case we: + return "[object WeakMap]"; + } + return t; + }); + var Ye = nt(function (e) { + var t; + e = + null == (t = e) + ? "" + : (function (e) { + if ("string" == typeof e) return e; + if (ht(e)) return Te ? Te.call(e) : ""; + var t = e + ""; + return "0" == t && 1 / e == -u ? "-0" : t; + })(t); + var r = []; + return ( + E.test(e) && r.push(""), + e.replace(P, function (e, t, n, i) { + r.push(n ? i.replace(x, "$1") : t || e); + }), + r + ); + }); + function Ke(e) { + if ("string" == typeof e || ht(e)) return e; + var t = e + ""; + return "0" == t && 1 / e == -u ? "-0" : t; + } + function Ze(e) { + if (null != e) { + try { + return te.call(e); + } catch (e) {} + try { + return e + ""; + } catch (e) {} + } + return ""; + } + var et, + tt, + rt = + ((et = function (e, t, r) { + re.call(e, r) ? e[r].push(t) : (e[r] = [t]); + }), + function (e, t) { + var r = st(e) ? q : Re, + n = tt ? tt() : {}; + return r(e, et, Ie(t), n); + }); + function nt(e, t) { + if ("function" != typeof e || (t && "function" != typeof t)) + throw new TypeError(i); + var r = function () { + var n = arguments, + i = t ? t.apply(this, n) : n[0], + o = r.cache; + if (o.has(i)) return o.get(i); + var s = e.apply(this, n); + return (r.cache = o.set(i, s)), s; + }; + return (r.cache = new (nt.Cache || Ce)()), r; + } + function it(e, t) { + return e === t || (e != e && t != t); + } + function ot(e) { + return ( + (function (e) { + return ct(e) && at(e); + })(e) && + re.call(e, "callee") && + (!ae.call(e, "callee") || ne.call(e) == l) + ); + } + nt.Cache = Ce; + var st = Array.isArray; + function at(e) { + return null != e && ft(e.length) && !ut(e); + } + function ut(e) { + var t = lt(e) ? ne.call(e) : ""; + return t == y || t == m; + } + function ft(e) { + return "number" == typeof e && e > -1 && e % 1 == 0 && e <= f; + } + function lt(e) { + var t = typeof e; + return !!e && ("object" == t || "function" == t); + } + function ct(e) { + return !!e && "object" == typeof e; + } + function ht(e) { + return "symbol" == typeof e || (ct(e) && ne.call(e) == T); + } + var dt = H + ? (function (e) { + return function (t) { + return e(t); + }; + })(H) + : function (e) { + return ct(e) && ft(e.length) && !!M[ne.call(e)]; + }; + function pt(e) { + return at(e) ? Pe(e) : He(e); + } + function yt(e) { + return e; + } + t.exports = rt; + }).call( + this, + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + {}, + ], + 28: [ + function (e, t, r) { + var n = "[object Boolean]", + i = Object.prototype.toString; + t.exports = function (e) { + return ( + !0 === e || + !1 === e || + ((function (e) { + return !!e && "object" == typeof e; + })(e) && + i.call(e) == n) + ); + }; + }, + {}, + ], + 29: [ + function (e, t, r) { + (function (e) { + var n = 200, + i = "__lodash_hash_undefined__", + o = 1, + s = 2, + a = 9007199254740991, + u = "[object Arguments]", + f = "[object Array]", + l = "[object AsyncFunction]", + c = "[object Boolean]", + h = "[object Date]", + d = "[object Error]", + p = "[object Function]", + y = "[object GeneratorFunction]", + m = "[object Map]", + g = "[object Number]", + b = "[object Null]", + v = "[object Object]", + w = "[object Proxy]", + _ = "[object RegExp]", + j = "[object Set]", + T = "[object String]", + O = "[object Symbol]", + S = "[object Undefined]", + C = "[object ArrayBuffer]", + k = "[object DataView]", + E = /^\[object .+?Constructor\]$/, + P = /^(?:0|[1-9]\d*)$/, + x = {}; + (x["[object Float32Array]"] = + x["[object Float64Array]"] = + x["[object Int8Array]"] = + x["[object Int16Array]"] = + x["[object Int32Array]"] = + x["[object Uint8Array]"] = + x["[object Uint8ClampedArray]"] = + x["[object Uint16Array]"] = + x["[object Uint32Array]"] = + !0), + (x[u] = + x[f] = + x[C] = + x[c] = + x[k] = + x[h] = + x[d] = + x[p] = + x[m] = + x[g] = + x[v] = + x[_] = + x[j] = + x[T] = + x["[object WeakMap]"] = + !1); + var R = "object" == typeof e && e && e.Object === Object && e, + A = + "object" == typeof self && + self && + self.Object === Object && + self, + M = R || A || Function("return this")(), + F = "object" == typeof r && r && !r.nodeType && r, + L = F && "object" == typeof t && t && !t.nodeType && t, + B = L && L.exports === F, + U = B && R.process, + D = (function () { + try { + return U && U.binding && U.binding("util"); + } catch (e) {} + })(), + N = D && D.isTypedArray; + function I(e, t) { + for (var r = -1, n = null == e ? 0 : e.length; ++r < n; ) + if (t(e[r], r, e)) return !0; + return !1; + } + function H(e) { + var t = -1, + r = Array(e.size); + return ( + e.forEach(function (e, n) { + r[++t] = [n, e]; + }), + r + ); + } + function q(e) { + var t = -1, + r = Array(e.size); + return ( + e.forEach(function (e) { + r[++t] = e; + }), + r + ); + } + var W, + z, + V, + $ = Array.prototype, + Q = Function.prototype, + G = Object.prototype, + X = M["__core-js_shared__"], + J = Q.toString, + Y = G.hasOwnProperty, + K = (W = /[^.]+$/.exec((X && X.keys && X.keys.IE_PROTO) || "")) + ? "Symbol(src)_1." + W + : "", + Z = G.toString, + ee = RegExp( + "^" + + J.call(Y) + .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&") + .replace( + /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, + "$1.*?", + ) + + "$", + ), + te = B ? M.Buffer : void 0, + re = M.Symbol, + ne = M.Uint8Array, + ie = G.propertyIsEnumerable, + oe = $.splice, + se = re ? re.toStringTag : void 0, + ae = Object.getOwnPropertySymbols, + ue = te ? te.isBuffer : void 0, + fe = + ((z = Object.keys), + (V = Object), + function (e) { + return z(V(e)); + }), + le = De(M, "DataView"), + ce = De(M, "Map"), + he = De(M, "Promise"), + de = De(M, "Set"), + pe = De(M, "WeakMap"), + ye = De(Object, "create"), + me = qe(le), + ge = qe(ce), + be = qe(he), + ve = qe(de), + we = qe(pe), + _e = re ? re.prototype : void 0, + je = _e ? _e.valueOf : void 0; + function Te(e) { + var t = -1, + r = null == e ? 0 : e.length; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } + } + function Oe(e) { + var t = -1, + r = null == e ? 0 : e.length; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } + } + function Se(e) { + var t = -1, + r = null == e ? 0 : e.length; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } + } + function Ce(e) { + var t = -1, + r = null == e ? 0 : e.length; + for (this.__data__ = new Se(); ++t < r; ) this.add(e[t]); + } + function ke(e) { + var t = (this.__data__ = new Oe(e)); + this.size = t.size; + } + function Ee(e, t) { + var r = Ve(e), + n = !r && ze(e), + i = !r && !n && $e(e), + o = !r && !n && !i && Ye(e), + s = r || n || i || o, + a = s + ? (function (e, t) { + for (var r = -1, n = Array(e); ++r < e; ) n[r] = t(r); + return n; + })(e.length, String) + : [], + u = a.length; + for (var f in e) + (!t && !Y.call(e, f)) || + (s && + ("length" == f || + (i && ("offset" == f || "parent" == f)) || + (o && + ("buffer" == f || + "byteLength" == f || + "byteOffset" == f)) || + He(f, u))) || + a.push(f); + return a; + } + function Pe(e, t) { + for (var r = e.length; r--; ) if (We(e[r][0], t)) return r; + return -1; + } + function xe(e) { + return null == e + ? void 0 === e + ? S + : b + : se && se in Object(e) + ? (function (e) { + var t = Y.call(e, se), + r = e[se]; + try { + e[se] = void 0; + var n = !0; + } catch (e) {} + var i = Z.call(e); + n && (t ? (e[se] = r) : delete e[se]); + return i; + })(e) + : (function (e) { + return Z.call(e); + })(e); + } + function Re(e) { + return Je(e) && xe(e) == u; + } + function Ae(e, t, r, n, i) { + return ( + e === t || + (null == e || null == t || (!Je(e) && !Je(t)) + ? e != e && t != t + : (function (e, t, r, n, i, a) { + var l = Ve(e), + p = Ve(t), + y = l ? f : Ie(e), + b = p ? f : Ie(t), + w = (y = y == u ? v : y) == v, + S = (b = b == u ? v : b) == v, + E = y == b; + if (E && $e(e)) { + if (!$e(t)) return !1; + (l = !0), (w = !1); + } + if (E && !w) + return ( + a || (a = new ke()), + l || Ye(e) + ? Le(e, t, r, n, i, a) + : (function (e, t, r, n, i, a, u) { + switch (r) { + case k: + if ( + e.byteLength != t.byteLength || + e.byteOffset != t.byteOffset + ) + return !1; + (e = e.buffer), (t = t.buffer); + case C: + return !( + e.byteLength != t.byteLength || + !a(new ne(e), new ne(t)) + ); + case c: + case h: + case g: + return We(+e, +t); + case d: + return ( + e.name == t.name && e.message == t.message + ); + case _: + case T: + return e == t + ""; + case m: + var f = H; + case j: + var l = n & o; + if ((f || (f = q), e.size != t.size && !l)) + return !1; + var p = u.get(e); + if (p) return p == t; + (n |= s), u.set(e, t); + var y = Le(f(e), f(t), n, i, a, u); + return u.delete(e), y; + case O: + if (je) return je.call(e) == je.call(t); + } + return !1; + })(e, t, y, r, n, i, a) + ); + if (!(r & o)) { + var P = w && Y.call(e, "__wrapped__"), + x = S && Y.call(t, "__wrapped__"); + if (P || x) { + var R = P ? e.value() : e, + A = x ? t.value() : t; + return a || (a = new ke()), i(R, A, r, n, a); + } + } + if (!E) return !1; + return ( + a || (a = new ke()), + (function (e, t, r, n, i, s) { + var a = r & o, + u = Be(e), + f = u.length, + l = Be(t).length; + if (f != l && !a) return !1; + for (var c = f; c--; ) { + var h = u[c]; + if (!(a ? h in t : Y.call(t, h))) return !1; + } + var d = s.get(e); + if (d && s.get(t)) return d == t; + var p = !0; + s.set(e, t), s.set(t, e); + for (var y = a; ++c < f; ) { + h = u[c]; + var m = e[h], + g = t[h]; + if (n) + var b = a + ? n(g, m, h, t, e, s) + : n(m, g, h, e, t, s); + if ( + !(void 0 === b ? m === g || i(m, g, r, n, s) : b) + ) { + p = !1; + break; + } + y || (y = "constructor" == h); + } + if (p && !y) { + var v = e.constructor, + w = t.constructor; + v != w && + "constructor" in e && + "constructor" in t && + !( + "function" == typeof v && + v instanceof v && + "function" == typeof w && + w instanceof w + ) && + (p = !1); + } + return s.delete(e), s.delete(t), p; + })(e, t, r, n, i, a) + ); + })(e, t, r, n, Ae, i)) + ); + } + function Me(e) { + return ( + !(!Xe(e) || ((t = e), K && K in t)) && + (Qe(e) ? ee : E).test(qe(e)) + ); + var t; + } + function Fe(e) { + if ( + ((r = (t = e) && t.constructor), + (n = ("function" == typeof r && r.prototype) || G), + t !== n) + ) + return fe(e); + var t, + r, + n, + i = []; + for (var o in Object(e)) + Y.call(e, o) && "constructor" != o && i.push(o); + return i; + } + function Le(e, t, r, n, i, a) { + var u = r & o, + f = e.length, + l = t.length; + if (f != l && !(u && l > f)) return !1; + var c = a.get(e); + if (c && a.get(t)) return c == t; + var h = -1, + d = !0, + p = r & s ? new Ce() : void 0; + for (a.set(e, t), a.set(t, e); ++h < f; ) { + var y = e[h], + m = t[h]; + if (n) var g = u ? n(m, y, h, t, e, a) : n(y, m, h, e, t, a); + if (void 0 !== g) { + if (g) continue; + d = !1; + break; + } + if (p) { + if ( + !I(t, function (e, t) { + if (((o = t), !p.has(o) && (y === e || i(y, e, r, n, a)))) + return p.push(t); + var o; + }) + ) { + d = !1; + break; + } + } else if (y !== m && !i(y, m, r, n, a)) { + d = !1; + break; + } + } + return a.delete(e), a.delete(t), d; + } + function Be(e) { + return (function (e, t, r) { + var n = t(e); + return Ve(e) + ? n + : (function (e, t) { + for (var r = -1, n = t.length, i = e.length; ++r < n; ) + e[i + r] = t[r]; + return e; + })(n, r(e)); + })(e, Ke, Ne); + } + function Ue(e, t) { + var r, + n, + i = e.__data__; + return ( + "string" == (n = typeof (r = t)) || + "number" == n || + "symbol" == n || + "boolean" == n + ? "__proto__" !== r + : null === r + ) + ? i["string" == typeof t ? "string" : "hash"] + : i.map; + } + function De(e, t) { + var r = (function (e, t) { + return null == e ? void 0 : e[t]; + })(e, t); + return Me(r) ? r : void 0; + } + (Te.prototype.clear = function () { + (this.__data__ = ye ? ye(null) : {}), (this.size = 0); + }), + (Te.prototype.delete = function (e) { + var t = this.has(e) && delete this.__data__[e]; + return (this.size -= t ? 1 : 0), t; + }), + (Te.prototype.get = function (e) { + var t = this.__data__; + if (ye) { + var r = t[e]; + return r === i ? void 0 : r; + } + return Y.call(t, e) ? t[e] : void 0; + }), + (Te.prototype.has = function (e) { + var t = this.__data__; + return ye ? void 0 !== t[e] : Y.call(t, e); + }), + (Te.prototype.set = function (e, t) { + var r = this.__data__; + return ( + (this.size += this.has(e) ? 0 : 1), + (r[e] = ye && void 0 === t ? i : t), + this + ); + }), + (Oe.prototype.clear = function () { + (this.__data__ = []), (this.size = 0); + }), + (Oe.prototype.delete = function (e) { + var t = this.__data__, + r = Pe(t, e); + return !( + r < 0 || + (r == t.length - 1 ? t.pop() : oe.call(t, r, 1), + --this.size, + 0) + ); + }), + (Oe.prototype.get = function (e) { + var t = this.__data__, + r = Pe(t, e); + return r < 0 ? void 0 : t[r][1]; + }), + (Oe.prototype.has = function (e) { + return Pe(this.__data__, e) > -1; + }), + (Oe.prototype.set = function (e, t) { + var r = this.__data__, + n = Pe(r, e); + return ( + n < 0 ? (++this.size, r.push([e, t])) : (r[n][1] = t), this + ); + }), + (Se.prototype.clear = function () { + (this.size = 0), + (this.__data__ = { + hash: new Te(), + map: new (ce || Oe)(), + string: new Te(), + }); + }), + (Se.prototype.delete = function (e) { + var t = Ue(this, e).delete(e); + return (this.size -= t ? 1 : 0), t; + }), + (Se.prototype.get = function (e) { + return Ue(this, e).get(e); + }), + (Se.prototype.has = function (e) { + return Ue(this, e).has(e); + }), + (Se.prototype.set = function (e, t) { + var r = Ue(this, e), + n = r.size; + return r.set(e, t), (this.size += r.size == n ? 0 : 1), this; + }), + (Ce.prototype.add = Ce.prototype.push = + function (e) { + return this.__data__.set(e, i), this; + }), + (Ce.prototype.has = function (e) { + return this.__data__.has(e); + }), + (ke.prototype.clear = function () { + (this.__data__ = new Oe()), (this.size = 0); + }), + (ke.prototype.delete = function (e) { + var t = this.__data__, + r = t.delete(e); + return (this.size = t.size), r; + }), + (ke.prototype.get = function (e) { + return this.__data__.get(e); + }), + (ke.prototype.has = function (e) { + return this.__data__.has(e); + }), + (ke.prototype.set = function (e, t) { + var r = this.__data__; + if (r instanceof Oe) { + var i = r.__data__; + if (!ce || i.length < n - 1) + return i.push([e, t]), (this.size = ++r.size), this; + r = this.__data__ = new Se(i); + } + return r.set(e, t), (this.size = r.size), this; + }); + var Ne = ae + ? function (e) { + return null == e + ? [] + : ((e = Object(e)), + (function (e, t) { + for ( + var r = -1, + n = null == e ? 0 : e.length, + i = 0, + o = []; + ++r < n; + + ) { + var s = e[r]; + t(s, r, e) && (o[i++] = s); + } + return o; + })(ae(e), function (t) { + return ie.call(e, t); + })); + } + : function () { + return []; + }, + Ie = xe; + function He(e, t) { + return ( + !!(t = null == t ? a : t) && + ("number" == typeof e || P.test(e)) && + e > -1 && + e % 1 == 0 && + e < t + ); + } + function qe(e) { + if (null != e) { + try { + return J.call(e); + } catch (e) {} + try { + return e + ""; + } catch (e) {} + } + return ""; + } + function We(e, t) { + return e === t || (e != e && t != t); + } + ((le && Ie(new le(new ArrayBuffer(1))) != k) || + (ce && Ie(new ce()) != m) || + (he && "[object Promise]" != Ie(he.resolve())) || + (de && Ie(new de()) != j) || + (pe && "[object WeakMap]" != Ie(new pe()))) && + (Ie = function (e) { + var t = xe(e), + r = t == v ? e.constructor : void 0, + n = r ? qe(r) : ""; + if (n) + switch (n) { + case me: + return k; + case ge: + return m; + case be: + return "[object Promise]"; + case ve: + return j; + case we: + return "[object WeakMap]"; + } + return t; + }); + var ze = Re( + (function () { + return arguments; + })(), + ) + ? Re + : function (e) { + return ( + Je(e) && Y.call(e, "callee") && !ie.call(e, "callee") + ); + }, + Ve = Array.isArray; + var $e = + ue || + function () { + return !1; + }; + function Qe(e) { + if (!Xe(e)) return !1; + var t = xe(e); + return t == p || t == y || t == l || t == w; + } + function Ge(e) { + return "number" == typeof e && e > -1 && e % 1 == 0 && e <= a; + } + function Xe(e) { + var t = typeof e; + return null != e && ("object" == t || "function" == t); + } + function Je(e) { + return null != e && "object" == typeof e; + } + var Ye = N + ? (function (e) { + return function (t) { + return e(t); + }; + })(N) + : function (e) { + return Je(e) && Ge(e.length) && !!x[xe(e)]; + }; + function Ke(e) { + return null != (t = e) && Ge(t.length) && !Qe(t) ? Ee(e) : Fe(e); + var t; + } + t.exports = function (e, t) { + return Ae(e, t); + }; + }).call( + this, + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + {}, + ], + 30: [ + function (e, t, r) { + (function (e) { + var r = "[object AsyncFunction]", + n = "[object Function]", + i = "[object GeneratorFunction]", + o = "[object Null]", + s = "[object Proxy]", + a = "[object Undefined]", + u = "object" == typeof e && e && e.Object === Object && e, + f = + "object" == typeof self && + self && + self.Object === Object && + self, + l = u || f || Function("return this")(), + c = Object.prototype, + h = c.hasOwnProperty, + d = c.toString, + p = l.Symbol, + y = p ? p.toStringTag : void 0; + function m(e) { + return null == e + ? void 0 === e + ? a + : o + : y && y in Object(e) + ? (function (e) { + var t = h.call(e, y), + r = e[y]; + try { + e[y] = void 0; + var n = !0; + } catch (e) {} + var i = d.call(e); + n && (t ? (e[y] = r) : delete e[y]); + return i; + })(e) + : (function (e) { + return d.call(e); + })(e); + } + t.exports = function (e) { + if ( + !(function (e) { + var t = typeof e; + return null != e && ("object" == t || "function" == t); + })(e) + ) + return !1; + var t = m(e); + return t == n || t == i || t == r || t == s; + }; + }).call( + this, + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + {}, + ], + 31: [ + function (e, t, r) { + t.exports = function (e) { + return null == e; + }; + }, + {}, + ], + 32: [ + function (e, t, r) { + t.exports = function (e) { + return void 0 === e; + }; + }, + {}, + ], + 33: [ + function (e, t, r) { + (function (e) { + var r = 200, + n = "__lodash_hash_undefined__", + i = "[object Function]", + o = "[object GeneratorFunction]", + s = /^\[object .+?Constructor\]$/, + a = "object" == typeof e && e && e.Object === Object && e, + u = + "object" == typeof self && + self && + self.Object === Object && + self, + f = a || u || Function("return this")(); + function l(e, t) { + return ( + !!(e ? e.length : 0) && + (function (e, t, r) { + if (t != t) + return (function (e, t, r, n) { + var i = e.length, + o = r + (n ? 1 : -1); + for (; n ? o-- : ++o < i; ) if (t(e[o], o, e)) return o; + return -1; + })(e, h, r); + var n = r - 1, + i = e.length; + for (; ++n < i; ) if (e[n] === t) return n; + return -1; + })(e, t, 0) > -1 + ); + } + function c(e, t, r) { + for (var n = -1, i = e ? e.length : 0; ++n < i; ) + if (r(t, e[n])) return !0; + return !1; + } + function h(e) { + return e != e; + } + function d(e, t) { + return e.has(t); + } + function p(e) { + var t = -1, + r = Array(e.size); + return ( + e.forEach(function (e) { + r[++t] = e; + }), + r + ); + } + var y, + m = Array.prototype, + g = Function.prototype, + b = Object.prototype, + v = f["__core-js_shared__"], + w = (y = /[^.]+$/.exec((v && v.keys && v.keys.IE_PROTO) || "")) + ? "Symbol(src)_1." + y + : "", + _ = g.toString, + j = b.hasOwnProperty, + T = b.toString, + O = RegExp( + "^" + + _.call(j) + .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&") + .replace( + /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, + "$1.*?", + ) + + "$", + ), + S = m.splice, + C = U(f, "Map"), + k = U(f, "Set"), + E = U(Object, "create"); + function P(e) { + var t = -1, + r = e ? e.length : 0; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } + } + function x(e) { + var t = -1, + r = e ? e.length : 0; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } + } + function R(e) { + var t = -1, + r = e ? e.length : 0; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } + } + function A(e) { + var t = -1, + r = e ? e.length : 0; + for (this.__data__ = new R(); ++t < r; ) this.add(e[t]); + } + function M(e, t) { + for (var r, n, i = e.length; i--; ) + if ((r = e[i][0]) === (n = t) || (r != r && n != n)) return i; + return -1; + } + function F(e) { + return ( + !(!D(e) || ((t = e), w && w in t)) && + ((function (e) { + var t = D(e) ? T.call(e) : ""; + return t == i || t == o; + })(e) || + (function (e) { + var t = !1; + if (null != e && "function" != typeof e.toString) + try { + t = !!(e + ""); + } catch (e) {} + return t; + })(e) + ? O + : s + ).test( + (function (e) { + if (null != e) { + try { + return _.call(e); + } catch (e) {} + try { + return e + ""; + } catch (e) {} + } + return ""; + })(e), + ) + ); + var t; + } + (P.prototype.clear = function () { + this.__data__ = E ? E(null) : {}; + }), + (P.prototype.delete = function (e) { + return this.has(e) && delete this.__data__[e]; + }), + (P.prototype.get = function (e) { + var t = this.__data__; + if (E) { + var r = t[e]; + return r === n ? void 0 : r; + } + return j.call(t, e) ? t[e] : void 0; + }), + (P.prototype.has = function (e) { + var t = this.__data__; + return E ? void 0 !== t[e] : j.call(t, e); + }), + (P.prototype.set = function (e, t) { + return (this.__data__[e] = E && void 0 === t ? n : t), this; + }), + (x.prototype.clear = function () { + this.__data__ = []; + }), + (x.prototype.delete = function (e) { + var t = this.__data__, + r = M(t, e); + return !( + r < 0 || (r == t.length - 1 ? t.pop() : S.call(t, r, 1), 0) + ); + }), + (x.prototype.get = function (e) { + var t = this.__data__, + r = M(t, e); + return r < 0 ? void 0 : t[r][1]; + }), + (x.prototype.has = function (e) { + return M(this.__data__, e) > -1; + }), + (x.prototype.set = function (e, t) { + var r = this.__data__, + n = M(r, e); + return n < 0 ? r.push([e, t]) : (r[n][1] = t), this; + }), + (R.prototype.clear = function () { + this.__data__ = { + hash: new P(), + map: new (C || x)(), + string: new P(), + }; + }), + (R.prototype.delete = function (e) { + return B(this, e).delete(e); + }), + (R.prototype.get = function (e) { + return B(this, e).get(e); + }), + (R.prototype.has = function (e) { + return B(this, e).has(e); + }), + (R.prototype.set = function (e, t) { + return B(this, e).set(e, t), this; + }), + (A.prototype.add = A.prototype.push = + function (e) { + return this.__data__.set(e, n), this; + }), + (A.prototype.has = function (e) { + return this.__data__.has(e); + }); + var L = + k && 1 / p(new k([, -0]))[1] == 1 / 0 + ? function (e) { + return new k(e); + } + : function () {}; + function B(e, t) { + var r, + n, + i = e.__data__; + return ( + "string" == (n = typeof (r = t)) || + "number" == n || + "symbol" == n || + "boolean" == n + ? "__proto__" !== r + : null === r + ) + ? i["string" == typeof t ? "string" : "hash"] + : i.map; + } + function U(e, t) { + var r = (function (e, t) { + return null == e ? void 0 : e[t]; + })(e, t); + return F(r) ? r : void 0; + } + function D(e) { + var t = typeof e; + return !!e && ("object" == t || "function" == t); + } + t.exports = function (e) { + return e && e.length + ? (function (e, t, n) { + var i = -1, + o = l, + s = e.length, + a = !0, + u = [], + f = u; + if (n) (a = !1), (o = c); + else if (s >= r) { + var h = t ? null : L(e); + if (h) return p(h); + (a = !1), (o = d), (f = new A()); + } else f = t ? [] : u; + e: for (; ++i < s; ) { + var y = e[i], + m = t ? t(y) : y; + if (((y = n || 0 !== y ? y : 0), a && m == m)) { + for (var g = f.length; g--; ) + if (f[g] === m) continue e; + t && f.push(m), u.push(y); + } else o(f, m, n) || (f !== u && f.push(m), u.push(y)); + } + return u; + })(e) + : []; + }; + }).call( + this, + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + {}, + ], + 34: [ + function (e, t, r) { + "use strict"; + (r.byteLength = function (e) { + var t = f(e), + r = t[0], + n = t[1]; + return (3 * (r + n)) / 4 - n; + }), + (r.toByteArray = function (e) { + var t, + r, + n = f(e), + s = n[0], + a = n[1], + u = new o( + (function (e, t, r) { + return (3 * (t + r)) / 4 - r; + })(0, s, a), + ), + l = 0, + c = a > 0 ? s - 4 : s; + for (r = 0; r < c; r += 4) + (t = + (i[e.charCodeAt(r)] << 18) | + (i[e.charCodeAt(r + 1)] << 12) | + (i[e.charCodeAt(r + 2)] << 6) | + i[e.charCodeAt(r + 3)]), + (u[l++] = (t >> 16) & 255), + (u[l++] = (t >> 8) & 255), + (u[l++] = 255 & t); + 2 === a && + ((t = + (i[e.charCodeAt(r)] << 2) | (i[e.charCodeAt(r + 1)] >> 4)), + (u[l++] = 255 & t)); + 1 === a && + ((t = + (i[e.charCodeAt(r)] << 10) | + (i[e.charCodeAt(r + 1)] << 4) | + (i[e.charCodeAt(r + 2)] >> 2)), + (u[l++] = (t >> 8) & 255), + (u[l++] = 255 & t)); + return u; + }), + (r.fromByteArray = function (e) { + for ( + var t, r = e.length, i = r % 3, o = [], s = 0, a = r - i; + s < a; + s += 16383 + ) + o.push(l(e, s, s + 16383 > a ? a : s + 16383)); + 1 === i + ? ((t = e[r - 1]), o.push(n[t >> 2] + n[(t << 4) & 63] + "==")) + : 2 === i && + ((t = (e[r - 2] << 8) + e[r - 1]), + o.push( + n[t >> 10] + n[(t >> 4) & 63] + n[(t << 2) & 63] + "=", + )); + return o.join(""); + }); + for ( + var n = [], + i = [], + o = "undefined" != typeof Uint8Array ? Uint8Array : Array, + s = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + a = 0, + u = s.length; + a < u; + ++a + ) + (n[a] = s[a]), (i[s.charCodeAt(a)] = a); + function f(e) { + var t = e.length; + if (t % 4 > 0) + throw new Error("Invalid string. Length must be a multiple of 4"); + var r = e.indexOf("="); + return -1 === r && (r = t), [r, r === t ? 0 : 4 - (r % 4)]; + } + function l(e, t, r) { + for (var i, o, s = [], a = t; a < r; a += 3) + (i = + ((e[a] << 16) & 16711680) + + ((e[a + 1] << 8) & 65280) + + (255 & e[a + 2])), + s.push( + n[((o = i) >> 18) & 63] + + n[(o >> 12) & 63] + + n[(o >> 6) & 63] + + n[63 & o], + ); + return s.join(""); + } + (i["-".charCodeAt(0)] = 62), (i["_".charCodeAt(0)] = 63); + }, + {}, + ], + 35: [function (e, t, r) {}, {}], + 36: [ + function (e, t, r) { + arguments[4][35][0].apply(r, arguments); + }, + { dup: 35 }, + ], + 37: [ + function (e, t, r) { + (function (t) { + "use strict"; + var n = e("base64-js"), + i = e("ieee754"); + (r.Buffer = t), + (r.SlowBuffer = function (e) { + +e != e && (e = 0); + return t.alloc(+e); + }), + (r.INSPECT_MAX_BYTES = 50); + var o = 2147483647; + function s(e) { + if (e > o) + throw new RangeError( + 'The value "' + e + '" is invalid for option "size"', + ); + var r = new Uint8Array(e); + return (r.__proto__ = t.prototype), r; + } + function t(e, t, r) { + if ("number" == typeof e) { + if ("string" == typeof t) + throw new TypeError( + 'The "string" argument must be of type string. Received type number', + ); + return f(e); + } + return a(e, t, r); + } + function a(e, r, n) { + if ("string" == typeof e) + return (function (e, r) { + ("string" == typeof r && "" !== r) || (r = "utf8"); + if (!t.isEncoding(r)) + throw new TypeError("Unknown encoding: " + r); + var n = 0 | h(e, r), + i = s(n), + o = i.write(e, r); + o !== n && (i = i.slice(0, o)); + return i; + })(e, r); + if (ArrayBuffer.isView(e)) return l(e); + if (null == e) + throw TypeError( + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + + typeof e, + ); + if (N(e, ArrayBuffer) || (e && N(e.buffer, ArrayBuffer))) + return (function (e, r, n) { + if (r < 0 || e.byteLength < r) + throw new RangeError( + '"offset" is outside of buffer bounds', + ); + if (e.byteLength < r + (n || 0)) + throw new RangeError( + '"length" is outside of buffer bounds', + ); + var i; + i = + void 0 === r && void 0 === n + ? new Uint8Array(e) + : void 0 === n + ? new Uint8Array(e, r) + : new Uint8Array(e, r, n); + return (i.__proto__ = t.prototype), i; + })(e, r, n); + if ("number" == typeof e) + throw new TypeError( + 'The "value" argument must not be of type number. Received type number', + ); + var i = e.valueOf && e.valueOf(); + if (null != i && i !== e) return t.from(i, r, n); + var o = (function (e) { + if (t.isBuffer(e)) { + var r = 0 | c(e.length), + n = s(r); + return 0 === n.length ? n : (e.copy(n, 0, 0, r), n); + } + if (void 0 !== e.length) + return "number" != typeof e.length || I(e.length) + ? s(0) + : l(e); + if ("Buffer" === e.type && Array.isArray(e.data)) + return l(e.data); + })(e); + if (o) return o; + if ( + "undefined" != typeof Symbol && + null != Symbol.toPrimitive && + "function" == typeof e[Symbol.toPrimitive] + ) + return t.from(e[Symbol.toPrimitive]("string"), r, n); + throw new TypeError( + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + + typeof e, + ); + } + function u(e) { + if ("number" != typeof e) + throw new TypeError('"size" argument must be of type number'); + if (e < 0) + throw new RangeError( + 'The value "' + e + '" is invalid for option "size"', + ); + } + function f(e) { + return u(e), s(e < 0 ? 0 : 0 | c(e)); + } + function l(e) { + for ( + var t = e.length < 0 ? 0 : 0 | c(e.length), r = s(t), n = 0; + n < t; + n += 1 + ) + r[n] = 255 & e[n]; + return r; + } + function c(e) { + if (e >= o) + throw new RangeError( + "Attempt to allocate Buffer larger than maximum size: 0x" + + o.toString(16) + + " bytes", + ); + return 0 | e; + } + function h(e, r) { + if (t.isBuffer(e)) return e.length; + if (ArrayBuffer.isView(e) || N(e, ArrayBuffer)) + return e.byteLength; + if ("string" != typeof e) + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + + typeof e, + ); + var n = e.length, + i = arguments.length > 2 && !0 === arguments[2]; + if (!i && 0 === n) return 0; + for (var o = !1; ; ) + switch (r) { + case "ascii": + case "latin1": + case "binary": + return n; + case "utf8": + case "utf-8": + return B(e).length; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return 2 * n; + case "hex": + return n >>> 1; + case "base64": + return U(e).length; + default: + if (o) return i ? -1 : B(e).length; + (r = ("" + r).toLowerCase()), (o = !0); + } + } + function d(e, t, r) { + var n = e[t]; + (e[t] = e[r]), (e[r] = n); + } + function p(e, r, n, i, o) { + if (0 === e.length) return -1; + if ( + ("string" == typeof n + ? ((i = n), (n = 0)) + : n > 2147483647 + ? (n = 2147483647) + : n < -2147483648 && (n = -2147483648), + I((n = +n)) && (n = o ? 0 : e.length - 1), + n < 0 && (n = e.length + n), + n >= e.length) + ) { + if (o) return -1; + n = e.length - 1; + } else if (n < 0) { + if (!o) return -1; + n = 0; + } + if (("string" == typeof r && (r = t.from(r, i)), t.isBuffer(r))) + return 0 === r.length ? -1 : y(e, r, n, i, o); + if ("number" == typeof r) + return ( + (r &= 255), + "function" == typeof Uint8Array.prototype.indexOf + ? o + ? Uint8Array.prototype.indexOf.call(e, r, n) + : Uint8Array.prototype.lastIndexOf.call(e, r, n) + : y(e, [r], n, i, o) + ); + throw new TypeError("val must be string, number or Buffer"); + } + function y(e, t, r, n, i) { + var o, + s = 1, + a = e.length, + u = t.length; + if ( + void 0 !== n && + ("ucs2" === (n = String(n).toLowerCase()) || + "ucs-2" === n || + "utf16le" === n || + "utf-16le" === n) + ) { + if (e.length < 2 || t.length < 2) return -1; + (s = 2), (a /= 2), (u /= 2), (r /= 2); + } + function f(e, t) { + return 1 === s ? e[t] : e.readUInt16BE(t * s); + } + if (i) { + var l = -1; + for (o = r; o < a; o++) + if (f(e, o) === f(t, -1 === l ? 0 : o - l)) { + if ((-1 === l && (l = o), o - l + 1 === u)) return l * s; + } else -1 !== l && (o -= o - l), (l = -1); + } else + for (r + u > a && (r = a - u), o = r; o >= 0; o--) { + for (var c = !0, h = 0; h < u; h++) + if (f(e, o + h) !== f(t, h)) { + c = !1; + break; + } + if (c) return o; + } + return -1; + } + function m(e, t, r, n) { + r = Number(r) || 0; + var i = e.length - r; + n ? (n = Number(n)) > i && (n = i) : (n = i); + var o = t.length; + n > o / 2 && (n = o / 2); + for (var s = 0; s < n; ++s) { + var a = parseInt(t.substr(2 * s, 2), 16); + if (I(a)) return s; + e[r + s] = a; + } + return s; + } + function g(e, t, r, n) { + return D(B(t, e.length - r), e, r, n); + } + function b(e, t, r, n) { + return D( + (function (e) { + for (var t = [], r = 0; r < e.length; ++r) + t.push(255 & e.charCodeAt(r)); + return t; + })(t), + e, + r, + n, + ); + } + function v(e, t, r, n) { + return b(e, t, r, n); + } + function w(e, t, r, n) { + return D(U(t), e, r, n); + } + function _(e, t, r, n) { + return D( + (function (e, t) { + for ( + var r, n, i, o = [], s = 0; + s < e.length && !((t -= 2) < 0); + ++s + ) + (r = e.charCodeAt(s)), + (n = r >> 8), + (i = r % 256), + o.push(i), + o.push(n); + return o; + })(t, e.length - r), + e, + r, + n, + ); + } + function j(e, t, r) { + return 0 === t && r === e.length + ? n.fromByteArray(e) + : n.fromByteArray(e.slice(t, r)); + } + function T(e, t, r) { + r = Math.min(e.length, r); + for (var n = [], i = t; i < r; ) { + var o, + s, + a, + u, + f = e[i], + l = null, + c = f > 239 ? 4 : f > 223 ? 3 : f > 191 ? 2 : 1; + if (i + c <= r) + switch (c) { + case 1: + f < 128 && (l = f); + break; + case 2: + 128 == (192 & (o = e[i + 1])) && + (u = ((31 & f) << 6) | (63 & o)) > 127 && + (l = u); + break; + case 3: + (o = e[i + 1]), + (s = e[i + 2]), + 128 == (192 & o) && + 128 == (192 & s) && + (u = ((15 & f) << 12) | ((63 & o) << 6) | (63 & s)) > + 2047 && + (u < 55296 || u > 57343) && + (l = u); + break; + case 4: + (o = e[i + 1]), + (s = e[i + 2]), + (a = e[i + 3]), + 128 == (192 & o) && + 128 == (192 & s) && + 128 == (192 & a) && + (u = + ((15 & f) << 18) | + ((63 & o) << 12) | + ((63 & s) << 6) | + (63 & a)) > 65535 && + u < 1114112 && + (l = u); + } + null === l + ? ((l = 65533), (c = 1)) + : l > 65535 && + ((l -= 65536), + n.push(((l >>> 10) & 1023) | 55296), + (l = 56320 | (1023 & l))), + n.push(l), + (i += c); + } + return (function (e) { + var t = e.length; + if (t <= O) return String.fromCharCode.apply(String, e); + var r = "", + n = 0; + for (; n < t; ) + r += String.fromCharCode.apply(String, e.slice(n, (n += O))); + return r; + })(n); + } + (r.kMaxLength = o), + (t.TYPED_ARRAY_SUPPORT = (function () { + try { + var e = new Uint8Array(1); + return ( + (e.__proto__ = { + __proto__: Uint8Array.prototype, + foo: function () { + return 42; + }, + }), + 42 === e.foo() + ); + } catch (e) { + return !1; + } + })()), + t.TYPED_ARRAY_SUPPORT || + "undefined" == typeof console || + "function" != typeof console.error || + console.error( + "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.", + ), + Object.defineProperty(t.prototype, "parent", { + enumerable: !0, + get: function () { + if (t.isBuffer(this)) return this.buffer; + }, + }), + Object.defineProperty(t.prototype, "offset", { + enumerable: !0, + get: function () { + if (t.isBuffer(this)) return this.byteOffset; + }, + }), + "undefined" != typeof Symbol && + null != Symbol.species && + t[Symbol.species] === t && + Object.defineProperty(t, Symbol.species, { + value: null, + configurable: !0, + enumerable: !1, + writable: !1, + }), + (t.poolSize = 8192), + (t.from = function (e, t, r) { + return a(e, t, r); + }), + (t.prototype.__proto__ = Uint8Array.prototype), + (t.__proto__ = Uint8Array), + (t.alloc = function (e, t, r) { + return (function (e, t, r) { + return ( + u(e), + e <= 0 + ? s(e) + : void 0 !== t + ? "string" == typeof r + ? s(e).fill(t, r) + : s(e).fill(t) + : s(e) + ); + })(e, t, r); + }), + (t.allocUnsafe = function (e) { + return f(e); + }), + (t.allocUnsafeSlow = function (e) { + return f(e); + }), + (t.isBuffer = function (e) { + return null != e && !0 === e._isBuffer && e !== t.prototype; + }), + (t.compare = function (e, r) { + if ( + (N(e, Uint8Array) && (e = t.from(e, e.offset, e.byteLength)), + N(r, Uint8Array) && (r = t.from(r, r.offset, r.byteLength)), + !t.isBuffer(e) || !t.isBuffer(r)) + ) + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array', + ); + if (e === r) return 0; + for ( + var n = e.length, i = r.length, o = 0, s = Math.min(n, i); + o < s; + ++o + ) + if (e[o] !== r[o]) { + (n = e[o]), (i = r[o]); + break; + } + return n < i ? -1 : i < n ? 1 : 0; + }), + (t.isEncoding = function (e) { + switch (String(e).toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "latin1": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return !0; + default: + return !1; + } + }), + (t.concat = function (e, r) { + if (!Array.isArray(e)) + throw new TypeError( + '"list" argument must be an Array of Buffers', + ); + if (0 === e.length) return t.alloc(0); + var n; + if (void 0 === r) + for (r = 0, n = 0; n < e.length; ++n) r += e[n].length; + var i = t.allocUnsafe(r), + o = 0; + for (n = 0; n < e.length; ++n) { + var s = e[n]; + if ((N(s, Uint8Array) && (s = t.from(s)), !t.isBuffer(s))) + throw new TypeError( + '"list" argument must be an Array of Buffers', + ); + s.copy(i, o), (o += s.length); + } + return i; + }), + (t.byteLength = h), + (t.prototype._isBuffer = !0), + (t.prototype.swap16 = function () { + var e = this.length; + if (e % 2 != 0) + throw new RangeError( + "Buffer size must be a multiple of 16-bits", + ); + for (var t = 0; t < e; t += 2) d(this, t, t + 1); + return this; + }), + (t.prototype.swap32 = function () { + var e = this.length; + if (e % 4 != 0) + throw new RangeError( + "Buffer size must be a multiple of 32-bits", + ); + for (var t = 0; t < e; t += 4) + d(this, t, t + 3), d(this, t + 1, t + 2); + return this; + }), + (t.prototype.swap64 = function () { + var e = this.length; + if (e % 8 != 0) + throw new RangeError( + "Buffer size must be a multiple of 64-bits", + ); + for (var t = 0; t < e; t += 8) + d(this, t, t + 7), + d(this, t + 1, t + 6), + d(this, t + 2, t + 5), + d(this, t + 3, t + 4); + return this; + }), + (t.prototype.toString = function () { + var e = this.length; + return 0 === e + ? "" + : 0 === arguments.length + ? T(this, 0, e) + : function (e, t, r) { + var n = !1; + if (((void 0 === t || t < 0) && (t = 0), t > this.length)) + return ""; + if ( + ((void 0 === r || r > this.length) && (r = this.length), + r <= 0) + ) + return ""; + if ((r >>>= 0) <= (t >>>= 0)) return ""; + for (e || (e = "utf8"); ; ) + switch (e) { + case "hex": + return k(this, t, r); + case "utf8": + case "utf-8": + return T(this, t, r); + case "ascii": + return S(this, t, r); + case "latin1": + case "binary": + return C(this, t, r); + case "base64": + return j(this, t, r); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return E(this, t, r); + default: + if (n) + throw new TypeError("Unknown encoding: " + e); + (e = (e + "").toLowerCase()), (n = !0); + } + }.apply(this, arguments); + }), + (t.prototype.toLocaleString = t.prototype.toString), + (t.prototype.equals = function (e) { + if (!t.isBuffer(e)) + throw new TypeError("Argument must be a Buffer"); + return this === e || 0 === t.compare(this, e); + }), + (t.prototype.inspect = function () { + var e = "", + t = r.INSPECT_MAX_BYTES; + return ( + (e = this.toString("hex", 0, t) + .replace(/(.{2})/g, "$1 ") + .trim()), + this.length > t && (e += " ... "), + "" + ); + }), + (t.prototype.compare = function (e, r, n, i, o) { + if ( + (N(e, Uint8Array) && (e = t.from(e, e.offset, e.byteLength)), + !t.isBuffer(e)) + ) + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + + typeof e, + ); + if ( + (void 0 === r && (r = 0), + void 0 === n && (n = e ? e.length : 0), + void 0 === i && (i = 0), + void 0 === o && (o = this.length), + r < 0 || n > e.length || i < 0 || o > this.length) + ) + throw new RangeError("out of range index"); + if (i >= o && r >= n) return 0; + if (i >= o) return -1; + if (r >= n) return 1; + if (this === e) return 0; + for ( + var s = (o >>>= 0) - (i >>>= 0), + a = (n >>>= 0) - (r >>>= 0), + u = Math.min(s, a), + f = this.slice(i, o), + l = e.slice(r, n), + c = 0; + c < u; + ++c + ) + if (f[c] !== l[c]) { + (s = f[c]), (a = l[c]); + break; + } + return s < a ? -1 : a < s ? 1 : 0; + }), + (t.prototype.includes = function (e, t, r) { + return -1 !== this.indexOf(e, t, r); + }), + (t.prototype.indexOf = function (e, t, r) { + return p(this, e, t, r, !0); + }), + (t.prototype.lastIndexOf = function (e, t, r) { + return p(this, e, t, r, !1); + }), + (t.prototype.write = function (e, t, r, n) { + if (void 0 === t) (n = "utf8"), (r = this.length), (t = 0); + else if (void 0 === r && "string" == typeof t) + (n = t), (r = this.length), (t = 0); + else { + if (!isFinite(t)) + throw new Error( + "Buffer.write(string, encoding, offset[, length]) is no longer supported", + ); + (t >>>= 0), + isFinite(r) + ? ((r >>>= 0), void 0 === n && (n = "utf8")) + : ((n = r), (r = void 0)); + } + var i = this.length - t; + if ( + ((void 0 === r || r > i) && (r = i), + (e.length > 0 && (r < 0 || t < 0)) || t > this.length) + ) + throw new RangeError( + "Attempt to write outside buffer bounds", + ); + n || (n = "utf8"); + for (var o = !1; ; ) + switch (n) { + case "hex": + return m(this, e, t, r); + case "utf8": + case "utf-8": + return g(this, e, t, r); + case "ascii": + return b(this, e, t, r); + case "latin1": + case "binary": + return v(this, e, t, r); + case "base64": + return w(this, e, t, r); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return _(this, e, t, r); + default: + if (o) throw new TypeError("Unknown encoding: " + n); + (n = ("" + n).toLowerCase()), (o = !0); + } + }), + (t.prototype.toJSON = function () { + return { + type: "Buffer", + data: Array.prototype.slice.call(this._arr || this, 0), + }; + }); + var O = 4096; + function S(e, t, r) { + var n = ""; + r = Math.min(e.length, r); + for (var i = t; i < r; ++i) n += String.fromCharCode(127 & e[i]); + return n; + } + function C(e, t, r) { + var n = ""; + r = Math.min(e.length, r); + for (var i = t; i < r; ++i) n += String.fromCharCode(e[i]); + return n; + } + function k(e, t, r) { + var n = e.length; + (!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n); + for (var i = "", o = t; o < r; ++o) i += L(e[o]); + return i; + } + function E(e, t, r) { + for (var n = e.slice(t, r), i = "", o = 0; o < n.length; o += 2) + i += String.fromCharCode(n[o] + 256 * n[o + 1]); + return i; + } + function P(e, t, r) { + if (e % 1 != 0 || e < 0) + throw new RangeError("offset is not uint"); + if (e + t > r) + throw new RangeError("Trying to access beyond buffer length"); + } + function x(e, r, n, i, o, s) { + if (!t.isBuffer(e)) + throw new TypeError( + '"buffer" argument must be a Buffer instance', + ); + if (r > o || r < s) + throw new RangeError('"value" argument is out of bounds'); + if (n + i > e.length) throw new RangeError("Index out of range"); + } + function R(e, t, r, n, i, o) { + if (r + n > e.length) throw new RangeError("Index out of range"); + if (r < 0) throw new RangeError("Index out of range"); + } + function A(e, t, r, n, o) { + return ( + (t = +t), + (r >>>= 0), + o || R(e, 0, r, 4), + i.write(e, t, r, n, 23, 4), + r + 4 + ); + } + function M(e, t, r, n, o) { + return ( + (t = +t), + (r >>>= 0), + o || R(e, 0, r, 8), + i.write(e, t, r, n, 52, 8), + r + 8 + ); + } + (t.prototype.slice = function (e, r) { + var n = this.length; + (e = ~~e) < 0 ? (e += n) < 0 && (e = 0) : e > n && (e = n), + (r = void 0 === r ? n : ~~r) < 0 + ? (r += n) < 0 && (r = 0) + : r > n && (r = n), + r < e && (r = e); + var i = this.subarray(e, r); + return (i.__proto__ = t.prototype), i; + }), + (t.prototype.readUIntLE = function (e, t, r) { + (e >>>= 0), (t >>>= 0), r || P(e, t, this.length); + for (var n = this[e], i = 1, o = 0; ++o < t && (i *= 256); ) + n += this[e + o] * i; + return n; + }), + (t.prototype.readUIntBE = function (e, t, r) { + (e >>>= 0), (t >>>= 0), r || P(e, t, this.length); + for (var n = this[e + --t], i = 1; t > 0 && (i *= 256); ) + n += this[e + --t] * i; + return n; + }), + (t.prototype.readUInt8 = function (e, t) { + return (e >>>= 0), t || P(e, 1, this.length), this[e]; + }), + (t.prototype.readUInt16LE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 2, this.length), + this[e] | (this[e + 1] << 8) + ); + }), + (t.prototype.readUInt16BE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 2, this.length), + (this[e] << 8) | this[e + 1] + ); + }), + (t.prototype.readUInt32LE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 4, this.length), + (this[e] | (this[e + 1] << 8) | (this[e + 2] << 16)) + + 16777216 * this[e + 3] + ); + }), + (t.prototype.readUInt32BE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 4, this.length), + 16777216 * this[e] + + ((this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3]) + ); + }), + (t.prototype.readIntLE = function (e, t, r) { + (e >>>= 0), (t >>>= 0), r || P(e, t, this.length); + for (var n = this[e], i = 1, o = 0; ++o < t && (i *= 256); ) + n += this[e + o] * i; + return n >= (i *= 128) && (n -= Math.pow(2, 8 * t)), n; + }), + (t.prototype.readIntBE = function (e, t, r) { + (e >>>= 0), (t >>>= 0), r || P(e, t, this.length); + for (var n = t, i = 1, o = this[e + --n]; n > 0 && (i *= 256); ) + o += this[e + --n] * i; + return o >= (i *= 128) && (o -= Math.pow(2, 8 * t)), o; + }), + (t.prototype.readInt8 = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 1, this.length), + 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e] + ); + }), + (t.prototype.readInt16LE = function (e, t) { + (e >>>= 0), t || P(e, 2, this.length); + var r = this[e] | (this[e + 1] << 8); + return 32768 & r ? 4294901760 | r : r; + }), + (t.prototype.readInt16BE = function (e, t) { + (e >>>= 0), t || P(e, 2, this.length); + var r = this[e + 1] | (this[e] << 8); + return 32768 & r ? 4294901760 | r : r; + }), + (t.prototype.readInt32LE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 4, this.length), + this[e] | + (this[e + 1] << 8) | + (this[e + 2] << 16) | + (this[e + 3] << 24) + ); + }), + (t.prototype.readInt32BE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 4, this.length), + (this[e] << 24) | + (this[e + 1] << 16) | + (this[e + 2] << 8) | + this[e + 3] + ); + }), + (t.prototype.readFloatLE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 4, this.length), + i.read(this, e, !0, 23, 4) + ); + }), + (t.prototype.readFloatBE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 4, this.length), + i.read(this, e, !1, 23, 4) + ); + }), + (t.prototype.readDoubleLE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 8, this.length), + i.read(this, e, !0, 52, 8) + ); + }), + (t.prototype.readDoubleBE = function (e, t) { + return ( + (e >>>= 0), + t || P(e, 8, this.length), + i.read(this, e, !1, 52, 8) + ); + }), + (t.prototype.writeUIntLE = function (e, t, r, n) { + ((e = +e), (t >>>= 0), (r >>>= 0), n) || + x(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); + var i = 1, + o = 0; + for (this[t] = 255 & e; ++o < r && (i *= 256); ) + this[t + o] = (e / i) & 255; + return t + r; + }), + (t.prototype.writeUIntBE = function (e, t, r, n) { + ((e = +e), (t >>>= 0), (r >>>= 0), n) || + x(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); + var i = r - 1, + o = 1; + for (this[t + i] = 255 & e; --i >= 0 && (o *= 256); ) + this[t + i] = (e / o) & 255; + return t + r; + }), + (t.prototype.writeUInt8 = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 1, 255, 0), + (this[t] = 255 & e), + t + 1 + ); + }), + (t.prototype.writeUInt16LE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 2, 65535, 0), + (this[t] = 255 & e), + (this[t + 1] = e >>> 8), + t + 2 + ); + }), + (t.prototype.writeUInt16BE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 2, 65535, 0), + (this[t] = e >>> 8), + (this[t + 1] = 255 & e), + t + 2 + ); + }), + (t.prototype.writeUInt32LE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 4, 4294967295, 0), + (this[t + 3] = e >>> 24), + (this[t + 2] = e >>> 16), + (this[t + 1] = e >>> 8), + (this[t] = 255 & e), + t + 4 + ); + }), + (t.prototype.writeUInt32BE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 4, 4294967295, 0), + (this[t] = e >>> 24), + (this[t + 1] = e >>> 16), + (this[t + 2] = e >>> 8), + (this[t + 3] = 255 & e), + t + 4 + ); + }), + (t.prototype.writeIntLE = function (e, t, r, n) { + if (((e = +e), (t >>>= 0), !n)) { + var i = Math.pow(2, 8 * r - 1); + x(this, e, t, r, i - 1, -i); + } + var o = 0, + s = 1, + a = 0; + for (this[t] = 255 & e; ++o < r && (s *= 256); ) + e < 0 && 0 === a && 0 !== this[t + o - 1] && (a = 1), + (this[t + o] = (((e / s) >> 0) - a) & 255); + return t + r; + }), + (t.prototype.writeIntBE = function (e, t, r, n) { + if (((e = +e), (t >>>= 0), !n)) { + var i = Math.pow(2, 8 * r - 1); + x(this, e, t, r, i - 1, -i); + } + var o = r - 1, + s = 1, + a = 0; + for (this[t + o] = 255 & e; --o >= 0 && (s *= 256); ) + e < 0 && 0 === a && 0 !== this[t + o + 1] && (a = 1), + (this[t + o] = (((e / s) >> 0) - a) & 255); + return t + r; + }), + (t.prototype.writeInt8 = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 1, 127, -128), + e < 0 && (e = 255 + e + 1), + (this[t] = 255 & e), + t + 1 + ); + }), + (t.prototype.writeInt16LE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 2, 32767, -32768), + (this[t] = 255 & e), + (this[t + 1] = e >>> 8), + t + 2 + ); + }), + (t.prototype.writeInt16BE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 2, 32767, -32768), + (this[t] = e >>> 8), + (this[t + 1] = 255 & e), + t + 2 + ); + }), + (t.prototype.writeInt32LE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 4, 2147483647, -2147483648), + (this[t] = 255 & e), + (this[t + 1] = e >>> 8), + (this[t + 2] = e >>> 16), + (this[t + 3] = e >>> 24), + t + 4 + ); + }), + (t.prototype.writeInt32BE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || x(this, e, t, 4, 2147483647, -2147483648), + e < 0 && (e = 4294967295 + e + 1), + (this[t] = e >>> 24), + (this[t + 1] = e >>> 16), + (this[t + 2] = e >>> 8), + (this[t + 3] = 255 & e), + t + 4 + ); + }), + (t.prototype.writeFloatLE = function (e, t, r) { + return A(this, e, t, !0, r); + }), + (t.prototype.writeFloatBE = function (e, t, r) { + return A(this, e, t, !1, r); + }), + (t.prototype.writeDoubleLE = function (e, t, r) { + return M(this, e, t, !0, r); + }), + (t.prototype.writeDoubleBE = function (e, t, r) { + return M(this, e, t, !1, r); + }), + (t.prototype.copy = function (e, r, n, i) { + if (!t.isBuffer(e)) + throw new TypeError("argument should be a Buffer"); + if ( + (n || (n = 0), + i || 0 === i || (i = this.length), + r >= e.length && (r = e.length), + r || (r = 0), + i > 0 && i < n && (i = n), + i === n) + ) + return 0; + if (0 === e.length || 0 === this.length) return 0; + if (r < 0) throw new RangeError("targetStart out of bounds"); + if (n < 0 || n >= this.length) + throw new RangeError("Index out of range"); + if (i < 0) throw new RangeError("sourceEnd out of bounds"); + i > this.length && (i = this.length), + e.length - r < i - n && (i = e.length - r + n); + var o = i - n; + if ( + this === e && + "function" == typeof Uint8Array.prototype.copyWithin + ) + this.copyWithin(r, n, i); + else if (this === e && n < r && r < i) + for (var s = o - 1; s >= 0; --s) e[s + r] = this[s + n]; + else Uint8Array.prototype.set.call(e, this.subarray(n, i), r); + return o; + }), + (t.prototype.fill = function (e, r, n, i) { + if ("string" == typeof e) { + if ( + ("string" == typeof r + ? ((i = r), (r = 0), (n = this.length)) + : "string" == typeof n && ((i = n), (n = this.length)), + void 0 !== i && "string" != typeof i) + ) + throw new TypeError("encoding must be a string"); + if ("string" == typeof i && !t.isEncoding(i)) + throw new TypeError("Unknown encoding: " + i); + if (1 === e.length) { + var o = e.charCodeAt(0); + (("utf8" === i && o < 128) || "latin1" === i) && (e = o); + } + } else "number" == typeof e && (e &= 255); + if (r < 0 || this.length < r || this.length < n) + throw new RangeError("Out of range index"); + if (n <= r) return this; + var s; + if ( + ((r >>>= 0), + (n = void 0 === n ? this.length : n >>> 0), + e || (e = 0), + "number" == typeof e) + ) + for (s = r; s < n; ++s) this[s] = e; + else { + var a = t.isBuffer(e) ? e : t.from(e, i), + u = a.length; + if (0 === u) + throw new TypeError( + 'The value "' + e + '" is invalid for argument "value"', + ); + for (s = 0; s < n - r; ++s) this[s + r] = a[s % u]; + } + return this; + }); + var F = /[^+/0-9A-Za-z-_]/g; + function L(e) { + return e < 16 ? "0" + e.toString(16) : e.toString(16); + } + function B(e, t) { + var r; + t = t || 1 / 0; + for (var n = e.length, i = null, o = [], s = 0; s < n; ++s) { + if ((r = e.charCodeAt(s)) > 55295 && r < 57344) { + if (!i) { + if (r > 56319) { + (t -= 3) > -1 && o.push(239, 191, 189); + continue; + } + if (s + 1 === n) { + (t -= 3) > -1 && o.push(239, 191, 189); + continue; + } + i = r; + continue; + } + if (r < 56320) { + (t -= 3) > -1 && o.push(239, 191, 189), (i = r); + continue; + } + r = 65536 + (((i - 55296) << 10) | (r - 56320)); + } else i && (t -= 3) > -1 && o.push(239, 191, 189); + if (((i = null), r < 128)) { + if ((t -= 1) < 0) break; + o.push(r); + } else if (r < 2048) { + if ((t -= 2) < 0) break; + o.push((r >> 6) | 192, (63 & r) | 128); + } else if (r < 65536) { + if ((t -= 3) < 0) break; + o.push( + (r >> 12) | 224, + ((r >> 6) & 63) | 128, + (63 & r) | 128, + ); + } else { + if (!(r < 1114112)) throw new Error("Invalid code point"); + if ((t -= 4) < 0) break; + o.push( + (r >> 18) | 240, + ((r >> 12) & 63) | 128, + ((r >> 6) & 63) | 128, + (63 & r) | 128, + ); + } + } + return o; + } + function U(e) { + return n.toByteArray( + (function (e) { + if ( + (e = (e = e.split("=")[0]).trim().replace(F, "")).length < 2 + ) + return ""; + for (; e.length % 4 != 0; ) e += "="; + return e; + })(e), + ); + } + function D(e, t, r, n) { + for ( + var i = 0; + i < n && !(i + r >= t.length || i >= e.length); + ++i + ) + t[i + r] = e[i]; + return i; + } + function N(e, t) { + return ( + e instanceof t || + (null != e && + null != e.constructor && + null != e.constructor.name && + e.constructor.name === t.name) + ); + } + function I(e) { + return e != e; + } + }).call(this, e("buffer").Buffer); + }, + { "base64-js": 34, buffer: 37, ieee754: 40 }, + ], + 38: [ + function (e, t, r) { + (function (e) { + function t(e) { + return Object.prototype.toString.call(e); + } + (r.isArray = function (e) { + return Array.isArray + ? Array.isArray(e) + : "[object Array]" === t(e); + }), + (r.isBoolean = function (e) { + return "boolean" == typeof e; + }), + (r.isNull = function (e) { + return null === e; + }), + (r.isNullOrUndefined = function (e) { + return null == e; + }), + (r.isNumber = function (e) { + return "number" == typeof e; + }), + (r.isString = function (e) { + return "string" == typeof e; + }), + (r.isSymbol = function (e) { + return "symbol" == typeof e; + }), + (r.isUndefined = function (e) { + return void 0 === e; + }), + (r.isRegExp = function (e) { + return "[object RegExp]" === t(e); + }), + (r.isObject = function (e) { + return "object" == typeof e && null !== e; + }), + (r.isDate = function (e) { + return "[object Date]" === t(e); + }), + (r.isError = function (e) { + return "[object Error]" === t(e) || e instanceof Error; + }), + (r.isFunction = function (e) { + return "function" == typeof e; + }), + (r.isPrimitive = function (e) { + return ( + null === e || + "boolean" == typeof e || + "number" == typeof e || + "string" == typeof e || + "symbol" == typeof e || + void 0 === e + ); + }), + (r.isBuffer = e.isBuffer); + }).call(this, { isBuffer: e("../../is-buffer/index.js") }); + }, + { "../../is-buffer/index.js": 42 }, + ], + 39: [ + function (e, t, r) { + var n = + Object.create || + function (e) { + var t = function () {}; + return (t.prototype = e), new t(); + }, + i = + Object.keys || + function (e) { + var t = []; + for (var r in e) + Object.prototype.hasOwnProperty.call(e, r) && t.push(r); + return r; + }, + o = + Function.prototype.bind || + function (e) { + var t = this; + return function () { + return t.apply(e, arguments); + }; + }; + function s() { + (this._events && + Object.prototype.hasOwnProperty.call(this, "_events")) || + ((this._events = n(null)), (this._eventsCount = 0)), + (this._maxListeners = this._maxListeners || void 0); + } + (t.exports = s), + (s.EventEmitter = s), + (s.prototype._events = void 0), + (s.prototype._maxListeners = void 0); + var a, + u = 10; + try { + var f = {}; + Object.defineProperty && + Object.defineProperty(f, "x", { value: 0 }), + (a = 0 === f.x); + } catch (e) { + a = !1; + } + function l(e) { + return void 0 === e._maxListeners + ? s.defaultMaxListeners + : e._maxListeners; + } + function c(e, t, r, i) { + var o, s, a; + if ("function" != typeof r) + throw new TypeError('"listener" argument must be a function'); + if ( + ((s = e._events) + ? (s.newListener && + (e.emit("newListener", t, r.listener ? r.listener : r), + (s = e._events)), + (a = s[t])) + : ((s = e._events = n(null)), (e._eventsCount = 0)), + a) + ) { + if ( + ("function" == typeof a + ? (a = s[t] = i ? [r, a] : [a, r]) + : i + ? a.unshift(r) + : a.push(r), + !a.warned && (o = l(e)) && o > 0 && a.length > o) + ) { + a.warned = !0; + var u = new Error( + "Possible EventEmitter memory leak detected. " + + a.length + + ' "' + + String(t) + + '" listeners added. Use emitter.setMaxListeners() to increase limit.', + ); + (u.name = "MaxListenersExceededWarning"), + (u.emitter = e), + (u.type = t), + (u.count = a.length), + "object" == typeof console && + console.warn && + console.warn("%s: %s", u.name, u.message); + } + } else (a = s[t] = r), ++e._eventsCount; + return e; + } + function h() { + if (!this.fired) + switch ( + (this.target.removeListener(this.type, this.wrapFn), + (this.fired = !0), + arguments.length) + ) { + case 0: + return this.listener.call(this.target); + case 1: + return this.listener.call(this.target, arguments[0]); + case 2: + return this.listener.call( + this.target, + arguments[0], + arguments[1], + ); + case 3: + return this.listener.call( + this.target, + arguments[0], + arguments[1], + arguments[2], + ); + default: + for ( + var e = new Array(arguments.length), t = 0; + t < e.length; + ++t + ) + e[t] = arguments[t]; + this.listener.apply(this.target, e); + } + } + function d(e, t, r) { + var n = { + fired: !1, + wrapFn: void 0, + target: e, + type: t, + listener: r, + }, + i = o.call(h, n); + return (i.listener = r), (n.wrapFn = i), i; + } + function p(e, t, r) { + var n = e._events; + if (!n) return []; + var i = n[t]; + return i + ? "function" == typeof i + ? r + ? [i.listener || i] + : [i] + : r + ? (function (e) { + for (var t = new Array(e.length), r = 0; r < t.length; ++r) + t[r] = e[r].listener || e[r]; + return t; + })(i) + : m(i, i.length) + : []; + } + function y(e) { + var t = this._events; + if (t) { + var r = t[e]; + if ("function" == typeof r) return 1; + if (r) return r.length; + } + return 0; + } + function m(e, t) { + for (var r = new Array(t), n = 0; n < t; ++n) r[n] = e[n]; + return r; + } + a + ? Object.defineProperty(s, "defaultMaxListeners", { + enumerable: !0, + get: function () { + return u; + }, + set: function (e) { + if ("number" != typeof e || e < 0 || e != e) + throw new TypeError( + '"defaultMaxListeners" must be a positive number', + ); + u = e; + }, + }) + : (s.defaultMaxListeners = u), + (s.prototype.setMaxListeners = function (e) { + if ("number" != typeof e || e < 0 || isNaN(e)) + throw new TypeError('"n" argument must be a positive number'); + return (this._maxListeners = e), this; + }), + (s.prototype.getMaxListeners = function () { + return l(this); + }), + (s.prototype.emit = function (e) { + var t, + r, + n, + i, + o, + s, + a = "error" === e; + if ((s = this._events)) a = a && null == s.error; + else if (!a) return !1; + if (a) { + if ( + (arguments.length > 1 && (t = arguments[1]), + t instanceof Error) + ) + throw t; + var u = new Error('Unhandled "error" event. (' + t + ")"); + throw ((u.context = t), u); + } + if (!(r = s[e])) return !1; + var f = "function" == typeof r; + switch ((n = arguments.length)) { + case 1: + !(function (e, t, r) { + if (t) e.call(r); + else + for (var n = e.length, i = m(e, n), o = 0; o < n; ++o) + i[o].call(r); + })(r, f, this); + break; + case 2: + !(function (e, t, r, n) { + if (t) e.call(r, n); + else + for (var i = e.length, o = m(e, i), s = 0; s < i; ++s) + o[s].call(r, n); + })(r, f, this, arguments[1]); + break; + case 3: + !(function (e, t, r, n, i) { + if (t) e.call(r, n, i); + else + for (var o = e.length, s = m(e, o), a = 0; a < o; ++a) + s[a].call(r, n, i); + })(r, f, this, arguments[1], arguments[2]); + break; + case 4: + !(function (e, t, r, n, i, o) { + if (t) e.call(r, n, i, o); + else + for (var s = e.length, a = m(e, s), u = 0; u < s; ++u) + a[u].call(r, n, i, o); + })(r, f, this, arguments[1], arguments[2], arguments[3]); + break; + default: + for (i = new Array(n - 1), o = 1; o < n; o++) + i[o - 1] = arguments[o]; + !(function (e, t, r, n) { + if (t) e.apply(r, n); + else + for (var i = e.length, o = m(e, i), s = 0; s < i; ++s) + o[s].apply(r, n); + })(r, f, this, i); + } + return !0; + }), + (s.prototype.addListener = function (e, t) { + return c(this, e, t, !1); + }), + (s.prototype.on = s.prototype.addListener), + (s.prototype.prependListener = function (e, t) { + return c(this, e, t, !0); + }), + (s.prototype.once = function (e, t) { + if ("function" != typeof t) + throw new TypeError('"listener" argument must be a function'); + return this.on(e, d(this, e, t)), this; + }), + (s.prototype.prependOnceListener = function (e, t) { + if ("function" != typeof t) + throw new TypeError('"listener" argument must be a function'); + return this.prependListener(e, d(this, e, t)), this; + }), + (s.prototype.removeListener = function (e, t) { + var r, i, o, s, a; + if ("function" != typeof t) + throw new TypeError('"listener" argument must be a function'); + if (!(i = this._events)) return this; + if (!(r = i[e])) return this; + if (r === t || r.listener === t) + 0 == --this._eventsCount + ? (this._events = n(null)) + : (delete i[e], + i.removeListener && + this.emit("removeListener", e, r.listener || t)); + else if ("function" != typeof r) { + for (o = -1, s = r.length - 1; s >= 0; s--) + if (r[s] === t || r[s].listener === t) { + (a = r[s].listener), (o = s); + break; + } + if (o < 0) return this; + 0 === o + ? r.shift() + : (function (e, t) { + for ( + var r = t, n = r + 1, i = e.length; + n < i; + r += 1, n += 1 + ) + e[r] = e[n]; + e.pop(); + })(r, o), + 1 === r.length && (i[e] = r[0]), + i.removeListener && this.emit("removeListener", e, a || t); + } + return this; + }), + (s.prototype.removeAllListeners = function (e) { + var t, r, o; + if (!(r = this._events)) return this; + if (!r.removeListener) + return ( + 0 === arguments.length + ? ((this._events = n(null)), (this._eventsCount = 0)) + : r[e] && + (0 == --this._eventsCount + ? (this._events = n(null)) + : delete r[e]), + this + ); + if (0 === arguments.length) { + var s, + a = i(r); + for (o = 0; o < a.length; ++o) + "removeListener" !== (s = a[o]) && this.removeAllListeners(s); + return ( + this.removeAllListeners("removeListener"), + (this._events = n(null)), + (this._eventsCount = 0), + this + ); + } + if ("function" == typeof (t = r[e])) this.removeListener(e, t); + else if (t) + for (o = t.length - 1; o >= 0; o--) + this.removeListener(e, t[o]); + return this; + }), + (s.prototype.listeners = function (e) { + return p(this, e, !0); + }), + (s.prototype.rawListeners = function (e) { + return p(this, e, !1); + }), + (s.listenerCount = function (e, t) { + return "function" == typeof e.listenerCount + ? e.listenerCount(t) + : y.call(e, t); + }), + (s.prototype.listenerCount = y), + (s.prototype.eventNames = function () { + return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; + }); + }, + {}, + ], + 40: [ + function (e, t, r) { + (r.read = function (e, t, r, n, i) { + var o, + s, + a = 8 * i - n - 1, + u = (1 << a) - 1, + f = u >> 1, + l = -7, + c = r ? i - 1 : 0, + h = r ? -1 : 1, + d = e[t + c]; + for ( + c += h, o = d & ((1 << -l) - 1), d >>= -l, l += a; + l > 0; + o = 256 * o + e[t + c], c += h, l -= 8 + ); + for ( + s = o & ((1 << -l) - 1), o >>= -l, l += n; + l > 0; + s = 256 * s + e[t + c], c += h, l -= 8 + ); + if (0 === o) o = 1 - f; + else { + if (o === u) return s ? NaN : (1 / 0) * (d ? -1 : 1); + (s += Math.pow(2, n)), (o -= f); + } + return (d ? -1 : 1) * s * Math.pow(2, o - n); + }), + (r.write = function (e, t, r, n, i, o) { + var s, + a, + u, + f = 8 * o - i - 1, + l = (1 << f) - 1, + c = l >> 1, + h = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, + d = n ? 0 : o - 1, + p = n ? 1 : -1, + y = t < 0 || (0 === t && 1 / t < 0) ? 1 : 0; + for ( + t = Math.abs(t), + isNaN(t) || t === 1 / 0 + ? ((a = isNaN(t) ? 1 : 0), (s = l)) + : ((s = Math.floor(Math.log(t) / Math.LN2)), + t * (u = Math.pow(2, -s)) < 1 && (s--, (u *= 2)), + (t += s + c >= 1 ? h / u : h * Math.pow(2, 1 - c)) * u >= + 2 && (s++, (u /= 2)), + s + c >= l + ? ((a = 0), (s = l)) + : s + c >= 1 + ? ((a = (t * u - 1) * Math.pow(2, i)), (s += c)) + : ((a = t * Math.pow(2, c - 1) * Math.pow(2, i)), + (s = 0))); + i >= 8; + e[r + d] = 255 & a, d += p, a /= 256, i -= 8 + ); + for ( + s = (s << i) | a, f += i; + f > 0; + e[r + d] = 255 & s, d += p, s /= 256, f -= 8 + ); + e[r + d - p] |= 128 * y; + }); + }, + {}, + ], + 41: [ + function (e, t, r) { + "function" == typeof Object.create + ? (t.exports = function (e, t) { + t && + ((e.super_ = t), + (e.prototype = Object.create(t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0, + }, + }))); + }) + : (t.exports = function (e, t) { + if (t) { + e.super_ = t; + var r = function () {}; + (r.prototype = t.prototype), + (e.prototype = new r()), + (e.prototype.constructor = e); + } + }); + }, + {}, + ], + 42: [ + function (e, t, r) { + function n(e) { + return ( + !!e.constructor && + "function" == typeof e.constructor.isBuffer && + e.constructor.isBuffer(e) + ); + } + t.exports = function (e) { + return ( + null != e && + (n(e) || + (function (e) { + return ( + "function" == typeof e.readFloatLE && + "function" == typeof e.slice && + n(e.slice(0, 0)) + ); + })(e) || + !!e._isBuffer) + ); + }; + }, + {}, + ], + 43: [ + function (e, t, r) { + var n = {}.toString; + t.exports = + Array.isArray || + function (e) { + return "[object Array]" == n.call(e); + }; + }, + {}, + ], + 44: [ + function (e, t, r) { + (function (e) { + "use strict"; + void 0 === e || + !e.version || + 0 === e.version.indexOf("v0.") || + (0 === e.version.indexOf("v1.") && 0 !== e.version.indexOf("v1.8.")) + ? (t.exports = { + nextTick: function (t, r, n, i) { + if ("function" != typeof t) + throw new TypeError( + '"callback" argument must be a function', + ); + var o, + s, + a = arguments.length; + switch (a) { + case 0: + case 1: + return e.nextTick(t); + case 2: + return e.nextTick(function () { + t.call(null, r); + }); + case 3: + return e.nextTick(function () { + t.call(null, r, n); + }); + case 4: + return e.nextTick(function () { + t.call(null, r, n, i); + }); + default: + for (o = new Array(a - 1), s = 0; s < o.length; ) + o[s++] = arguments[s]; + return e.nextTick(function () { + t.apply(null, o); + }); + } + }, + }) + : (t.exports = e); + }).call(this, e("_process")); + }, + { _process: 45 }, + ], + 45: [ + function (e, t, r) { + var n, + i, + o = (t.exports = {}); + function s() { + throw new Error("setTimeout has not been defined"); + } + function a() { + throw new Error("clearTimeout has not been defined"); + } + function u(e) { + if (n === setTimeout) return setTimeout(e, 0); + if ((n === s || !n) && setTimeout) + return (n = setTimeout), setTimeout(e, 0); + try { + return n(e, 0); + } catch (t) { + try { + return n.call(null, e, 0); + } catch (t) { + return n.call(this, e, 0); + } + } + } + !(function () { + try { + n = "function" == typeof setTimeout ? setTimeout : s; + } catch (e) { + n = s; + } + try { + i = "function" == typeof clearTimeout ? clearTimeout : a; + } catch (e) { + i = a; + } + })(); + var f, + l = [], + c = !1, + h = -1; + function d() { + c && + f && + ((c = !1), + f.length ? (l = f.concat(l)) : (h = -1), + l.length && p()); + } + function p() { + if (!c) { + var e = u(d); + c = !0; + for (var t = l.length; t; ) { + for (f = l, l = []; ++h < t; ) f && f[h].run(); + (h = -1), (t = l.length); + } + (f = null), + (c = !1), + (function (e) { + if (i === clearTimeout) return clearTimeout(e); + if ((i === a || !i) && clearTimeout) + return (i = clearTimeout), clearTimeout(e); + try { + i(e); + } catch (t) { + try { + return i.call(null, e); + } catch (t) { + return i.call(this, e); + } + } + })(e); + } + } + function y(e, t) { + (this.fun = e), (this.array = t); + } + function m() {} + (o.nextTick = function (e) { + var t = new Array(arguments.length - 1); + if (arguments.length > 1) + for (var r = 1; r < arguments.length; r++) + t[r - 1] = arguments[r]; + l.push(new y(e, t)), 1 !== l.length || c || u(p); + }), + (y.prototype.run = function () { + this.fun.apply(null, this.array); + }), + (o.title = "browser"), + (o.browser = !0), + (o.env = {}), + (o.argv = []), + (o.version = ""), + (o.versions = {}), + (o.on = m), + (o.addListener = m), + (o.once = m), + (o.off = m), + (o.removeListener = m), + (o.removeAllListeners = m), + (o.emit = m), + (o.prependListener = m), + (o.prependOnceListener = m), + (o.listeners = function (e) { + return []; + }), + (o.binding = function (e) { + throw new Error("process.binding is not supported"); + }), + (o.cwd = function () { + return "/"; + }), + (o.chdir = function (e) { + throw new Error("process.chdir is not supported"); + }), + (o.umask = function () { + return 0; + }); + }, + {}, + ], + 46: [ + function (e, t, r) { + t.exports = e("./lib/_stream_duplex.js"); + }, + { "./lib/_stream_duplex.js": 47 }, + ], + 47: [ + function (e, t, r) { + "use strict"; + var n = e("process-nextick-args"), + i = + Object.keys || + function (e) { + var t = []; + for (var r in e) t.push(r); + return t; + }; + t.exports = c; + var o = e("core-util-is"); + o.inherits = e("inherits"); + var s = e("./_stream_readable"), + a = e("./_stream_writable"); + o.inherits(c, s); + for (var u = i(a.prototype), f = 0; f < u.length; f++) { + var l = u[f]; + c.prototype[l] || (c.prototype[l] = a.prototype[l]); + } + function c(e) { + if (!(this instanceof c)) return new c(e); + s.call(this, e), + a.call(this, e), + e && !1 === e.readable && (this.readable = !1), + e && !1 === e.writable && (this.writable = !1), + (this.allowHalfOpen = !0), + e && !1 === e.allowHalfOpen && (this.allowHalfOpen = !1), + this.once("end", h); + } + function h() { + this.allowHalfOpen || + this._writableState.ended || + n.nextTick(d, this); + } + function d(e) { + e.end(); + } + Object.defineProperty(c.prototype, "writableHighWaterMark", { + enumerable: !1, + get: function () { + return this._writableState.highWaterMark; + }, + }), + Object.defineProperty(c.prototype, "destroyed", { + get: function () { + return ( + void 0 !== this._readableState && + void 0 !== this._writableState && + this._readableState.destroyed && + this._writableState.destroyed + ); + }, + set: function (e) { + void 0 !== this._readableState && + void 0 !== this._writableState && + ((this._readableState.destroyed = e), + (this._writableState.destroyed = e)); + }, + }), + (c.prototype._destroy = function (e, t) { + this.push(null), this.end(), n.nextTick(t, e); + }); + }, + { + "./_stream_readable": 49, + "./_stream_writable": 51, + "core-util-is": 38, + inherits: 41, + "process-nextick-args": 44, + }, + ], + 48: [ + function (e, t, r) { + "use strict"; + t.exports = o; + var n = e("./_stream_transform"), + i = e("core-util-is"); + function o(e) { + if (!(this instanceof o)) return new o(e); + n.call(this, e); + } + (i.inherits = e("inherits")), + i.inherits(o, n), + (o.prototype._transform = function (e, t, r) { + r(null, e); + }); + }, + { "./_stream_transform": 50, "core-util-is": 38, inherits: 41 }, + ], + 49: [ + function (e, t, r) { + (function (r, n) { + "use strict"; + var i = e("process-nextick-args"); + t.exports = v; + var o, + s = e("isarray"); + v.ReadableState = b; + e("events").EventEmitter; + var a = function (e, t) { + return e.listeners(t).length; + }, + u = e("./internal/streams/stream"), + f = e("safe-buffer").Buffer, + l = n.Uint8Array || function () {}; + var c = e("core-util-is"); + c.inherits = e("inherits"); + var h = e("util"), + d = void 0; + d = h && h.debuglog ? h.debuglog("stream") : function () {}; + var p, + y = e("./internal/streams/BufferList"), + m = e("./internal/streams/destroy"); + c.inherits(v, u); + var g = ["error", "close", "destroy", "pause", "resume"]; + function b(t, r) { + t = t || {}; + var n = r instanceof (o = o || e("./_stream_duplex")); + (this.objectMode = !!t.objectMode), + n && + (this.objectMode = this.objectMode || !!t.readableObjectMode); + var i = t.highWaterMark, + s = t.readableHighWaterMark, + a = this.objectMode ? 16 : 16384; + (this.highWaterMark = + i || 0 === i ? i : n && (s || 0 === s) ? s : a), + (this.highWaterMark = Math.floor(this.highWaterMark)), + (this.buffer = new y()), + (this.length = 0), + (this.pipes = null), + (this.pipesCount = 0), + (this.flowing = null), + (this.ended = !1), + (this.endEmitted = !1), + (this.reading = !1), + (this.sync = !0), + (this.needReadable = !1), + (this.emittedReadable = !1), + (this.readableListening = !1), + (this.resumeScheduled = !1), + (this.destroyed = !1), + (this.defaultEncoding = t.defaultEncoding || "utf8"), + (this.awaitDrain = 0), + (this.readingMore = !1), + (this.decoder = null), + (this.encoding = null), + t.encoding && + (p || (p = e("string_decoder/").StringDecoder), + (this.decoder = new p(t.encoding)), + (this.encoding = t.encoding)); + } + function v(t) { + if (((o = o || e("./_stream_duplex")), !(this instanceof v))) + return new v(t); + (this._readableState = new b(t, this)), + (this.readable = !0), + t && + ("function" == typeof t.read && (this._read = t.read), + "function" == typeof t.destroy && + (this._destroy = t.destroy)), + u.call(this); + } + function w(e, t, r, n, i) { + var o, + s = e._readableState; + null === t + ? ((s.reading = !1), + (function (e, t) { + if (t.ended) return; + if (t.decoder) { + var r = t.decoder.end(); + r && + r.length && + (t.buffer.push(r), + (t.length += t.objectMode ? 1 : r.length)); + } + (t.ended = !0), O(e); + })(e, s)) + : (i || + (o = (function (e, t) { + var r; + (n = t), + f.isBuffer(n) || + n instanceof l || + "string" == typeof t || + void 0 === t || + e.objectMode || + (r = new TypeError( + "Invalid non-string/buffer chunk", + )); + var n; + return r; + })(s, t)), + o + ? e.emit("error", o) + : s.objectMode || (t && t.length > 0) + ? ("string" == typeof t || + s.objectMode || + Object.getPrototypeOf(t) === f.prototype || + (t = (function (e) { + return f.from(e); + })(t)), + n + ? s.endEmitted + ? e.emit( + "error", + new Error("stream.unshift() after end event"), + ) + : _(e, s, t, !0) + : s.ended + ? e.emit("error", new Error("stream.push() after EOF")) + : ((s.reading = !1), + s.decoder && !r + ? ((t = s.decoder.write(t)), + s.objectMode || 0 !== t.length + ? _(e, s, t, !1) + : C(e, s)) + : _(e, s, t, !1))) + : n || (s.reading = !1)); + return (function (e) { + return ( + !e.ended && + (e.needReadable || + e.length < e.highWaterMark || + 0 === e.length) + ); + })(s); + } + function _(e, t, r, n) { + t.flowing && 0 === t.length && !t.sync + ? (e.emit("data", r), e.read(0)) + : ((t.length += t.objectMode ? 1 : r.length), + n ? t.buffer.unshift(r) : t.buffer.push(r), + t.needReadable && O(e)), + C(e, t); + } + Object.defineProperty(v.prototype, "destroyed", { + get: function () { + return ( + void 0 !== this._readableState && + this._readableState.destroyed + ); + }, + set: function (e) { + this._readableState && (this._readableState.destroyed = e); + }, + }), + (v.prototype.destroy = m.destroy), + (v.prototype._undestroy = m.undestroy), + (v.prototype._destroy = function (e, t) { + this.push(null), t(e); + }), + (v.prototype.push = function (e, t) { + var r, + n = this._readableState; + return ( + n.objectMode + ? (r = !0) + : "string" == typeof e && + ((t = t || n.defaultEncoding) !== n.encoding && + ((e = f.from(e, t)), (t = "")), + (r = !0)), + w(this, e, t, !1, r) + ); + }), + (v.prototype.unshift = function (e) { + return w(this, e, null, !0, !1); + }), + (v.prototype.isPaused = function () { + return !1 === this._readableState.flowing; + }), + (v.prototype.setEncoding = function (t) { + return ( + p || (p = e("string_decoder/").StringDecoder), + (this._readableState.decoder = new p(t)), + (this._readableState.encoding = t), + this + ); + }); + var j = 8388608; + function T(e, t) { + return e <= 0 || (0 === t.length && t.ended) + ? 0 + : t.objectMode + ? 1 + : e != e + ? t.flowing && t.length + ? t.buffer.head.data.length + : t.length + : (e > t.highWaterMark && + (t.highWaterMark = (function (e) { + return ( + e >= j + ? (e = j) + : (e--, + (e |= e >>> 1), + (e |= e >>> 2), + (e |= e >>> 4), + (e |= e >>> 8), + (e |= e >>> 16), + e++), + e + ); + })(e)), + e <= t.length + ? e + : t.ended + ? t.length + : ((t.needReadable = !0), 0)); + } + function O(e) { + var t = e._readableState; + (t.needReadable = !1), + t.emittedReadable || + (d("emitReadable", t.flowing), + (t.emittedReadable = !0), + t.sync ? i.nextTick(S, e) : S(e)); + } + function S(e) { + d("emit readable"), e.emit("readable"), x(e); + } + function C(e, t) { + t.readingMore || ((t.readingMore = !0), i.nextTick(k, e, t)); + } + function k(e, t) { + for ( + var r = t.length; + !t.reading && + !t.flowing && + !t.ended && + t.length < t.highWaterMark && + (d("maybeReadMore read 0"), e.read(0), r !== t.length); + + ) + r = t.length; + t.readingMore = !1; + } + function E(e) { + d("readable nexttick read 0"), e.read(0); + } + function P(e, t) { + t.reading || (d("resume read 0"), e.read(0)), + (t.resumeScheduled = !1), + (t.awaitDrain = 0), + e.emit("resume"), + x(e), + t.flowing && !t.reading && e.read(0); + } + function x(e) { + var t = e._readableState; + for (d("flow", t.flowing); t.flowing && null !== e.read(); ); + } + function R(e, t) { + return 0 === t.length + ? null + : (t.objectMode + ? (r = t.buffer.shift()) + : !e || e >= t.length + ? ((r = t.decoder + ? t.buffer.join("") + : 1 === t.buffer.length + ? t.buffer.head.data + : t.buffer.concat(t.length)), + t.buffer.clear()) + : (r = (function (e, t, r) { + var n; + e < t.head.data.length + ? ((n = t.head.data.slice(0, e)), + (t.head.data = t.head.data.slice(e))) + : (n = + e === t.head.data.length + ? t.shift() + : r + ? (function (e, t) { + var r = t.head, + n = 1, + i = r.data; + e -= i.length; + for (; (r = r.next); ) { + var o = r.data, + s = e > o.length ? o.length : e; + if ( + (s === o.length + ? (i += o) + : (i += o.slice(0, e)), + 0 === (e -= s)) + ) { + s === o.length + ? (++n, + r.next + ? (t.head = r.next) + : (t.head = t.tail = null)) + : ((t.head = r), + (r.data = o.slice(s))); + break; + } + ++n; + } + return (t.length -= n), i; + })(e, t) + : (function (e, t) { + var r = f.allocUnsafe(e), + n = t.head, + i = 1; + n.data.copy(r), (e -= n.data.length); + for (; (n = n.next); ) { + var o = n.data, + s = e > o.length ? o.length : e; + if ( + (o.copy(r, r.length - e, 0, s), + 0 === (e -= s)) + ) { + s === o.length + ? (++i, + n.next + ? (t.head = n.next) + : (t.head = t.tail = null)) + : ((t.head = n), + (n.data = o.slice(s))); + break; + } + ++i; + } + return (t.length -= i), r; + })(e, t)); + return n; + })(e, t.buffer, t.decoder)), + r); + var r; + } + function A(e) { + var t = e._readableState; + if (t.length > 0) + throw new Error('"endReadable()" called on non-empty stream'); + t.endEmitted || ((t.ended = !0), i.nextTick(M, t, e)); + } + function M(e, t) { + e.endEmitted || + 0 !== e.length || + ((e.endEmitted = !0), (t.readable = !1), t.emit("end")); + } + function F(e, t) { + for (var r = 0, n = e.length; r < n; r++) + if (e[r] === t) return r; + return -1; + } + (v.prototype.read = function (e) { + d("read", e), (e = parseInt(e, 10)); + var t = this._readableState, + r = e; + if ( + (0 !== e && (t.emittedReadable = !1), + 0 === e && + t.needReadable && + (t.length >= t.highWaterMark || t.ended)) + ) + return ( + d("read: emitReadable", t.length, t.ended), + 0 === t.length && t.ended ? A(this) : O(this), + null + ); + if (0 === (e = T(e, t)) && t.ended) + return 0 === t.length && A(this), null; + var n, + i = t.needReadable; + return ( + d("need readable", i), + (0 === t.length || t.length - e < t.highWaterMark) && + d("length less than watermark", (i = !0)), + t.ended || t.reading + ? d("reading or ended", (i = !1)) + : i && + (d("do read"), + (t.reading = !0), + (t.sync = !0), + 0 === t.length && (t.needReadable = !0), + this._read(t.highWaterMark), + (t.sync = !1), + t.reading || (e = T(r, t))), + null === (n = e > 0 ? R(e, t) : null) + ? ((t.needReadable = !0), (e = 0)) + : (t.length -= e), + 0 === t.length && + (t.ended || (t.needReadable = !0), + r !== e && t.ended && A(this)), + null !== n && this.emit("data", n), + n + ); + }), + (v.prototype._read = function (e) { + this.emit("error", new Error("_read() is not implemented")); + }), + (v.prototype.pipe = function (e, t) { + var n = this, + o = this._readableState; + switch (o.pipesCount) { + case 0: + o.pipes = e; + break; + case 1: + o.pipes = [o.pipes, e]; + break; + default: + o.pipes.push(e); + } + (o.pipesCount += 1), + d("pipe count=%d opts=%j", o.pipesCount, t); + var u = + (!t || !1 !== t.end) && e !== r.stdout && e !== r.stderr + ? l + : v; + function f(t, r) { + d("onunpipe"), + t === n && + r && + !1 === r.hasUnpiped && + ((r.hasUnpiped = !0), + d("cleanup"), + e.removeListener("close", g), + e.removeListener("finish", b), + e.removeListener("drain", c), + e.removeListener("error", m), + e.removeListener("unpipe", f), + n.removeListener("end", l), + n.removeListener("end", v), + n.removeListener("data", y), + (h = !0), + !o.awaitDrain || + (e._writableState && !e._writableState.needDrain) || + c()); + } + function l() { + d("onend"), e.end(); + } + o.endEmitted ? i.nextTick(u) : n.once("end", u), + e.on("unpipe", f); + var c = (function (e) { + return function () { + var t = e._readableState; + d("pipeOnDrain", t.awaitDrain), + t.awaitDrain && t.awaitDrain--, + 0 === t.awaitDrain && + a(e, "data") && + ((t.flowing = !0), x(e)); + }; + })(n); + e.on("drain", c); + var h = !1; + var p = !1; + function y(t) { + d("ondata"), + (p = !1), + !1 !== e.write(t) || + p || + (((1 === o.pipesCount && o.pipes === e) || + (o.pipesCount > 1 && -1 !== F(o.pipes, e))) && + !h && + (d( + "false write response, pause", + n._readableState.awaitDrain, + ), + n._readableState.awaitDrain++, + (p = !0)), + n.pause()); + } + function m(t) { + d("onerror", t), + v(), + e.removeListener("error", m), + 0 === a(e, "error") && e.emit("error", t); + } + function g() { + e.removeListener("finish", b), v(); + } + function b() { + d("onfinish"), e.removeListener("close", g), v(); + } + function v() { + d("unpipe"), n.unpipe(e); + } + return ( + n.on("data", y), + (function (e, t, r) { + if ("function" == typeof e.prependListener) + return e.prependListener(t, r); + e._events && e._events[t] + ? s(e._events[t]) + ? e._events[t].unshift(r) + : (e._events[t] = [r, e._events[t]]) + : e.on(t, r); + })(e, "error", m), + e.once("close", g), + e.once("finish", b), + e.emit("pipe", n), + o.flowing || (d("pipe resume"), n.resume()), + e + ); + }), + (v.prototype.unpipe = function (e) { + var t = this._readableState, + r = { hasUnpiped: !1 }; + if (0 === t.pipesCount) return this; + if (1 === t.pipesCount) + return e && e !== t.pipes + ? this + : (e || (e = t.pipes), + (t.pipes = null), + (t.pipesCount = 0), + (t.flowing = !1), + e && e.emit("unpipe", this, r), + this); + if (!e) { + var n = t.pipes, + i = t.pipesCount; + (t.pipes = null), (t.pipesCount = 0), (t.flowing = !1); + for (var o = 0; o < i; o++) n[o].emit("unpipe", this, r); + return this; + } + var s = F(t.pipes, e); + return -1 === s + ? this + : (t.pipes.splice(s, 1), + (t.pipesCount -= 1), + 1 === t.pipesCount && (t.pipes = t.pipes[0]), + e.emit("unpipe", this, r), + this); + }), + (v.prototype.on = function (e, t) { + var r = u.prototype.on.call(this, e, t); + if ("data" === e) + !1 !== this._readableState.flowing && this.resume(); + else if ("readable" === e) { + var n = this._readableState; + n.endEmitted || + n.readableListening || + ((n.readableListening = n.needReadable = !0), + (n.emittedReadable = !1), + n.reading ? n.length && O(this) : i.nextTick(E, this)); + } + return r; + }), + (v.prototype.addListener = v.prototype.on), + (v.prototype.resume = function () { + var e = this._readableState; + return ( + e.flowing || + (d("resume"), + (e.flowing = !0), + (function (e, t) { + t.resumeScheduled || + ((t.resumeScheduled = !0), i.nextTick(P, e, t)); + })(this, e)), + this + ); + }), + (v.prototype.pause = function () { + return ( + d("call pause flowing=%j", this._readableState.flowing), + !1 !== this._readableState.flowing && + (d("pause"), + (this._readableState.flowing = !1), + this.emit("pause")), + this + ); + }), + (v.prototype.wrap = function (e) { + var t = this, + r = this._readableState, + n = !1; + for (var i in (e.on("end", function () { + if ((d("wrapped end"), r.decoder && !r.ended)) { + var e = r.decoder.end(); + e && e.length && t.push(e); + } + t.push(null); + }), + e.on("data", function (i) { + (d("wrapped data"), + r.decoder && (i = r.decoder.write(i)), + r.objectMode && null == i) || + ((r.objectMode || (i && i.length)) && + (t.push(i) || ((n = !0), e.pause()))); + }), + e)) + void 0 === this[i] && + "function" == typeof e[i] && + (this[i] = (function (t) { + return function () { + return e[t].apply(e, arguments); + }; + })(i)); + for (var o = 0; o < g.length; o++) + e.on(g[o], this.emit.bind(this, g[o])); + return ( + (this._read = function (t) { + d("wrapped _read", t), n && ((n = !1), e.resume()); + }), + this + ); + }), + Object.defineProperty(v.prototype, "readableHighWaterMark", { + enumerable: !1, + get: function () { + return this._readableState.highWaterMark; + }, + }), + (v._fromList = R); + }).call( + this, + e("_process"), + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + { + "./_stream_duplex": 47, + "./internal/streams/BufferList": 52, + "./internal/streams/destroy": 53, + "./internal/streams/stream": 54, + _process: 45, + "core-util-is": 38, + events: 39, + inherits: 41, + isarray: 43, + "process-nextick-args": 44, + "safe-buffer": 55, + "string_decoder/": 56, + util: 35, + }, + ], + 50: [ + function (e, t, r) { + "use strict"; + t.exports = s; + var n = e("./_stream_duplex"), + i = e("core-util-is"); + function o(e, t) { + var r = this._transformState; + r.transforming = !1; + var n = r.writecb; + if (!n) + return this.emit( + "error", + new Error("write callback called multiple times"), + ); + (r.writechunk = null), + (r.writecb = null), + null != t && this.push(t), + n(e); + var i = this._readableState; + (i.reading = !1), + (i.needReadable || i.length < i.highWaterMark) && + this._read(i.highWaterMark); + } + function s(e) { + if (!(this instanceof s)) return new s(e); + n.call(this, e), + (this._transformState = { + afterTransform: o.bind(this), + needTransform: !1, + transforming: !1, + writecb: null, + writechunk: null, + writeencoding: null, + }), + (this._readableState.needReadable = !0), + (this._readableState.sync = !1), + e && + ("function" == typeof e.transform && + (this._transform = e.transform), + "function" == typeof e.flush && (this._flush = e.flush)), + this.on("prefinish", a); + } + function a() { + var e = this; + "function" == typeof this._flush + ? this._flush(function (t, r) { + u(e, t, r); + }) + : u(this, null, null); + } + function u(e, t, r) { + if (t) return e.emit("error", t); + if ((null != r && e.push(r), e._writableState.length)) + throw new Error("Calling transform done when ws.length != 0"); + if (e._transformState.transforming) + throw new Error("Calling transform done when still transforming"); + return e.push(null); + } + (i.inherits = e("inherits")), + i.inherits(s, n), + (s.prototype.push = function (e, t) { + return ( + (this._transformState.needTransform = !1), + n.prototype.push.call(this, e, t) + ); + }), + (s.prototype._transform = function (e, t, r) { + throw new Error("_transform() is not implemented"); + }), + (s.prototype._write = function (e, t, r) { + var n = this._transformState; + if ( + ((n.writecb = r), + (n.writechunk = e), + (n.writeencoding = t), + !n.transforming) + ) { + var i = this._readableState; + (n.needTransform || + i.needReadable || + i.length < i.highWaterMark) && + this._read(i.highWaterMark); + } + }), + (s.prototype._read = function (e) { + var t = this._transformState; + null !== t.writechunk && t.writecb && !t.transforming + ? ((t.transforming = !0), + this._transform( + t.writechunk, + t.writeencoding, + t.afterTransform, + )) + : (t.needTransform = !0); + }), + (s.prototype._destroy = function (e, t) { + var r = this; + n.prototype._destroy.call(this, e, function (e) { + t(e), r.emit("close"); + }); + }); + }, + { "./_stream_duplex": 47, "core-util-is": 38, inherits: 41 }, + ], + 51: [ + function (e, t, r) { + (function (r, n, i) { + "use strict"; + var o = e("process-nextick-args"); + function s(e) { + var t = this; + (this.next = null), + (this.entry = null), + (this.finish = function () { + !(function (e, t, r) { + var n = e.entry; + e.entry = null; + for (; n; ) { + var i = n.callback; + t.pendingcb--, i(r), (n = n.next); + } + t.corkedRequestsFree + ? (t.corkedRequestsFree.next = e) + : (t.corkedRequestsFree = e); + })(t, e); + }); + } + t.exports = b; + var a, + u = + !r.browser && + ["v0.10", "v0.9."].indexOf(r.version.slice(0, 5)) > -1 + ? i + : o.nextTick; + b.WritableState = g; + var f = e("core-util-is"); + f.inherits = e("inherits"); + var l = { deprecate: e("util-deprecate") }, + c = e("./internal/streams/stream"), + h = e("safe-buffer").Buffer, + d = n.Uint8Array || function () {}; + var p, + y = e("./internal/streams/destroy"); + function m() {} + function g(t, r) { + (a = a || e("./_stream_duplex")), (t = t || {}); + var n = r instanceof a; + (this.objectMode = !!t.objectMode), + n && + (this.objectMode = this.objectMode || !!t.writableObjectMode); + var i = t.highWaterMark, + f = t.writableHighWaterMark, + l = this.objectMode ? 16 : 16384; + (this.highWaterMark = + i || 0 === i ? i : n && (f || 0 === f) ? f : l), + (this.highWaterMark = Math.floor(this.highWaterMark)), + (this.finalCalled = !1), + (this.needDrain = !1), + (this.ending = !1), + (this.ended = !1), + (this.finished = !1), + (this.destroyed = !1); + var c = !1 === t.decodeStrings; + (this.decodeStrings = !c), + (this.defaultEncoding = t.defaultEncoding || "utf8"), + (this.length = 0), + (this.writing = !1), + (this.corked = 0), + (this.sync = !0), + (this.bufferProcessing = !1), + (this.onwrite = function (e) { + !(function (e, t) { + var r = e._writableState, + n = r.sync, + i = r.writecb; + if ( + ((function (e) { + (e.writing = !1), + (e.writecb = null), + (e.length -= e.writelen), + (e.writelen = 0); + })(r), + t) + ) + !(function (e, t, r, n, i) { + --t.pendingcb, + r + ? (o.nextTick(i, n), + o.nextTick(O, e, t), + (e._writableState.errorEmitted = !0), + e.emit("error", n)) + : (i(n), + (e._writableState.errorEmitted = !0), + e.emit("error", n), + O(e, t)); + })(e, r, n, t, i); + else { + var s = j(r); + s || + r.corked || + r.bufferProcessing || + !r.bufferedRequest || + _(e, r), + n ? u(w, e, r, s, i) : w(e, r, s, i); + } + })(r, e); + }), + (this.writecb = null), + (this.writelen = 0), + (this.bufferedRequest = null), + (this.lastBufferedRequest = null), + (this.pendingcb = 0), + (this.prefinished = !1), + (this.errorEmitted = !1), + (this.bufferedRequestCount = 0), + (this.corkedRequestsFree = new s(this)); + } + function b(t) { + if ( + ((a = a || e("./_stream_duplex")), + !(p.call(b, this) || this instanceof a)) + ) + return new b(t); + (this._writableState = new g(t, this)), + (this.writable = !0), + t && + ("function" == typeof t.write && (this._write = t.write), + "function" == typeof t.writev && (this._writev = t.writev), + "function" == typeof t.destroy && (this._destroy = t.destroy), + "function" == typeof t.final && (this._final = t.final)), + c.call(this); + } + function v(e, t, r, n, i, o, s) { + (t.writelen = n), + (t.writecb = s), + (t.writing = !0), + (t.sync = !0), + r ? e._writev(i, t.onwrite) : e._write(i, o, t.onwrite), + (t.sync = !1); + } + function w(e, t, r, n) { + r || + (function (e, t) { + 0 === t.length && + t.needDrain && + ((t.needDrain = !1), e.emit("drain")); + })(e, t), + t.pendingcb--, + n(), + O(e, t); + } + function _(e, t) { + t.bufferProcessing = !0; + var r = t.bufferedRequest; + if (e._writev && r && r.next) { + var n = t.bufferedRequestCount, + i = new Array(n), + o = t.corkedRequestsFree; + o.entry = r; + for (var a = 0, u = !0; r; ) + (i[a] = r), r.isBuf || (u = !1), (r = r.next), (a += 1); + (i.allBuffers = u), + v(e, t, !0, t.length, i, "", o.finish), + t.pendingcb++, + (t.lastBufferedRequest = null), + o.next + ? ((t.corkedRequestsFree = o.next), (o.next = null)) + : (t.corkedRequestsFree = new s(t)), + (t.bufferedRequestCount = 0); + } else { + for (; r; ) { + var f = r.chunk, + l = r.encoding, + c = r.callback; + if ( + (v(e, t, !1, t.objectMode ? 1 : f.length, f, l, c), + (r = r.next), + t.bufferedRequestCount--, + t.writing) + ) + break; + } + null === r && (t.lastBufferedRequest = null); + } + (t.bufferedRequest = r), (t.bufferProcessing = !1); + } + function j(e) { + return ( + e.ending && + 0 === e.length && + null === e.bufferedRequest && + !e.finished && + !e.writing + ); + } + function T(e, t) { + e._final(function (r) { + t.pendingcb--, + r && e.emit("error", r), + (t.prefinished = !0), + e.emit("prefinish"), + O(e, t); + }); + } + function O(e, t) { + var r = j(t); + return ( + r && + (!(function (e, t) { + t.prefinished || + t.finalCalled || + ("function" == typeof e._final + ? (t.pendingcb++, + (t.finalCalled = !0), + o.nextTick(T, e, t)) + : ((t.prefinished = !0), e.emit("prefinish"))); + })(e, t), + 0 === t.pendingcb && ((t.finished = !0), e.emit("finish"))), + r + ); + } + f.inherits(b, c), + (g.prototype.getBuffer = function () { + for (var e = this.bufferedRequest, t = []; e; ) + t.push(e), (e = e.next); + return t; + }), + (function () { + try { + Object.defineProperty(g.prototype, "buffer", { + get: l.deprecate( + function () { + return this.getBuffer(); + }, + "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", + "DEP0003", + ), + }); + } catch (e) {} + })(), + "function" == typeof Symbol && + Symbol.hasInstance && + "function" == typeof Function.prototype[Symbol.hasInstance] + ? ((p = Function.prototype[Symbol.hasInstance]), + Object.defineProperty(b, Symbol.hasInstance, { + value: function (e) { + return ( + !!p.call(this, e) || + (this === b && e && e._writableState instanceof g) + ); + }, + })) + : (p = function (e) { + return e instanceof this; + }), + (b.prototype.pipe = function () { + this.emit("error", new Error("Cannot pipe, not readable")); + }), + (b.prototype.write = function (e, t, r) { + var n, + i = this._writableState, + s = !1, + a = + !i.objectMode && ((n = e), h.isBuffer(n) || n instanceof d); + return ( + a && + !h.isBuffer(e) && + (e = (function (e) { + return h.from(e); + })(e)), + "function" == typeof t && ((r = t), (t = null)), + a ? (t = "buffer") : t || (t = i.defaultEncoding), + "function" != typeof r && (r = m), + i.ended + ? (function (e, t) { + var r = new Error("write after end"); + e.emit("error", r), o.nextTick(t, r); + })(this, r) + : (a || + (function (e, t, r, n) { + var i = !0, + s = !1; + return ( + null === r + ? (s = new TypeError( + "May not write null values to stream", + )) + : "string" == typeof r || + void 0 === r || + t.objectMode || + (s = new TypeError( + "Invalid non-string/buffer chunk", + )), + s && + (e.emit("error", s), o.nextTick(n, s), (i = !1)), + i + ); + })(this, i, e, r)) && + (i.pendingcb++, + (s = (function (e, t, r, n, i, o) { + if (!r) { + var s = (function (e, t, r) { + e.objectMode || + !1 === e.decodeStrings || + "string" != typeof t || + (t = h.from(t, r)); + return t; + })(t, n, i); + n !== s && ((r = !0), (i = "buffer"), (n = s)); + } + var a = t.objectMode ? 1 : n.length; + t.length += a; + var u = t.length < t.highWaterMark; + u || (t.needDrain = !0); + if (t.writing || t.corked) { + var f = t.lastBufferedRequest; + (t.lastBufferedRequest = { + chunk: n, + encoding: i, + isBuf: r, + callback: o, + next: null, + }), + f + ? (f.next = t.lastBufferedRequest) + : (t.bufferedRequest = t.lastBufferedRequest), + (t.bufferedRequestCount += 1); + } else v(e, t, !1, a, n, i, o); + return u; + })(this, i, a, e, t, r))), + s + ); + }), + (b.prototype.cork = function () { + this._writableState.corked++; + }), + (b.prototype.uncork = function () { + var e = this._writableState; + e.corked && + (e.corked--, + e.writing || + e.corked || + e.finished || + e.bufferProcessing || + !e.bufferedRequest || + _(this, e)); + }), + (b.prototype.setDefaultEncoding = function (e) { + if ( + ("string" == typeof e && (e = e.toLowerCase()), + !( + [ + "hex", + "utf8", + "utf-8", + "ascii", + "binary", + "base64", + "ucs2", + "ucs-2", + "utf16le", + "utf-16le", + "raw", + ].indexOf((e + "").toLowerCase()) > -1 + )) + ) + throw new TypeError("Unknown encoding: " + e); + return (this._writableState.defaultEncoding = e), this; + }), + Object.defineProperty(b.prototype, "writableHighWaterMark", { + enumerable: !1, + get: function () { + return this._writableState.highWaterMark; + }, + }), + (b.prototype._write = function (e, t, r) { + r(new Error("_write() is not implemented")); + }), + (b.prototype._writev = null), + (b.prototype.end = function (e, t, r) { + var n = this._writableState; + "function" == typeof e + ? ((r = e), (e = null), (t = null)) + : "function" == typeof t && ((r = t), (t = null)), + null != e && this.write(e, t), + n.corked && ((n.corked = 1), this.uncork()), + n.ending || + n.finished || + (function (e, t, r) { + (t.ending = !0), + O(e, t), + r && (t.finished ? o.nextTick(r) : e.once("finish", r)); + (t.ended = !0), (e.writable = !1); + })(this, n, r); + }), + Object.defineProperty(b.prototype, "destroyed", { + get: function () { + return ( + void 0 !== this._writableState && + this._writableState.destroyed + ); + }, + set: function (e) { + this._writableState && (this._writableState.destroyed = e); + }, + }), + (b.prototype.destroy = y.destroy), + (b.prototype._undestroy = y.undestroy), + (b.prototype._destroy = function (e, t) { + this.end(), t(e); + }); + }).call( + this, + e("_process"), + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + e("timers").setImmediate, + ); + }, + { + "./_stream_duplex": 47, + "./internal/streams/destroy": 53, + "./internal/streams/stream": 54, + _process: 45, + "core-util-is": 38, + inherits: 41, + "process-nextick-args": 44, + "safe-buffer": 55, + timers: 64, + "util-deprecate": 65, + }, + ], + 52: [ + function (e, t, r) { + "use strict"; + var n = e("safe-buffer").Buffer, + i = e("util"); + (t.exports = (function () { + function e() { + !(function (e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + })(this, e), + (this.head = null), + (this.tail = null), + (this.length = 0); + } + return ( + (e.prototype.push = function (e) { + var t = { data: e, next: null }; + this.length > 0 ? (this.tail.next = t) : (this.head = t), + (this.tail = t), + ++this.length; + }), + (e.prototype.unshift = function (e) { + var t = { data: e, next: this.head }; + 0 === this.length && (this.tail = t), + (this.head = t), + ++this.length; + }), + (e.prototype.shift = function () { + if (0 !== this.length) { + var e = this.head.data; + return ( + 1 === this.length + ? (this.head = this.tail = null) + : (this.head = this.head.next), + --this.length, + e + ); + } + }), + (e.prototype.clear = function () { + (this.head = this.tail = null), (this.length = 0); + }), + (e.prototype.join = function (e) { + if (0 === this.length) return ""; + for (var t = this.head, r = "" + t.data; (t = t.next); ) + r += e + t.data; + return r; + }), + (e.prototype.concat = function (e) { + if (0 === this.length) return n.alloc(0); + if (1 === this.length) return this.head.data; + for ( + var t, r, i, o = n.allocUnsafe(e >>> 0), s = this.head, a = 0; + s; + + ) + (t = s.data), + (r = o), + (i = a), + t.copy(r, i), + (a += s.data.length), + (s = s.next); + return o; + }), + e + ); + })()), + i && + i.inspect && + i.inspect.custom && + (t.exports.prototype[i.inspect.custom] = function () { + var e = i.inspect({ length: this.length }); + return this.constructor.name + " " + e; + }); + }, + { "safe-buffer": 55, util: 35 }, + ], + 53: [ + function (e, t, r) { + "use strict"; + var n = e("process-nextick-args"); + function i(e, t) { + e.emit("error", t); + } + t.exports = { + destroy: function (e, t) { + var r = this, + o = this._readableState && this._readableState.destroyed, + s = this._writableState && this._writableState.destroyed; + return o || s + ? (t + ? t(e) + : !e || + (this._writableState && + this._writableState.errorEmitted) || + n.nextTick(i, this, e), + this) + : (this._readableState && (this._readableState.destroyed = !0), + this._writableState && (this._writableState.destroyed = !0), + this._destroy(e || null, function (e) { + !t && e + ? (n.nextTick(i, r, e), + r._writableState && + (r._writableState.errorEmitted = !0)) + : t && t(e); + }), + this); + }, + undestroy: function () { + this._readableState && + ((this._readableState.destroyed = !1), + (this._readableState.reading = !1), + (this._readableState.ended = !1), + (this._readableState.endEmitted = !1)), + this._writableState && + ((this._writableState.destroyed = !1), + (this._writableState.ended = !1), + (this._writableState.ending = !1), + (this._writableState.finished = !1), + (this._writableState.errorEmitted = !1)); + }, + }; + }, + { "process-nextick-args": 44 }, + ], + 54: [ + function (e, t, r) { + t.exports = e("events").EventEmitter; + }, + { events: 39 }, + ], + 55: [ + function (e, t, r) { + var n = e("buffer"), + i = n.Buffer; + function o(e, t) { + for (var r in e) t[r] = e[r]; + } + function s(e, t, r) { + return i(e, t, r); + } + i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow + ? (t.exports = n) + : (o(n, r), (r.Buffer = s)), + o(i, s), + (s.from = function (e, t, r) { + if ("number" == typeof e) + throw new TypeError("Argument must not be a number"); + return i(e, t, r); + }), + (s.alloc = function (e, t, r) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + var n = i(e); + return ( + void 0 !== t + ? "string" == typeof r + ? n.fill(t, r) + : n.fill(t) + : n.fill(0), + n + ); + }), + (s.allocUnsafe = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return i(e); + }), + (s.allocUnsafeSlow = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return n.SlowBuffer(e); + }); + }, + { buffer: 37 }, + ], + 56: [ + function (e, t, r) { + "use strict"; + var n = e("safe-buffer").Buffer, + i = + n.isEncoding || + function (e) { + switch ((e = "" + e) && e.toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + case "raw": + return !0; + default: + return !1; + } + }; + function o(e) { + var t; + switch ( + ((this.encoding = (function (e) { + var t = (function (e) { + if (!e) return "utf8"; + for (var t; ; ) + switch (e) { + case "utf8": + case "utf-8": + return "utf8"; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return "utf16le"; + case "latin1": + case "binary": + return "latin1"; + case "base64": + case "ascii": + case "hex": + return e; + default: + if (t) return; + (e = ("" + e).toLowerCase()), (t = !0); + } + })(e); + if ("string" != typeof t && (n.isEncoding === i || !i(e))) + throw new Error("Unknown encoding: " + e); + return t || e; + })(e)), + this.encoding) + ) { + case "utf16le": + (this.text = u), (this.end = f), (t = 4); + break; + case "utf8": + (this.fillLast = a), (t = 4); + break; + case "base64": + (this.text = l), (this.end = c), (t = 3); + break; + default: + return (this.write = h), void (this.end = d); + } + (this.lastNeed = 0), + (this.lastTotal = 0), + (this.lastChar = n.allocUnsafe(t)); + } + function s(e) { + return e <= 127 + ? 0 + : e >> 5 == 6 + ? 2 + : e >> 4 == 14 + ? 3 + : e >> 3 == 30 + ? 4 + : e >> 6 == 2 + ? -1 + : -2; + } + function a(e) { + var t = this.lastTotal - this.lastNeed, + r = (function (e, t, r) { + if (128 != (192 & t[0])) return (e.lastNeed = 0), "�"; + if (e.lastNeed > 1 && t.length > 1) { + if (128 != (192 & t[1])) return (e.lastNeed = 1), "�"; + if (e.lastNeed > 2 && t.length > 2 && 128 != (192 & t[2])) + return (e.lastNeed = 2), "�"; + } + })(this, e); + return void 0 !== r + ? r + : this.lastNeed <= e.length + ? (e.copy(this.lastChar, t, 0, this.lastNeed), + this.lastChar.toString(this.encoding, 0, this.lastTotal)) + : (e.copy(this.lastChar, t, 0, e.length), + void (this.lastNeed -= e.length)); + } + function u(e, t) { + if ((e.length - t) % 2 == 0) { + var r = e.toString("utf16le", t); + if (r) { + var n = r.charCodeAt(r.length - 1); + if (n >= 55296 && n <= 56319) + return ( + (this.lastNeed = 2), + (this.lastTotal = 4), + (this.lastChar[0] = e[e.length - 2]), + (this.lastChar[1] = e[e.length - 1]), + r.slice(0, -1) + ); + } + return r; + } + return ( + (this.lastNeed = 1), + (this.lastTotal = 2), + (this.lastChar[0] = e[e.length - 1]), + e.toString("utf16le", t, e.length - 1) + ); + } + function f(e) { + var t = e && e.length ? this.write(e) : ""; + if (this.lastNeed) { + var r = this.lastTotal - this.lastNeed; + return t + this.lastChar.toString("utf16le", 0, r); + } + return t; + } + function l(e, t) { + var r = (e.length - t) % 3; + return 0 === r + ? e.toString("base64", t) + : ((this.lastNeed = 3 - r), + (this.lastTotal = 3), + 1 === r + ? (this.lastChar[0] = e[e.length - 1]) + : ((this.lastChar[0] = e[e.length - 2]), + (this.lastChar[1] = e[e.length - 1])), + e.toString("base64", t, e.length - r)); + } + function c(e) { + var t = e && e.length ? this.write(e) : ""; + return this.lastNeed + ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) + : t; + } + function h(e) { + return e.toString(this.encoding); + } + function d(e) { + return e && e.length ? this.write(e) : ""; + } + (r.StringDecoder = o), + (o.prototype.write = function (e) { + if (0 === e.length) return ""; + var t, r; + if (this.lastNeed) { + if (void 0 === (t = this.fillLast(e))) return ""; + (r = this.lastNeed), (this.lastNeed = 0); + } else r = 0; + return r < e.length + ? t + ? t + this.text(e, r) + : this.text(e, r) + : t || ""; + }), + (o.prototype.end = function (e) { + var t = e && e.length ? this.write(e) : ""; + return this.lastNeed ? t + "�" : t; + }), + (o.prototype.text = function (e, t) { + var r = (function (e, t, r) { + var n = t.length - 1; + if (n < r) return 0; + var i = s(t[n]); + if (i >= 0) return i > 0 && (e.lastNeed = i - 1), i; + if (--n < r || -2 === i) return 0; + if ((i = s(t[n])) >= 0) return i > 0 && (e.lastNeed = i - 2), i; + if (--n < r || -2 === i) return 0; + if ((i = s(t[n])) >= 0) + return i > 0 && (2 === i ? (i = 0) : (e.lastNeed = i - 3)), i; + return 0; + })(this, e, t); + if (!this.lastNeed) return e.toString("utf8", t); + this.lastTotal = r; + var n = e.length - (r - this.lastNeed); + return e.copy(this.lastChar, 0, n), e.toString("utf8", t, n); + }), + (o.prototype.fillLast = function (e) { + if (this.lastNeed <= e.length) + return ( + e.copy( + this.lastChar, + this.lastTotal - this.lastNeed, + 0, + this.lastNeed, + ), + this.lastChar.toString(this.encoding, 0, this.lastTotal) + ); + e.copy( + this.lastChar, + this.lastTotal - this.lastNeed, + 0, + e.length, + ), + (this.lastNeed -= e.length); + }); + }, + { "safe-buffer": 55 }, + ], + 57: [ + function (e, t, r) { + t.exports = e("./readable").PassThrough; + }, + { "./readable": 58 }, + ], + 58: [ + function (e, t, r) { + ((r = t.exports = e("./lib/_stream_readable.js")).Stream = r), + (r.Readable = r), + (r.Writable = e("./lib/_stream_writable.js")), + (r.Duplex = e("./lib/_stream_duplex.js")), + (r.Transform = e("./lib/_stream_transform.js")), + (r.PassThrough = e("./lib/_stream_passthrough.js")); + }, + { + "./lib/_stream_duplex.js": 47, + "./lib/_stream_passthrough.js": 48, + "./lib/_stream_readable.js": 49, + "./lib/_stream_transform.js": 50, + "./lib/_stream_writable.js": 51, + }, + ], + 59: [ + function (e, t, r) { + t.exports = e("./readable").Transform; + }, + { "./readable": 58 }, + ], + 60: [ + function (e, t, r) { + t.exports = e("./lib/_stream_writable.js"); + }, + { "./lib/_stream_writable.js": 51 }, + ], + 61: [ + function (e, t, r) { + var n = e("buffer"), + i = n.Buffer; + function o(e, t) { + for (var r in e) t[r] = e[r]; + } + function s(e, t, r) { + return i(e, t, r); + } + i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow + ? (t.exports = n) + : (o(n, r), (r.Buffer = s)), + (s.prototype = Object.create(i.prototype)), + o(i, s), + (s.from = function (e, t, r) { + if ("number" == typeof e) + throw new TypeError("Argument must not be a number"); + return i(e, t, r); + }), + (s.alloc = function (e, t, r) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + var n = i(e); + return ( + void 0 !== t + ? "string" == typeof r + ? n.fill(t, r) + : n.fill(t) + : n.fill(0), + n + ); + }), + (s.allocUnsafe = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return i(e); + }), + (s.allocUnsafeSlow = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return n.SlowBuffer(e); + }); + }, + { buffer: 37 }, + ], + 62: [ + function (e, t, r) { + t.exports = i; + var n = e("events").EventEmitter; + function i() { + n.call(this); + } + e("inherits")(i, n), + (i.Readable = e("readable-stream/readable.js")), + (i.Writable = e("readable-stream/writable.js")), + (i.Duplex = e("readable-stream/duplex.js")), + (i.Transform = e("readable-stream/transform.js")), + (i.PassThrough = e("readable-stream/passthrough.js")), + (i.Stream = i), + (i.prototype.pipe = function (e, t) { + var r = this; + function i(t) { + e.writable && !1 === e.write(t) && r.pause && r.pause(); + } + function o() { + r.readable && r.resume && r.resume(); + } + r.on("data", i), + e.on("drain", o), + e._isStdio || + (t && !1 === t.end) || + (r.on("end", a), r.on("close", u)); + var s = !1; + function a() { + s || ((s = !0), e.end()); + } + function u() { + s || ((s = !0), "function" == typeof e.destroy && e.destroy()); + } + function f(e) { + if ((l(), 0 === n.listenerCount(this, "error"))) throw e; + } + function l() { + r.removeListener("data", i), + e.removeListener("drain", o), + r.removeListener("end", a), + r.removeListener("close", u), + r.removeListener("error", f), + e.removeListener("error", f), + r.removeListener("end", l), + r.removeListener("close", l), + e.removeListener("close", l); + } + return ( + r.on("error", f), + e.on("error", f), + r.on("end", l), + r.on("close", l), + e.on("close", l), + e.emit("pipe", r), + e + ); + }); + }, + { + events: 39, + inherits: 41, + "readable-stream/duplex.js": 46, + "readable-stream/passthrough.js": 57, + "readable-stream/readable.js": 58, + "readable-stream/transform.js": 59, + "readable-stream/writable.js": 60, + }, + ], + 63: [ + function (e, t, r) { + arguments[4][56][0].apply(r, arguments); + }, + { dup: 56, "safe-buffer": 61 }, + ], + 64: [ + function (e, t, r) { + (function (t, n) { + var i = e("process/browser.js").nextTick, + o = Function.prototype.apply, + s = Array.prototype.slice, + a = {}, + u = 0; + function f(e, t) { + (this._id = e), (this._clearFn = t); + } + (r.setTimeout = function () { + return new f(o.call(setTimeout, window, arguments), clearTimeout); + }), + (r.setInterval = function () { + return new f( + o.call(setInterval, window, arguments), + clearInterval, + ); + }), + (r.clearTimeout = r.clearInterval = + function (e) { + e.close(); + }), + (f.prototype.unref = f.prototype.ref = function () {}), + (f.prototype.close = function () { + this._clearFn.call(window, this._id); + }), + (r.enroll = function (e, t) { + clearTimeout(e._idleTimeoutId), (e._idleTimeout = t); + }), + (r.unenroll = function (e) { + clearTimeout(e._idleTimeoutId), (e._idleTimeout = -1); + }), + (r._unrefActive = r.active = + function (e) { + clearTimeout(e._idleTimeoutId); + var t = e._idleTimeout; + t >= 0 && + (e._idleTimeoutId = setTimeout(function () { + e._onTimeout && e._onTimeout(); + }, t)); + }), + (r.setImmediate = + "function" == typeof t + ? t + : function (e) { + var t = u++, + n = !(arguments.length < 2) && s.call(arguments, 1); + return ( + (a[t] = !0), + i(function () { + a[t] && + (n ? e.apply(null, n) : e.call(null), + r.clearImmediate(t)); + }), + t + ); + }), + (r.clearImmediate = + "function" == typeof n + ? n + : function (e) { + delete a[e]; + }); + }).call(this, e("timers").setImmediate, e("timers").clearImmediate); + }, + { "process/browser.js": 45, timers: 64 }, + ], + 65: [ + function (e, t, r) { + (function (e) { + function r(t) { + try { + if (!e.localStorage) return !1; + } catch (e) { + return !1; + } + var r = e.localStorage[t]; + return null != r && "true" === String(r).toLowerCase(); + } + t.exports = function (e, t) { + if (r("noDeprecation")) return e; + var n = !1; + return function () { + if (!n) { + if (r("throwDeprecation")) throw new Error(t); + r("traceDeprecation") ? console.trace(t) : console.warn(t), + (n = !0); + } + return e.apply(this, arguments); + }; + }; + }).call( + this, + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + {}, + ], + 66: [ + function (e, t, r) { + "function" == typeof Object.create + ? (t.exports = function (e, t) { + (e.super_ = t), + (e.prototype = Object.create(t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0, + }, + })); + }) + : (t.exports = function (e, t) { + e.super_ = t; + var r = function () {}; + (r.prototype = t.prototype), + (e.prototype = new r()), + (e.prototype.constructor = e); + }); + }, + {}, + ], + 67: [ + function (e, t, r) { + t.exports = function (e) { + return ( + e && + "object" == typeof e && + "function" == typeof e.copy && + "function" == typeof e.fill && + "function" == typeof e.readUInt8 + ); + }; + }, + {}, + ], + 68: [ + function (e, t, r) { + (function (t, n) { + var i = /%[sdj%]/g; + (r.format = function (e) { + if (!g(e)) { + for (var t = [], r = 0; r < arguments.length; r++) + t.push(a(arguments[r])); + return t.join(" "); + } + r = 1; + for ( + var n = arguments, + o = n.length, + s = String(e).replace(i, function (e) { + if ("%%" === e) return "%"; + if (r >= o) return e; + switch (e) { + case "%s": + return String(n[r++]); + case "%d": + return Number(n[r++]); + case "%j": + try { + return JSON.stringify(n[r++]); + } catch (e) { + return "[Circular]"; + } + default: + return e; + } + }), + u = n[r]; + r < o; + u = n[++r] + ) + y(u) || !w(u) ? (s += " " + u) : (s += " " + a(u)); + return s; + }), + (r.deprecate = function (e, i) { + if (b(n.process)) + return function () { + return r.deprecate(e, i).apply(this, arguments); + }; + if (!0 === t.noDeprecation) return e; + var o = !1; + return function () { + if (!o) { + if (t.throwDeprecation) throw new Error(i); + t.traceDeprecation ? console.trace(i) : console.error(i), + (o = !0); + } + return e.apply(this, arguments); + }; + }); + var o, + s = {}; + function a(e, t) { + var n = { seen: [], stylize: f }; + return ( + arguments.length >= 3 && (n.depth = arguments[2]), + arguments.length >= 4 && (n.colors = arguments[3]), + p(t) ? (n.showHidden = t) : t && r._extend(n, t), + b(n.showHidden) && (n.showHidden = !1), + b(n.depth) && (n.depth = 2), + b(n.colors) && (n.colors = !1), + b(n.customInspect) && (n.customInspect = !0), + n.colors && (n.stylize = u), + l(n, e, n.depth) + ); + } + function u(e, t) { + var r = a.styles[t]; + return r + ? "[" + a.colors[r][0] + "m" + e + "[" + a.colors[r][1] + "m" + : e; + } + function f(e, t) { + return e; + } + function l(e, t, n) { + if ( + e.customInspect && + t && + T(t.inspect) && + t.inspect !== r.inspect && + (!t.constructor || t.constructor.prototype !== t) + ) { + var i = t.inspect(n, e); + return g(i) || (i = l(e, i, n)), i; + } + var o = (function (e, t) { + if (b(t)) return e.stylize("undefined", "undefined"); + if (g(t)) { + var r = + "'" + + JSON.stringify(t) + .replace(/^"|"$/g, "") + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + + "'"; + return e.stylize(r, "string"); + } + if (m(t)) return e.stylize("" + t, "number"); + if (p(t)) return e.stylize("" + t, "boolean"); + if (y(t)) return e.stylize("null", "null"); + })(e, t); + if (o) return o; + var s = Object.keys(t), + a = (function (e) { + var t = {}; + return ( + e.forEach(function (e, r) { + t[e] = !0; + }), + t + ); + })(s); + if ( + (e.showHidden && (s = Object.getOwnPropertyNames(t)), + j(t) && + (s.indexOf("message") >= 0 || s.indexOf("description") >= 0)) + ) + return c(t); + if (0 === s.length) { + if (T(t)) { + var u = t.name ? ": " + t.name : ""; + return e.stylize("[Function" + u + "]", "special"); + } + if (v(t)) + return e.stylize(RegExp.prototype.toString.call(t), "regexp"); + if (_(t)) + return e.stylize(Date.prototype.toString.call(t), "date"); + if (j(t)) return c(t); + } + var f, + w = "", + O = !1, + S = ["{", "}"]; + (d(t) && ((O = !0), (S = ["[", "]"])), T(t)) && + (w = " [Function" + (t.name ? ": " + t.name : "") + "]"); + return ( + v(t) && (w = " " + RegExp.prototype.toString.call(t)), + _(t) && (w = " " + Date.prototype.toUTCString.call(t)), + j(t) && (w = " " + c(t)), + 0 !== s.length || (O && 0 != t.length) + ? n < 0 + ? v(t) + ? e.stylize(RegExp.prototype.toString.call(t), "regexp") + : e.stylize("[Object]", "special") + : (e.seen.push(t), + (f = O + ? (function (e, t, r, n, i) { + for (var o = [], s = 0, a = t.length; s < a; ++s) + k(t, String(s)) + ? o.push(h(e, t, r, n, String(s), !0)) + : o.push(""); + return ( + i.forEach(function (i) { + i.match(/^\d+$/) || + o.push(h(e, t, r, n, i, !0)); + }), + o + ); + })(e, t, n, a, s) + : s.map(function (r) { + return h(e, t, n, a, r, O); + })), + e.seen.pop(), + (function (e, t, r) { + if ( + e.reduce(function (e, t) { + return ( + 0, + t.indexOf("\n") >= 0 && 0, + e + t.replace(/\u001b\[\d\d?m/g, "").length + 1 + ); + }, 0) > 60 + ) + return ( + r[0] + + ("" === t ? "" : t + "\n ") + + " " + + e.join(",\n ") + + " " + + r[1] + ); + return r[0] + t + " " + e.join(", ") + " " + r[1]; + })(f, w, S)) + : S[0] + w + S[1] + ); + } + function c(e) { + return "[" + Error.prototype.toString.call(e) + "]"; + } + function h(e, t, r, n, i, o) { + var s, a, u; + if ( + ((u = Object.getOwnPropertyDescriptor(t, i) || { value: t[i] }) + .get + ? (a = u.set + ? e.stylize("[Getter/Setter]", "special") + : e.stylize("[Getter]", "special")) + : u.set && (a = e.stylize("[Setter]", "special")), + k(n, i) || (s = "[" + i + "]"), + a || + (e.seen.indexOf(u.value) < 0 + ? (a = y(r) + ? l(e, u.value, null) + : l(e, u.value, r - 1)).indexOf("\n") > -1 && + (a = o + ? a + .split("\n") + .map(function (e) { + return " " + e; + }) + .join("\n") + .substr(2) + : "\n" + + a + .split("\n") + .map(function (e) { + return " " + e; + }) + .join("\n")) + : (a = e.stylize("[Circular]", "special"))), + b(s)) + ) { + if (o && i.match(/^\d+$/)) return a; + (s = JSON.stringify("" + i)).match( + /^"([a-zA-Z_][a-zA-Z_0-9]*)"$/, + ) + ? ((s = s.substr(1, s.length - 2)), + (s = e.stylize(s, "name"))) + : ((s = s + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'")), + (s = e.stylize(s, "string"))); + } + return s + ": " + a; + } + function d(e) { + return Array.isArray(e); + } + function p(e) { + return "boolean" == typeof e; + } + function y(e) { + return null === e; + } + function m(e) { + return "number" == typeof e; + } + function g(e) { + return "string" == typeof e; + } + function b(e) { + return void 0 === e; + } + function v(e) { + return w(e) && "[object RegExp]" === O(e); + } + function w(e) { + return "object" == typeof e && null !== e; + } + function _(e) { + return w(e) && "[object Date]" === O(e); + } + function j(e) { + return w(e) && ("[object Error]" === O(e) || e instanceof Error); + } + function T(e) { + return "function" == typeof e; + } + function O(e) { + return Object.prototype.toString.call(e); + } + function S(e) { + return e < 10 ? "0" + e.toString(10) : e.toString(10); + } + (r.debuglog = function (e) { + if ( + (b(o) && (o = t.env.NODE_DEBUG || ""), + (e = e.toUpperCase()), + !s[e]) + ) + if (new RegExp("\\b" + e + "\\b", "i").test(o)) { + var n = t.pid; + s[e] = function () { + var t = r.format.apply(r, arguments); + console.error("%s %d: %s", e, n, t); + }; + } else s[e] = function () {}; + return s[e]; + }), + (r.inspect = a), + (a.colors = { + bold: [1, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + white: [37, 39], + grey: [90, 39], + black: [30, 39], + blue: [34, 39], + cyan: [36, 39], + green: [32, 39], + magenta: [35, 39], + red: [31, 39], + yellow: [33, 39], + }), + (a.styles = { + special: "cyan", + number: "yellow", + boolean: "yellow", + undefined: "grey", + null: "bold", + string: "green", + date: "magenta", + regexp: "red", + }), + (r.isArray = d), + (r.isBoolean = p), + (r.isNull = y), + (r.isNullOrUndefined = function (e) { + return null == e; + }), + (r.isNumber = m), + (r.isString = g), + (r.isSymbol = function (e) { + return "symbol" == typeof e; + }), + (r.isUndefined = b), + (r.isRegExp = v), + (r.isObject = w), + (r.isDate = _), + (r.isError = j), + (r.isFunction = T), + (r.isPrimitive = function (e) { + return ( + null === e || + "boolean" == typeof e || + "number" == typeof e || + "string" == typeof e || + "symbol" == typeof e || + void 0 === e + ); + }), + (r.isBuffer = e("./support/isBuffer")); + var C = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec", + ]; + function k(e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + } + (r.log = function () { + var e, t; + console.log( + "%s - %s", + ((e = new Date()), + (t = [ + S(e.getHours()), + S(e.getMinutes()), + S(e.getSeconds()), + ].join(":")), + [e.getDate(), C[e.getMonth()], t].join(" ")), + r.format.apply(r, arguments), + ); + }), + (r.inherits = e("inherits")), + (r._extend = function (e, t) { + if (!t || !w(t)) return e; + for (var r = Object.keys(t), n = r.length; n--; ) + e[r[n]] = t[r[n]]; + return e; + }); + }).call( + this, + e("_process"), + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + { "./support/isBuffer": 67, _process: 45, inherits: 66 }, + ], + }, + {}, + [1], + )(1); +}); diff --git a/app/client/public/libraries/jsonwebtoken@8.5.1.js b/app/client/public/libraries/jsonwebtoken@8.5.1.js index ef575d43c5..48c3873003 100644 --- a/app/client/public/libraries/jsonwebtoken@8.5.1.js +++ b/app/client/public/libraries/jsonwebtoken@8.5.1.js @@ -1 +1,19989 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsonwebtoken=e()}}(function(){var define,module,exports;return function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var f="function"==typeof require&&require;if(!s&&f)return f(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[a]={exports:{}};t[a][0].call(u.exports,function(e){return i(t[a][1][e]||e)},u,u.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a=8.0.0")}).call(this,e("_process"))},{_process:145,semver:26}],7:[function(e,t,r){var n=e("ms");t.exports=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var i=n(e);if(void 0===i)return;return Math.floor(r+i/1e3)}return"number"==typeof e?r+e:void 0}},{ms:24}],8:[function(e,t,r){"use strict";var n=e("buffer").Buffer,i=e("buffer").SlowBuffer;function o(e,t){if(!n.isBuffer(e)||!n.isBuffer(t))return!1;if(e.length!==t.length)return!1;for(var r=0,i=0;i=o&&--n,n}t.exports={derToJose:function(e,t){e=f(e);var r=i(t),c=r+1,u=e.length,h=0;if(e[h++]!==a)throw new Error('Could not find expected "seq"');var d=e[h++];if(d===(1|o)&&(d=e[h++]),u-h-1&&e%1==0&&e-1&&e%1==0&&e<=i}(e.length)&&!function(e){var t=C(e)?M.call(e):"";return t==f||t==c}(e)}function C(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function P(e){return!!e&&"object"==typeof e}t.exports=function(e,t,r,i){var s;e=T(e)?e:(s=e)?g(s,function(e){return T(e)?j(e):B(e)}(s)):[],r=r&&!i?function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||P(e)&&M.call(e)==h}(e))return a;if(C(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=C(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var r=p.test(e);return r||b.test(e)?m(e.slice(2),r?2:8):l.test(e)?a:+e}(e))===n||e===-n){var t=e<0?-1:1;return t*o}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(r):0;var f=e.length;return r<0&&(r=A(f+r,0)),function(e){return"string"==typeof e||!R(e)&&P(e)&&M.call(e)==u}(e)?r<=f&&e.indexOf(t,r)>-1:!!f&&function(e,t,r){if(t!=t)return function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o-1}},{}],18:[function(e,t,r){var n="[object Boolean]",i=Object.prototype.toString;t.exports=function(e){return!0===e||!1===e||function(e){return!!e&&"object"==typeof e}(e)&&i.call(e)==n}},{}],19:[function(e,t,r){var n=1/0,i=1.7976931348623157e308,o=NaN,a="[object Symbol]",s=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,h=parseInt,d=Object.prototype.toString;function l(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=function(e){return"number"==typeof e&&e==function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==a}(e))return o;if(l(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=l(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var r=c.test(e);return r||u.test(e)?h(e.slice(2),r?2:8):f.test(e)?o:+e}(e))===n||e===-n){var t=e<0?-1:1;return t*i}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(e)}},{}],20:[function(e,t,r){var n="[object Number]",i=Object.prototype.toString;t.exports=function(e){return"number"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&i.call(e)==n}},{}],21:[function(e,t,r){var n="[object Object]";var i,o,a=Function.prototype,s=Object.prototype,f=a.toString,c=s.hasOwnProperty,u=f.call(Object),h=s.toString,d=(i=Object.getPrototypeOf,o=Object,function(e){return i(o(e))});t.exports=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||h.call(e)!=n||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=d(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&f.call(r)==u}},{}],22:[function(e,t,r){var n="[object String]",i=Object.prototype.toString,o=Array.isArray;t.exports=function(e){return"string"==typeof e||!o(e)&&function(e){return!!e&&"object"==typeof e}(e)&&i.call(e)==n}},{}],23:[function(e,t,r){var n="Expected a function",i=1/0,o=1.7976931348623157e308,a=NaN,s="[object Symbol]",f=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt,l=Object.prototype.toString;function p(e,t){var r;if("function"!=typeof t)throw new TypeError(n);return e=function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&l.call(e)==s}(e))return a;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(f,"");var r=u.test(e);return r||h.test(e)?d(e.slice(2),r?2:8):c.test(e)?a:+e}(e))===i||e===-i){var t=e<0?-1:1;return t*o}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=function(e){return p(2,e)}},{}],24:[function(e,t,r){var n=1e3,i=60*n,o=60*i,a=24*o,s=7*a,f=365.25*a;function c(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*f;case"weeks":case"week":case"w":return r*s;case"days":case"day":case"d":return r*a;case"hours":case"hour":case"hrs":case"hr":case"h":return r*o;case"minutes":case"minute":case"mins":case"min":case"m":return r*i;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return c(e,t,a,"day");if(t>=o)return c(e,t,o,"hour");if(t>=i)return c(e,t,i,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=i)return Math.round(e/i)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],25:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:75}],26:[function(e,t,r){(function(e){var n;r=t.exports=X,n="object"==typeof e&&e.env&&e.env.NODE_DEBUG&&/\bsemver\b/i.test(e.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},r.SEMVER_SPEC_VERSION="2.0.0";var i=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,a=r.re=[],s=r.src=[],f=0,c=f++;s[c]="0|[1-9]\\d*";var u=f++;s[u]="[0-9]+";var h=f++;s[h]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=f++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var l=f++;s[l]="("+s[u]+")\\.("+s[u]+")\\.("+s[u]+")";var p=f++;s[p]="(?:"+s[c]+"|"+s[h]+")";var b=f++;s[b]="(?:"+s[u]+"|"+s[h]+")";var y=f++;s[y]="(?:-("+s[p]+"(?:\\."+s[p]+")*))";var m=f++;s[m]="(?:-?("+s[b]+"(?:\\."+s[b]+")*))";var v=f++;s[v]="[0-9A-Za-z-]+";var g=f++;s[g]="(?:\\+("+s[v]+"(?:\\."+s[v]+")*))";var w=f++,_="v?"+s[d]+s[y]+"?"+s[g]+"?";s[w]="^"+_+"$";var S="[v=\\s]*"+s[l]+s[m]+"?"+s[g]+"?",E=f++;s[E]="^"+S+"$";var M=f++;s[M]="((?:<|>)?=?)";var k=f++;s[k]=s[u]+"|x|X|\\*";var x=f++;s[x]=s[c]+"|x|X|\\*";var A=f++;s[A]="[v=\\s]*("+s[x]+")(?:\\.("+s[x]+")(?:\\.("+s[x]+")(?:"+s[y]+")?"+s[g]+"?)?)?";var j=f++;s[j]="[v=\\s]*("+s[k]+")(?:\\.("+s[k]+")(?:\\.("+s[k]+")(?:"+s[m]+")?"+s[g]+"?)?)?";var B=f++;s[B]="^"+s[M]+"\\s*"+s[A]+"$";var I=f++;s[I]="^"+s[M]+"\\s*"+s[j]+"$";var R=f++;s[R]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var T=f++;s[T]="(?:~>?)";var C=f++;s[C]="(\\s*)"+s[T]+"\\s+",a[C]=new RegExp(s[C],"g");var P=f++;s[P]="^"+s[T]+s[A]+"$";var O=f++;s[O]="^"+s[T]+s[j]+"$";var D=f++;s[D]="(?:\\^)";var N=f++;s[N]="(\\s*)"+s[D]+"\\s+",a[N]=new RegExp(s[N],"g");var L=f++;s[L]="^"+s[D]+s[A]+"$";var U=f++;s[U]="^"+s[D]+s[j]+"$";var q=f++;s[q]="^"+s[M]+"\\s*("+S+")$|^$";var z=f++;s[z]="^"+s[M]+"\\s*("+_+")$|^$";var K=f++;s[K]="(\\s*)"+s[M]+"\\s*("+S+"|"+s[A]+")",a[K]=new RegExp(s[K],"g");var F=f++;s[F]="^\\s*("+s[A]+")\\s+-\\s+("+s[A]+")\\s*$";var H=f++;s[H]="^\\s*("+s[j]+")\\s+-\\s+("+s[j]+")\\s*$";var V=f++;s[V]="(<|>)?=?\\s*\\*";for(var W=0;W<35;W++)n(W,s[W]),a[W]||(a[W]=new RegExp(s[W]));function J(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof X)return e;if("string"!=typeof e)return null;if(e.length>i)return null;if(!(t.loose?a[E]:a[w]).test(e))return null;try{return new X(e,t)}catch(e){return null}}function X(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof X){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof X))return new X(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?a[E]:a[w]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},r.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new X(e,r).inc(t,n).version}catch(e){return null}},r.diff=function(e,t){if(ee(e,t))return null;var r=J(e),n=J(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return i+a;return o},r.compareIdentifiers=G;var $=/^[0-9]+$/;function G(e,t){var r=$.test(e),n=$.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function Q(e,t,r){return Z(e,t,r)<0}function ee(e,t,r){return 0===Z(e,t,r)}function te(e,t,r){return 0!==Z(e,t,r)}function re(e,t,r){return Z(e,t,r)>=0}function ne(e,t,r){return Z(e,t,r)<=0}function ie(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return ee(e,r,n);case"!=":return te(e,r,n);case">":return Y(e,r,n);case">=":return re(e,r,n);case"<":return Q(e,r,n);case"<=":return ne(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof oe))return new oe(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ae?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}r.rcompareIdentifiers=function(e,t){return G(t,e)},r.major=function(e,t){return new X(e,t).major},r.minor=function(e,t){return new X(e,t).minor},r.patch=function(e,t){return new X(e,t).patch},r.compare=Z,r.compareLoose=function(e,t){return Z(e,t,!0)},r.rcompare=function(e,t,r){return Z(t,e,r)},r.sort=function(e,t){return e.sort(function(e,n){return r.compare(e,n,t)})},r.rsort=function(e,t){return e.sort(function(e,n){return r.rcompare(e,n,t)})},r.gt=Y,r.lt=Q,r.eq=ee,r.neq=te,r.gte=re,r.lte=ne,r.cmp=ie,r.Comparator=oe;var ae={};function se(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof oe)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function fe(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,r,n,i,o,a,s,f,c,u,h,d){return((t=fe(r)?"":fe(n)?">="+r+".0.0":fe(i)?">="+r+"."+n+".0":">="+t)+" "+(s=fe(f)?"":fe(c)?"<"+(+f+1)+".0.0":fe(u)?"<"+f+"."+(+c+1)+".0":h?"<="+f+"."+c+"."+u+"-"+h:"<="+s)).trim()}function ue(e,t,r){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function he(e,t,r){try{t=new se(t,r)}catch(e){return!1}return t.test(e)}function de(e,t,r,n){var i,o,a,s,f;switch(e=new X(e,n),t=new se(t,n),r){case">":i=Y,o=ne,a=Q,s=">",f=">=";break;case"<":i=Q,o=re,a=Y,s="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(he(e,t,n))return!1;for(var c=0;c=0.0.0")),h=h||e,d=d||e,i(e.semver,h.semver,n)?h=e:a(e.semver,d.semver,n)&&(d=e)}),h.operator===s||h.operator===f)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===f&&a(e,d.semver))return!1}return!0}oe.prototype.parse=function(e){var t=this.options.loose?a[q]:a[z],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new X(r[2],this.options.loose):this.semver=ae},oe.prototype.toString=function(){return this.value},oe.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ae||("string"==typeof e&&(e=new X(e,this.options)),ie(e,this.operator,this.semver,this.options))},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new se(e.value,t),he(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),he(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ie(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),f=ie(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&a||s||f},r.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?a[H]:a[F];e=e.replace(r,ce),n("hyphen replace",e),e=e.replace(a[K],"$1$2$3"),n("comparator trim",e,a[K]),e=(e=(e=e.replace(a[C],"$1~")).replace(a[N],"$1^")).split(/\s+/).join(" ");var i=t?a[q]:a[z],o=e.split(" ").map(function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t);var r=t.loose?a[U]:a[L];return e.replace(r,function(t,r,i,o,a){var s;return n("caret",e,t,r,i,o,a),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(o)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),s="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+a+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",s),s})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var r=t.loose?a[O]:a[P];return e.replace(r,function(t,r,i,o,a){var s;return n("tilde",e,t,r,i,o,a),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(o)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":a?(n("replaceTilde pr",a),s=">="+r+"."+i+"."+o+"-"+a+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var r=t.loose?a[I]:a[B];return e.replace(r,function(t,r,i,o,a,s){n("xRange",e,t,r,i,o,a,s);var f=fe(i),c=f||fe(o),u=c||fe(a),h=u;return"="===r&&h&&(r=""),f?t=">"===r||"<"===r?"<0.0.0":"*":r&&h?(c&&(o=0),a=0,">"===r?(r=">=",c?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===r&&(r="<",c?i=+i+1:o=+o+1),t=r+i+"."+o+"."+a):c?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(a[V],"")}(e,t),n("stars",e),e}(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter(function(e){return!!e.match(i)})),o=o.map(function(e){return new oe(e,this.options)},this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},r.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new X(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!Y(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r))return r;return null},r.validRange=function(e,t){try{return new se(e,t).range||"*"}catch(e){return null}},r.ltr=function(e,t,r){return de(e,t,"<",r)},r.gtr=function(e,t,r){return de(e,t,">",r)},r.outside=de,r.prerelease=function(e,t){var r=J(e,t);return r&&r.prerelease.length?r.prerelease:null},r.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},r.coerce=function(e){if(e instanceof X)return e;if("string"!=typeof e)return null;var t=e.match(a[R]);if(null==t)return null;return J(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}).call(this,e("_process"))},{_process:145}],27:[function(e,t,r){(function(r){var n=e("./lib/timespan"),i=e("./lib/psSupported"),o=e("jws"),a=e("lodash.includes"),s=e("lodash.isboolean"),f=e("lodash.isinteger"),c=e("lodash.isnumber"),u=e("lodash.isplainobject"),h=e("lodash.isstring"),d=e("lodash.once"),l=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];i&&l.splice(3,0,"PS256","PS384","PS512");var p={expiresIn:{isValid:function(e){return f(e)||h(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return f(e)||h(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return h(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:a.bind(null,l),message:'"algorithm" must be a valid string enum value'},header:{isValid:u,message:'"header" must be an object'},encoding:{isValid:h,message:'"encoding" must be a string'},issuer:{isValid:h,message:'"issuer" must be a string'},subject:{isValid:h,message:'"subject" must be a string'},jwtid:{isValid:h,message:'"jwtid" must be a string'},noTimestamp:{isValid:s,message:'"noTimestamp" must be a boolean'},keyid:{isValid:h,message:'"keyid" must be a string'},mutatePayload:{isValid:s,message:'"mutatePayload" must be a boolean'}},b={iat:{isValid:c,message:'"iat" should be a number of seconds'},exp:{isValid:c,message:'"exp" should be a number of seconds'},nbf:{isValid:c,message:'"nbf" should be a number of seconds'}};function y(e,t,r,n){if(!u(r))throw new Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach(function(i){var o=e[i];if(o){if(!o.isValid(r[i]))throw new Error(o.message)}else if(!t)throw new Error('"'+i+'" is not allowed in "'+n+'"')})}var m={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},v=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];t.exports=function(e,t,i,a){"function"==typeof i?(a=i,i={}):i=i||{};var s="object"==typeof e&&!r.isBuffer(e),f=Object.assign({alg:i.algorithm||"HS256",typ:s?"JWT":void 0,kid:i.keyid},i.header);function c(e){if(a)return a(e);throw e}if(!t&&"none"!==i.algorithm)return c(new Error("secretOrPrivateKey must have a value"));if(void 0===e)return c(new Error("payload is required"));if(s){try{!function(e){y(b,!0,e,"payload")}(e)}catch(e){return c(e)}i.mutatePayload||(e=Object.assign({},e))}else{var u=v.filter(function(e){return void 0!==i[e]});if(u.length>0)return c(new Error("invalid "+u.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==i.expiresIn)return c(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==i.notBefore)return c(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{!function(e){y(p,!1,e,"options")}(i)}catch(e){return c(e)}var h=e.iat||Math.floor(Date.now()/1e3);if(i.noTimestamp?delete e.iat:s&&(e.iat=h),void 0!==i.notBefore){try{e.nbf=n(i.notBefore,h)}catch(e){return c(e)}if(void 0===e.nbf)return c(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==i.expiresIn&&"object"==typeof e){try{e.exp=n(i.expiresIn,h)}catch(e){return c(e)}if(void 0===e.exp)return c(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(m).forEach(function(t){var r=m[t];if(void 0!==i[t]){if(void 0!==e[r])return c(new Error('Bad "options.'+t+'" option. The payload already has an "'+r+'" property.'));e[r]=i[t]}});var l=i.encoding||"utf8";if("function"!=typeof a)return o.sign({header:f,payload:e,secret:t,encoding:l});a=a&&d(a),o.createSign({header:f,privateKey:t,payload:e,encoding:l}).once("error",a).once("done",function(e){a(null,e)})}}).call(this,{isBuffer:e("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":128,"./lib/psSupported":6,"./lib/timespan":7,jws:12,"lodash.includes":17,"lodash.isboolean":18,"lodash.isinteger":19,"lodash.isnumber":20,"lodash.isplainobject":21,"lodash.isstring":22,"lodash.once":23}],28:[function(e,t,r){var n=e("./lib/JsonWebTokenError"),i=e("./lib/NotBeforeError"),o=e("./lib/TokenExpiredError"),a=e("./decode"),s=e("./lib/timespan"),f=e("./lib/psSupported"),c=e("jws"),u=["RS256","RS384","RS512","ES256","ES384","ES512"],h=["RS256","RS384","RS512"],d=["HS256","HS384","HS512"];f&&(u.splice(3,0,"PS256","PS384","PS512"),h.splice(3,0,"PS256","PS384","PS512")),t.exports=function(e,t,r,f){var l;if("function"!=typeof r||f||(f=r,r={}),r||(r={}),r=Object.assign({},r),l=f||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return l(new n("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return l(new n("nonce must be a non-empty string"));var p=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return l(new n("jwt must be provided"));if("string"!=typeof e)return l(new n("jwt must be a string"));var b,y=e.split(".");if(3!==y.length)return l(new n("jwt malformed"));try{b=a(e,{complete:!0})}catch(e){return l(e)}if(!b)return l(new n("invalid token"));var m,v=b.header;if("function"==typeof t){if(!f)return l(new n("verify must be called asynchronous if secret or public key is provided as a callback"));m=t}else m=function(e,r){return r(null,t)};return m(v,function(t,a){if(t)return l(new n("error in secret or public key callback: "+t.message));var f,m=""!==y[2].trim();if(!m&&a)return l(new n("jwt signature is required"));if(m&&!a)return l(new n("secret or public key must be provided"));if(m||r.algorithms||(r.algorithms=["none"]),r.algorithms||(r.algorithms=~a.toString().indexOf("BEGIN CERTIFICATE")||~a.toString().indexOf("BEGIN PUBLIC KEY")?u:~a.toString().indexOf("BEGIN RSA PUBLIC KEY")?h:d),!~r.algorithms.indexOf(b.header.alg))return l(new n("invalid algorithm"));try{f=c.verify(e,b.header.alg,a)}catch(e){return l(e)}if(!f)return l(new n("invalid signature"));var g=b.payload;if(void 0!==g.nbf&&!r.ignoreNotBefore){if("number"!=typeof g.nbf)return l(new n("invalid nbf value"));if(g.nbf>p+(r.clockTolerance||0))return l(new i("jwt not active",new Date(1e3*g.nbf)))}if(void 0!==g.exp&&!r.ignoreExpiration){if("number"!=typeof g.exp)return l(new n("invalid exp value"));if(p>=g.exp+(r.clockTolerance||0))return l(new o("jwt expired",new Date(1e3*g.exp)))}if(r.audience){var w=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(g.aud)?g.aud:[g.aud]).some(function(e){return w.some(function(t){return t instanceof RegExp?t.test(e):t===e})}))return l(new n("jwt audience invalid. expected: "+w.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&g.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(g.iss)))return l(new n("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&g.sub!==r.subject)return l(new n("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&g.jti!==r.jwtid)return l(new n("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&g.nonce!==r.nonce)return l(new n("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof g.iat)return l(new n("iat required when maxAge is specified"));var _=s(r.maxAge,g.iat);if(void 0===_)return l(new n('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(p>=_+(r.clockTolerance||0))return l(new o("maxAge exceeded",new Date(1e3*_)))}if(!0===r.complete){var S=b.signature;return l(null,{header:v,payload:g,signature:S})}return l(null,g)})}},{"./decode":1,"./lib/JsonWebTokenError":3,"./lib/NotBeforeError":4,"./lib/TokenExpiredError":5,"./lib/psSupported":6,"./lib/timespan":7,jws:12}],29:[function(e,t,r){var n=r;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":30,"./asn1/base":32,"./asn1/constants":36,"./asn1/decoders":38,"./asn1/encoders":41,"bn.js":44}],30:[function(e,t,r){var n=e("../asn1"),i=e("inherits");function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}r.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return i(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":29,inherits:127,vm:186}],31:[function(e,t,r){var n=e("inherits"),i=e("../base").Reporter,o=e("buffer").Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),r.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=s,s.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":32,buffer:75,inherits:127}],32:[function(e,t,r){var n=r;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":31,"./node":33,"./reporter":34}],33:[function(e,t,r){var n=e("../base").Reporter,i=e("../base").EncoderBuffer,o=e("../base").DecoderBuffer,a=e("minimalistic-assert"),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=c;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};u.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;f.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},c.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),s.forEach(function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}}),c.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},c.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var f=null;if(null!==r.explicit?f=r.explicit:null!==r.implicit?f=r.implicit:null!==r.tag&&(f=r.tag),null!==f||r.any){if(a=this._peekTag(e,f,r.any),e.isError(a))return a}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(c)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){var u=this._decodeTag(e,r.explicit);if(e.isError(u))return u;e=u}var h=e.offset;if(null===r.use&&null===r.choice){if(r.any)c=e.save();var d=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(d))return d;r.any?i=e.raw(c):e=d}if(t&&t.track&&null!==r.tag&&t.track(e.path(),h,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var l=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(l,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var a=e.save(),s=r.choice[o];try{var f=s._decode(e,t);if(e.isError(f))return!1;n={type:o,value:f},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},c.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var f=this.clone();f._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},f))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,u=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,s,u,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":32,"minimalistic-assert":132}],34:[function(e,t,r){var n=e("inherits");function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}r.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:127}],35:[function(e,t,r){var n=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=n._reverse(r.tag)},{"../constants":36}],36:[function(e,t,r){var n=r;n._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r}),t},n.der=e("./der")},{"./der":35}],37:[function(e,t,r){var n=e("inherits"),i=e("../../asn1"),o=i.base,a=i.bignum,s=i.constants.der;function f(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function u(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function h(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=s.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var f=1,c=n.length;c>=256;c>>=8)f++;(o=new i(2+f))[0]=a,o[1]=128|f;c=1+f;for(var u=n.length;u>0;c--,u>>=8)o[c]=255&u;return this._createEncoderBuffer([o,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;a>>=7)o++}var s=new i(o),f=s.length-1;for(n=e.length-1;n>=0;n--){a=e[n];for(s[f--]=127&a;(a>>=7)>0;)s[f--]=128|127&a}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[u(n.getFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var a=e;a>=256;a>>=8)n++;for(a=(o=new Array(n)).length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n0?a-4:a;for(r=0;r>16&255,f[u++]=t>>8&255,f[u++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,f[u++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,f[u++]=t>>8&255,f[u++]=255&t);return f},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;as?s:a+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],44:[function(e,t,r){!function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;try{a=e("buffer").Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function f(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,f=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&f,d=Math.min(c,t.length-1),l=Math.max(0,c-e.length+1);l<=d;l++){var p=c-l|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[l])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,f=0|u}return 0!==f?r.words[c]=0|f:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-f.length]+f+r:f+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],l=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(l).toString(e);r=(p=p.idivn(l)).isZero()?b+r:c[d-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,f="le"===t,c=new e(o),u=this.clone();if(f){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,l=0|a[1],p=8191&l,b=l>>>13,y=0|a[2],m=8191&y,v=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,S=0|a[4],E=8191&S,M=S>>>13,k=0|a[5],x=8191&k,A=k>>>13,j=0|a[6],B=8191&j,I=j>>>13,R=0|a[7],T=8191&R,C=R>>>13,P=0|a[8],O=8191&P,D=P>>>13,N=0|a[9],L=8191&N,U=N>>>13,q=0|s[0],z=8191&q,K=q>>>13,F=0|s[1],H=8191&F,V=F>>>13,W=0|s[2],J=8191&W,X=W>>>13,$=0|s[3],G=8191&$,Z=$>>>13,Y=0|s[4],Q=8191&Y,ee=Y>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],fe=8191&se,ce=se>>>13,ue=0|s[8],he=8191&ue,de=ue>>>13,le=0|s[9],pe=8191&le,be=le>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(h,z))|0)+((8191&(i=(i=Math.imul(h,K))+Math.imul(d,z)|0))<<13)|0;c=((o=Math.imul(d,K))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,K))+Math.imul(b,z)|0,o=Math.imul(b,K);var me=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,H)|0))<<13)|0;c=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,z),i=(i=Math.imul(m,K))+Math.imul(v,z)|0,o=Math.imul(v,K),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,V)|0;var ve=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,K))+Math.imul(_,z)|0,o=Math.imul(_,K),n=n+Math.imul(m,H)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,X)|0;var ge=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,K))+Math.imul(M,z)|0,o=Math.imul(M,K),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,Z)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,K))+Math.imul(A,z)|0,o=Math.imul(A,K),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,K))+Math.imul(I,z)|0,o=Math.imul(I,K),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,K))+Math.imul(C,z)|0,o=Math.imul(C,K),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,V)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(c+(n=n+Math.imul(h,fe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,K))+Math.imul(D,z)|0,o=Math.imul(D,K),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(B,J)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,ce)|0;var Me=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,K))+Math.imul(U,z)|0,o=Math.imul(U,K),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,V)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,de)|0;var ke=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,be)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,V))+Math.imul(U,H)|0,o=Math.imul(U,V),n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(D,J)|0,o=o+Math.imul(D,X)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(m,he)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(v,he)|0,o=o+Math.imul(v,de)|0;var xe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,J),i=(i=Math.imul(L,X))+Math.imul(U,J)|0,o=Math.imul(U,X),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(D,G)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(M,fe)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,de)|0;var Ae=(c+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,Z))+Math.imul(U,G)|0,o=Math.imul(U,Z),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var je=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,ee))+Math.imul(U,Q)|0,o=Math.imul(U,ee),n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(x,he)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var Be=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(B,he)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(I,he)|0,o=o+Math.imul(I,de)|0;var Ie=(c+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,be)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(D,fe)|0,o=o+Math.imul(D,ce)|0,n=n+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(C,he)|0,o=o+Math.imul(C,de)|0;var Re=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(L,fe),i=(i=Math.imul(L,ce))+Math.imul(U,fe)|0,o=Math.imul(U,ce),n=n+Math.imul(O,he)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(D,he)|0,o=o+Math.imul(D,de)|0;var Te=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,he),i=(i=Math.imul(L,de))+Math.imul(U,he)|0,o=Math.imul(U,de);var Ce=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,be)|0)+Math.imul(D,pe)|0))<<13)|0;c=((o=o+Math.imul(D,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Pe=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,be))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,be))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,f[0]=ye,f[1]=me,f[2]=ve,f[3]=ge,f[4]=we,f[5]=_e,f[6]=Se,f[7]=Ee,f[8]=Me,f[9]=ke,f[10]=xe,f[11]=Ae,f[12]=je,f[13]=Be,f[14]=Ie,f[15]=Re,f[16]=Te,f[17]=Ce,f[18]=Pe,0!==c&&(f[19]=c,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(l=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?l(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-o|h>>>o,u=h&s}return f&&0!==u&&(f.words[f.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new o(null)).length=f+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=d)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),f=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var d=0,l=1;0==(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(u),f.isub(h)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(f)):(r.isub(t),s.isub(i),f.isub(a))}return{a:s,b:f,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(v,m),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new g;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),f=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(f);)u.redIAdd(f);for(var h=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=a;0!==l.cmp(s);){for(var b=l,y=0;0!==b.cmp(s);y++)b=b.redSqr();n(y=0;n--){for(var c=t.words[n],u=f-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}f=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,S),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:46}],45:[function(e,t,r){var n;function i(e){this.rand=e}if(t.exports=function(e){return n||(n=new i(null)),n.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^u[p>>>16&255]^h[b>>>8&255]^d[255&y]^t[m++],a=c[p>>>24]^u[b>>>16&255]^h[y>>>8&255]^d[255&l]^t[m++],s=c[b>>>24]^u[y>>>16&255]^h[l>>>8&255]^d[255&p]^t[m++],f=c[y>>>24]^u[l>>>16&255]^h[p>>>8&255]^d[255&b]^t[m++],l=o,p=a,b=s,y=f;return o=(n[l>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&y])^t[m++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[y>>>8&255]<<8|n[255&l])^t[m++],s=(n[b>>>24]<<24|n[y>>>16&255]<<16|n[l>>>8&255]<<8|n[255&p])^t[m++],f=(n[y>>>24]<<24|n[l>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[m++],[o>>>=0,a>>>=0,s>>>=0,f>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,f=0;f<256;++f){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var u=e[a],h=e[u],d=e[h],l=257*e[c]^16843008*c;i[0][a]=l<<24|l>>>8,i[1][a]=l<<16|l>>>16,i[2][a]=l<<8|l>>>24,i[3][a]=l,l=16843009*d^65537*h^257*u^16843008*a,o[0][c]=l<<24|l>>>8,o[1][c]=l<<16|l>>>16,o[2][c]=l<<8|l>>>24,o[3][c]=l,0===a?a=s=1:(a=u^e[e[e[d^u]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],u=0;u>>24]]^f.INV_SUB_MIX[1][f.SBOX[d>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[d>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},{"safe-buffer":170}],48:[function(e,t,r){var n=e("./aes"),i=e("safe-buffer").Buffer,o=e("cipher-base"),a=e("inherits"),s=e("./ghash"),f=e("buffer-xor"),c=e("./incr32");function u(e,t,r,a){o.call(this);var f=i.alloc(4,0);this._cipher=new n.AES(t);var u=this._cipher.encryptBlock(f);this._ghash=new s(u),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var f=8*o,u=i.alloc(8);u.writeUIntBE(f,0,8),n.update(u),e._finID=n.state;var h=i.from(e._finID);return c(h),h}(this,r,u),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(u,o),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=f(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return d(e,n.key,n.iv)},r.createDecipheriv=d},{"./aes":47,"./authCipher":48,"./modes":60,"./streamCipher":63,"cipher-base":76,evp_bytestokey:111,inherits:127,"safe-buffer":170}],51:[function(e,t,r){var n=e("./modes"),i=e("./authCipher"),o=e("safe-buffer").Buffer,a=e("./streamCipher"),s=e("cipher-base"),f=e("./aes"),c=e("evp_bytestokey");function u(e,t,r){s.call(this),this._cache=new d,this._cipher=new f.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}e("inherits")(u,s),u.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var h=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function l(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new u(s.module,t,r)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},t.exports=a},{"safe-buffer":170}],53:[function(e,t,r){t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},{}],54:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},{"buffer-xor":74}],55:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("buffer-xor");function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}r.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},{"buffer-xor":74,"safe-buffer":170}],56:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}r.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}t.exports=o,o.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":44,buffer:75,randombytes:152}],68:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":69}],69:[function(e,t,r){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],70:[function(e,t,r){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],71:[function(e,t,r){(function(r){var n=e("create-hash"),i=e("stream"),o=e("inherits"),a=e("./sign"),s=e("./verify"),f=e("./algorithms.json");function c(e){i.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){i.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new c(e)}function d(e){return new u(e)}Object.keys(f).forEach(function(e){f[e].id=new r(f[e].id,"hex"),f[e.toLowerCase()]=f[e]}),o(c,i.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},c.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=a(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(u,i.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},u.prototype.verify=function(e,t,n){"string"==typeof t&&(t=new r(t,n)),this.end();var i=this._hash.digest();return s(t,i,e,this._signType,this._tag)},t.exports={Sign:h,Verify:d,createSign:h,createVerify:d}}).call(this,e("buffer").Buffer)},{"./algorithms.json":69,"./sign":72,"./verify":73,buffer:75,"create-hash":79,inherits:127,stream:179}],72:[function(e,t,r){(function(r){var n=e("create-hmac"),i=e("browserify-rsa"),o=e("elliptic").ec,a=e("bn.js"),s=e("parse-asn1"),f=e("./curves.json");function c(e,t,i,o){if((e=new r(e.toArray())).length0&&r.ishrn(n),r}function h(e,t,i){var o,a;do{for(o=new r(0);8*o.length=t)throw new Error("invalid sig")}t.exports=function(e,t,f,c,u){var h=o(f);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new i(n),s=r.data.subjectPrivateKey.data;return o.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,a=r.data.q,f=r.data.g,c=r.data.pub_key,u=o.signature.decode(e,"der"),h=u.s,d=u.r;s(h,a),s(d,a);var l=n.mont(i),p=h.invm(a);return 0===f.toRed(l).redPow(new n(t).mul(p).mod(a)).fromRed().mul(c.toRed(l).redPow(d.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(d)}(e,t,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=r.concat([u,t]);for(var d=h.modulus.byteLength(),l=[1],p=0;t.length+l.length+2o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return r.__proto__=t.prototype,r}function t(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,r,n){if("string"==typeof e)return function(e,r){"string"==typeof r&&""!==r||(r="utf8");if(!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|d(e,r),i=a(n),o=i.write(e,r);o!==n&&(i=i.slice(0,o));return i}(e,r);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return function(e,r,n){if(r<0||e.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function d(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(o)return i?-1:D(e).length;r=(""+r).toLowerCase(),o=!0}}function l(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function p(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:b(e,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):b(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,f/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;os&&(r=s-f),o=r;o>=0;o--){for(var h=!0,d=0;di&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(f=(31&c)<<6|63&o)>127&&(u=f);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(f=(15&c)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(u=f);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(f=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&f<1114112&&(u=f)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return E(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),""},t.prototype.compare=function(e,r,n,i,o){if(U(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(r>>>=0),f=Math.min(a,s),c=this.slice(i,o),u=e.slice(r,n),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return m(this,e,t,r);case"ascii":return v(this,e,t,r);case"latin1":case"binary":return g(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function I(e,r,n,i,o,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||re.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function T(e,t,r,n,o){return t=+t,r>>>=0,o||R(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function C(e,t,r,n,o){return t=+t,r>>>=0,o||R(e,0,r,8),i.write(e,t,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},t.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},t.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,i){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r=0;--a)e[a+r]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,i),r);return o},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var o=e.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(e=o)}}else"number"==typeof e&&(e&=255);if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=r;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function N(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":43,buffer:75,ieee754:126}],76:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("stream").Transform,o=e("string_decoder").StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},t.exports=a},{inherits:127,"safe-buffer":170,stream:179,string_decoder:180}],77:[function(e,t,r){(function(e){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":128}],78:[function(e,t,r){(function(r){var n=e("elliptic"),i=e("bn.js");t.exports=function(e){return new a(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function s(e,t,n){Array.isArray(e)||(e=e.toArray());var i=new r(e);if(n&&i.lengthr)?t=("rmd160"===e?new f:c(e)).update(t).digest():t.lengths?t=e(t):t.length0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=a.r28shl(r,s),i=a.r28shl(i,s),a.pc2(r,i,e.keys,o)}},c.prototype._update=function(e,t,r,n){var i=this._desState,o=a.readUInt32BE(e,t),s=a.readUInt32BE(e,t+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(r,o,n),a.writeUInt32BE(r,s,n+4)},c.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,o=d}a.rip(s,o,n,i)},c.prototype._decrypt=function(e,t,r,n,i){for(var o=r,s=t,f=e.keys.length-2;f>=0;f-=2){var c=e.keys[f],u=e.keys[f+1];a.expand(o,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var h=a.substitute(c,u),d=o;o=(s^a.permute(h))>>>0,s=d}a.rip(o,s,n,i)}},{"../des":84,inherits:127,"minimalistic-assert":132}],88:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits"),o=e("../des"),a=o.Cipher,s=o.DES;function f(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function c(e){a.call(this,e);var t=new f(this.type,this.options.key);this._edeState=t}i(c,a),t.exports=c,c.create=function(e){return new c(e)},c.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},c.prototype._pad=s.prototype._pad,c.prototype._unpad=s.prototype._unpad},{"../des":84,inherits:127,"minimalistic-assert":132}],89:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},r.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var o=0,a=0,s=n.length>>>1,f=0;f>>n[f]&1;for(f=s;f>>n[f]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},r.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(f),t.cmp(f)){if(!t.cmp(c))for(;r.mod(u).cmp(h);)r.iadd(l)}else for(;r.mod(o).cmp(d);)r.iadd(l);if(y(p=r.shrn(1))&&y(r)&&m(p)&&m(r)&&a.test(p)&&a.test(r))return r}}},{"bn.js":44,"miller-rabin":131,randombytes:152}],93:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],94:[function(e,t,r){"use strict";var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":109,"./elliptic/curve":97,"./elliptic/curves":100,"./elliptic/ec":101,"./elliptic/eddsa":104,"./elliptic/utils":108,brorand:45}],95:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../utils"),o=i.getNAF,a=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1),i=(1<=f;t--)c=(c<<1)+n[t];a.push(c)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(f=0;f=0;c--){for(t=0;c>=0&&0===a[c];c--)t++;if(c>=0&&t++,f=f.dblp(t),c<0)break;var u=a[c];s(0!==u),f="affine"===e.type?u>0?f.mixedAdd(i[u-1>>1]):f.mixedAdd(i[-u-1>>1].neg()):u>0?f.add(i[u-1>>1]):f.add(i[-u-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,f=this._wnafT2,c=this._wnafT3,u=0,h=0;h=1;h-=2){var l=h-1,p=h;if(1===s[l]&&1===s[p]){var b=[t[l],null,null,t[p]];0===t[l].y.cmp(t[p].y)?(b[1]=t[l].add(t[p]),b[2]=t[l].toJ().mixedAdd(t[p].neg())):0===t[l].y.cmp(t[p].y.redNeg())?(b[1]=t[l].toJ().mixedAdd(t[p]),b[2]=t[l].add(t[p].neg())):(b[1]=t[l].toJ().mixedAdd(t[p]),b[2]=t[l].toJ().mixedAdd(t[p].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=a(r[l],r[p]);u=Math.max(m[0].length,u),c[l]=new Array(u),c[p]=new Array(u);for(var v=0;v=0;h--){for(var E=0;h>=0;){var M=!0;for(v=0;v=0&&E++,_=_.dblp(E),h<0)break;for(v=0;v0?k=f[v][x-1>>1]:x<0&&(k=f[v][-x-1>>1].neg()),_="affine"===k.type?_.mixedAdd(k):_.add(k))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),f=i.redMul(a),c=o.redMul(s),u=i.redMul(s),h=a.redMul(o);return this.curve.point(f,c,h,u)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(c.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),f=a.redSub(s).redISub(s);e=n.redSub(i).redISub(o).redMul(f),t=a.redMul(c.redSub(o)),r=a.redMul(f)}}else{var c=i.redAdd(o);s=this.curve._mulC(this.z).redSqr(),f=c.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(c)).redMul(f),t=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(f)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),c=o.redMul(a),u=s.redMul(f),h=o.redMul(f),d=a.redMul(s);return this.curve.point(c,u,d,h)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),f=i.redSub(s),c=i.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),h=n.redMul(f).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=f.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(f).redMul(c)),this.curve.point(h,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},{"../utils":108,"./base":95,"bn.js":44,inherits:127}],97:[function(e,t,r){"use strict";var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":95,"./edwards":96,"./mont":98,"./short":99}],98:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("inherits"),o=e("./base"),a=e("../utils");function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),t.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(f,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new f(this,e,t)},s.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),f=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,f)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":108,"./base":95,"bn.js":44,inherits:127}],99:[function(e,t,r){"use strict";var n=e("../utils"),i=e("bn.js"),o=e("inherits"),a=e("./base"),s=n.assert;function f(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(f,a),t.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},f.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,f,c,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,l=this.n.clone(),p=new i(1),b=new i(0),y=new i(0),m=new i(1),v=0;0!==d.cmpn(0);){var g=l.div(d);c=l.sub(g.mul(d)),u=y.sub(g.mul(p));var w=m.sub(g.mul(b));if(!n&&c.cmp(h)<0)t=f.neg(),r=p,n=c.neg(),o=u;else if(n&&2==++v)break;f=c,l=d,d=c,y=p,p=u,m=b,b=w}a=c.neg(),s=u;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:f.add(c).neg()}},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,a.BasePoint),f.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),h=n.redMul(c),d=f.redSqr().redIAdd(u).redISub(h).redISub(h),l=f.redMul(h.redISub(d)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,l,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),c=f.redMul(a),u=r.redMul(f),h=s.redSqr().redIAdd(c).redISub(u).redISub(u),d=s.redMul(u.redISub(h)).redISub(i.redMul(c)),l=this.z.redMul(a);return this.curve.jpoint(h,d,l)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":108,"./base":95,"bn.js":44,inherits:127}],100:[function(e,t,r){"use strict";var n,i=r,o=e("hash.js"),a=e("./curve"),s=e("./utils").assert;function f(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new f(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=f,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=e("./precomputed/secp256k1")}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"./curve":97,"./precomputed/secp256k1":107,"./utils":108,"hash.js":113}],101:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("hmac-drbg"),o=e("../utils"),a=e("../curves"),s=e("brorand"),f=o.assert,c=e("./key"),u=e("./signature");function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(f(a.hasOwnProperty(e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=h,h.prototype.keyPair=function(e){return new c(this,e)},h.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},h.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),f=e.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:f,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),d=0;;d++){var l=o.k?o.k(d):new n(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(h)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var b=p.getX(),y=b.umod(this.n);if(0!==y.cmpn(0)){var m=l.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==b.cmp(y)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),v^=1),new u({r:y,s:m,recoveryParam:v})}}}}}},h.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,f=a.invm(this.n),c=f.mul(e).umod(this.n),h=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(e,t,r,i){f((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,a=new n(e),s=t.r,c=t.s,h=1&r,d=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),h):this.curve.pointFromX(s,h);var l=t.r.invm(o),p=o.sub(a).mul(l).umod(o),b=c.mul(l).umod(o);return this.g.mulAdd(p,s,b)},h.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../curves":100,"../utils":108,"./key":102,"./signature":103,"bn.js":44,brorand:45,"hmac-drbg":125}],102:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../utils").assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}t.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},{"../utils":108,"bn.js":44}],103:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../utils"),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,a=t.place;o>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}t.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;if(f(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=f(e,r),a=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var c=f(e,r);if(e.length!==c+r.place)return!1;var u=e.slice(r.place,c+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new n(a),this.s=new n(u),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var o=n.concat(r),a=[48];return u(a,o.length),a=a.concat(o),i.encode(a,e)}},{"../utils":108,"bn.js":44}],104:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("../curves"),o=e("../utils"),a=o.assert,s=o.parseBytes,f=e("./key"),c=e("./signature");function u(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}t.exports=u,u.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),f=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:o})},u.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0;){var o;if(i.isOdd()){var a=i.andln(n-1);o=a>(n>>1)-1?(n>>1)-a:a,i.isubn(o)}else o=0;r.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,f=1;f0||t.cmpn(-i)>0;){var o,a,s,f=e.andln(3)+n&3,c=t.andln(3)+i&3;3===f&&(f=-1),3===c&&(c=-1),o=0==(1&f)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==c?f:-f,r[0].push(o),a=0==(1&c)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==f?c:-c,r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},{"bn.js":44,"minimalistic-assert":132,"minimalistic-crypto-utils":133}],109:[function(e,t,r){t.exports={name:"elliptic",version:"6.5.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},{}],110:[function(e,t,r){var n=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var s,f=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),s=0===c.x}catch(e){s=!1}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function h(e,t,r,i){var o,a,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]):(a=e._events=n(null),e._eventsCount=0),s){if("function"==typeof s?s=a[t]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),!s.warned&&(o=u(e))&&o>0&&s.length>o){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",f.name,f.message)}}else s=a[t]=r,++e._eventsCount;return e}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var f=new Error('Unhandled "error" event. ('+t+")");throw f.context=t,f}if(!(r=a[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=y(e,n),o=0;o=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n=0;o--)this.removeListener(e,t[o]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},a.prototype.listenerCount=b,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],111:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("md5.js");t.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),f=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var u=new i;u.update(c),u.update(e),t&&u.update(t),c=u.digest();var h=0;if(a>0){var d=s.length-a;h=Math.min(a,c.length),c.copy(s,d,0,h),a-=h}if(h0){var l=f.length-o,p=Math.min(o,c.length-h);c.copy(f,l,h,h+p),o-=p}}return c.fill(0),{key:s,iv:f}}},{"md5.js":130,"safe-buffer":170}],112:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("stream").Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},{inherits:127,"safe-buffer":170,stream:179}],113:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":114,"./hash/hmac":115,"./hash/ripemd":116,"./hash/sha":117,"./hash/utils":124}],114:[function(e,t,r){"use strict";var n=e("./utils"),i=e("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":124}],124:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits");function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function f(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,o,a,s){var f=0,c=t;return f+=(c=c+n>>>0)>>0)>>0)>>0},r.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},r.sum64_5_hi=function(e,t,r,n,i,o,a,s,f,c){var u=0,h=t;return u+=(h=h+n>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(e,t,r,n,i,o,a,s,f,c){return t+n+o+s+c>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:127,"minimalistic-assert":132}],125:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}t.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length>1,u=-7,h=r?i-1:0,d=r?-1:1,l=e[t+h];for(h+=d,o=l&(1<<-u)-1,l>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===f)return a?NaN:1/0*(l?-1:1);a+=Math.pow(2,n),o-=c}return(l?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,f,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),(t+=a+h>=1?d/f:d*Math.pow(2,1-h))*f>=2&&(a++,f/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*f-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+l]=255&s,l+=p,s/=256,i-=8);for(a=a<0;e[r+l]=255&a,l+=p,a/=256,c-=8);e[r+l-p]|=128*b}},{}],127:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],128:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],129:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],130:[function(e,t,r){"use strict";var n=e("inherits"),i=e("hash-base"),o=e("safe-buffer").Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<>>32-t}function c(e,t,r,n,i,o,a){return f(e+(t&r|~t&n)+i+o|0,a)+t|0}function u(e,t,r,n,i,o,a){return f(e+(t&n|r&~n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return f(e+(t^r^n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return f(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=u(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=u(o,r,n,i,e[6],3225465664,9),i=u(i,o,r,n,e[11],643717713,14),n=u(n,i,o,r,e[0],3921069994,20),r=u(r,n,i,o,e[5],3593408605,5),o=u(o,r,n,i,e[10],38016083,9),i=u(i,o,r,n,e[15],3634488961,14),n=u(n,i,o,r,e[4],3889429448,20),r=u(r,n,i,o,e[9],568446438,5),o=u(o,r,n,i,e[14],3275163606,9),i=u(i,o,r,n,e[3],4107603335,14),n=u(n,i,o,r,e[8],1163531501,20),r=u(r,n,i,o,e[13],2850285829,5),o=u(o,r,n,i,e[2],4243563512,9),i=u(i,o,r,n,e[7],1735328473,14),r=h(r,n=u(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=h(o,r,n,i,e[8],2272392833,11),i=h(i,o,r,n,e[11],1839030562,16),n=h(n,i,o,r,e[14],4259657740,23),r=h(r,n,i,o,e[1],2763975236,4),o=h(o,r,n,i,e[4],1272893353,11),i=h(i,o,r,n,e[7],4139469664,16),n=h(n,i,o,r,e[10],3200236656,23),r=h(r,n,i,o,e[13],681279174,4),o=h(o,r,n,i,e[0],3936430074,11),i=h(i,o,r,n,e[3],3572445317,16),n=h(n,i,o,r,e[6],76029189,23),r=h(r,n,i,o,e[9],3654602809,4),o=h(o,r,n,i,e[12],3873151461,11),i=h(i,o,r,n,e[15],530742520,16),r=d(r,n=h(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,r,n,i,e[7],1126891415,10),i=d(i,o,r,n,e[14],2878612391,15),n=d(n,i,o,r,e[5],4237533241,21),r=d(r,n,i,o,e[12],1700485571,6),o=d(o,r,n,i,e[3],2399980690,10),i=d(i,o,r,n,e[10],4293915773,15),n=d(n,i,o,r,e[1],2240044497,21),r=d(r,n,i,o,e[8],1873313359,6),o=d(o,r,n,i,e[15],4264355552,10),i=d(i,o,r,n,e[6],2734768916,15),n=d(n,i,o,r,e[13],1309151649,21),r=d(r,n,i,o,e[4],4149444226,6),o=d(o,r,n,i,e[11],3174756917,10),i=d(i,o,r,n,e[2],718787259,15),n=d(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=s},{"hash-base":112,inherits:127,"safe-buffer":170}],131:[function(e,t,r){var n=e("bn.js"),i=e("brorand");function o(e){this.rand=e||new i.Rand}t.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),f=0;!s.testn(f);f++);for(var c=e.shrn(f),u=s.toRed(o);t>0;t--){var h=this._randrange(new n(2),s);r&&r(h);var d=h.toRed(o).redPow(c);if(0!==d.cmp(a)&&0!==d.cmp(u)){for(var l=1;l0;t--){var u=this._randrange(new n(2),a),h=e.gcd(u);if(0!==h.cmpn(1))return h;var d=u.toRed(i).redPow(f);if(0!==d.cmp(o)&&0!==d.cmp(c)){for(var l=1;l>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},{}],134:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],135:[function(e,t,r){"use strict";var n=e("asn1.js");r.certificate=e("./certificate");var i=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=a;var s=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),f=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=f;var c=n.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=c;var u=n.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=u,r.DSAparam=n.define("DSAparam",function(){this.int()});var h=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=h;var d=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":136,"asn1.js":29}],136:[function(e,t,r){"use strict";var n=e("asn1.js"),i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),s=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),f=n.define("RelativeDistinguishedName",function(){this.setof(o)}),c=n.define("RDNSequence",function(){this.seqof(f)}),u=n.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),h=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),d=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),l=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(u),this.key("validity").use(h),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())}),p=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});t.exports=p},{"asn1.js":29}],137:[function(e,t,r){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,a=e("evp_bytestokey"),s=e("browserify-aes"),f=e("safe-buffer").Buffer;t.exports=function(e,t){var r,c=e.toString(),u=c.match(n);if(u){var h="aes"+u[1],d=f.from(u[2],"hex"),l=f.from(u[3].replace(/[\r\n]/g,""),"base64"),p=a(t,d.slice(0,8),parseInt(u[1],10)).key,b=[],y=s.createDecipheriv(h,p,d);b.push(y.update(l)),b.push(y.final()),r=f.concat(b)}else{var m=c.match(o);r=new f(m[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},{"browserify-aes":49,evp_bytestokey:111,"safe-buffer":170}],138:[function(e,t,r){var n=e("./asn1"),i=e("./aesid.json"),o=e("./fixProc"),a=e("browserify-aes"),s=e("pbkdf2"),f=e("safe-buffer").Buffer;function c(e){var t;"object"!=typeof e||f.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=f.from(e));var r,c,u=o(e,t),h=u.tag,d=u.data;switch(h){case"CERTIFICATE":c=n.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(d,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+h);case"ENCRYPTED PRIVATE KEY":d=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,h=parseInt(o.split("-")[1],10)/8,d=s.pbkdf2Sync(t,r,n,h,"sha1"),l=a.createDecipheriv(o,d,c),p=[];return p.push(l.update(u)),p.push(l.final()),f.concat(p)}(d=n.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(r=(c=n.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+h);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=n.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=c,c.signature=n.signature},{"./aesid.json":134,"./asn1":135,"./fixProc":137,"browserify-aes":49,pbkdf2:139,"safe-buffer":170}],139:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":140,"./lib/sync":143}],140:[function(e,t,r){(function(r,n){var i,o=e("./precondition"),a=e("./default-encoding"),s=e("./sync"),f=e("safe-buffer").Buffer,c=n.crypto&&n.crypto.subtle,u={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function d(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)}).then(function(e){return f.from(e)})}t.exports=function(e,t,l,p,b,y){"function"==typeof b&&(y=b,b=void 0);var m=u[(b=b||"sha1").toLowerCase()];if(!m||"function"!=typeof n.Promise)return r.nextTick(function(){var r;try{r=s(e,t,l,p,b)}catch(e){return y(e)}y(null,r)});if(o(e,t,l,p),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");f.isBuffer(e)||(e=f.from(e,a)),f.isBuffer(t)||(t=f.from(t,a)),function(e,t){e.then(function(e){r.nextTick(function(){t(null,e)})},function(e){r.nextTick(function(){t(e)})})}(function(e){if(n.process&&!n.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var t=d(i=i||f.alloc(8),i,10,128,e).then(function(){return!0}).catch(function(){return!1});return h[e]=t,t}(m).then(function(r){return r?d(e,t,l,p,m):s(e,t,l,p,b)}),y)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":141,"./precondition":142,"./sync":143,_process:145,"safe-buffer":170}],141:[function(e,t,r){(function(e){var r;e.browser?r="utf-8":r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=r}).call(this,e("_process"))},{_process:145}],142:[function(e,t,r){(function(e){var r=Math.pow(2,30)-1;function n(t,r){if("string"!=typeof t&&!e.isBuffer(t))throw new TypeError(r+" must be a buffer or string")}t.exports=function(e,t,i,o){if(n(e,"Password"),n(t,"Salt"),"number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(o<0||o>r||o!=o)throw new TypeError("Bad key length")}}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":128}],143:[function(e,t,r){var n=e("create-hash/md5"),i=e("ripemd160"),o=e("sha.js"),a=e("./precondition"),s=e("./default-encoding"),f=e("safe-buffer").Buffer,c=f.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,r){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=a(t):t.length1)for(var r=1;rp||new a(t).cmp(l.modulus)>=0)throw new Error("decryption error");d=r?c(new a(t),l):s(t,l);var b=u.alloc(p-d.length);if(d=u.concat([b,d],p),4===h)return function(e,t){var r=e.modulus.byteLength(),n=f("sha1").update(u.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),c=t.slice(a+1),h=o(s,i(c,a)),d=o(c,i(h,r-a-1));if(function(e,t){e=u.from(e),t=u.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;for(;++i=t.length){o++;break}var a=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,d,r);if(3===h)return d;throw new Error("unknown padding")}},{"./mgf":147,"./withPublic":150,"./xor":151,"bn.js":44,"browserify-rsa":67,"create-hash":79,"parse-asn1":138,"safe-buffer":170}],149:[function(e,t,r){var n=e("parse-asn1"),i=e("randombytes"),o=e("create-hash"),a=e("./mgf"),s=e("./xor"),f=e("bn.js"),c=e("./withPublic"),u=e("browserify-rsa"),h=e("safe-buffer").Buffer;t.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var l,p=n(e);if(4===d)l=function(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(h.alloc(0)).digest(),u=c.length,d=2*u;if(n>r-d-2)throw new Error("message too long");var l=h.alloc(r-n-d-2),p=r-u-1,b=i(u),y=s(h.concat([c,l,h.alloc(1,1),t],p),a(b,p)),m=s(b,a(y,u));return new f(h.concat([h.alloc(1),m,y],r))}(p,t);else if(1===d)l=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");n=r?h.alloc(a-o-3,255):function(e){var t,r=h.allocUnsafe(e),n=0,o=i(2*e),a=0;for(;n=0)throw new Error("data too long for modulus")}return r?u(l,p):c(l,p)}},{"./mgf":147,"./withPublic":150,"./xor":151,"bn.js":44,"browserify-rsa":67,"create-hash":79,"parse-asn1":138,randombytes:152,"safe-buffer":170}],150:[function(e,t,r){var n=e("bn.js"),i=e("safe-buffer").Buffer;t.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},{"bn.js":44,"safe-buffer":170}],151:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,n=-1;++no)throw new RangeError("requested too many random bytes");var n=a.allocUnsafe(e);if(e>0)if(e>i)for(var f=0;fu||e<0)throw new TypeError("offset must be a uint32");if(e>f||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>f)throw new RangeError("buffer too small")}function l(e,r,n,i){if(t.browser){var o=e.buffer,s=new Uint8Array(o,r,n);return c.getRandomValues(s),i?void t.nextTick(function(){i(null,e)}):e}if(!i)return a(n).copy(e,r),e;a(n,function(t,n){if(t)return i(t);n.copy(e,r),i(null,e)})}c&&c.getRandomValues||!t.browser?(r.randomFill=function(e,t,r,i){if(!(s.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(t,e.length),d(r,t,e.length),l(e,t,r,i)},r.randomFillSync=function(e,t,r){void 0===t&&(t=0);if(!(s.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(t,e.length),void 0===r&&(r=e.length-t);return d(r,t,e.length),l(e,t,r)}):(r.randomFill=i,r.randomFillSync=i)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:145,randombytes:152,"safe-buffer":170}],154:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":155}],155:[function(e,t,r){"use strict";var n=e("process-nextick-args"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=h;var o=e("core-util-is");o.inherits=e("inherits");var a=e("./_stream_readable"),s=e("./_stream_writable");o.inherits(h,a);for(var f=i(s.prototype),c=0;c0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):x(e,a)):_(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){l("emit readable"),e.emit("readable"),I(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(A,e,t))}function A(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):M(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&T(this),null;var n,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&T(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,l("pipe count=%d opts=%j",o.pipesCount,t);var f=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:g;function c(t,r){l("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),e.removeListener("close",m),e.removeListener("finish",v),e.removeListener("drain",h),e.removeListener("error",y),e.removeListener("unpipe",c),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",b),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){l("onend"),e.end()}o.endEmitted?i.nextTick(f):n.once("end",f),e.on("unpipe",c);var h=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,I(e))}}(n);e.on("drain",h);var d=!1;var p=!1;function b(t){l("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==P(o.pipes,e))&&!d&&(l("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function y(t){l("onerror",t),g(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",v),g()}function v(){l("onfinish"),e.removeListener("close",m),g()}function g(){l("unpipe"),n.unpipe(e)}return n.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",m),e.once("finish",v),e.emit("pipe",n),o.flowing||(l("pipe resume"),n.resume()),e},g.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?i:o.nextTick;v.WritableState=m;var c=e("core-util-is");c.inherits=e("inherits");var u={deprecate:e("util-deprecate")},h=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,l=n.Uint8Array||function(){};var p,b=e("./internal/streams/destroy");function y(){}function m(t,r){s=s||e("./_stream_duplex"),t=t||{};var n=r instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(M,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),M(e,t))}(e,r,n,t,i);else{var a=S(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?f(w,e,r,a,i):w(e,r,a,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(t){if(s=s||e("./_stream_duplex"),!(p.call(v,this)||this instanceof s))return new v(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function g(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),M(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,f=!0;r;)i[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;i.allBuffers=f,g(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,h=r.callback;if(g(e,t,!1,t.objectMode?1:c.length,c,u,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),M(e,t)})}function M(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(v,h),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===v&&(e&&e._writableState instanceof m)}})):p=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof l);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=y),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=b.destroy,v.prototype._undestroy=b.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":155,"./internal/streams/destroy":161,"./internal/streams/stream":162,_process:145,"core-util-is":77,inherits:127,"process-nextick-args":144,"safe-buffer":163,timers:181,"util-deprecate":182}],160:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":163,util:46}],161:[function(e,t,r){"use strict";var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":144}],162:[function(e,t,r){t.exports=e("events").EventEmitter},{events:110}],163:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:75}],164:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function l(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":163}],165:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":166}],166:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":155,"./lib/_stream_passthrough.js":156,"./lib/_stream_readable.js":157,"./lib/_stream_transform.js":158,"./lib/_stream_writable.js":159}],167:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":166}],168:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":159}],169:[function(e,t,r){"use strict";var n=e("buffer").Buffer,i=e("inherits"),o=e("hash-base"),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function l(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function b(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(l,o),l.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,l=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,E=0|this._d,M=0|this._e,k=0;k<80;k+=1){var x,A;k<16?(x=b(r,n,i,o,l,e[s[k]],h[0],c[k]),A=g(w,_,S,E,M,e[f[k]],d[0],u[k])):k<32?(x=y(r,n,i,o,l,e[s[k]],h[1],c[k]),A=v(w,_,S,E,M,e[f[k]],d[1],u[k])):k<48?(x=m(r,n,i,o,l,e[s[k]],h[2],c[k]),A=m(w,_,S,E,M,e[f[k]],d[2],u[k])):k<64?(x=v(r,n,i,o,l,e[s[k]],h[3],c[k]),A=y(w,_,S,E,M,e[f[k]],d[3],u[k])):(x=g(r,n,i,o,l,e[s[k]],h[4],c[k]),A=b(w,_,S,E,M,e[f[k]],d[4],u[k])),r=l,l=o,o=p(i,10),i=n,n=x,w=M,M=E,E=p(S,10),S=_,_=A}var j=this._b+i+E|0;this._b=this._c+o+M|0,this._c=this._d+l+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=j},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=l},{buffer:75,"hash-base":112,inherits:127}],170:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:75}],171:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":170}],172:[function(e,t,r){(r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":173,"./sha1":174,"./sha224":175,"./sha256":176,"./sha384":177,"./sha512":178}],173:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function u(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var d=0;d<80;++d){var l=~~(d/20),p=0|((t=n)<<5|t>>>27)+u(l,i,o,s)+f+r[d]+a[l];f=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=f},{"./hash":171,inherits:127,"safe-buffer":170}],174:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var l=0;l<80;++l){var p=~~(l/20),b=c(n)+h(p,i,o,s)+f+r[l]+a[p]|0;f=s,s=o,o=u(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=f},{"./hash":171,inherits:127,"safe-buffer":170}],175:[function(e,t,r){var n=e("inherits"),i=e("./sha256"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(64);function f(){this.init(),this._w=s,o.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=f},{"./hash":171,"./sha256":176,inherits:127,"safe-buffer":170}],176:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function f(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function l(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,y=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+l(r[m-15])+r[m-16];for(var v=0;v<64;++v){var g=y+d(f)+c(f,p,b)+a[v]+r[v]|0,w=h(n)+u(n,i,o)|0;y=b,b=p,p=f,f=s+g|0,s=o,o=i,i=n,n=g+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=y+this._h|0},f.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=f},{"./hash":171,inherits:127,"safe-buffer":170}],177:[function(e,t,r){var n=e("inherits"),i=e("./sha512"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(160);function f(){this.init(),this._w=s,o.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=f},{"./hash":171,"./sha512":178,inherits:127,"safe-buffer":170}],178:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,f=0|this._fh,v=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,E=0|this._dl,M=0|this._el,k=0|this._fl,x=0|this._gl,A=0|this._hl,j=0;j<32;j+=2)t[j]=e.readInt32BE(4*j),t[j+1]=e.readInt32BE(4*j+4);for(;j<160;j+=2){var B=t[j-30],I=t[j-30+1],R=l(B,I),T=p(I,B),C=b(B=t[j-4],I=t[j-4+1]),P=y(I,B),O=t[j-14],D=t[j-14+1],N=t[j-32],L=t[j-32+1],U=T+D|0,q=R+O+m(U,T)|0;q=(q=q+C+m(U=U+P|0,P)|0)+N+m(U=U+L|0,L)|0,t[j]=q,t[j+1]=U}for(var z=0;z<160;z+=2){q=t[z],U=t[z+1];var K=u(r,n,i),F=u(w,_,S),H=h(r,w),V=h(w,r),W=d(s,M),J=d(M,s),X=a[z],$=a[z+1],G=c(s,f,v),Z=c(M,k,x),Y=A+J|0,Q=g+W+m(Y,A)|0;Q=(Q=(Q=Q+G+m(Y=Y+Z|0,Z)|0)+X+m(Y=Y+$|0,$)|0)+q+m(Y=Y+U|0,U)|0;var ee=V+F|0,te=H+K+m(ee,V)|0;g=v,A=x,v=f,x=k,f=s,k=M,s=o+Q+m(M=E+Y|0,E)|0,o=i,E=S,i=n,S=_,n=r,_=w,r=Q+te+m(w=Y+ee|0,Y)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+E|0,this._el=this._el+M|0,this._fl=this._fl+k|0,this._gl=this._gl+x|0,this._hl=this._hl+A|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,S)|0,this._dh=this._dh+o+m(this._dl,E)|0,this._eh=this._eh+s+m(this._el,M)|0,this._fh=this._fh+f+m(this._fl,k)|0,this._gh=this._gh+v+m(this._gl,x)|0,this._hh=this._hh+g+m(this._hl,A)|0},f.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=f},{"./hash":171,inherits:127,"safe-buffer":170}],179:[function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",f));var a=!1;function s(){a||(a=!0,e.end())}function f(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",f),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("error",c),e.on("error",c),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}},{events:110,inherits:127,"readable-stream/duplex.js":154,"readable-stream/passthrough.js":165,"readable-stream/readable.js":166,"readable-stream/transform.js":167,"readable-stream/writable.js":168}],180:[function(e,t,r){arguments[4][164][0].apply(r,arguments)},{dup:164,"safe-buffer":170}],181:[function(e,t,r){(function(t,n){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},f=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof t?t:function(e){var t=f++,n=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i(function(){s[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof n?n:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":145,timers:181}],182:[function(e,t,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],183:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],184:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],185:[function(e,t,r){(function(t,n){var i=/%[sdj%]/g;r.format=function(e){if(!m(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),f=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),u(n,e,n.depth)}function f(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,t,n){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return m(i)||(i=u(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}(e,t);if(o)return o;var a=Object.keys(t),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),S(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(t);if(0===a.length){if(E(t)){var f=t.name?": "+t.name:"";return e.stylize("[Function"+f+"]","special")}if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(_(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return h(t)}var c,w="",M=!1,k=["{","}"];(l(t)&&(M=!0,k=["[","]"]),E(t))&&(w=" [Function"+(t.name?": "+t.name:"")+"]");return g(t)&&(w=" "+RegExp.prototype.toString.call(t)),_(t)&&(w=" "+Date.prototype.toUTCString.call(t)),S(t)&&(w=" "+h(t)),0!==a.length||M&&0!=t.length?n<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=M?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,w,k)):k[0]+w+k[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i,o){var a,s,f;if((f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),A(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(f.value)<0?(s=b(r)?u(e,f.value,null):u(e,f.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function l(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function b(e){return null===e}function y(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function g(e){return w(e)&&"[object RegExp]"===M(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===M(e)}function S(e){return w(e)&&("[object Error]"===M(e)||e instanceof Error)}function E(e){return"function"==typeof e}function M(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(v(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var n=t.pid;a[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else a[e]=function(){};return a[e]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=l,r.isBoolean=p,r.isNull=b,r.isNullOrUndefined=function(e){return null==e},r.isNumber=y,r.isString=m,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=v,r.isRegExp=g,r.isObject=w,r.isDate=_,r.isError=S,r.isFunction=E,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":"),[e.getDate(),x[e.getMonth()],t].join(" ")),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":184,_process:145,inherits:183}],186:[function(require,module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r=8.0.0"); + }).call(this, e("_process")); + }, + { _process: 145, semver: 26 }, + ], + 7: [ + function (e, t, r) { + var n = e("ms"); + t.exports = function (e, t) { + var r = t || Math.floor(Date.now() / 1e3); + if ("string" == typeof e) { + var i = n(e); + if (void 0 === i) return; + return Math.floor(r + i / 1e3); + } + return "number" == typeof e ? r + e : void 0; + }; + }, + { ms: 24 }, + ], + 8: [ + function (e, t, r) { + "use strict"; + var n = e("buffer").Buffer, + i = e("buffer").SlowBuffer; + function o(e, t) { + if (!n.isBuffer(e) || !n.isBuffer(t)) return !1; + if (e.length !== t.length) return !1; + for (var r = 0, i = 0; i < e.length; i++) r |= e[i] ^ t[i]; + return 0 === r; + } + (t.exports = o), + (o.install = function () { + n.prototype.equal = i.prototype.equal = function (e) { + return o(this, e); + }; + }); + var a = n.prototype.equal, + s = i.prototype.equal; + o.restore = function () { + (n.prototype.equal = a), (i.prototype.equal = s); + }; + }, + { buffer: 75 }, + ], + 9: [ + function (e, t, r) { + "use strict"; + var n = e("safe-buffer").Buffer, + i = e("./param-bytes-for-alg"), + o = 128, + a = 48, + s = 2; + function f(e) { + if (n.isBuffer(e)) return e; + if ("string" == typeof e) return n.from(e, "base64"); + throw new TypeError( + "ECDSA signature must be a Base64 string or a Buffer", + ); + } + function c(e, t, r) { + for (var n = 0; t + n < r && 0 === e[t + n]; ) ++n; + return e[t + n] >= o && --n, n; + } + t.exports = { + derToJose: function (e, t) { + e = f(e); + var r = i(t), + c = r + 1, + u = e.length, + h = 0; + if (e[h++] !== a) + throw new Error('Could not find expected "seq"'); + var d = e[h++]; + if ((d === (1 | o) && (d = e[h++]), u - h < d)) + throw new Error( + '"seq" specified length of "' + + d + + '", only "' + + (u - h) + + '" remaining', + ); + if (e[h++] !== s) + throw new Error('Could not find expected "int" for "r"'); + var l = e[h++]; + if (u - h - 2 < l) + throw new Error( + '"r" specified length of "' + + l + + '", only "' + + (u - h - 2) + + '" available', + ); + if (c < l) + throw new Error( + '"r" specified length of "' + + l + + '", max of "' + + c + + '" is acceptable', + ); + var p = h; + if (((h += l), e[h++] !== s)) + throw new Error('Could not find expected "int" for "s"'); + var b = e[h++]; + if (u - h !== b) + throw new Error( + '"s" specified length of "' + + b + + '", expected "' + + (u - h) + + '"', + ); + if (c < b) + throw new Error( + '"s" specified length of "' + + b + + '", max of "' + + c + + '" is acceptable', + ); + var y = h; + if ((h += b) !== u) + throw new Error( + 'Expected to consume entire buffer, but "' + + (u - h) + + '" bytes remain', + ); + var m = r - l, + v = r - b, + g = n.allocUnsafe(m + l + v + b); + for (h = 0; h < m; ++h) g[h] = 0; + e.copy(g, h, p + Math.max(-m, 0), p + l); + for (var w = (h = r); h < w + v; ++h) g[h] = 0; + return ( + e.copy(g, h, y + Math.max(-v, 0), y + b), + (g = (g = g.toString("base64")) + .replace(/=/g, "") + .replace(/\+/g, "-") + .replace(/\//g, "_")) + ); + }, + joseToDer: function (e, t) { + e = f(e); + var r = i(t), + u = e.length; + if (u !== 2 * r) + throw new TypeError( + '"' + + t + + '" signatures must be "' + + 2 * r + + '" bytes, saw "' + + u + + '"', + ); + var h = c(e, 0, r), + d = c(e, r, e.length), + l = r - h, + p = r - d, + b = 2 + l + 1 + 1 + p, + y = b < o, + m = n.allocUnsafe((y ? 2 : 3) + b), + v = 0; + return ( + (m[v++] = a), + y ? (m[v++] = b) : ((m[v++] = 1 | o), (m[v++] = 255 & b)), + (m[v++] = s), + (m[v++] = l), + h < 0 + ? ((m[v++] = 0), (v += e.copy(m, v, 0, r))) + : (v += e.copy(m, v, h, r)), + (m[v++] = s), + (m[v++] = p), + d < 0 ? ((m[v++] = 0), e.copy(m, v, r)) : e.copy(m, v, r + d), + m + ); + }, + }; + }, + { "./param-bytes-for-alg": 10, "safe-buffer": 25 }, + ], + 10: [ + function (e, t, r) { + "use strict"; + function n(e) { + return ((e / 8) | 0) + (e % 8 == 0 ? 0 : 1); + } + var i = { ES256: n(256), ES384: n(384), ES512: n(521) }; + t.exports = function (e) { + var t = i[e]; + if (t) return t; + throw new Error('Unknown algorithm "' + e + '"'); + }; + }, + {}, + ], + 11: [ + function (e, t, r) { + var n = e("buffer-equal-constant-time"), + i = e("safe-buffer").Buffer, + o = e("crypto"), + a = e("ecdsa-sig-formatter"), + s = e("util"), + f = "secret must be a string or buffer", + c = "key must be a string or a buffer", + u = "key must be a string, a buffer or an object", + h = "function" == typeof o.createPublicKey; + function d(e) { + if (!i.isBuffer(e) && "string" != typeof e) { + if (!h) throw y(c); + if ("object" != typeof e) throw y(c); + if ("string" != typeof e.type) throw y(c); + if ("string" != typeof e.asymmetricKeyType) throw y(c); + if ("function" != typeof e.export) throw y(c); + } + } + function l(e) { + if (!i.isBuffer(e) && "string" != typeof e && "object" != typeof e) + throw y(u); + } + function p(e) { + return e.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function b(e) { + var t = 4 - ((e = e.toString()).length % 4); + if (4 !== t) for (var r = 0; r < t; ++r) e += "="; + return e.replace(/\-/g, "+").replace(/_/g, "/"); + } + function y(e) { + var t = [].slice.call(arguments, 1), + r = s.format.bind(s, e).apply(null, t); + return new TypeError(r); + } + function m(e) { + var t; + return ( + (t = e), + i.isBuffer(t) || "string" == typeof t || (e = JSON.stringify(e)), + e + ); + } + function v(e) { + return function (t, r) { + !(function (e) { + if (!i.isBuffer(e)) { + if ("string" == typeof e) return e; + if (!h) throw y(f); + if ("object" != typeof e) throw y(f); + if ("secret" !== e.type) throw y(f); + if ("function" != typeof e.export) throw y(f); + } + })(r), + (t = m(t)); + var n = o.createHmac("sha" + e, r); + return p((n.update(t), n.digest("base64"))); + }; + } + function g(e) { + return function (t, r, o) { + var a = v(e)(t, o); + return n(i.from(r), i.from(a)); + }; + } + function w(e) { + return function (t, r) { + l(r), (t = m(t)); + var n = o.createSign("RSA-SHA" + e); + return p((n.update(t), n.sign(r, "base64"))); + }; + } + function _(e) { + return function (t, r, n) { + d(n), (t = m(t)), (r = b(r)); + var i = o.createVerify("RSA-SHA" + e); + return i.update(t), i.verify(n, r, "base64"); + }; + } + function S(e) { + return function (t, r) { + l(r), (t = m(t)); + var n = o.createSign("RSA-SHA" + e); + return p( + (n.update(t), + n.sign( + { + key: r, + padding: o.constants.RSA_PKCS1_PSS_PADDING, + saltLength: o.constants.RSA_PSS_SALTLEN_DIGEST, + }, + "base64", + )), + ); + }; + } + function E(e) { + return function (t, r, n) { + d(n), (t = m(t)), (r = b(r)); + var i = o.createVerify("RSA-SHA" + e); + return ( + i.update(t), + i.verify( + { + key: n, + padding: o.constants.RSA_PKCS1_PSS_PADDING, + saltLength: o.constants.RSA_PSS_SALTLEN_DIGEST, + }, + r, + "base64", + ) + ); + }; + } + function M(e) { + var t = w(e); + return function () { + var r = t.apply(null, arguments); + return (r = a.derToJose(r, "ES" + e)); + }; + } + function k(e) { + var t = _(e); + return function (r, n, i) { + return ( + (n = a.joseToDer(n, "ES" + e).toString("base64")), t(r, n, i) + ); + }; + } + function x() { + return function () { + return ""; + }; + } + function A() { + return function (e, t) { + return "" === t; + }; + } + h && ((c += " or a KeyObject"), (f += "or a KeyObject")), + (t.exports = function (e) { + var t = { hs: v, rs: w, ps: S, es: M, none: x }, + r = { hs: g, rs: _, ps: E, es: k, none: A }, + n = e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i); + if (!n) + throw y( + '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".', + e, + ); + var i = (n[1] || n[3]).toLowerCase(), + o = n[2]; + return { sign: t[i](o), verify: r[i](o) }; + }); + }, + { + "buffer-equal-constant-time": 8, + crypto: 83, + "ecdsa-sig-formatter": 9, + "safe-buffer": 25, + util: 185, + }, + ], + 12: [ + function (e, t, r) { + var n = e("./lib/sign-stream"), + i = e("./lib/verify-stream"); + (r.ALGORITHMS = [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "PS256", + "PS384", + "PS512", + "ES256", + "ES384", + "ES512", + ]), + (r.sign = n.sign), + (r.verify = i.verify), + (r.decode = i.decode), + (r.isValid = i.isValid), + (r.createSign = function (e) { + return new n(e); + }), + (r.createVerify = function (e) { + return new i(e); + }); + }, + { "./lib/sign-stream": 14, "./lib/verify-stream": 16 }, + ], + 13: [ + function (e, t, r) { + (function (r) { + var n = e("safe-buffer").Buffer, + i = e("stream"); + function o(e) { + if ( + ((this.buffer = null), + (this.writable = !0), + (this.readable = !0), + !e) + ) + return (this.buffer = n.alloc(0)), this; + if ("function" == typeof e.pipe) + return (this.buffer = n.alloc(0)), e.pipe(this), this; + if (e.length || "object" == typeof e) + return ( + (this.buffer = e), + (this.writable = !1), + r.nextTick( + function () { + this.emit("end", e), + (this.readable = !1), + this.emit("close"); + }.bind(this), + ), + this + ); + throw new TypeError("Unexpected data type (" + typeof e + ")"); + } + e("util").inherits(o, i), + (o.prototype.write = function (e) { + (this.buffer = n.concat([this.buffer, n.from(e)])), + this.emit("data", e); + }), + (o.prototype.end = function (e) { + e && this.write(e), + this.emit("end", e), + this.emit("close"), + (this.writable = !1), + (this.readable = !1); + }), + (t.exports = o); + }).call(this, e("_process")); + }, + { _process: 145, "safe-buffer": 25, stream: 179, util: 185 }, + ], + 14: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer, + i = e("./data-stream"), + o = e("jwa"), + a = e("stream"), + s = e("./tostring"), + f = e("util"); + function c(e, t) { + return n + .from(e, t) + .toString("base64") + .replace(/=/g, "") + .replace(/\+/g, "-") + .replace(/\//g, "_"); + } + function u(e) { + var t = e.header, + r = e.payload, + n = e.secret || e.privateKey, + i = e.encoding, + a = o(t.alg), + u = (function (e, t, r) { + r = r || "utf8"; + var n = c(s(e), "binary"), + i = c(s(t), r); + return f.format("%s.%s", n, i); + })(t, r, i), + h = a.sign(u, n); + return f.format("%s.%s", u, h); + } + function h(e) { + var t = e.secret || e.privateKey || e.key, + r = new i(t); + (this.readable = !0), + (this.header = e.header), + (this.encoding = e.encoding), + (this.secret = this.privateKey = this.key = r), + (this.payload = new i(e.payload)), + this.secret.once( + "close", + function () { + !this.payload.writable && this.readable && this.sign(); + }.bind(this), + ), + this.payload.once( + "close", + function () { + !this.secret.writable && this.readable && this.sign(); + }.bind(this), + ); + } + f.inherits(h, a), + (h.prototype.sign = function () { + try { + var e = u({ + header: this.header, + payload: this.payload.buffer, + secret: this.secret.buffer, + encoding: this.encoding, + }); + return ( + this.emit("done", e), + this.emit("data", e), + this.emit("end"), + (this.readable = !1), + e + ); + } catch (e) { + (this.readable = !1), this.emit("error", e), this.emit("close"); + } + }), + (h.sign = u), + (t.exports = h); + }, + { + "./data-stream": 13, + "./tostring": 15, + jwa: 11, + "safe-buffer": 25, + stream: 179, + util: 185, + }, + ], + 15: [ + function (e, t, r) { + var n = e("buffer").Buffer; + t.exports = function (e) { + return "string" == typeof e + ? e + : "number" == typeof e || n.isBuffer(e) + ? e.toString() + : JSON.stringify(e); + }; + }, + { buffer: 75 }, + ], + 16: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer, + i = e("./data-stream"), + o = e("jwa"), + a = e("stream"), + s = e("./tostring"), + f = e("util"), + c = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; + function u(e) { + if ( + (function (e) { + return "[object Object]" === Object.prototype.toString.call(e); + })(e) + ) + return e; + try { + return JSON.parse(e); + } catch (e) { + return; + } + } + function h(e) { + var t = e.split(".", 1)[0]; + return u(n.from(t, "base64").toString("binary")); + } + function d(e) { + return e.split(".")[2]; + } + function l(e) { + return c.test(e) && !!h(e); + } + function p(e, t, r) { + if (!t) { + var n = new Error("Missing algorithm parameter for jws.verify"); + throw ((n.code = "MISSING_ALGORITHM"), n); + } + var i = d((e = s(e))), + a = (function (e) { + return e.split(".", 2).join("."); + })(e); + return o(t).verify(a, i, r); + } + function b(e, t) { + if (((t = t || {}), !l((e = s(e))))) return null; + var r = h(e); + if (!r) return null; + var i = (function (e, t) { + t = t || "utf8"; + var r = e.split(".")[1]; + return n.from(r, "base64").toString(t); + })(e); + return ( + ("JWT" === r.typ || t.json) && (i = JSON.parse(i, t.encoding)), + { header: r, payload: i, signature: d(e) } + ); + } + function y(e) { + var t = (e = e || {}).secret || e.publicKey || e.key, + r = new i(t); + (this.readable = !0), + (this.algorithm = e.algorithm), + (this.encoding = e.encoding), + (this.secret = this.publicKey = this.key = r), + (this.signature = new i(e.signature)), + this.secret.once( + "close", + function () { + !this.signature.writable && this.readable && this.verify(); + }.bind(this), + ), + this.signature.once( + "close", + function () { + !this.secret.writable && this.readable && this.verify(); + }.bind(this), + ); + } + f.inherits(y, a), + (y.prototype.verify = function () { + try { + var e = p( + this.signature.buffer, + this.algorithm, + this.key.buffer, + ), + t = b(this.signature.buffer, this.encoding); + return ( + this.emit("done", e, t), + this.emit("data", e), + this.emit("end"), + (this.readable = !1), + e + ); + } catch (e) { + (this.readable = !1), this.emit("error", e), this.emit("close"); + } + }), + (y.decode = b), + (y.isValid = l), + (y.verify = p), + (t.exports = y); + }, + { + "./data-stream": 13, + "./tostring": 15, + jwa: 11, + "safe-buffer": 25, + stream: 179, + util: 185, + }, + ], + 17: [ + function (e, t, r) { + var n = 1 / 0, + i = 9007199254740991, + o = 1.7976931348623157e308, + a = NaN, + s = "[object Arguments]", + f = "[object Function]", + c = "[object GeneratorFunction]", + u = "[object String]", + h = "[object Symbol]", + d = /^\s+|\s+$/g, + l = /^[-+]0x[0-9a-f]+$/i, + p = /^0b[01]+$/i, + b = /^0o[0-7]+$/i, + y = /^(?:0|[1-9]\d*)$/, + m = parseInt; + function v(e) { + return e != e; + } + function g(e, t) { + return (function (e, t) { + for (var r = -1, n = e ? e.length : 0, i = Array(n); ++r < n; ) + i[r] = t(e[r], r, e); + return i; + })(t, function (t) { + return e[t]; + }); + } + var w, + _, + S = Object.prototype, + E = S.hasOwnProperty, + M = S.toString, + k = S.propertyIsEnumerable, + x = + ((w = Object.keys), + (_ = Object), + function (e) { + return w(_(e)); + }), + A = Math.max; + function j(e, t) { + var r = + R(e) || + (function (e) { + return ( + (function (e) { + return P(e) && T(e); + })(e) && + E.call(e, "callee") && + (!k.call(e, "callee") || M.call(e) == s) + ); + })(e) + ? (function (e, t) { + for (var r = -1, n = Array(e); ++r < e; ) n[r] = t(r); + return n; + })(e.length, String) + : [], + n = r.length, + i = !!n; + for (var o in e) + (!t && !E.call(e, o)) || + (i && ("length" == o || I(o, n))) || + r.push(o); + return r; + } + function B(e) { + if ( + ((r = (t = e) && t.constructor), + (n = ("function" == typeof r && r.prototype) || S), + t !== n) + ) + return x(e); + var t, + r, + n, + i = []; + for (var o in Object(e)) + E.call(e, o) && "constructor" != o && i.push(o); + return i; + } + function I(e, t) { + return ( + !!(t = null == t ? i : t) && + ("number" == typeof e || y.test(e)) && + e > -1 && + e % 1 == 0 && + e < t + ); + } + var R = Array.isArray; + function T(e) { + return ( + null != e && + (function (e) { + return "number" == typeof e && e > -1 && e % 1 == 0 && e <= i; + })(e.length) && + !(function (e) { + var t = C(e) ? M.call(e) : ""; + return t == f || t == c; + })(e) + ); + } + function C(e) { + var t = typeof e; + return !!e && ("object" == t || "function" == t); + } + function P(e) { + return !!e && "object" == typeof e; + } + t.exports = function (e, t, r, i) { + var s; + (e = T(e) + ? e + : (s = e) + ? g( + s, + (function (e) { + return T(e) ? j(e) : B(e); + })(s), + ) + : []), + (r = + r && !i + ? (function (e) { + var t = (function (e) { + if (!e) return 0 === e ? e : 0; + if ( + (e = (function (e) { + if ("number" == typeof e) return e; + if ( + (function (e) { + return ( + "symbol" == typeof e || + (P(e) && M.call(e) == h) + ); + })(e) + ) + return a; + if (C(e)) { + var t = + "function" == typeof e.valueOf + ? e.valueOf() + : e; + e = C(t) ? t + "" : t; + } + if ("string" != typeof e) return 0 === e ? e : +e; + e = e.replace(d, ""); + var r = p.test(e); + return r || b.test(e) + ? m(e.slice(2), r ? 2 : 8) + : l.test(e) + ? a + : +e; + })(e)) === n || + e === -n + ) { + var t = e < 0 ? -1 : 1; + return t * o; + } + return e == e ? e : 0; + })(e), + r = t % 1; + return t == t ? (r ? t - r : t) : 0; + })(r) + : 0); + var f = e.length; + return ( + r < 0 && (r = A(f + r, 0)), + (function (e) { + return ( + "string" == typeof e || (!R(e) && P(e) && M.call(e) == u) + ); + })(e) + ? r <= f && e.indexOf(t, r) > -1 + : !!f && + (function (e, t, r) { + if (t != t) + return (function (e, t, r, n) { + for ( + var i = e.length, o = r + (n ? 1 : -1); + n ? o-- : ++o < i; + + ) + if (t(e[o], o, e)) return o; + return -1; + })(e, v, r); + for (var n = r - 1, i = e.length; ++n < i; ) + if (e[n] === t) return n; + return -1; + })(e, t, r) > -1 + ); + }; + }, + {}, + ], + 18: [ + function (e, t, r) { + var n = "[object Boolean]", + i = Object.prototype.toString; + t.exports = function (e) { + return ( + !0 === e || + !1 === e || + ((function (e) { + return !!e && "object" == typeof e; + })(e) && + i.call(e) == n) + ); + }; + }, + {}, + ], + 19: [ + function (e, t, r) { + var n = 1 / 0, + i = 1.7976931348623157e308, + o = NaN, + a = "[object Symbol]", + s = /^\s+|\s+$/g, + f = /^[-+]0x[0-9a-f]+$/i, + c = /^0b[01]+$/i, + u = /^0o[0-7]+$/i, + h = parseInt, + d = Object.prototype.toString; + function l(e) { + var t = typeof e; + return !!e && ("object" == t || "function" == t); + } + t.exports = function (e) { + return ( + "number" == typeof e && + e == + (function (e) { + var t = (function (e) { + if (!e) return 0 === e ? e : 0; + if ( + (e = (function (e) { + if ("number" == typeof e) return e; + if ( + (function (e) { + return ( + "symbol" == typeof e || + ((function (e) { + return !!e && "object" == typeof e; + })(e) && + d.call(e) == a) + ); + })(e) + ) + return o; + if (l(e)) { + var t = + "function" == typeof e.valueOf ? e.valueOf() : e; + e = l(t) ? t + "" : t; + } + if ("string" != typeof e) return 0 === e ? e : +e; + e = e.replace(s, ""); + var r = c.test(e); + return r || u.test(e) + ? h(e.slice(2), r ? 2 : 8) + : f.test(e) + ? o + : +e; + })(e)) === n || + e === -n + ) { + var t = e < 0 ? -1 : 1; + return t * i; + } + return e == e ? e : 0; + })(e), + r = t % 1; + return t == t ? (r ? t - r : t) : 0; + })(e) + ); + }; + }, + {}, + ], + 20: [ + function (e, t, r) { + var n = "[object Number]", + i = Object.prototype.toString; + t.exports = function (e) { + return ( + "number" == typeof e || + ((function (e) { + return !!e && "object" == typeof e; + })(e) && + i.call(e) == n) + ); + }; + }, + {}, + ], + 21: [ + function (e, t, r) { + var n = "[object Object]"; + var i, + o, + a = Function.prototype, + s = Object.prototype, + f = a.toString, + c = s.hasOwnProperty, + u = f.call(Object), + h = s.toString, + d = + ((i = Object.getPrototypeOf), + (o = Object), + function (e) { + return i(o(e)); + }); + t.exports = function (e) { + if ( + !(function (e) { + return !!e && "object" == typeof e; + })(e) || + h.call(e) != n || + (function (e) { + var t = !1; + if (null != e && "function" != typeof e.toString) + try { + t = !!(e + ""); + } catch (e) {} + return t; + })(e) + ) + return !1; + var t = d(e); + if (null === t) return !0; + var r = c.call(t, "constructor") && t.constructor; + return "function" == typeof r && r instanceof r && f.call(r) == u; + }; + }, + {}, + ], + 22: [ + function (e, t, r) { + var n = "[object String]", + i = Object.prototype.toString, + o = Array.isArray; + t.exports = function (e) { + return ( + "string" == typeof e || + (!o(e) && + (function (e) { + return !!e && "object" == typeof e; + })(e) && + i.call(e) == n) + ); + }; + }, + {}, + ], + 23: [ + function (e, t, r) { + var n = "Expected a function", + i = 1 / 0, + o = 1.7976931348623157e308, + a = NaN, + s = "[object Symbol]", + f = /^\s+|\s+$/g, + c = /^[-+]0x[0-9a-f]+$/i, + u = /^0b[01]+$/i, + h = /^0o[0-7]+$/i, + d = parseInt, + l = Object.prototype.toString; + function p(e, t) { + var r; + if ("function" != typeof t) throw new TypeError(n); + return ( + (e = (function (e) { + var t = (function (e) { + if (!e) return 0 === e ? e : 0; + if ( + (e = (function (e) { + if ("number" == typeof e) return e; + if ( + (function (e) { + return ( + "symbol" == typeof e || + ((function (e) { + return !!e && "object" == typeof e; + })(e) && + l.call(e) == s) + ); + })(e) + ) + return a; + if (b(e)) { + var t = + "function" == typeof e.valueOf ? e.valueOf() : e; + e = b(t) ? t + "" : t; + } + if ("string" != typeof e) return 0 === e ? e : +e; + e = e.replace(f, ""); + var r = u.test(e); + return r || h.test(e) + ? d(e.slice(2), r ? 2 : 8) + : c.test(e) + ? a + : +e; + })(e)) === i || + e === -i + ) { + var t = e < 0 ? -1 : 1; + return t * o; + } + return e == e ? e : 0; + })(e), + r = t % 1; + return t == t ? (r ? t - r : t) : 0; + })(e)), + function () { + return ( + --e > 0 && (r = t.apply(this, arguments)), + e <= 1 && (t = void 0), + r + ); + } + ); + } + function b(e) { + var t = typeof e; + return !!e && ("object" == t || "function" == t); + } + t.exports = function (e) { + return p(2, e); + }; + }, + {}, + ], + 24: [ + function (e, t, r) { + var n = 1e3, + i = 60 * n, + o = 60 * i, + a = 24 * o, + s = 7 * a, + f = 365.25 * a; + function c(e, t, r, n) { + var i = t >= 1.5 * r; + return Math.round(e / r) + " " + n + (i ? "s" : ""); + } + t.exports = function (e, t) { + t = t || {}; + var r = typeof e; + if ("string" === r && e.length > 0) + return (function (e) { + if ((e = String(e)).length > 100) return; + var t = + /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + e, + ); + if (!t) return; + var r = parseFloat(t[1]); + switch ((t[2] || "ms").toLowerCase()) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return r * f; + case "weeks": + case "week": + case "w": + return r * s; + case "days": + case "day": + case "d": + return r * a; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return r * o; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return r * i; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return r * n; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return r; + default: + return; + } + })(e); + if ("number" === r && isFinite(e)) + return t.long + ? (function (e) { + var t = Math.abs(e); + if (t >= a) return c(e, t, a, "day"); + if (t >= o) return c(e, t, o, "hour"); + if (t >= i) return c(e, t, i, "minute"); + if (t >= n) return c(e, t, n, "second"); + return e + " ms"; + })(e) + : (function (e) { + var t = Math.abs(e); + if (t >= a) return Math.round(e / a) + "d"; + if (t >= o) return Math.round(e / o) + "h"; + if (t >= i) return Math.round(e / i) + "m"; + if (t >= n) return Math.round(e / n) + "s"; + return e + "ms"; + })(e); + throw new Error( + "val is not a non-empty string or a valid number. val=" + + JSON.stringify(e), + ); + }; + }, + {}, + ], + 25: [ + function (e, t, r) { + var n = e("buffer"), + i = n.Buffer; + function o(e, t) { + for (var r in e) t[r] = e[r]; + } + function a(e, t, r) { + return i(e, t, r); + } + i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow + ? (t.exports = n) + : (o(n, r), (r.Buffer = a)), + (a.prototype = Object.create(i.prototype)), + o(i, a), + (a.from = function (e, t, r) { + if ("number" == typeof e) + throw new TypeError("Argument must not be a number"); + return i(e, t, r); + }), + (a.alloc = function (e, t, r) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + var n = i(e); + return ( + void 0 !== t + ? "string" == typeof r + ? n.fill(t, r) + : n.fill(t) + : n.fill(0), + n + ); + }), + (a.allocUnsafe = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return i(e); + }), + (a.allocUnsafeSlow = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return n.SlowBuffer(e); + }); + }, + { buffer: 75 }, + ], + 26: [ + function (e, t, r) { + (function (e) { + var n; + (r = t.exports = X), + (n = + "object" == typeof e && + e.env && + e.env.NODE_DEBUG && + /\bsemver\b/i.test(e.env.NODE_DEBUG) + ? function () { + var e = Array.prototype.slice.call(arguments, 0); + e.unshift("SEMVER"), console.log.apply(console, e); + } + : function () {}), + (r.SEMVER_SPEC_VERSION = "2.0.0"); + var i = 256, + o = Number.MAX_SAFE_INTEGER || 9007199254740991, + a = (r.re = []), + s = (r.src = []), + f = 0, + c = f++; + s[c] = "0|[1-9]\\d*"; + var u = f++; + s[u] = "[0-9]+"; + var h = f++; + s[h] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; + var d = f++; + s[d] = "(" + s[c] + ")\\.(" + s[c] + ")\\.(" + s[c] + ")"; + var l = f++; + s[l] = "(" + s[u] + ")\\.(" + s[u] + ")\\.(" + s[u] + ")"; + var p = f++; + s[p] = "(?:" + s[c] + "|" + s[h] + ")"; + var b = f++; + s[b] = "(?:" + s[u] + "|" + s[h] + ")"; + var y = f++; + s[y] = "(?:-(" + s[p] + "(?:\\." + s[p] + ")*))"; + var m = f++; + s[m] = "(?:-?(" + s[b] + "(?:\\." + s[b] + ")*))"; + var v = f++; + s[v] = "[0-9A-Za-z-]+"; + var g = f++; + s[g] = "(?:\\+(" + s[v] + "(?:\\." + s[v] + ")*))"; + var w = f++, + _ = "v?" + s[d] + s[y] + "?" + s[g] + "?"; + s[w] = "^" + _ + "$"; + var S = "[v=\\s]*" + s[l] + s[m] + "?" + s[g] + "?", + E = f++; + s[E] = "^" + S + "$"; + var M = f++; + s[M] = "((?:<|>)?=?)"; + var k = f++; + s[k] = s[u] + "|x|X|\\*"; + var x = f++; + s[x] = s[c] + "|x|X|\\*"; + var A = f++; + s[A] = + "[v=\\s]*(" + + s[x] + + ")(?:\\.(" + + s[x] + + ")(?:\\.(" + + s[x] + + ")(?:" + + s[y] + + ")?" + + s[g] + + "?)?)?"; + var j = f++; + s[j] = + "[v=\\s]*(" + + s[k] + + ")(?:\\.(" + + s[k] + + ")(?:\\.(" + + s[k] + + ")(?:" + + s[m] + + ")?" + + s[g] + + "?)?)?"; + var B = f++; + s[B] = "^" + s[M] + "\\s*" + s[A] + "$"; + var I = f++; + s[I] = "^" + s[M] + "\\s*" + s[j] + "$"; + var R = f++; + s[R] = + "(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])"; + var T = f++; + s[T] = "(?:~>?)"; + var C = f++; + (s[C] = "(\\s*)" + s[T] + "\\s+"), (a[C] = new RegExp(s[C], "g")); + var P = f++; + s[P] = "^" + s[T] + s[A] + "$"; + var O = f++; + s[O] = "^" + s[T] + s[j] + "$"; + var D = f++; + s[D] = "(?:\\^)"; + var N = f++; + (s[N] = "(\\s*)" + s[D] + "\\s+"), (a[N] = new RegExp(s[N], "g")); + var L = f++; + s[L] = "^" + s[D] + s[A] + "$"; + var U = f++; + s[U] = "^" + s[D] + s[j] + "$"; + var q = f++; + s[q] = "^" + s[M] + "\\s*(" + S + ")$|^$"; + var z = f++; + s[z] = "^" + s[M] + "\\s*(" + _ + ")$|^$"; + var K = f++; + (s[K] = "(\\s*)" + s[M] + "\\s*(" + S + "|" + s[A] + ")"), + (a[K] = new RegExp(s[K], "g")); + var F = f++; + s[F] = "^\\s*(" + s[A] + ")\\s+-\\s+(" + s[A] + ")\\s*$"; + var H = f++; + s[H] = "^\\s*(" + s[j] + ")\\s+-\\s+(" + s[j] + ")\\s*$"; + var V = f++; + s[V] = "(<|>)?=?\\s*\\*"; + for (var W = 0; W < 35; W++) + n(W, s[W]), a[W] || (a[W] = new RegExp(s[W])); + function J(e, t) { + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + e instanceof X) + ) + return e; + if ("string" != typeof e) return null; + if (e.length > i) return null; + if (!(t.loose ? a[E] : a[w]).test(e)) return null; + try { + return new X(e, t); + } catch (e) { + return null; + } + } + function X(e, t) { + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + e instanceof X) + ) { + if (e.loose === t.loose) return e; + e = e.version; + } else if ("string" != typeof e) + throw new TypeError("Invalid Version: " + e); + if (e.length > i) + throw new TypeError( + "version is longer than " + i + " characters", + ); + if (!(this instanceof X)) return new X(e, t); + n("SemVer", e, t), (this.options = t), (this.loose = !!t.loose); + var r = e.trim().match(t.loose ? a[E] : a[w]); + if (!r) throw new TypeError("Invalid Version: " + e); + if ( + ((this.raw = e), + (this.major = +r[1]), + (this.minor = +r[2]), + (this.patch = +r[3]), + this.major > o || this.major < 0) + ) + throw new TypeError("Invalid major version"); + if (this.minor > o || this.minor < 0) + throw new TypeError("Invalid minor version"); + if (this.patch > o || this.patch < 0) + throw new TypeError("Invalid patch version"); + r[4] + ? (this.prerelease = r[4].split(".").map(function (e) { + if (/^[0-9]+$/.test(e)) { + var t = +e; + if (t >= 0 && t < o) return t; + } + return e; + })) + : (this.prerelease = []), + (this.build = r[5] ? r[5].split(".") : []), + this.format(); + } + (r.parse = J), + (r.valid = function (e, t) { + var r = J(e, t); + return r ? r.version : null; + }), + (r.clean = function (e, t) { + var r = J(e.trim().replace(/^[=v]+/, ""), t); + return r ? r.version : null; + }), + (r.SemVer = X), + (X.prototype.format = function () { + return ( + (this.version = + this.major + "." + this.minor + "." + this.patch), + this.prerelease.length && + (this.version += "-" + this.prerelease.join(".")), + this.version + ); + }), + (X.prototype.toString = function () { + return this.version; + }), + (X.prototype.compare = function (e) { + return ( + n("SemVer.compare", this.version, this.options, e), + e instanceof X || (e = new X(e, this.options)), + this.compareMain(e) || this.comparePre(e) + ); + }), + (X.prototype.compareMain = function (e) { + return ( + e instanceof X || (e = new X(e, this.options)), + G(this.major, e.major) || + G(this.minor, e.minor) || + G(this.patch, e.patch) + ); + }), + (X.prototype.comparePre = function (e) { + if ( + (e instanceof X || (e = new X(e, this.options)), + this.prerelease.length && !e.prerelease.length) + ) + return -1; + if (!this.prerelease.length && e.prerelease.length) return 1; + if (!this.prerelease.length && !e.prerelease.length) return 0; + var t = 0; + do { + var r = this.prerelease[t], + i = e.prerelease[t]; + if ( + (n("prerelease compare", t, r, i), + void 0 === r && void 0 === i) + ) + return 0; + if (void 0 === i) return 1; + if (void 0 === r) return -1; + if (r !== i) return G(r, i); + } while (++t); + }), + (X.prototype.inc = function (e, t) { + switch (e) { + case "premajor": + (this.prerelease.length = 0), + (this.patch = 0), + (this.minor = 0), + this.major++, + this.inc("pre", t); + break; + case "preminor": + (this.prerelease.length = 0), + (this.patch = 0), + this.minor++, + this.inc("pre", t); + break; + case "prepatch": + (this.prerelease.length = 0), + this.inc("patch", t), + this.inc("pre", t); + break; + case "prerelease": + 0 === this.prerelease.length && this.inc("patch", t), + this.inc("pre", t); + break; + case "major": + (0 === this.minor && + 0 === this.patch && + 0 !== this.prerelease.length) || + this.major++, + (this.minor = 0), + (this.patch = 0), + (this.prerelease = []); + break; + case "minor": + (0 === this.patch && 0 !== this.prerelease.length) || + this.minor++, + (this.patch = 0), + (this.prerelease = []); + break; + case "patch": + 0 === this.prerelease.length && this.patch++, + (this.prerelease = []); + break; + case "pre": + if (0 === this.prerelease.length) this.prerelease = [0]; + else { + for (var r = this.prerelease.length; --r >= 0; ) + "number" == typeof this.prerelease[r] && + (this.prerelease[r]++, (r = -2)); + -1 === r && this.prerelease.push(0); + } + t && + (this.prerelease[0] === t + ? isNaN(this.prerelease[1]) && + (this.prerelease = [t, 0]) + : (this.prerelease = [t, 0])); + break; + default: + throw new Error("invalid increment argument: " + e); + } + return this.format(), (this.raw = this.version), this; + }), + (r.inc = function (e, t, r, n) { + "string" == typeof r && ((n = r), (r = void 0)); + try { + return new X(e, r).inc(t, n).version; + } catch (e) { + return null; + } + }), + (r.diff = function (e, t) { + if (ee(e, t)) return null; + var r = J(e), + n = J(t), + i = ""; + if (r.prerelease.length || n.prerelease.length) { + i = "pre"; + var o = "prerelease"; + } + for (var a in r) + if ( + ("major" === a || "minor" === a || "patch" === a) && + r[a] !== n[a] + ) + return i + a; + return o; + }), + (r.compareIdentifiers = G); + var $ = /^[0-9]+$/; + function G(e, t) { + var r = $.test(e), + n = $.test(t); + return ( + r && n && ((e = +e), (t = +t)), + e === t ? 0 : r && !n ? -1 : n && !r ? 1 : e < t ? -1 : 1 + ); + } + function Z(e, t, r) { + return new X(e, r).compare(new X(t, r)); + } + function Y(e, t, r) { + return Z(e, t, r) > 0; + } + function Q(e, t, r) { + return Z(e, t, r) < 0; + } + function ee(e, t, r) { + return 0 === Z(e, t, r); + } + function te(e, t, r) { + return 0 !== Z(e, t, r); + } + function re(e, t, r) { + return Z(e, t, r) >= 0; + } + function ne(e, t, r) { + return Z(e, t, r) <= 0; + } + function ie(e, t, r, n) { + switch (t) { + case "===": + return ( + "object" == typeof e && (e = e.version), + "object" == typeof r && (r = r.version), + e === r + ); + case "!==": + return ( + "object" == typeof e && (e = e.version), + "object" == typeof r && (r = r.version), + e !== r + ); + case "": + case "=": + case "==": + return ee(e, r, n); + case "!=": + return te(e, r, n); + case ">": + return Y(e, r, n); + case ">=": + return re(e, r, n); + case "<": + return Q(e, r, n); + case "<=": + return ne(e, r, n); + default: + throw new TypeError("Invalid operator: " + t); + } + } + function oe(e, t) { + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + e instanceof oe) + ) { + if (e.loose === !!t.loose) return e; + e = e.value; + } + if (!(this instanceof oe)) return new oe(e, t); + n("comparator", e, t), + (this.options = t), + (this.loose = !!t.loose), + this.parse(e), + this.semver === ae + ? (this.value = "") + : (this.value = this.operator + this.semver.version), + n("comp", this); + } + (r.rcompareIdentifiers = function (e, t) { + return G(t, e); + }), + (r.major = function (e, t) { + return new X(e, t).major; + }), + (r.minor = function (e, t) { + return new X(e, t).minor; + }), + (r.patch = function (e, t) { + return new X(e, t).patch; + }), + (r.compare = Z), + (r.compareLoose = function (e, t) { + return Z(e, t, !0); + }), + (r.rcompare = function (e, t, r) { + return Z(t, e, r); + }), + (r.sort = function (e, t) { + return e.sort(function (e, n) { + return r.compare(e, n, t); + }); + }), + (r.rsort = function (e, t) { + return e.sort(function (e, n) { + return r.rcompare(e, n, t); + }); + }), + (r.gt = Y), + (r.lt = Q), + (r.eq = ee), + (r.neq = te), + (r.gte = re), + (r.lte = ne), + (r.cmp = ie), + (r.Comparator = oe); + var ae = {}; + function se(e, t) { + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + e instanceof se) + ) + return e.loose === !!t.loose && + e.includePrerelease === !!t.includePrerelease + ? e + : new se(e.raw, t); + if (e instanceof oe) return new se(e.value, t); + if (!(this instanceof se)) return new se(e, t); + if ( + ((this.options = t), + (this.loose = !!t.loose), + (this.includePrerelease = !!t.includePrerelease), + (this.raw = e), + (this.set = e + .split(/\s*\|\|\s*/) + .map(function (e) { + return this.parseRange(e.trim()); + }, this) + .filter(function (e) { + return e.length; + })), + !this.set.length) + ) + throw new TypeError("Invalid SemVer Range: " + e); + this.format(); + } + function fe(e) { + return !e || "x" === e.toLowerCase() || "*" === e; + } + function ce(e, t, r, n, i, o, a, s, f, c, u, h, d) { + return ( + (t = fe(r) + ? "" + : fe(n) + ? ">=" + r + ".0.0" + : fe(i) + ? ">=" + r + "." + n + ".0" + : ">=" + t) + + " " + + (s = fe(f) + ? "" + : fe(c) + ? "<" + (+f + 1) + ".0.0" + : fe(u) + ? "<" + f + "." + (+c + 1) + ".0" + : h + ? "<=" + f + "." + c + "." + u + "-" + h + : "<=" + s) + ).trim(); + } + function ue(e, t, r) { + for (var i = 0; i < e.length; i++) if (!e[i].test(t)) return !1; + if (t.prerelease.length && !r.includePrerelease) { + for (i = 0; i < e.length; i++) + if ( + (n(e[i].semver), + e[i].semver !== ae && e[i].semver.prerelease.length > 0) + ) { + var o = e[i].semver; + if ( + o.major === t.major && + o.minor === t.minor && + o.patch === t.patch + ) + return !0; + } + return !1; + } + return !0; + } + function he(e, t, r) { + try { + t = new se(t, r); + } catch (e) { + return !1; + } + return t.test(e); + } + function de(e, t, r, n) { + var i, o, a, s, f; + switch (((e = new X(e, n)), (t = new se(t, n)), r)) { + case ">": + (i = Y), (o = ne), (a = Q), (s = ">"), (f = ">="); + break; + case "<": + (i = Q), (o = re), (a = Y), (s = "<"), (f = "<="); + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (he(e, t, n)) return !1; + for (var c = 0; c < t.set.length; ++c) { + var u = t.set[c], + h = null, + d = null; + if ( + (u.forEach(function (e) { + e.semver === ae && (e = new oe(">=0.0.0")), + (h = h || e), + (d = d || e), + i(e.semver, h.semver, n) + ? (h = e) + : a(e.semver, d.semver, n) && (d = e); + }), + h.operator === s || h.operator === f) + ) + return !1; + if ((!d.operator || d.operator === s) && o(e, d.semver)) + return !1; + if (d.operator === f && a(e, d.semver)) return !1; + } + return !0; + } + (oe.prototype.parse = function (e) { + var t = this.options.loose ? a[q] : a[z], + r = e.match(t); + if (!r) throw new TypeError("Invalid comparator: " + e); + (this.operator = r[1]), + "=" === this.operator && (this.operator = ""), + r[2] + ? (this.semver = new X(r[2], this.options.loose)) + : (this.semver = ae); + }), + (oe.prototype.toString = function () { + return this.value; + }), + (oe.prototype.test = function (e) { + return ( + n("Comparator.test", e, this.options.loose), + this.semver === ae || + ("string" == typeof e && (e = new X(e, this.options)), + ie(e, this.operator, this.semver, this.options)) + ); + }), + (oe.prototype.intersects = function (e, t) { + if (!(e instanceof oe)) + throw new TypeError("a Comparator is required"); + var r; + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + "" === this.operator) + ) + return (r = new se(e.value, t)), he(this.value, r, t); + if ("" === e.operator) + return (r = new se(this.value, t)), he(e.semver, r, t); + var n = !( + (">=" !== this.operator && ">" !== this.operator) || + (">=" !== e.operator && ">" !== e.operator) + ), + i = !( + ("<=" !== this.operator && "<" !== this.operator) || + ("<=" !== e.operator && "<" !== e.operator) + ), + o = this.semver.version === e.semver.version, + a = !( + (">=" !== this.operator && "<=" !== this.operator) || + (">=" !== e.operator && "<=" !== e.operator) + ), + s = + ie(this.semver, "<", e.semver, t) && + (">=" === this.operator || ">" === this.operator) && + ("<=" === e.operator || "<" === e.operator), + f = + ie(this.semver, ">", e.semver, t) && + ("<=" === this.operator || "<" === this.operator) && + (">=" === e.operator || ">" === e.operator); + return n || i || (o && a) || s || f; + }), + (r.Range = se), + (se.prototype.format = function () { + return ( + (this.range = this.set + .map(function (e) { + return e.join(" ").trim(); + }) + .join("||") + .trim()), + this.range + ); + }), + (se.prototype.toString = function () { + return this.range; + }), + (se.prototype.parseRange = function (e) { + var t = this.options.loose; + e = e.trim(); + var r = t ? a[H] : a[F]; + (e = e.replace(r, ce)), + n("hyphen replace", e), + (e = e.replace(a[K], "$1$2$3")), + n("comparator trim", e, a[K]), + (e = (e = (e = e.replace(a[C], "$1~")).replace(a[N], "$1^")) + .split(/\s+/) + .join(" ")); + var i = t ? a[q] : a[z], + o = e + .split(" ") + .map(function (e) { + return (function (e, t) { + return ( + n("comp", e, t), + (e = (function (e, t) { + return e + .trim() + .split(/\s+/) + .map(function (e) { + return (function (e, t) { + n("caret", e, t); + var r = t.loose ? a[U] : a[L]; + return e.replace(r, function (t, r, i, o, a) { + var s; + return ( + n("caret", e, t, r, i, o, a), + fe(r) + ? (s = "") + : fe(i) + ? (s = + ">=" + + r + + ".0.0 <" + + (+r + 1) + + ".0.0") + : fe(o) + ? (s = + "0" === r + ? ">=" + + r + + "." + + i + + ".0 <" + + r + + "." + + (+i + 1) + + ".0" + : ">=" + + r + + "." + + i + + ".0 <" + + (+r + 1) + + ".0.0") + : a + ? (n("replaceCaret pr", a), + (s = + "0" === r + ? "0" === i + ? ">=" + + r + + "." + + i + + "." + + o + + "-" + + a + + " <" + + r + + "." + + i + + "." + + (+o + 1) + : ">=" + + r + + "." + + i + + "." + + o + + "-" + + a + + " <" + + r + + "." + + (+i + 1) + + ".0" + : ">=" + + r + + "." + + i + + "." + + o + + "-" + + a + + " <" + + (+r + 1) + + ".0.0")) + : (n("no pr"), + (s = + "0" === r + ? "0" === i + ? ">=" + + r + + "." + + i + + "." + + o + + " <" + + r + + "." + + i + + "." + + (+o + 1) + : ">=" + + r + + "." + + i + + "." + + o + + " <" + + r + + "." + + (+i + 1) + + ".0" + : ">=" + + r + + "." + + i + + "." + + o + + " <" + + (+r + 1) + + ".0.0")), + n("caret return", s), + s + ); + }); + })(e, t); + }) + .join(" "); + })(e, t)), + n("caret", e), + (e = (function (e, t) { + return e + .trim() + .split(/\s+/) + .map(function (e) { + return (function (e, t) { + var r = t.loose ? a[O] : a[P]; + return e.replace(r, function (t, r, i, o, a) { + var s; + return ( + n("tilde", e, t, r, i, o, a), + fe(r) + ? (s = "") + : fe(i) + ? (s = + ">=" + + r + + ".0.0 <" + + (+r + 1) + + ".0.0") + : fe(o) + ? (s = + ">=" + + r + + "." + + i + + ".0 <" + + r + + "." + + (+i + 1) + + ".0") + : a + ? (n("replaceTilde pr", a), + (s = + ">=" + + r + + "." + + i + + "." + + o + + "-" + + a + + " <" + + r + + "." + + (+i + 1) + + ".0")) + : (s = + ">=" + + r + + "." + + i + + "." + + o + + " <" + + r + + "." + + (+i + 1) + + ".0"), + n("tilde return", s), + s + ); + }); + })(e, t); + }) + .join(" "); + })(e, t)), + n("tildes", e), + (e = (function (e, t) { + return ( + n("replaceXRanges", e, t), + e + .split(/\s+/) + .map(function (e) { + return (function (e, t) { + e = e.trim(); + var r = t.loose ? a[I] : a[B]; + return e.replace( + r, + function (t, r, i, o, a, s) { + n("xRange", e, t, r, i, o, a, s); + var f = fe(i), + c = f || fe(o), + u = c || fe(a), + h = u; + return ( + "=" === r && h && (r = ""), + f + ? (t = + ">" === r || "<" === r + ? "<0.0.0" + : "*") + : r && h + ? (c && (o = 0), + (a = 0), + ">" === r + ? ((r = ">="), + c + ? ((i = +i + 1), + (o = 0), + (a = 0)) + : ((o = +o + 1), (a = 0))) + : "<=" === r && + ((r = "<"), + c + ? (i = +i + 1) + : (o = +o + 1)), + (t = r + i + "." + o + "." + a)) + : c + ? (t = + ">=" + + i + + ".0.0 <" + + (+i + 1) + + ".0.0") + : u && + (t = + ">=" + + i + + "." + + o + + ".0 <" + + i + + "." + + (+o + 1) + + ".0"), + n("xRange return", t), + t + ); + }, + ); + })(e, t); + }) + .join(" ") + ); + })(e, t)), + n("xrange", e), + (e = (function (e, t) { + return ( + n("replaceStars", e, t), + e.trim().replace(a[V], "") + ); + })(e, t)), + n("stars", e), + e + ); + })(e, this.options); + }, this) + .join(" ") + .split(/\s+/); + return ( + this.options.loose && + (o = o.filter(function (e) { + return !!e.match(i); + })), + (o = o.map(function (e) { + return new oe(e, this.options); + }, this)) + ); + }), + (se.prototype.intersects = function (e, t) { + if (!(e instanceof se)) + throw new TypeError("a Range is required"); + return this.set.some(function (r) { + return r.every(function (r) { + return e.set.some(function (e) { + return e.every(function (e) { + return r.intersects(e, t); + }); + }); + }); + }); + }), + (r.toComparators = function (e, t) { + return new se(e, t).set.map(function (e) { + return e + .map(function (e) { + return e.value; + }) + .join(" ") + .trim() + .split(" "); + }); + }), + (se.prototype.test = function (e) { + if (!e) return !1; + "string" == typeof e && (e = new X(e, this.options)); + for (var t = 0; t < this.set.length; t++) + if (ue(this.set[t], e, this.options)) return !0; + return !1; + }), + (r.satisfies = he), + (r.maxSatisfying = function (e, t, r) { + var n = null, + i = null; + try { + var o = new se(t, r); + } catch (e) { + return null; + } + return ( + e.forEach(function (e) { + o.test(e) && + ((n && -1 !== i.compare(e)) || (i = new X((n = e), r))); + }), + n + ); + }), + (r.minSatisfying = function (e, t, r) { + var n = null, + i = null; + try { + var o = new se(t, r); + } catch (e) { + return null; + } + return ( + e.forEach(function (e) { + o.test(e) && + ((n && 1 !== i.compare(e)) || (i = new X((n = e), r))); + }), + n + ); + }), + (r.minVersion = function (e, t) { + e = new se(e, t); + var r = new X("0.0.0"); + if (e.test(r)) return r; + if (((r = new X("0.0.0-0")), e.test(r))) return r; + r = null; + for (var n = 0; n < e.set.length; ++n) { + var i = e.set[n]; + i.forEach(function (e) { + var t = new X(e.semver.version); + switch (e.operator) { + case ">": + 0 === t.prerelease.length + ? t.patch++ + : t.prerelease.push(0), + (t.raw = t.format()); + case "": + case ">=": + (r && !Y(r, t)) || (r = t); + break; + case "<": + case "<=": + break; + default: + throw new Error("Unexpected operation: " + e.operator); + } + }); + } + if (r && e.test(r)) return r; + return null; + }), + (r.validRange = function (e, t) { + try { + return new se(e, t).range || "*"; + } catch (e) { + return null; + } + }), + (r.ltr = function (e, t, r) { + return de(e, t, "<", r); + }), + (r.gtr = function (e, t, r) { + return de(e, t, ">", r); + }), + (r.outside = de), + (r.prerelease = function (e, t) { + var r = J(e, t); + return r && r.prerelease.length ? r.prerelease : null; + }), + (r.intersects = function (e, t, r) { + return (e = new se(e, r)), (t = new se(t, r)), e.intersects(t); + }), + (r.coerce = function (e) { + if (e instanceof X) return e; + if ("string" != typeof e) return null; + var t = e.match(a[R]); + if (null == t) return null; + return J(t[1] + "." + (t[2] || "0") + "." + (t[3] || "0")); + }); + }).call(this, e("_process")); + }, + { _process: 145 }, + ], + 27: [ + function (e, t, r) { + (function (r) { + var n = e("./lib/timespan"), + i = e("./lib/psSupported"), + o = e("jws"), + a = e("lodash.includes"), + s = e("lodash.isboolean"), + f = e("lodash.isinteger"), + c = e("lodash.isnumber"), + u = e("lodash.isplainobject"), + h = e("lodash.isstring"), + d = e("lodash.once"), + l = [ + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "HS256", + "HS384", + "HS512", + "none", + ]; + i && l.splice(3, 0, "PS256", "PS384", "PS512"); + var p = { + expiresIn: { + isValid: function (e) { + return f(e) || (h(e) && e); + }, + message: + '"expiresIn" should be a number of seconds or string representing a timespan', + }, + notBefore: { + isValid: function (e) { + return f(e) || (h(e) && e); + }, + message: + '"notBefore" should be a number of seconds or string representing a timespan', + }, + audience: { + isValid: function (e) { + return h(e) || Array.isArray(e); + }, + message: '"audience" must be a string or array', + }, + algorithm: { + isValid: a.bind(null, l), + message: '"algorithm" must be a valid string enum value', + }, + header: { isValid: u, message: '"header" must be an object' }, + encoding: { + isValid: h, + message: '"encoding" must be a string', + }, + issuer: { isValid: h, message: '"issuer" must be a string' }, + subject: { isValid: h, message: '"subject" must be a string' }, + jwtid: { isValid: h, message: '"jwtid" must be a string' }, + noTimestamp: { + isValid: s, + message: '"noTimestamp" must be a boolean', + }, + keyid: { isValid: h, message: '"keyid" must be a string' }, + mutatePayload: { + isValid: s, + message: '"mutatePayload" must be a boolean', + }, + }, + b = { + iat: { + isValid: c, + message: '"iat" should be a number of seconds', + }, + exp: { + isValid: c, + message: '"exp" should be a number of seconds', + }, + nbf: { + isValid: c, + message: '"nbf" should be a number of seconds', + }, + }; + function y(e, t, r, n) { + if (!u(r)) + throw new Error('Expected "' + n + '" to be a plain object.'); + Object.keys(r).forEach(function (i) { + var o = e[i]; + if (o) { + if (!o.isValid(r[i])) throw new Error(o.message); + } else if (!t) throw new Error('"' + i + '" is not allowed in "' + n + '"'); + }); + } + var m = { + audience: "aud", + issuer: "iss", + subject: "sub", + jwtid: "jti", + }, + v = [ + "expiresIn", + "notBefore", + "noTimestamp", + "audience", + "issuer", + "subject", + "jwtid", + ]; + t.exports = function (e, t, i, a) { + "function" == typeof i ? ((a = i), (i = {})) : (i = i || {}); + var s = "object" == typeof e && !r.isBuffer(e), + f = Object.assign( + { + alg: i.algorithm || "HS256", + typ: s ? "JWT" : void 0, + kid: i.keyid, + }, + i.header, + ); + function c(e) { + if (a) return a(e); + throw e; + } + if (!t && "none" !== i.algorithm) + return c(new Error("secretOrPrivateKey must have a value")); + if (void 0 === e) return c(new Error("payload is required")); + if (s) { + try { + !(function (e) { + y(b, !0, e, "payload"); + })(e); + } catch (e) { + return c(e); + } + i.mutatePayload || (e = Object.assign({}, e)); + } else { + var u = v.filter(function (e) { + return void 0 !== i[e]; + }); + if (u.length > 0) + return c( + new Error( + "invalid " + + u.join(",") + + " option for " + + typeof e + + " payload", + ), + ); + } + if (void 0 !== e.exp && void 0 !== i.expiresIn) + return c( + new Error( + 'Bad "options.expiresIn" option the payload already has an "exp" property.', + ), + ); + if (void 0 !== e.nbf && void 0 !== i.notBefore) + return c( + new Error( + 'Bad "options.notBefore" option the payload already has an "nbf" property.', + ), + ); + try { + !(function (e) { + y(p, !1, e, "options"); + })(i); + } catch (e) { + return c(e); + } + var h = e.iat || Math.floor(Date.now() / 1e3); + if ( + (i.noTimestamp ? delete e.iat : s && (e.iat = h), + void 0 !== i.notBefore) + ) { + try { + e.nbf = n(i.notBefore, h); + } catch (e) { + return c(e); + } + if (void 0 === e.nbf) + return c( + new Error( + '"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60', + ), + ); + } + if (void 0 !== i.expiresIn && "object" == typeof e) { + try { + e.exp = n(i.expiresIn, h); + } catch (e) { + return c(e); + } + if (void 0 === e.exp) + return c( + new Error( + '"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60', + ), + ); + } + Object.keys(m).forEach(function (t) { + var r = m[t]; + if (void 0 !== i[t]) { + if (void 0 !== e[r]) + return c( + new Error( + 'Bad "options.' + + t + + '" option. The payload already has an "' + + r + + '" property.', + ), + ); + e[r] = i[t]; + } + }); + var l = i.encoding || "utf8"; + if ("function" != typeof a) + return o.sign({ + header: f, + payload: e, + secret: t, + encoding: l, + }); + (a = a && d(a)), + o + .createSign({ + header: f, + privateKey: t, + payload: e, + encoding: l, + }) + .once("error", a) + .once("done", function (e) { + a(null, e); + }); + }; + }).call(this, { + isBuffer: e("../../../node_modules/is-buffer/index.js"), + }); + }, + { + "../../../node_modules/is-buffer/index.js": 128, + "./lib/psSupported": 6, + "./lib/timespan": 7, + jws: 12, + "lodash.includes": 17, + "lodash.isboolean": 18, + "lodash.isinteger": 19, + "lodash.isnumber": 20, + "lodash.isplainobject": 21, + "lodash.isstring": 22, + "lodash.once": 23, + }, + ], + 28: [ + function (e, t, r) { + var n = e("./lib/JsonWebTokenError"), + i = e("./lib/NotBeforeError"), + o = e("./lib/TokenExpiredError"), + a = e("./decode"), + s = e("./lib/timespan"), + f = e("./lib/psSupported"), + c = e("jws"), + u = ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512"], + h = ["RS256", "RS384", "RS512"], + d = ["HS256", "HS384", "HS512"]; + f && + (u.splice(3, 0, "PS256", "PS384", "PS512"), + h.splice(3, 0, "PS256", "PS384", "PS512")), + (t.exports = function (e, t, r, f) { + var l; + if ( + ("function" != typeof r || f || ((f = r), (r = {})), + r || (r = {}), + (r = Object.assign({}, r)), + (l = + f || + function (e, t) { + if (e) throw e; + return t; + }), + r.clockTimestamp && "number" != typeof r.clockTimestamp) + ) + return l(new n("clockTimestamp must be a number")); + if ( + void 0 !== r.nonce && + ("string" != typeof r.nonce || "" === r.nonce.trim()) + ) + return l(new n("nonce must be a non-empty string")); + var p = r.clockTimestamp || Math.floor(Date.now() / 1e3); + if (!e) return l(new n("jwt must be provided")); + if ("string" != typeof e) return l(new n("jwt must be a string")); + var b, + y = e.split("."); + if (3 !== y.length) return l(new n("jwt malformed")); + try { + b = a(e, { complete: !0 }); + } catch (e) { + return l(e); + } + if (!b) return l(new n("invalid token")); + var m, + v = b.header; + if ("function" == typeof t) { + if (!f) + return l( + new n( + "verify must be called asynchronous if secret or public key is provided as a callback", + ), + ); + m = t; + } else + m = function (e, r) { + return r(null, t); + }; + return m(v, function (t, a) { + if (t) + return l( + new n( + "error in secret or public key callback: " + t.message, + ), + ); + var f, + m = "" !== y[2].trim(); + if (!m && a) return l(new n("jwt signature is required")); + if (m && !a) + return l(new n("secret or public key must be provided")); + if ( + (m || r.algorithms || (r.algorithms = ["none"]), + r.algorithms || + (r.algorithms = + ~a.toString().indexOf("BEGIN CERTIFICATE") || + ~a.toString().indexOf("BEGIN PUBLIC KEY") + ? u + : ~a.toString().indexOf("BEGIN RSA PUBLIC KEY") + ? h + : d), + !~r.algorithms.indexOf(b.header.alg)) + ) + return l(new n("invalid algorithm")); + try { + f = c.verify(e, b.header.alg, a); + } catch (e) { + return l(e); + } + if (!f) return l(new n("invalid signature")); + var g = b.payload; + if (void 0 !== g.nbf && !r.ignoreNotBefore) { + if ("number" != typeof g.nbf) + return l(new n("invalid nbf value")); + if (g.nbf > p + (r.clockTolerance || 0)) + return l(new i("jwt not active", new Date(1e3 * g.nbf))); + } + if (void 0 !== g.exp && !r.ignoreExpiration) { + if ("number" != typeof g.exp) + return l(new n("invalid exp value")); + if (p >= g.exp + (r.clockTolerance || 0)) + return l(new o("jwt expired", new Date(1e3 * g.exp))); + } + if (r.audience) { + var w = Array.isArray(r.audience) ? r.audience : [r.audience]; + if ( + !(Array.isArray(g.aud) ? g.aud : [g.aud]).some(function ( + e, + ) { + return w.some(function (t) { + return t instanceof RegExp ? t.test(e) : t === e; + }); + }) + ) + return l( + new n( + "jwt audience invalid. expected: " + w.join(" or "), + ), + ); + } + if ( + r.issuer && + (("string" == typeof r.issuer && g.iss !== r.issuer) || + (Array.isArray(r.issuer) && -1 === r.issuer.indexOf(g.iss))) + ) + return l(new n("jwt issuer invalid. expected: " + r.issuer)); + if (r.subject && g.sub !== r.subject) + return l( + new n("jwt subject invalid. expected: " + r.subject), + ); + if (r.jwtid && g.jti !== r.jwtid) + return l(new n("jwt jwtid invalid. expected: " + r.jwtid)); + if (r.nonce && g.nonce !== r.nonce) + return l(new n("jwt nonce invalid. expected: " + r.nonce)); + if (r.maxAge) { + if ("number" != typeof g.iat) + return l(new n("iat required when maxAge is specified")); + var _ = s(r.maxAge, g.iat); + if (void 0 === _) + return l( + new n( + '"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60', + ), + ); + if (p >= _ + (r.clockTolerance || 0)) + return l(new o("maxAge exceeded", new Date(1e3 * _))); + } + if (!0 === r.complete) { + var S = b.signature; + return l(null, { header: v, payload: g, signature: S }); + } + return l(null, g); + }); + }); + }, + { + "./decode": 1, + "./lib/JsonWebTokenError": 3, + "./lib/NotBeforeError": 4, + "./lib/TokenExpiredError": 5, + "./lib/psSupported": 6, + "./lib/timespan": 7, + jws: 12, + }, + ], + 29: [ + function (e, t, r) { + var n = r; + (n.bignum = e("bn.js")), + (n.define = e("./asn1/api").define), + (n.base = e("./asn1/base")), + (n.constants = e("./asn1/constants")), + (n.decoders = e("./asn1/decoders")), + (n.encoders = e("./asn1/encoders")); + }, + { + "./asn1/api": 30, + "./asn1/base": 32, + "./asn1/constants": 36, + "./asn1/decoders": 38, + "./asn1/encoders": 41, + "bn.js": 44, + }, + ], + 30: [ + function (e, t, r) { + var n = e("../asn1"), + i = e("inherits"); + function o(e, t) { + (this.name = e), + (this.body = t), + (this.decoders = {}), + (this.encoders = {}); + } + (r.define = function (e, t) { + return new o(e, t); + }), + (o.prototype._createNamed = function (t) { + var r; + try { + r = e("vm").runInThisContext( + "(function " + + this.name + + "(entity) {\n this._initNamed(entity);\n})", + ); + } catch (e) { + r = function (e) { + this._initNamed(e); + }; + } + return ( + i(r, t), + (r.prototype._initNamed = function (e) { + t.call(this, e); + }), + new r(this) + ); + }), + (o.prototype._getDecoder = function (e) { + return ( + (e = e || "der"), + this.decoders.hasOwnProperty(e) || + (this.decoders[e] = this._createNamed(n.decoders[e])), + this.decoders[e] + ); + }), + (o.prototype.decode = function (e, t, r) { + return this._getDecoder(t).decode(e, r); + }), + (o.prototype._getEncoder = function (e) { + return ( + (e = e || "der"), + this.encoders.hasOwnProperty(e) || + (this.encoders[e] = this._createNamed(n.encoders[e])), + this.encoders[e] + ); + }), + (o.prototype.encode = function (e, t, r) { + return this._getEncoder(t).encode(e, r); + }); + }, + { "../asn1": 29, inherits: 127, vm: 186 }, + ], + 31: [ + function (e, t, r) { + var n = e("inherits"), + i = e("../base").Reporter, + o = e("buffer").Buffer; + function a(e, t) { + i.call(this, t), + o.isBuffer(e) + ? ((this.base = e), (this.offset = 0), (this.length = e.length)) + : this.error("Input not Buffer"); + } + function s(e, t) { + if (Array.isArray(e)) + (this.length = 0), + (this.value = e.map(function (e) { + return ( + e instanceof s || (e = new s(e, t)), + (this.length += e.length), + e + ); + }, this)); + else if ("number" == typeof e) { + if (!(0 <= e && e <= 255)) + return t.error("non-byte EncoderBuffer value"); + (this.value = e), (this.length = 1); + } else if ("string" == typeof e) + (this.value = e), (this.length = o.byteLength(e)); + else { + if (!o.isBuffer(e)) + return t.error("Unsupported type: " + typeof e); + (this.value = e), (this.length = e.length); + } + } + n(a, i), + (r.DecoderBuffer = a), + (a.prototype.save = function () { + return { + offset: this.offset, + reporter: i.prototype.save.call(this), + }; + }), + (a.prototype.restore = function (e) { + var t = new a(this.base); + return ( + (t.offset = e.offset), + (t.length = this.offset), + (this.offset = e.offset), + i.prototype.restore.call(this, e.reporter), + t + ); + }), + (a.prototype.isEmpty = function () { + return this.offset === this.length; + }), + (a.prototype.readUInt8 = function (e) { + return this.offset + 1 <= this.length + ? this.base.readUInt8(this.offset++, !0) + : this.error(e || "DecoderBuffer overrun"); + }), + (a.prototype.skip = function (e, t) { + if (!(this.offset + e <= this.length)) + return this.error(t || "DecoderBuffer overrun"); + var r = new a(this.base); + return ( + (r._reporterState = this._reporterState), + (r.offset = this.offset), + (r.length = this.offset + e), + (this.offset += e), + r + ); + }), + (a.prototype.raw = function (e) { + return this.base.slice(e ? e.offset : this.offset, this.length); + }), + (r.EncoderBuffer = s), + (s.prototype.join = function (e, t) { + return ( + e || (e = new o(this.length)), + t || (t = 0), + 0 === this.length + ? e + : (Array.isArray(this.value) + ? this.value.forEach(function (r) { + r.join(e, t), (t += r.length); + }) + : ("number" == typeof this.value + ? (e[t] = this.value) + : "string" == typeof this.value + ? e.write(this.value, t) + : o.isBuffer(this.value) && this.value.copy(e, t), + (t += this.length)), + e) + ); + }); + }, + { "../base": 32, buffer: 75, inherits: 127 }, + ], + 32: [ + function (e, t, r) { + var n = r; + (n.Reporter = e("./reporter").Reporter), + (n.DecoderBuffer = e("./buffer").DecoderBuffer), + (n.EncoderBuffer = e("./buffer").EncoderBuffer), + (n.Node = e("./node")); + }, + { "./buffer": 31, "./node": 33, "./reporter": 34 }, + ], + 33: [ + function (e, t, r) { + var n = e("../base").Reporter, + i = e("../base").EncoderBuffer, + o = e("../base").DecoderBuffer, + a = e("minimalistic-assert"), + s = [ + "seq", + "seqof", + "set", + "setof", + "objid", + "bool", + "gentime", + "utctime", + "null_", + "enum", + "int", + "objDesc", + "bitstr", + "bmpstr", + "charstr", + "genstr", + "graphstr", + "ia5str", + "iso646str", + "numstr", + "octstr", + "printstr", + "t61str", + "unistr", + "utf8str", + "videostr", + ], + f = [ + "key", + "obj", + "use", + "optional", + "explicit", + "implicit", + "def", + "choice", + "any", + "contains", + ].concat(s); + function c(e, t) { + var r = {}; + (this._baseState = r), + (r.enc = e), + (r.parent = t || null), + (r.children = null), + (r.tag = null), + (r.args = null), + (r.reverseArgs = null), + (r.choice = null), + (r.optional = !1), + (r.any = !1), + (r.obj = !1), + (r.use = null), + (r.useDecoder = null), + (r.key = null), + (r.default = null), + (r.explicit = null), + (r.implicit = null), + (r.contains = null), + r.parent || ((r.children = []), this._wrap()); + } + t.exports = c; + var u = [ + "enc", + "parent", + "children", + "tag", + "args", + "reverseArgs", + "choice", + "optional", + "any", + "obj", + "use", + "alteredUse", + "key", + "default", + "explicit", + "implicit", + "contains", + ]; + (c.prototype.clone = function () { + var e = this._baseState, + t = {}; + u.forEach(function (r) { + t[r] = e[r]; + }); + var r = new this.constructor(t.parent); + return (r._baseState = t), r; + }), + (c.prototype._wrap = function () { + var e = this._baseState; + f.forEach(function (t) { + this[t] = function () { + var r = new this.constructor(this); + return e.children.push(r), r[t].apply(r, arguments); + }; + }, this); + }), + (c.prototype._init = function (e) { + var t = this._baseState; + a(null === t.parent), + e.call(this), + (t.children = t.children.filter(function (e) { + return e._baseState.parent === this; + }, this)), + a.equal( + t.children.length, + 1, + "Root node can have only one child", + ); + }), + (c.prototype._useArgs = function (e) { + var t = this._baseState, + r = e.filter(function (e) { + return e instanceof this.constructor; + }, this); + (e = e.filter(function (e) { + return !(e instanceof this.constructor); + }, this)), + 0 !== r.length && + (a(null === t.children), + (t.children = r), + r.forEach(function (e) { + e._baseState.parent = this; + }, this)), + 0 !== e.length && + (a(null === t.args), + (t.args = e), + (t.reverseArgs = e.map(function (e) { + if ("object" != typeof e || e.constructor !== Object) + return e; + var t = {}; + return ( + Object.keys(e).forEach(function (r) { + r == (0 | r) && (r |= 0); + var n = e[r]; + t[n] = r; + }), + t + ); + }))); + }), + [ + "_peekTag", + "_decodeTag", + "_use", + "_decodeStr", + "_decodeObjid", + "_decodeTime", + "_decodeNull", + "_decodeInt", + "_decodeBool", + "_decodeList", + "_encodeComposite", + "_encodeStr", + "_encodeObjid", + "_encodeTime", + "_encodeNull", + "_encodeInt", + "_encodeBool", + ].forEach(function (e) { + c.prototype[e] = function () { + var t = this._baseState; + throw new Error(e + " not implemented for encoding: " + t.enc); + }; + }), + s.forEach(function (e) { + c.prototype[e] = function () { + var t = this._baseState, + r = Array.prototype.slice.call(arguments); + return a(null === t.tag), (t.tag = e), this._useArgs(r), this; + }; + }), + (c.prototype.use = function (e) { + a(e); + var t = this._baseState; + return a(null === t.use), (t.use = e), this; + }), + (c.prototype.optional = function () { + return (this._baseState.optional = !0), this; + }), + (c.prototype.def = function (e) { + var t = this._baseState; + return ( + a(null === t.default), (t.default = e), (t.optional = !0), this + ); + }), + (c.prototype.explicit = function (e) { + var t = this._baseState; + return ( + a(null === t.explicit && null === t.implicit), + (t.explicit = e), + this + ); + }), + (c.prototype.implicit = function (e) { + var t = this._baseState; + return ( + a(null === t.explicit && null === t.implicit), + (t.implicit = e), + this + ); + }), + (c.prototype.obj = function () { + var e = this._baseState, + t = Array.prototype.slice.call(arguments); + return (e.obj = !0), 0 !== t.length && this._useArgs(t), this; + }), + (c.prototype.key = function (e) { + var t = this._baseState; + return a(null === t.key), (t.key = e), this; + }), + (c.prototype.any = function () { + return (this._baseState.any = !0), this; + }), + (c.prototype.choice = function (e) { + var t = this._baseState; + return ( + a(null === t.choice), + (t.choice = e), + this._useArgs( + Object.keys(e).map(function (t) { + return e[t]; + }), + ), + this + ); + }), + (c.prototype.contains = function (e) { + var t = this._baseState; + return a(null === t.use), (t.contains = e), this; + }), + (c.prototype._decode = function (e, t) { + var r = this._baseState; + if (null === r.parent) + return e.wrapResult(r.children[0]._decode(e, t)); + var n, + i = r.default, + a = !0, + s = null; + if ((null !== r.key && (s = e.enterKey(r.key)), r.optional)) { + var f = null; + if ( + (null !== r.explicit + ? (f = r.explicit) + : null !== r.implicit + ? (f = r.implicit) + : null !== r.tag && (f = r.tag), + null !== f || r.any) + ) { + if (((a = this._peekTag(e, f, r.any)), e.isError(a))) + return a; + } else { + var c = e.save(); + try { + null === r.choice + ? this._decodeGeneric(r.tag, e, t) + : this._decodeChoice(e, t), + (a = !0); + } catch (e) { + a = !1; + } + e.restore(c); + } + } + if ((r.obj && a && (n = e.enterObject()), a)) { + if (null !== r.explicit) { + var u = this._decodeTag(e, r.explicit); + if (e.isError(u)) return u; + e = u; + } + var h = e.offset; + if (null === r.use && null === r.choice) { + if (r.any) c = e.save(); + var d = this._decodeTag( + e, + null !== r.implicit ? r.implicit : r.tag, + r.any, + ); + if (e.isError(d)) return d; + r.any ? (i = e.raw(c)) : (e = d); + } + if ( + (t && + t.track && + null !== r.tag && + t.track(e.path(), h, e.length, "tagged"), + t && + t.track && + null !== r.tag && + t.track(e.path(), e.offset, e.length, "content"), + (i = r.any + ? i + : null === r.choice + ? this._decodeGeneric(r.tag, e, t) + : this._decodeChoice(e, t)), + e.isError(i)) + ) + return i; + if ( + (r.any || + null !== r.choice || + null === r.children || + r.children.forEach(function (r) { + r._decode(e, t); + }), + r.contains && ("octstr" === r.tag || "bitstr" === r.tag)) + ) { + var l = new o(i); + i = this._getUse(r.contains, e._reporterState.obj)._decode( + l, + t, + ); + } + } + return ( + r.obj && a && (i = e.leaveObject(n)), + null === r.key || (null === i && !0 !== a) + ? null !== s && e.exitKey(s) + : e.leaveKey(s, r.key, i), + i + ); + }), + (c.prototype._decodeGeneric = function (e, t, r) { + var n = this._baseState; + return "seq" === e || "set" === e + ? null + : "seqof" === e || "setof" === e + ? this._decodeList(t, e, n.args[0], r) + : /str$/.test(e) + ? this._decodeStr(t, e, r) + : "objid" === e && n.args + ? this._decodeObjid(t, n.args[0], n.args[1], r) + : "objid" === e + ? this._decodeObjid(t, null, null, r) + : "gentime" === e || "utctime" === e + ? this._decodeTime(t, e, r) + : "null_" === e + ? this._decodeNull(t, r) + : "bool" === e + ? this._decodeBool(t, r) + : "objDesc" === e + ? this._decodeStr(t, e, r) + : "int" === e || "enum" === e + ? this._decodeInt(t, n.args && n.args[0], r) + : null !== n.use + ? this._getUse(n.use, t._reporterState.obj)._decode(t, r) + : t.error("unknown tag: " + e); + }), + (c.prototype._getUse = function (e, t) { + var r = this._baseState; + return ( + (r.useDecoder = this._use(e, t)), + a(null === r.useDecoder._baseState.parent), + (r.useDecoder = r.useDecoder._baseState.children[0]), + r.implicit !== r.useDecoder._baseState.implicit && + ((r.useDecoder = r.useDecoder.clone()), + (r.useDecoder._baseState.implicit = r.implicit)), + r.useDecoder + ); + }), + (c.prototype._decodeChoice = function (e, t) { + var r = this._baseState, + n = null, + i = !1; + return ( + Object.keys(r.choice).some(function (o) { + var a = e.save(), + s = r.choice[o]; + try { + var f = s._decode(e, t); + if (e.isError(f)) return !1; + (n = { type: o, value: f }), (i = !0); + } catch (t) { + return e.restore(a), !1; + } + return !0; + }, this), + i ? n : e.error("Choice not matched") + ); + }), + (c.prototype._createEncoderBuffer = function (e) { + return new i(e, this.reporter); + }), + (c.prototype._encode = function (e, t, r) { + var n = this._baseState; + if (null === n.default || n.default !== e) { + var i = this._encodeValue(e, t, r); + if (void 0 !== i && !this._skipDefault(i, t, r)) return i; + } + }), + (c.prototype._encodeValue = function (e, t, r) { + var i = this._baseState; + if (null === i.parent) + return i.children[0]._encode(e, t || new n()); + var o = null; + if (((this.reporter = t), i.optional && void 0 === e)) { + if (null === i.default) return; + e = i.default; + } + var a = null, + s = !1; + if (i.any) o = this._createEncoderBuffer(e); + else if (i.choice) o = this._encodeChoice(e, t); + else if (i.contains) + (a = this._getUse(i.contains, r)._encode(e, t)), (s = !0); + else if (i.children) + (a = i.children + .map(function (r) { + if ("null_" === r._baseState.tag) + return r._encode(null, t, e); + if (null === r._baseState.key) + return t.error("Child should have a key"); + var n = t.enterKey(r._baseState.key); + if ("object" != typeof e) + return t.error("Child expected, but input is not object"); + var i = r._encode(e[r._baseState.key], t, e); + return t.leaveKey(n), i; + }, this) + .filter(function (e) { + return e; + })), + (a = this._createEncoderBuffer(a)); + else if ("seqof" === i.tag || "setof" === i.tag) { + if (!i.args || 1 !== i.args.length) + return t.error("Too many args for : " + i.tag); + if (!Array.isArray(e)) + return t.error("seqof/setof, but data is not Array"); + var f = this.clone(); + (f._baseState.implicit = null), + (a = this._createEncoderBuffer( + e.map(function (r) { + var n = this._baseState; + return this._getUse(n.args[0], e)._encode(r, t); + }, f), + )); + } else + null !== i.use + ? (o = this._getUse(i.use, r)._encode(e, t)) + : ((a = this._encodePrimitive(i.tag, e)), (s = !0)); + if (!i.any && null === i.choice) { + var c = null !== i.implicit ? i.implicit : i.tag, + u = null === i.implicit ? "universal" : "context"; + null === c + ? null === i.use && + t.error("Tag could be omitted only for .use()") + : null === i.use && (o = this._encodeComposite(c, s, u, a)); + } + return ( + null !== i.explicit && + (o = this._encodeComposite(i.explicit, !1, "context", o)), + o + ); + }), + (c.prototype._encodeChoice = function (e, t) { + var r = this._baseState, + n = r.choice[e.type]; + return ( + n || + a( + !1, + e.type + + " not found in " + + JSON.stringify(Object.keys(r.choice)), + ), + n._encode(e.value, t) + ); + }), + (c.prototype._encodePrimitive = function (e, t) { + var r = this._baseState; + if (/str$/.test(e)) return this._encodeStr(t, e); + if ("objid" === e && r.args) + return this._encodeObjid(t, r.reverseArgs[0], r.args[1]); + if ("objid" === e) return this._encodeObjid(t, null, null); + if ("gentime" === e || "utctime" === e) + return this._encodeTime(t, e); + if ("null_" === e) return this._encodeNull(); + if ("int" === e || "enum" === e) + return this._encodeInt(t, r.args && r.reverseArgs[0]); + if ("bool" === e) return this._encodeBool(t); + if ("objDesc" === e) return this._encodeStr(t, e); + throw new Error("Unsupported tag: " + e); + }), + (c.prototype._isNumstr = function (e) { + return /^[0-9 ]*$/.test(e); + }), + (c.prototype._isPrintstr = function (e) { + return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e); + }); + }, + { "../base": 32, "minimalistic-assert": 132 }, + ], + 34: [ + function (e, t, r) { + var n = e("inherits"); + function i(e) { + this._reporterState = { + obj: null, + path: [], + options: e || {}, + errors: [], + }; + } + function o(e, t) { + (this.path = e), this.rethrow(t); + } + (r.Reporter = i), + (i.prototype.isError = function (e) { + return e instanceof o; + }), + (i.prototype.save = function () { + var e = this._reporterState; + return { obj: e.obj, pathLen: e.path.length }; + }), + (i.prototype.restore = function (e) { + var t = this._reporterState; + (t.obj = e.obj), (t.path = t.path.slice(0, e.pathLen)); + }), + (i.prototype.enterKey = function (e) { + return this._reporterState.path.push(e); + }), + (i.prototype.exitKey = function (e) { + var t = this._reporterState; + t.path = t.path.slice(0, e - 1); + }), + (i.prototype.leaveKey = function (e, t, r) { + var n = this._reporterState; + this.exitKey(e), null !== n.obj && (n.obj[t] = r); + }), + (i.prototype.path = function () { + return this._reporterState.path.join("/"); + }), + (i.prototype.enterObject = function () { + var e = this._reporterState, + t = e.obj; + return (e.obj = {}), t; + }), + (i.prototype.leaveObject = function (e) { + var t = this._reporterState, + r = t.obj; + return (t.obj = e), r; + }), + (i.prototype.error = function (e) { + var t, + r = this._reporterState, + n = e instanceof o; + if ( + ((t = n + ? e + : new o( + r.path + .map(function (e) { + return "[" + JSON.stringify(e) + "]"; + }) + .join(""), + e.message || e, + e.stack, + )), + !r.options.partial) + ) + throw t; + return n || r.errors.push(t), t; + }), + (i.prototype.wrapResult = function (e) { + var t = this._reporterState; + return t.options.partial + ? { result: this.isError(e) ? null : e, errors: t.errors } + : e; + }), + n(o, Error), + (o.prototype.rethrow = function (e) { + if ( + ((this.message = e + " at: " + (this.path || "(shallow)")), + Error.captureStackTrace && Error.captureStackTrace(this, o), + !this.stack) + ) + try { + throw new Error(this.message); + } catch (e) { + this.stack = e.stack; + } + return this; + }); + }, + { inherits: 127 }, + ], + 35: [ + function (e, t, r) { + var n = e("../constants"); + (r.tagClass = { + 0: "universal", + 1: "application", + 2: "context", + 3: "private", + }), + (r.tagClassByName = n._reverse(r.tagClass)), + (r.tag = { + 0: "end", + 1: "bool", + 2: "int", + 3: "bitstr", + 4: "octstr", + 5: "null_", + 6: "objid", + 7: "objDesc", + 8: "external", + 9: "real", + 10: "enum", + 11: "embed", + 12: "utf8str", + 13: "relativeOid", + 16: "seq", + 17: "set", + 18: "numstr", + 19: "printstr", + 20: "t61str", + 21: "videostr", + 22: "ia5str", + 23: "utctime", + 24: "gentime", + 25: "graphstr", + 26: "iso646str", + 27: "genstr", + 28: "unistr", + 29: "charstr", + 30: "bmpstr", + }), + (r.tagByName = n._reverse(r.tag)); + }, + { "../constants": 36 }, + ], + 36: [ + function (e, t, r) { + var n = r; + (n._reverse = function (e) { + var t = {}; + return ( + Object.keys(e).forEach(function (r) { + (0 | r) == r && (r |= 0); + var n = e[r]; + t[n] = r; + }), + t + ); + }), + (n.der = e("./der")); + }, + { "./der": 35 }, + ], + 37: [ + function (e, t, r) { + var n = e("inherits"), + i = e("../../asn1"), + o = i.base, + a = i.bignum, + s = i.constants.der; + function f(e) { + (this.enc = "der"), + (this.name = e.name), + (this.entity = e), + (this.tree = new c()), + this.tree._init(e.body); + } + function c(e) { + o.Node.call(this, "der", e); + } + function u(e, t) { + var r = e.readUInt8(t); + if (e.isError(r)) return r; + var n = s.tagClass[r >> 6], + i = 0 == (32 & r); + if (31 == (31 & r)) { + var o = r; + for (r = 0; 128 == (128 & o); ) { + if (((o = e.readUInt8(t)), e.isError(o))) return o; + (r <<= 7), (r |= 127 & o); + } + } else r &= 31; + return { cls: n, primitive: i, tag: r, tagStr: s.tag[r] }; + } + function h(e, t, r) { + var n = e.readUInt8(r); + if (e.isError(n)) return n; + if (!t && 128 === n) return null; + if (0 == (128 & n)) return n; + var i = 127 & n; + if (i > 4) return e.error("length octect is too long"); + n = 0; + for (var o = 0; o < i; o++) { + n <<= 8; + var a = e.readUInt8(r); + if (e.isError(a)) return a; + n |= a; + } + return n; + } + (t.exports = f), + (f.prototype.decode = function (e, t) { + return ( + e instanceof o.DecoderBuffer || (e = new o.DecoderBuffer(e, t)), + this.tree._decode(e, t) + ); + }), + n(c, o.Node), + (c.prototype._peekTag = function (e, t, r) { + if (e.isEmpty()) return !1; + var n = e.save(), + i = u(e, 'Failed to peek tag: "' + t + '"'); + return e.isError(i) + ? i + : (e.restore(n), + i.tag === t || i.tagStr === t || i.tagStr + "of" === t || r); + }), + (c.prototype._decodeTag = function (e, t, r) { + var n = u(e, 'Failed to decode tag of "' + t + '"'); + if (e.isError(n)) return n; + var i = h(e, n.primitive, 'Failed to get length of "' + t + '"'); + if (e.isError(i)) return i; + if (!r && n.tag !== t && n.tagStr !== t && n.tagStr + "of" !== t) + return e.error('Failed to match tag: "' + t + '"'); + if (n.primitive || null !== i) + return e.skip(i, 'Failed to match body of: "' + t + '"'); + var o = e.save(), + a = this._skipUntilEnd( + e, + 'Failed to skip indefinite length body: "' + this.tag + '"', + ); + return e.isError(a) + ? a + : ((i = e.offset - o.offset), + e.restore(o), + e.skip(i, 'Failed to match body of: "' + t + '"')); + }), + (c.prototype._skipUntilEnd = function (e, t) { + for (;;) { + var r = u(e, t); + if (e.isError(r)) return r; + var n, + i = h(e, r.primitive, t); + if (e.isError(i)) return i; + if ( + ((n = + r.primitive || null !== i + ? e.skip(i) + : this._skipUntilEnd(e, t)), + e.isError(n)) + ) + return n; + if ("end" === r.tagStr) break; + } + }), + (c.prototype._decodeList = function (e, t, r, n) { + for (var i = []; !e.isEmpty(); ) { + var o = this._peekTag(e, "end"); + if (e.isError(o)) return o; + var a = r.decode(e, "der", n); + if (e.isError(a) && o) break; + i.push(a); + } + return i; + }), + (c.prototype._decodeStr = function (e, t) { + if ("bitstr" === t) { + var r = e.readUInt8(); + return e.isError(r) ? r : { unused: r, data: e.raw() }; + } + if ("bmpstr" === t) { + var n = e.raw(); + if (n.length % 2 == 1) + return e.error( + "Decoding of string type: bmpstr length mismatch", + ); + for (var i = "", o = 0; o < n.length / 2; o++) + i += String.fromCharCode(n.readUInt16BE(2 * o)); + return i; + } + if ("numstr" === t) { + var a = e.raw().toString("ascii"); + return this._isNumstr(a) + ? a + : e.error( + "Decoding of string type: numstr unsupported characters", + ); + } + if ("octstr" === t) return e.raw(); + if ("objDesc" === t) return e.raw(); + if ("printstr" === t) { + var s = e.raw().toString("ascii"); + return this._isPrintstr(s) + ? s + : e.error( + "Decoding of string type: printstr unsupported characters", + ); + } + return /str$/.test(t) + ? e.raw().toString() + : e.error("Decoding of string type: " + t + " unsupported"); + }), + (c.prototype._decodeObjid = function (e, t, r) { + for (var n, i = [], o = 0; !e.isEmpty(); ) { + var a = e.readUInt8(); + (o <<= 7), + (o |= 127 & a), + 0 == (128 & a) && (i.push(o), (o = 0)); + } + 128 & a && i.push(o); + var s = (i[0] / 40) | 0, + f = i[0] % 40; + if (((n = r ? i : [s, f].concat(i.slice(1))), t)) { + var c = t[n.join(" ")]; + void 0 === c && (c = t[n.join(".")]), void 0 !== c && (n = c); + } + return n; + }), + (c.prototype._decodeTime = function (e, t) { + var r = e.raw().toString(); + if ("gentime" === t) + var n = 0 | r.slice(0, 4), + i = 0 | r.slice(4, 6), + o = 0 | r.slice(6, 8), + a = 0 | r.slice(8, 10), + s = 0 | r.slice(10, 12), + f = 0 | r.slice(12, 14); + else { + if ("utctime" !== t) + return e.error( + "Decoding " + t + " time is not supported yet", + ); + (n = 0 | r.slice(0, 2)), + (i = 0 | r.slice(2, 4)), + (o = 0 | r.slice(4, 6)), + (a = 0 | r.slice(6, 8)), + (s = 0 | r.slice(8, 10)), + (f = 0 | r.slice(10, 12)); + n = n < 70 ? 2e3 + n : 1900 + n; + } + return Date.UTC(n, i - 1, o, a, s, f, 0); + }), + (c.prototype._decodeNull = function (e) { + return null; + }), + (c.prototype._decodeBool = function (e) { + var t = e.readUInt8(); + return e.isError(t) ? t : 0 !== t; + }), + (c.prototype._decodeInt = function (e, t) { + var r = e.raw(), + n = new a(r); + return t && (n = t[n.toString(10)] || n), n; + }), + (c.prototype._use = function (e, t) { + return ( + "function" == typeof e && (e = e(t)), e._getDecoder("der").tree + ); + }); + }, + { "../../asn1": 29, inherits: 127 }, + ], + 38: [ + function (e, t, r) { + var n = r; + (n.der = e("./der")), (n.pem = e("./pem")); + }, + { "./der": 37, "./pem": 39 }, + ], + 39: [ + function (e, t, r) { + var n = e("inherits"), + i = e("buffer").Buffer, + o = e("./der"); + function a(e) { + o.call(this, e), (this.enc = "pem"); + } + n(a, o), + (t.exports = a), + (a.prototype.decode = function (e, t) { + for ( + var r = e.toString().split(/[\r\n]+/g), + n = t.label.toUpperCase(), + a = /^-----(BEGIN|END) ([^-]+)-----$/, + s = -1, + f = -1, + c = 0; + c < r.length; + c++ + ) { + var u = r[c].match(a); + if (null !== u && u[2] === n) { + if (-1 !== s) { + if ("END" !== u[1]) break; + f = c; + break; + } + if ("BEGIN" !== u[1]) break; + s = c; + } + } + if (-1 === s || -1 === f) + throw new Error("PEM section not found for: " + n); + var h = r.slice(s + 1, f).join(""); + h.replace(/[^a-z0-9\+\/=]+/gi, ""); + var d = new i(h, "base64"); + return o.prototype.decode.call(this, d, t); + }); + }, + { "./der": 37, buffer: 75, inherits: 127 }, + ], + 40: [ + function (e, t, r) { + var n = e("inherits"), + i = e("buffer").Buffer, + o = e("../../asn1"), + a = o.base, + s = o.constants.der; + function f(e) { + (this.enc = "der"), + (this.name = e.name), + (this.entity = e), + (this.tree = new c()), + this.tree._init(e.body); + } + function c(e) { + a.Node.call(this, "der", e); + } + function u(e) { + return e < 10 ? "0" + e : e; + } + (t.exports = f), + (f.prototype.encode = function (e, t) { + return this.tree._encode(e, t).join(); + }), + n(c, a.Node), + (c.prototype._encodeComposite = function (e, t, r, n) { + var o, + a = (function (e, t, r, n) { + var i; + "seqof" === e ? (e = "seq") : "setof" === e && (e = "set"); + if (s.tagByName.hasOwnProperty(e)) i = s.tagByName[e]; + else { + if ("number" != typeof e || (0 | e) !== e) + return n.error("Unknown tag: " + e); + i = e; + } + if (i >= 31) + return n.error("Multi-octet tag encoding unsupported"); + t || (i |= 32); + return (i |= s.tagClassByName[r || "universal"] << 6); + })(e, t, r, this.reporter); + if (n.length < 128) + return ( + ((o = new i(2))[0] = a), + (o[1] = n.length), + this._createEncoderBuffer([o, n]) + ); + for (var f = 1, c = n.length; c >= 256; c >>= 8) f++; + ((o = new i(2 + f))[0] = a), (o[1] = 128 | f); + c = 1 + f; + for (var u = n.length; u > 0; c--, u >>= 8) o[c] = 255 & u; + return this._createEncoderBuffer([o, n]); + }), + (c.prototype._encodeStr = function (e, t) { + if ("bitstr" === t) + return this._createEncoderBuffer([0 | e.unused, e.data]); + if ("bmpstr" === t) { + for (var r = new i(2 * e.length), n = 0; n < e.length; n++) + r.writeUInt16BE(e.charCodeAt(n), 2 * n); + return this._createEncoderBuffer(r); + } + return "numstr" === t + ? this._isNumstr(e) + ? this._createEncoderBuffer(e) + : this.reporter.error( + "Encoding of string type: numstr supports only digits and space", + ) + : "printstr" === t + ? this._isPrintstr(e) + ? this._createEncoderBuffer(e) + : this.reporter.error( + "Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark", + ) + : /str$/.test(t) + ? this._createEncoderBuffer(e) + : "objDesc" === t + ? this._createEncoderBuffer(e) + : this.reporter.error( + "Encoding of string type: " + t + " unsupported", + ); + }), + (c.prototype._encodeObjid = function (e, t, r) { + if ("string" == typeof e) { + if (!t) + return this.reporter.error( + "string objid given, but no values map found", + ); + if (!t.hasOwnProperty(e)) + return this.reporter.error("objid not found in values map"); + e = t[e].split(/[\s\.]+/g); + for (var n = 0; n < e.length; n++) e[n] |= 0; + } else if (Array.isArray(e)) { + e = e.slice(); + for (n = 0; n < e.length; n++) e[n] |= 0; + } + if (!Array.isArray(e)) + return this.reporter.error( + "objid() should be either array or string, got: " + + JSON.stringify(e), + ); + if (!r) { + if (e[1] >= 40) + return this.reporter.error("Second objid identifier OOB"); + e.splice(0, 2, 40 * e[0] + e[1]); + } + var o = 0; + for (n = 0; n < e.length; n++) { + var a = e[n]; + for (o++; a >= 128; a >>= 7) o++; + } + var s = new i(o), + f = s.length - 1; + for (n = e.length - 1; n >= 0; n--) { + a = e[n]; + for (s[f--] = 127 & a; (a >>= 7) > 0; ) + s[f--] = 128 | (127 & a); + } + return this._createEncoderBuffer(s); + }), + (c.prototype._encodeTime = function (e, t) { + var r, + n = new Date(e); + return ( + "gentime" === t + ? (r = [ + u(n.getFullYear()), + u(n.getUTCMonth() + 1), + u(n.getUTCDate()), + u(n.getUTCHours()), + u(n.getUTCMinutes()), + u(n.getUTCSeconds()), + "Z", + ].join("")) + : "utctime" === t + ? (r = [ + u(n.getFullYear() % 100), + u(n.getUTCMonth() + 1), + u(n.getUTCDate()), + u(n.getUTCHours()), + u(n.getUTCMinutes()), + u(n.getUTCSeconds()), + "Z", + ].join("")) + : this.reporter.error( + "Encoding " + t + " time is not supported yet", + ), + this._encodeStr(r, "octstr") + ); + }), + (c.prototype._encodeNull = function () { + return this._createEncoderBuffer(""); + }), + (c.prototype._encodeInt = function (e, t) { + if ("string" == typeof e) { + if (!t) + return this.reporter.error( + "String int or enum given, but no values map", + ); + if (!t.hasOwnProperty(e)) + return this.reporter.error( + "Values map doesn't contain: " + JSON.stringify(e), + ); + e = t[e]; + } + if ("number" != typeof e && !i.isBuffer(e)) { + var r = e.toArray(); + !e.sign && 128 & r[0] && r.unshift(0), (e = new i(r)); + } + if (i.isBuffer(e)) { + var n = e.length; + 0 === e.length && n++; + var o = new i(n); + return ( + e.copy(o), + 0 === e.length && (o[0] = 0), + this._createEncoderBuffer(o) + ); + } + if (e < 128) return this._createEncoderBuffer(e); + if (e < 256) return this._createEncoderBuffer([0, e]); + n = 1; + for (var a = e; a >= 256; a >>= 8) n++; + for (a = (o = new Array(n)).length - 1; a >= 0; a--) + (o[a] = 255 & e), (e >>= 8); + return ( + 128 & o[0] && o.unshift(0), this._createEncoderBuffer(new i(o)) + ); + }), + (c.prototype._encodeBool = function (e) { + return this._createEncoderBuffer(e ? 255 : 0); + }), + (c.prototype._use = function (e, t) { + return ( + "function" == typeof e && (e = e(t)), e._getEncoder("der").tree + ); + }), + (c.prototype._skipDefault = function (e, t, r) { + var n, + i = this._baseState; + if (null === i.default) return !1; + var o = e.join(); + if ( + (void 0 === i.defaultBuffer && + (i.defaultBuffer = this._encodeValue(i.default, t, r).join()), + o.length !== i.defaultBuffer.length) + ) + return !1; + for (n = 0; n < o.length; n++) + if (o[n] !== i.defaultBuffer[n]) return !1; + return !0; + }); + }, + { "../../asn1": 29, buffer: 75, inherits: 127 }, + ], + 41: [ + function (e, t, r) { + var n = r; + (n.der = e("./der")), (n.pem = e("./pem")); + }, + { "./der": 40, "./pem": 42 }, + ], + 42: [ + function (e, t, r) { + var n = e("inherits"), + i = e("./der"); + function o(e) { + i.call(this, e), (this.enc = "pem"); + } + n(o, i), + (t.exports = o), + (o.prototype.encode = function (e, t) { + for ( + var r = i.prototype.encode.call(this, e).toString("base64"), + n = ["-----BEGIN " + t.label + "-----"], + o = 0; + o < r.length; + o += 64 + ) + n.push(r.slice(o, o + 64)); + return n.push("-----END " + t.label + "-----"), n.join("\n"); + }); + }, + { "./der": 40, inherits: 127 }, + ], + 43: [ + function (e, t, r) { + "use strict"; + (r.byteLength = function (e) { + var t = c(e), + r = t[0], + n = t[1]; + return (3 * (r + n)) / 4 - n; + }), + (r.toByteArray = function (e) { + var t, + r, + n = c(e), + a = n[0], + s = n[1], + f = new o( + (function (e, t, r) { + return (3 * (t + r)) / 4 - r; + })(0, a, s), + ), + u = 0, + h = s > 0 ? a - 4 : a; + for (r = 0; r < h; r += 4) + (t = + (i[e.charCodeAt(r)] << 18) | + (i[e.charCodeAt(r + 1)] << 12) | + (i[e.charCodeAt(r + 2)] << 6) | + i[e.charCodeAt(r + 3)]), + (f[u++] = (t >> 16) & 255), + (f[u++] = (t >> 8) & 255), + (f[u++] = 255 & t); + 2 === s && + ((t = + (i[e.charCodeAt(r)] << 2) | (i[e.charCodeAt(r + 1)] >> 4)), + (f[u++] = 255 & t)); + 1 === s && + ((t = + (i[e.charCodeAt(r)] << 10) | + (i[e.charCodeAt(r + 1)] << 4) | + (i[e.charCodeAt(r + 2)] >> 2)), + (f[u++] = (t >> 8) & 255), + (f[u++] = 255 & t)); + return f; + }), + (r.fromByteArray = function (e) { + for ( + var t, r = e.length, i = r % 3, o = [], a = 0, s = r - i; + a < s; + a += 16383 + ) + o.push(u(e, a, a + 16383 > s ? s : a + 16383)); + 1 === i + ? ((t = e[r - 1]), o.push(n[t >> 2] + n[(t << 4) & 63] + "==")) + : 2 === i && + ((t = (e[r - 2] << 8) + e[r - 1]), + o.push( + n[t >> 10] + n[(t >> 4) & 63] + n[(t << 2) & 63] + "=", + )); + return o.join(""); + }); + for ( + var n = [], + i = [], + o = "undefined" != typeof Uint8Array ? Uint8Array : Array, + a = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + s = 0, + f = a.length; + s < f; + ++s + ) + (n[s] = a[s]), (i[a.charCodeAt(s)] = s); + function c(e) { + var t = e.length; + if (t % 4 > 0) + throw new Error("Invalid string. Length must be a multiple of 4"); + var r = e.indexOf("="); + return -1 === r && (r = t), [r, r === t ? 0 : 4 - (r % 4)]; + } + function u(e, t, r) { + for (var i, o, a = [], s = t; s < r; s += 3) + (i = + ((e[s] << 16) & 16711680) + + ((e[s + 1] << 8) & 65280) + + (255 & e[s + 2])), + a.push( + n[((o = i) >> 18) & 63] + + n[(o >> 12) & 63] + + n[(o >> 6) & 63] + + n[63 & o], + ); + return a.join(""); + } + (i["-".charCodeAt(0)] = 62), (i["_".charCodeAt(0)] = 63); + }, + {}, + ], + 44: [ + function (e, t, r) { + !(function (t, r) { + "use strict"; + function n(e, t) { + if (!e) throw new Error(t || "Assertion failed"); + } + function i(e, t) { + e.super_ = t; + var r = function () {}; + (r.prototype = t.prototype), + (e.prototype = new r()), + (e.prototype.constructor = e); + } + function o(e, t, r) { + if (o.isBN(e)) return e; + (this.negative = 0), + (this.words = null), + (this.length = 0), + (this.red = null), + null !== e && + (("le" !== t && "be" !== t) || ((r = t), (t = 10)), + this._init(e || 0, t || 10, r || "be")); + } + var a; + "object" == typeof t ? (t.exports = o) : (r.BN = o), + (o.BN = o), + (o.wordSize = 26); + try { + a = e("buffer").Buffer; + } catch (e) {} + function s(e, t, r) { + for (var n = 0, i = Math.min(e.length, r), o = t; o < i; o++) { + var a = e.charCodeAt(o) - 48; + (n <<= 4), + (n |= + a >= 49 && a <= 54 + ? a - 49 + 10 + : a >= 17 && a <= 22 + ? a - 17 + 10 + : 15 & a); + } + return n; + } + function f(e, t, r, n) { + for (var i = 0, o = Math.min(e.length, r), a = t; a < o; a++) { + var s = e.charCodeAt(a) - 48; + (i *= n), + (i += s >= 49 ? s - 49 + 10 : s >= 17 ? s - 17 + 10 : s); + } + return i; + } + (o.isBN = function (e) { + return ( + e instanceof o || + (null !== e && + "object" == typeof e && + e.constructor.wordSize === o.wordSize && + Array.isArray(e.words)) + ); + }), + (o.max = function (e, t) { + return e.cmp(t) > 0 ? e : t; + }), + (o.min = function (e, t) { + return e.cmp(t) < 0 ? e : t; + }), + (o.prototype._init = function (e, t, r) { + if ("number" == typeof e) return this._initNumber(e, t, r); + if ("object" == typeof e) return this._initArray(e, t, r); + "hex" === t && (t = 16), n(t === (0 | t) && t >= 2 && t <= 36); + var i = 0; + "-" === (e = e.toString().replace(/\s+/g, ""))[0] && i++, + 16 === t ? this._parseHex(e, i) : this._parseBase(e, t, i), + "-" === e[0] && (this.negative = 1), + this.strip(), + "le" === r && this._initArray(this.toArray(), t, r); + }), + (o.prototype._initNumber = function (e, t, r) { + e < 0 && ((this.negative = 1), (e = -e)), + e < 67108864 + ? ((this.words = [67108863 & e]), (this.length = 1)) + : e < 4503599627370496 + ? ((this.words = [67108863 & e, (e / 67108864) & 67108863]), + (this.length = 2)) + : (n(e < 9007199254740992), + (this.words = [ + 67108863 & e, + (e / 67108864) & 67108863, + 1, + ]), + (this.length = 3)), + "le" === r && this._initArray(this.toArray(), t, r); + }), + (o.prototype._initArray = function (e, t, r) { + if ((n("number" == typeof e.length), e.length <= 0)) + return (this.words = [0]), (this.length = 1), this; + (this.length = Math.ceil(e.length / 3)), + (this.words = new Array(this.length)); + for (var i = 0; i < this.length; i++) this.words[i] = 0; + var o, + a, + s = 0; + if ("be" === r) + for (i = e.length - 1, o = 0; i >= 0; i -= 3) + (a = e[i] | (e[i - 1] << 8) | (e[i - 2] << 16)), + (this.words[o] |= (a << s) & 67108863), + (this.words[o + 1] = (a >>> (26 - s)) & 67108863), + (s += 24) >= 26 && ((s -= 26), o++); + else if ("le" === r) + for (i = 0, o = 0; i < e.length; i += 3) + (a = e[i] | (e[i + 1] << 8) | (e[i + 2] << 16)), + (this.words[o] |= (a << s) & 67108863), + (this.words[o + 1] = (a >>> (26 - s)) & 67108863), + (s += 24) >= 26 && ((s -= 26), o++); + return this.strip(); + }), + (o.prototype._parseHex = function (e, t) { + (this.length = Math.ceil((e.length - t) / 6)), + (this.words = new Array(this.length)); + for (var r = 0; r < this.length; r++) this.words[r] = 0; + var n, + i, + o = 0; + for (r = e.length - 6, n = 0; r >= t; r -= 6) + (i = s(e, r, r + 6)), + (this.words[n] |= (i << o) & 67108863), + (this.words[n + 1] |= (i >>> (26 - o)) & 4194303), + (o += 24) >= 26 && ((o -= 26), n++); + r + 6 !== t && + ((i = s(e, t, r + 6)), + (this.words[n] |= (i << o) & 67108863), + (this.words[n + 1] |= (i >>> (26 - o)) & 4194303)), + this.strip(); + }), + (o.prototype._parseBase = function (e, t, r) { + (this.words = [0]), (this.length = 1); + for (var n = 0, i = 1; i <= 67108863; i *= t) n++; + n--, (i = (i / t) | 0); + for ( + var o = e.length - r, + a = o % n, + s = Math.min(o, o - a) + r, + c = 0, + u = r; + u < s; + u += n + ) + (c = f(e, u, u + n, t)), + this.imuln(i), + this.words[0] + c < 67108864 + ? (this.words[0] += c) + : this._iaddn(c); + if (0 !== a) { + var h = 1; + for (c = f(e, u, e.length, t), u = 0; u < a; u++) h *= t; + this.imuln(h), + this.words[0] + c < 67108864 + ? (this.words[0] += c) + : this._iaddn(c); + } + }), + (o.prototype.copy = function (e) { + e.words = new Array(this.length); + for (var t = 0; t < this.length; t++) + e.words[t] = this.words[t]; + (e.length = this.length), + (e.negative = this.negative), + (e.red = this.red); + }), + (o.prototype.clone = function () { + var e = new o(null); + return this.copy(e), e; + }), + (o.prototype._expand = function (e) { + for (; this.length < e; ) this.words[this.length++] = 0; + return this; + }), + (o.prototype.strip = function () { + for (; this.length > 1 && 0 === this.words[this.length - 1]; ) + this.length--; + return this._normSign(); + }), + (o.prototype._normSign = function () { + return ( + 1 === this.length && + 0 === this.words[0] && + (this.negative = 0), + this + ); + }), + (o.prototype.inspect = function () { + return ( + (this.red ? "" + ); + }); + var c = [ + "", + "0", + "00", + "000", + "0000", + "00000", + "000000", + "0000000", + "00000000", + "000000000", + "0000000000", + "00000000000", + "000000000000", + "0000000000000", + "00000000000000", + "000000000000000", + "0000000000000000", + "00000000000000000", + "000000000000000000", + "0000000000000000000", + "00000000000000000000", + "000000000000000000000", + "0000000000000000000000", + "00000000000000000000000", + "000000000000000000000000", + "0000000000000000000000000", + ], + u = [ + 0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, + 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + ], + h = [ + 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, + 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, + 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, + 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, + 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, + 45435424, 52521875, 60466176, + ]; + function d(e, t, r) { + r.negative = t.negative ^ e.negative; + var n = (e.length + t.length) | 0; + (r.length = n), (n = (n - 1) | 0); + var i = 0 | e.words[0], + o = 0 | t.words[0], + a = i * o, + s = 67108863 & a, + f = (a / 67108864) | 0; + r.words[0] = s; + for (var c = 1; c < n; c++) { + for ( + var u = f >>> 26, + h = 67108863 & f, + d = Math.min(c, t.length - 1), + l = Math.max(0, c - e.length + 1); + l <= d; + l++ + ) { + var p = (c - l) | 0; + (u += + ((a = (i = 0 | e.words[p]) * (o = 0 | t.words[l]) + h) / + 67108864) | + 0), + (h = 67108863 & a); + } + (r.words[c] = 0 | h), (f = 0 | u); + } + return 0 !== f ? (r.words[c] = 0 | f) : r.length--, r.strip(); + } + (o.prototype.toString = function (e, t) { + var r; + if (((t = 0 | t || 1), 16 === (e = e || 10) || "hex" === e)) { + r = ""; + for (var i = 0, o = 0, a = 0; a < this.length; a++) { + var s = this.words[a], + f = (16777215 & ((s << i) | o)).toString(16); + (r = + 0 !== (o = (s >>> (24 - i)) & 16777215) || + a !== this.length - 1 + ? c[6 - f.length] + f + r + : f + r), + (i += 2) >= 26 && ((i -= 26), a--); + } + for (0 !== o && (r = o.toString(16) + r); r.length % t != 0; ) + r = "0" + r; + return 0 !== this.negative && (r = "-" + r), r; + } + if (e === (0 | e) && e >= 2 && e <= 36) { + var d = u[e], + l = h[e]; + r = ""; + var p = this.clone(); + for (p.negative = 0; !p.isZero(); ) { + var b = p.modn(l).toString(e); + r = (p = p.idivn(l)).isZero() + ? b + r + : c[d - b.length] + b + r; + } + for (this.isZero() && (r = "0" + r); r.length % t != 0; ) + r = "0" + r; + return 0 !== this.negative && (r = "-" + r), r; + } + n(!1, "Base should be between 2 and 36"); + }), + (o.prototype.toNumber = function () { + var e = this.words[0]; + return ( + 2 === this.length + ? (e += 67108864 * this.words[1]) + : 3 === this.length && 1 === this.words[2] + ? (e += 4503599627370496 + 67108864 * this.words[1]) + : this.length > 2 && + n(!1, "Number can only safely store up to 53 bits"), + 0 !== this.negative ? -e : e + ); + }), + (o.prototype.toJSON = function () { + return this.toString(16); + }), + (o.prototype.toBuffer = function (e, t) { + return n(void 0 !== a), this.toArrayLike(a, e, t); + }), + (o.prototype.toArray = function (e, t) { + return this.toArrayLike(Array, e, t); + }), + (o.prototype.toArrayLike = function (e, t, r) { + var i = this.byteLength(), + o = r || Math.max(1, i); + n(i <= o, "byte array longer than desired length"), + n(o > 0, "Requested array length <= 0"), + this.strip(); + var a, + s, + f = "le" === t, + c = new e(o), + u = this.clone(); + if (f) { + for (s = 0; !u.isZero(); s++) + (a = u.andln(255)), u.iushrn(8), (c[s] = a); + for (; s < o; s++) c[s] = 0; + } else { + for (s = 0; s < o - i; s++) c[s] = 0; + for (s = 0; !u.isZero(); s++) + (a = u.andln(255)), u.iushrn(8), (c[o - s - 1] = a); + } + return c; + }), + Math.clz32 + ? (o.prototype._countBits = function (e) { + return 32 - Math.clz32(e); + }) + : (o.prototype._countBits = function (e) { + var t = e, + r = 0; + return ( + t >= 4096 && ((r += 13), (t >>>= 13)), + t >= 64 && ((r += 7), (t >>>= 7)), + t >= 8 && ((r += 4), (t >>>= 4)), + t >= 2 && ((r += 2), (t >>>= 2)), + r + t + ); + }), + (o.prototype._zeroBits = function (e) { + if (0 === e) return 26; + var t = e, + r = 0; + return ( + 0 == (8191 & t) && ((r += 13), (t >>>= 13)), + 0 == (127 & t) && ((r += 7), (t >>>= 7)), + 0 == (15 & t) && ((r += 4), (t >>>= 4)), + 0 == (3 & t) && ((r += 2), (t >>>= 2)), + 0 == (1 & t) && r++, + r + ); + }), + (o.prototype.bitLength = function () { + var e = this.words[this.length - 1], + t = this._countBits(e); + return 26 * (this.length - 1) + t; + }), + (o.prototype.zeroBits = function () { + if (this.isZero()) return 0; + for (var e = 0, t = 0; t < this.length; t++) { + var r = this._zeroBits(this.words[t]); + if (((e += r), 26 !== r)) break; + } + return e; + }), + (o.prototype.byteLength = function () { + return Math.ceil(this.bitLength() / 8); + }), + (o.prototype.toTwos = function (e) { + return 0 !== this.negative + ? this.abs().inotn(e).iaddn(1) + : this.clone(); + }), + (o.prototype.fromTwos = function (e) { + return this.testn(e - 1) + ? this.notn(e).iaddn(1).ineg() + : this.clone(); + }), + (o.prototype.isNeg = function () { + return 0 !== this.negative; + }), + (o.prototype.neg = function () { + return this.clone().ineg(); + }), + (o.prototype.ineg = function () { + return this.isZero() || (this.negative ^= 1), this; + }), + (o.prototype.iuor = function (e) { + for (; this.length < e.length; ) this.words[this.length++] = 0; + for (var t = 0; t < e.length; t++) + this.words[t] = this.words[t] | e.words[t]; + return this.strip(); + }), + (o.prototype.ior = function (e) { + return n(0 == (this.negative | e.negative)), this.iuor(e); + }), + (o.prototype.or = function (e) { + return this.length > e.length + ? this.clone().ior(e) + : e.clone().ior(this); + }), + (o.prototype.uor = function (e) { + return this.length > e.length + ? this.clone().iuor(e) + : e.clone().iuor(this); + }), + (o.prototype.iuand = function (e) { + var t; + t = this.length > e.length ? e : this; + for (var r = 0; r < t.length; r++) + this.words[r] = this.words[r] & e.words[r]; + return (this.length = t.length), this.strip(); + }), + (o.prototype.iand = function (e) { + return n(0 == (this.negative | e.negative)), this.iuand(e); + }), + (o.prototype.and = function (e) { + return this.length > e.length + ? this.clone().iand(e) + : e.clone().iand(this); + }), + (o.prototype.uand = function (e) { + return this.length > e.length + ? this.clone().iuand(e) + : e.clone().iuand(this); + }), + (o.prototype.iuxor = function (e) { + var t, r; + this.length > e.length + ? ((t = this), (r = e)) + : ((t = e), (r = this)); + for (var n = 0; n < r.length; n++) + this.words[n] = t.words[n] ^ r.words[n]; + if (this !== t) + for (; n < t.length; n++) this.words[n] = t.words[n]; + return (this.length = t.length), this.strip(); + }), + (o.prototype.ixor = function (e) { + return n(0 == (this.negative | e.negative)), this.iuxor(e); + }), + (o.prototype.xor = function (e) { + return this.length > e.length + ? this.clone().ixor(e) + : e.clone().ixor(this); + }), + (o.prototype.uxor = function (e) { + return this.length > e.length + ? this.clone().iuxor(e) + : e.clone().iuxor(this); + }), + (o.prototype.inotn = function (e) { + n("number" == typeof e && e >= 0); + var t = 0 | Math.ceil(e / 26), + r = e % 26; + this._expand(t), r > 0 && t--; + for (var i = 0; i < t; i++) + this.words[i] = 67108863 & ~this.words[i]; + return ( + r > 0 && + (this.words[i] = ~this.words[i] & (67108863 >> (26 - r))), + this.strip() + ); + }), + (o.prototype.notn = function (e) { + return this.clone().inotn(e); + }), + (o.prototype.setn = function (e, t) { + n("number" == typeof e && e >= 0); + var r = (e / 26) | 0, + i = e % 26; + return ( + this._expand(r + 1), + (this.words[r] = t + ? this.words[r] | (1 << i) + : this.words[r] & ~(1 << i)), + this.strip() + ); + }), + (o.prototype.iadd = function (e) { + var t, r, n; + if (0 !== this.negative && 0 === e.negative) + return ( + (this.negative = 0), + (t = this.isub(e)), + (this.negative ^= 1), + this._normSign() + ); + if (0 === this.negative && 0 !== e.negative) + return ( + (e.negative = 0), + (t = this.isub(e)), + (e.negative = 1), + t._normSign() + ); + this.length > e.length + ? ((r = this), (n = e)) + : ((r = e), (n = this)); + for (var i = 0, o = 0; o < n.length; o++) + (t = (0 | r.words[o]) + (0 | n.words[o]) + i), + (this.words[o] = 67108863 & t), + (i = t >>> 26); + for (; 0 !== i && o < r.length; o++) + (t = (0 | r.words[o]) + i), + (this.words[o] = 67108863 & t), + (i = t >>> 26); + if (((this.length = r.length), 0 !== i)) + (this.words[this.length] = i), this.length++; + else if (r !== this) + for (; o < r.length; o++) this.words[o] = r.words[o]; + return this; + }), + (o.prototype.add = function (e) { + var t; + return 0 !== e.negative && 0 === this.negative + ? ((e.negative = 0), (t = this.sub(e)), (e.negative ^= 1), t) + : 0 === e.negative && 0 !== this.negative + ? ((this.negative = 0), + (t = e.sub(this)), + (this.negative = 1), + t) + : this.length > e.length + ? this.clone().iadd(e) + : e.clone().iadd(this); + }), + (o.prototype.isub = function (e) { + if (0 !== e.negative) { + e.negative = 0; + var t = this.iadd(e); + return (e.negative = 1), t._normSign(); + } + if (0 !== this.negative) + return ( + (this.negative = 0), + this.iadd(e), + (this.negative = 1), + this._normSign() + ); + var r, + n, + i = this.cmp(e); + if (0 === i) + return ( + (this.negative = 0), + (this.length = 1), + (this.words[0] = 0), + this + ); + i > 0 ? ((r = this), (n = e)) : ((r = e), (n = this)); + for (var o = 0, a = 0; a < n.length; a++) + (o = (t = (0 | r.words[a]) - (0 | n.words[a]) + o) >> 26), + (this.words[a] = 67108863 & t); + for (; 0 !== o && a < r.length; a++) + (o = (t = (0 | r.words[a]) + o) >> 26), + (this.words[a] = 67108863 & t); + if (0 === o && a < r.length && r !== this) + for (; a < r.length; a++) this.words[a] = r.words[a]; + return ( + (this.length = Math.max(this.length, a)), + r !== this && (this.negative = 1), + this.strip() + ); + }), + (o.prototype.sub = function (e) { + return this.clone().isub(e); + }); + var l = function (e, t, r) { + var n, + i, + o, + a = e.words, + s = t.words, + f = r.words, + c = 0, + u = 0 | a[0], + h = 8191 & u, + d = u >>> 13, + l = 0 | a[1], + p = 8191 & l, + b = l >>> 13, + y = 0 | a[2], + m = 8191 & y, + v = y >>> 13, + g = 0 | a[3], + w = 8191 & g, + _ = g >>> 13, + S = 0 | a[4], + E = 8191 & S, + M = S >>> 13, + k = 0 | a[5], + x = 8191 & k, + A = k >>> 13, + j = 0 | a[6], + B = 8191 & j, + I = j >>> 13, + R = 0 | a[7], + T = 8191 & R, + C = R >>> 13, + P = 0 | a[8], + O = 8191 & P, + D = P >>> 13, + N = 0 | a[9], + L = 8191 & N, + U = N >>> 13, + q = 0 | s[0], + z = 8191 & q, + K = q >>> 13, + F = 0 | s[1], + H = 8191 & F, + V = F >>> 13, + W = 0 | s[2], + J = 8191 & W, + X = W >>> 13, + $ = 0 | s[3], + G = 8191 & $, + Z = $ >>> 13, + Y = 0 | s[4], + Q = 8191 & Y, + ee = Y >>> 13, + te = 0 | s[5], + re = 8191 & te, + ne = te >>> 13, + ie = 0 | s[6], + oe = 8191 & ie, + ae = ie >>> 13, + se = 0 | s[7], + fe = 8191 & se, + ce = se >>> 13, + ue = 0 | s[8], + he = 8191 & ue, + de = ue >>> 13, + le = 0 | s[9], + pe = 8191 & le, + be = le >>> 13; + (r.negative = e.negative ^ t.negative), (r.length = 19); + var ye = + (((c + (n = Math.imul(h, z))) | 0) + + ((8191 & + (i = ((i = Math.imul(h, K)) + Math.imul(d, z)) | 0)) << + 13)) | + 0; + (c = + ((((o = Math.imul(d, K)) + (i >>> 13)) | 0) + (ye >>> 26)) | 0), + (ye &= 67108863), + (n = Math.imul(p, z)), + (i = ((i = Math.imul(p, K)) + Math.imul(b, z)) | 0), + (o = Math.imul(b, K)); + var me = + (((c + (n = (n + Math.imul(h, H)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(h, V)) | 0) + Math.imul(d, H)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(d, V)) | 0) + (i >>> 13)) | 0) + + (me >>> 26)) | + 0), + (me &= 67108863), + (n = Math.imul(m, z)), + (i = ((i = Math.imul(m, K)) + Math.imul(v, z)) | 0), + (o = Math.imul(v, K)), + (n = (n + Math.imul(p, H)) | 0), + (i = ((i = (i + Math.imul(p, V)) | 0) + Math.imul(b, H)) | 0), + (o = (o + Math.imul(b, V)) | 0); + var ve = + (((c + (n = (n + Math.imul(h, J)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(h, X)) | 0) + Math.imul(d, J)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(d, X)) | 0) + (i >>> 13)) | 0) + + (ve >>> 26)) | + 0), + (ve &= 67108863), + (n = Math.imul(w, z)), + (i = ((i = Math.imul(w, K)) + Math.imul(_, z)) | 0), + (o = Math.imul(_, K)), + (n = (n + Math.imul(m, H)) | 0), + (i = ((i = (i + Math.imul(m, V)) | 0) + Math.imul(v, H)) | 0), + (o = (o + Math.imul(v, V)) | 0), + (n = (n + Math.imul(p, J)) | 0), + (i = ((i = (i + Math.imul(p, X)) | 0) + Math.imul(b, J)) | 0), + (o = (o + Math.imul(b, X)) | 0); + var ge = + (((c + (n = (n + Math.imul(h, G)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(h, Z)) | 0) + Math.imul(d, G)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(d, Z)) | 0) + (i >>> 13)) | 0) + + (ge >>> 26)) | + 0), + (ge &= 67108863), + (n = Math.imul(E, z)), + (i = ((i = Math.imul(E, K)) + Math.imul(M, z)) | 0), + (o = Math.imul(M, K)), + (n = (n + Math.imul(w, H)) | 0), + (i = ((i = (i + Math.imul(w, V)) | 0) + Math.imul(_, H)) | 0), + (o = (o + Math.imul(_, V)) | 0), + (n = (n + Math.imul(m, J)) | 0), + (i = ((i = (i + Math.imul(m, X)) | 0) + Math.imul(v, J)) | 0), + (o = (o + Math.imul(v, X)) | 0), + (n = (n + Math.imul(p, G)) | 0), + (i = ((i = (i + Math.imul(p, Z)) | 0) + Math.imul(b, G)) | 0), + (o = (o + Math.imul(b, Z)) | 0); + var we = + (((c + (n = (n + Math.imul(h, Q)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(h, ee)) | 0) + Math.imul(d, Q)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(d, ee)) | 0) + (i >>> 13)) | 0) + + (we >>> 26)) | + 0), + (we &= 67108863), + (n = Math.imul(x, z)), + (i = ((i = Math.imul(x, K)) + Math.imul(A, z)) | 0), + (o = Math.imul(A, K)), + (n = (n + Math.imul(E, H)) | 0), + (i = ((i = (i + Math.imul(E, V)) | 0) + Math.imul(M, H)) | 0), + (o = (o + Math.imul(M, V)) | 0), + (n = (n + Math.imul(w, J)) | 0), + (i = ((i = (i + Math.imul(w, X)) | 0) + Math.imul(_, J)) | 0), + (o = (o + Math.imul(_, X)) | 0), + (n = (n + Math.imul(m, G)) | 0), + (i = ((i = (i + Math.imul(m, Z)) | 0) + Math.imul(v, G)) | 0), + (o = (o + Math.imul(v, Z)) | 0), + (n = (n + Math.imul(p, Q)) | 0), + (i = ((i = (i + Math.imul(p, ee)) | 0) + Math.imul(b, Q)) | 0), + (o = (o + Math.imul(b, ee)) | 0); + var _e = + (((c + (n = (n + Math.imul(h, re)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(h, ne)) | 0) + Math.imul(d, re)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(d, ne)) | 0) + (i >>> 13)) | 0) + + (_e >>> 26)) | + 0), + (_e &= 67108863), + (n = Math.imul(B, z)), + (i = ((i = Math.imul(B, K)) + Math.imul(I, z)) | 0), + (o = Math.imul(I, K)), + (n = (n + Math.imul(x, H)) | 0), + (i = ((i = (i + Math.imul(x, V)) | 0) + Math.imul(A, H)) | 0), + (o = (o + Math.imul(A, V)) | 0), + (n = (n + Math.imul(E, J)) | 0), + (i = ((i = (i + Math.imul(E, X)) | 0) + Math.imul(M, J)) | 0), + (o = (o + Math.imul(M, X)) | 0), + (n = (n + Math.imul(w, G)) | 0), + (i = ((i = (i + Math.imul(w, Z)) | 0) + Math.imul(_, G)) | 0), + (o = (o + Math.imul(_, Z)) | 0), + (n = (n + Math.imul(m, Q)) | 0), + (i = ((i = (i + Math.imul(m, ee)) | 0) + Math.imul(v, Q)) | 0), + (o = (o + Math.imul(v, ee)) | 0), + (n = (n + Math.imul(p, re)) | 0), + (i = ((i = (i + Math.imul(p, ne)) | 0) + Math.imul(b, re)) | 0), + (o = (o + Math.imul(b, ne)) | 0); + var Se = + (((c + (n = (n + Math.imul(h, oe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(h, ae)) | 0) + Math.imul(d, oe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(d, ae)) | 0) + (i >>> 13)) | 0) + + (Se >>> 26)) | + 0), + (Se &= 67108863), + (n = Math.imul(T, z)), + (i = ((i = Math.imul(T, K)) + Math.imul(C, z)) | 0), + (o = Math.imul(C, K)), + (n = (n + Math.imul(B, H)) | 0), + (i = ((i = (i + Math.imul(B, V)) | 0) + Math.imul(I, H)) | 0), + (o = (o + Math.imul(I, V)) | 0), + (n = (n + Math.imul(x, J)) | 0), + (i = ((i = (i + Math.imul(x, X)) | 0) + Math.imul(A, J)) | 0), + (o = (o + Math.imul(A, X)) | 0), + (n = (n + Math.imul(E, G)) | 0), + (i = ((i = (i + Math.imul(E, Z)) | 0) + Math.imul(M, G)) | 0), + (o = (o + Math.imul(M, Z)) | 0), + (n = (n + Math.imul(w, Q)) | 0), + (i = ((i = (i + Math.imul(w, ee)) | 0) + Math.imul(_, Q)) | 0), + (o = (o + Math.imul(_, ee)) | 0), + (n = (n + Math.imul(m, re)) | 0), + (i = ((i = (i + Math.imul(m, ne)) | 0) + Math.imul(v, re)) | 0), + (o = (o + Math.imul(v, ne)) | 0), + (n = (n + Math.imul(p, oe)) | 0), + (i = ((i = (i + Math.imul(p, ae)) | 0) + Math.imul(b, oe)) | 0), + (o = (o + Math.imul(b, ae)) | 0); + var Ee = + (((c + (n = (n + Math.imul(h, fe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(h, ce)) | 0) + Math.imul(d, fe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(d, ce)) | 0) + (i >>> 13)) | 0) + + (Ee >>> 26)) | + 0), + (Ee &= 67108863), + (n = Math.imul(O, z)), + (i = ((i = Math.imul(O, K)) + Math.imul(D, z)) | 0), + (o = Math.imul(D, K)), + (n = (n + Math.imul(T, H)) | 0), + (i = ((i = (i + Math.imul(T, V)) | 0) + Math.imul(C, H)) | 0), + (o = (o + Math.imul(C, V)) | 0), + (n = (n + Math.imul(B, J)) | 0), + (i = ((i = (i + Math.imul(B, X)) | 0) + Math.imul(I, J)) | 0), + (o = (o + Math.imul(I, X)) | 0), + (n = (n + Math.imul(x, G)) | 0), + (i = ((i = (i + Math.imul(x, Z)) | 0) + Math.imul(A, G)) | 0), + (o = (o + Math.imul(A, Z)) | 0), + (n = (n + Math.imul(E, Q)) | 0), + (i = ((i = (i + Math.imul(E, ee)) | 0) + Math.imul(M, Q)) | 0), + (o = (o + Math.imul(M, ee)) | 0), + (n = (n + Math.imul(w, re)) | 0), + (i = ((i = (i + Math.imul(w, ne)) | 0) + Math.imul(_, re)) | 0), + (o = (o + Math.imul(_, ne)) | 0), + (n = (n + Math.imul(m, oe)) | 0), + (i = ((i = (i + Math.imul(m, ae)) | 0) + Math.imul(v, oe)) | 0), + (o = (o + Math.imul(v, ae)) | 0), + (n = (n + Math.imul(p, fe)) | 0), + (i = ((i = (i + Math.imul(p, ce)) | 0) + Math.imul(b, fe)) | 0), + (o = (o + Math.imul(b, ce)) | 0); + var Me = + (((c + (n = (n + Math.imul(h, he)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(h, de)) | 0) + Math.imul(d, he)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(d, de)) | 0) + (i >>> 13)) | 0) + + (Me >>> 26)) | + 0), + (Me &= 67108863), + (n = Math.imul(L, z)), + (i = ((i = Math.imul(L, K)) + Math.imul(U, z)) | 0), + (o = Math.imul(U, K)), + (n = (n + Math.imul(O, H)) | 0), + (i = ((i = (i + Math.imul(O, V)) | 0) + Math.imul(D, H)) | 0), + (o = (o + Math.imul(D, V)) | 0), + (n = (n + Math.imul(T, J)) | 0), + (i = ((i = (i + Math.imul(T, X)) | 0) + Math.imul(C, J)) | 0), + (o = (o + Math.imul(C, X)) | 0), + (n = (n + Math.imul(B, G)) | 0), + (i = ((i = (i + Math.imul(B, Z)) | 0) + Math.imul(I, G)) | 0), + (o = (o + Math.imul(I, Z)) | 0), + (n = (n + Math.imul(x, Q)) | 0), + (i = ((i = (i + Math.imul(x, ee)) | 0) + Math.imul(A, Q)) | 0), + (o = (o + Math.imul(A, ee)) | 0), + (n = (n + Math.imul(E, re)) | 0), + (i = ((i = (i + Math.imul(E, ne)) | 0) + Math.imul(M, re)) | 0), + (o = (o + Math.imul(M, ne)) | 0), + (n = (n + Math.imul(w, oe)) | 0), + (i = ((i = (i + Math.imul(w, ae)) | 0) + Math.imul(_, oe)) | 0), + (o = (o + Math.imul(_, ae)) | 0), + (n = (n + Math.imul(m, fe)) | 0), + (i = ((i = (i + Math.imul(m, ce)) | 0) + Math.imul(v, fe)) | 0), + (o = (o + Math.imul(v, ce)) | 0), + (n = (n + Math.imul(p, he)) | 0), + (i = ((i = (i + Math.imul(p, de)) | 0) + Math.imul(b, he)) | 0), + (o = (o + Math.imul(b, de)) | 0); + var ke = + (((c + (n = (n + Math.imul(h, pe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(h, be)) | 0) + Math.imul(d, pe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(d, be)) | 0) + (i >>> 13)) | 0) + + (ke >>> 26)) | + 0), + (ke &= 67108863), + (n = Math.imul(L, H)), + (i = ((i = Math.imul(L, V)) + Math.imul(U, H)) | 0), + (o = Math.imul(U, V)), + (n = (n + Math.imul(O, J)) | 0), + (i = ((i = (i + Math.imul(O, X)) | 0) + Math.imul(D, J)) | 0), + (o = (o + Math.imul(D, X)) | 0), + (n = (n + Math.imul(T, G)) | 0), + (i = ((i = (i + Math.imul(T, Z)) | 0) + Math.imul(C, G)) | 0), + (o = (o + Math.imul(C, Z)) | 0), + (n = (n + Math.imul(B, Q)) | 0), + (i = ((i = (i + Math.imul(B, ee)) | 0) + Math.imul(I, Q)) | 0), + (o = (o + Math.imul(I, ee)) | 0), + (n = (n + Math.imul(x, re)) | 0), + (i = ((i = (i + Math.imul(x, ne)) | 0) + Math.imul(A, re)) | 0), + (o = (o + Math.imul(A, ne)) | 0), + (n = (n + Math.imul(E, oe)) | 0), + (i = ((i = (i + Math.imul(E, ae)) | 0) + Math.imul(M, oe)) | 0), + (o = (o + Math.imul(M, ae)) | 0), + (n = (n + Math.imul(w, fe)) | 0), + (i = ((i = (i + Math.imul(w, ce)) | 0) + Math.imul(_, fe)) | 0), + (o = (o + Math.imul(_, ce)) | 0), + (n = (n + Math.imul(m, he)) | 0), + (i = ((i = (i + Math.imul(m, de)) | 0) + Math.imul(v, he)) | 0), + (o = (o + Math.imul(v, de)) | 0); + var xe = + (((c + (n = (n + Math.imul(p, pe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(p, be)) | 0) + Math.imul(b, pe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(b, be)) | 0) + (i >>> 13)) | 0) + + (xe >>> 26)) | + 0), + (xe &= 67108863), + (n = Math.imul(L, J)), + (i = ((i = Math.imul(L, X)) + Math.imul(U, J)) | 0), + (o = Math.imul(U, X)), + (n = (n + Math.imul(O, G)) | 0), + (i = ((i = (i + Math.imul(O, Z)) | 0) + Math.imul(D, G)) | 0), + (o = (o + Math.imul(D, Z)) | 0), + (n = (n + Math.imul(T, Q)) | 0), + (i = ((i = (i + Math.imul(T, ee)) | 0) + Math.imul(C, Q)) | 0), + (o = (o + Math.imul(C, ee)) | 0), + (n = (n + Math.imul(B, re)) | 0), + (i = ((i = (i + Math.imul(B, ne)) | 0) + Math.imul(I, re)) | 0), + (o = (o + Math.imul(I, ne)) | 0), + (n = (n + Math.imul(x, oe)) | 0), + (i = ((i = (i + Math.imul(x, ae)) | 0) + Math.imul(A, oe)) | 0), + (o = (o + Math.imul(A, ae)) | 0), + (n = (n + Math.imul(E, fe)) | 0), + (i = ((i = (i + Math.imul(E, ce)) | 0) + Math.imul(M, fe)) | 0), + (o = (o + Math.imul(M, ce)) | 0), + (n = (n + Math.imul(w, he)) | 0), + (i = ((i = (i + Math.imul(w, de)) | 0) + Math.imul(_, he)) | 0), + (o = (o + Math.imul(_, de)) | 0); + var Ae = + (((c + (n = (n + Math.imul(m, pe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(m, be)) | 0) + Math.imul(v, pe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(v, be)) | 0) + (i >>> 13)) | 0) + + (Ae >>> 26)) | + 0), + (Ae &= 67108863), + (n = Math.imul(L, G)), + (i = ((i = Math.imul(L, Z)) + Math.imul(U, G)) | 0), + (o = Math.imul(U, Z)), + (n = (n + Math.imul(O, Q)) | 0), + (i = ((i = (i + Math.imul(O, ee)) | 0) + Math.imul(D, Q)) | 0), + (o = (o + Math.imul(D, ee)) | 0), + (n = (n + Math.imul(T, re)) | 0), + (i = ((i = (i + Math.imul(T, ne)) | 0) + Math.imul(C, re)) | 0), + (o = (o + Math.imul(C, ne)) | 0), + (n = (n + Math.imul(B, oe)) | 0), + (i = ((i = (i + Math.imul(B, ae)) | 0) + Math.imul(I, oe)) | 0), + (o = (o + Math.imul(I, ae)) | 0), + (n = (n + Math.imul(x, fe)) | 0), + (i = ((i = (i + Math.imul(x, ce)) | 0) + Math.imul(A, fe)) | 0), + (o = (o + Math.imul(A, ce)) | 0), + (n = (n + Math.imul(E, he)) | 0), + (i = ((i = (i + Math.imul(E, de)) | 0) + Math.imul(M, he)) | 0), + (o = (o + Math.imul(M, de)) | 0); + var je = + (((c + (n = (n + Math.imul(w, pe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(w, be)) | 0) + Math.imul(_, pe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(_, be)) | 0) + (i >>> 13)) | 0) + + (je >>> 26)) | + 0), + (je &= 67108863), + (n = Math.imul(L, Q)), + (i = ((i = Math.imul(L, ee)) + Math.imul(U, Q)) | 0), + (o = Math.imul(U, ee)), + (n = (n + Math.imul(O, re)) | 0), + (i = ((i = (i + Math.imul(O, ne)) | 0) + Math.imul(D, re)) | 0), + (o = (o + Math.imul(D, ne)) | 0), + (n = (n + Math.imul(T, oe)) | 0), + (i = ((i = (i + Math.imul(T, ae)) | 0) + Math.imul(C, oe)) | 0), + (o = (o + Math.imul(C, ae)) | 0), + (n = (n + Math.imul(B, fe)) | 0), + (i = ((i = (i + Math.imul(B, ce)) | 0) + Math.imul(I, fe)) | 0), + (o = (o + Math.imul(I, ce)) | 0), + (n = (n + Math.imul(x, he)) | 0), + (i = ((i = (i + Math.imul(x, de)) | 0) + Math.imul(A, he)) | 0), + (o = (o + Math.imul(A, de)) | 0); + var Be = + (((c + (n = (n + Math.imul(E, pe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(E, be)) | 0) + Math.imul(M, pe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(M, be)) | 0) + (i >>> 13)) | 0) + + (Be >>> 26)) | + 0), + (Be &= 67108863), + (n = Math.imul(L, re)), + (i = ((i = Math.imul(L, ne)) + Math.imul(U, re)) | 0), + (o = Math.imul(U, ne)), + (n = (n + Math.imul(O, oe)) | 0), + (i = ((i = (i + Math.imul(O, ae)) | 0) + Math.imul(D, oe)) | 0), + (o = (o + Math.imul(D, ae)) | 0), + (n = (n + Math.imul(T, fe)) | 0), + (i = ((i = (i + Math.imul(T, ce)) | 0) + Math.imul(C, fe)) | 0), + (o = (o + Math.imul(C, ce)) | 0), + (n = (n + Math.imul(B, he)) | 0), + (i = ((i = (i + Math.imul(B, de)) | 0) + Math.imul(I, he)) | 0), + (o = (o + Math.imul(I, de)) | 0); + var Ie = + (((c + (n = (n + Math.imul(x, pe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(x, be)) | 0) + Math.imul(A, pe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(A, be)) | 0) + (i >>> 13)) | 0) + + (Ie >>> 26)) | + 0), + (Ie &= 67108863), + (n = Math.imul(L, oe)), + (i = ((i = Math.imul(L, ae)) + Math.imul(U, oe)) | 0), + (o = Math.imul(U, ae)), + (n = (n + Math.imul(O, fe)) | 0), + (i = ((i = (i + Math.imul(O, ce)) | 0) + Math.imul(D, fe)) | 0), + (o = (o + Math.imul(D, ce)) | 0), + (n = (n + Math.imul(T, he)) | 0), + (i = ((i = (i + Math.imul(T, de)) | 0) + Math.imul(C, he)) | 0), + (o = (o + Math.imul(C, de)) | 0); + var Re = + (((c + (n = (n + Math.imul(B, pe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(B, be)) | 0) + Math.imul(I, pe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(I, be)) | 0) + (i >>> 13)) | 0) + + (Re >>> 26)) | + 0), + (Re &= 67108863), + (n = Math.imul(L, fe)), + (i = ((i = Math.imul(L, ce)) + Math.imul(U, fe)) | 0), + (o = Math.imul(U, ce)), + (n = (n + Math.imul(O, he)) | 0), + (i = ((i = (i + Math.imul(O, de)) | 0) + Math.imul(D, he)) | 0), + (o = (o + Math.imul(D, de)) | 0); + var Te = + (((c + (n = (n + Math.imul(T, pe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(T, be)) | 0) + Math.imul(C, pe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(C, be)) | 0) + (i >>> 13)) | 0) + + (Te >>> 26)) | + 0), + (Te &= 67108863), + (n = Math.imul(L, he)), + (i = ((i = Math.imul(L, de)) + Math.imul(U, he)) | 0), + (o = Math.imul(U, de)); + var Ce = + (((c + (n = (n + Math.imul(O, pe)) | 0)) | 0) + + ((8191 & + (i = + ((i = (i + Math.imul(O, be)) | 0) + Math.imul(D, pe)) | + 0)) << + 13)) | + 0; + (c = + ((((o = (o + Math.imul(D, be)) | 0) + (i >>> 13)) | 0) + + (Ce >>> 26)) | + 0), + (Ce &= 67108863); + var Pe = + (((c + (n = Math.imul(L, pe))) | 0) + + ((8191 & + (i = ((i = Math.imul(L, be)) + Math.imul(U, pe)) | 0)) << + 13)) | + 0; + return ( + (c = + ((((o = Math.imul(U, be)) + (i >>> 13)) | 0) + (Pe >>> 26)) | + 0), + (Pe &= 67108863), + (f[0] = ye), + (f[1] = me), + (f[2] = ve), + (f[3] = ge), + (f[4] = we), + (f[5] = _e), + (f[6] = Se), + (f[7] = Ee), + (f[8] = Me), + (f[9] = ke), + (f[10] = xe), + (f[11] = Ae), + (f[12] = je), + (f[13] = Be), + (f[14] = Ie), + (f[15] = Re), + (f[16] = Te), + (f[17] = Ce), + (f[18] = Pe), + 0 !== c && ((f[19] = c), r.length++), + r + ); + }; + function p(e, t, r) { + return new b().mulp(e, t, r); + } + function b(e, t) { + (this.x = e), (this.y = t); + } + Math.imul || (l = d), + (o.prototype.mulTo = function (e, t) { + var r = this.length + e.length; + return 10 === this.length && 10 === e.length + ? l(this, e, t) + : r < 63 + ? d(this, e, t) + : r < 1024 + ? (function (e, t, r) { + (r.negative = t.negative ^ e.negative), + (r.length = e.length + t.length); + for (var n = 0, i = 0, o = 0; o < r.length - 1; o++) { + var a = i; + i = 0; + for ( + var s = 67108863 & n, + f = Math.min(o, t.length - 1), + c = Math.max(0, o - e.length + 1); + c <= f; + c++ + ) { + var u = o - c, + h = (0 | e.words[u]) * (0 | t.words[c]), + d = 67108863 & h; + (s = 67108863 & (d = (d + s) | 0)), + (i += + (a = + ((a = (a + ((h / 67108864) | 0)) | 0) + + (d >>> 26)) | + 0) >>> 26), + (a &= 67108863); + } + (r.words[o] = s), (n = a), (a = i); + } + return 0 !== n ? (r.words[o] = n) : r.length--, r.strip(); + })(this, e, t) + : p(this, e, t); + }), + (b.prototype.makeRBT = function (e) { + for ( + var t = new Array(e), + r = o.prototype._countBits(e) - 1, + n = 0; + n < e; + n++ + ) + t[n] = this.revBin(n, r, e); + return t; + }), + (b.prototype.revBin = function (e, t, r) { + if (0 === e || e === r - 1) return e; + for (var n = 0, i = 0; i < t; i++) + (n |= (1 & e) << (t - i - 1)), (e >>= 1); + return n; + }), + (b.prototype.permute = function (e, t, r, n, i, o) { + for (var a = 0; a < o; a++) (n[a] = t[e[a]]), (i[a] = r[e[a]]); + }), + (b.prototype.transform = function (e, t, r, n, i, o) { + this.permute(o, e, t, r, n, i); + for (var a = 1; a < i; a <<= 1) + for ( + var s = a << 1, + f = Math.cos((2 * Math.PI) / s), + c = Math.sin((2 * Math.PI) / s), + u = 0; + u < i; + u += s + ) + for (var h = f, d = c, l = 0; l < a; l++) { + var p = r[u + l], + b = n[u + l], + y = r[u + l + a], + m = n[u + l + a], + v = h * y - d * m; + (m = h * m + d * y), + (y = v), + (r[u + l] = p + y), + (n[u + l] = b + m), + (r[u + l + a] = p - y), + (n[u + l + a] = b - m), + l !== s && + ((v = f * h - c * d), (d = f * d + c * h), (h = v)); + } + }), + (b.prototype.guessLen13b = function (e, t) { + var r = 1 | Math.max(t, e), + n = 1 & r, + i = 0; + for (r = (r / 2) | 0; r; r >>>= 1) i++; + return 1 << (i + 1 + n); + }), + (b.prototype.conjugate = function (e, t, r) { + if (!(r <= 1)) + for (var n = 0; n < r / 2; n++) { + var i = e[n]; + (e[n] = e[r - n - 1]), + (e[r - n - 1] = i), + (i = t[n]), + (t[n] = -t[r - n - 1]), + (t[r - n - 1] = -i); + } + }), + (b.prototype.normalize13b = function (e, t) { + for (var r = 0, n = 0; n < t / 2; n++) { + var i = + 8192 * Math.round(e[2 * n + 1] / t) + + Math.round(e[2 * n] / t) + + r; + (e[n] = 67108863 & i), + (r = i < 67108864 ? 0 : (i / 67108864) | 0); + } + return e; + }), + (b.prototype.convert13b = function (e, t, r, i) { + for (var o = 0, a = 0; a < t; a++) + (o += 0 | e[a]), + (r[2 * a] = 8191 & o), + (o >>>= 13), + (r[2 * a + 1] = 8191 & o), + (o >>>= 13); + for (a = 2 * t; a < i; ++a) r[a] = 0; + n(0 === o), n(0 == (-8192 & o)); + }), + (b.prototype.stub = function (e) { + for (var t = new Array(e), r = 0; r < e; r++) t[r] = 0; + return t; + }), + (b.prototype.mulp = function (e, t, r) { + var n = 2 * this.guessLen13b(e.length, t.length), + i = this.makeRBT(n), + o = this.stub(n), + a = new Array(n), + s = new Array(n), + f = new Array(n), + c = new Array(n), + u = new Array(n), + h = new Array(n), + d = r.words; + (d.length = n), + this.convert13b(e.words, e.length, a, n), + this.convert13b(t.words, t.length, c, n), + this.transform(a, o, s, f, n, i), + this.transform(c, o, u, h, n, i); + for (var l = 0; l < n; l++) { + var p = s[l] * u[l] - f[l] * h[l]; + (f[l] = s[l] * h[l] + f[l] * u[l]), (s[l] = p); + } + return ( + this.conjugate(s, f, n), + this.transform(s, f, d, o, n, i), + this.conjugate(d, o, n), + this.normalize13b(d, n), + (r.negative = e.negative ^ t.negative), + (r.length = e.length + t.length), + r.strip() + ); + }), + (o.prototype.mul = function (e) { + var t = new o(null); + return ( + (t.words = new Array(this.length + e.length)), + this.mulTo(e, t) + ); + }), + (o.prototype.mulf = function (e) { + var t = new o(null); + return ( + (t.words = new Array(this.length + e.length)), p(this, e, t) + ); + }), + (o.prototype.imul = function (e) { + return this.clone().mulTo(e, this); + }), + (o.prototype.imuln = function (e) { + n("number" == typeof e), n(e < 67108864); + for (var t = 0, r = 0; r < this.length; r++) { + var i = (0 | this.words[r]) * e, + o = (67108863 & i) + (67108863 & t); + (t >>= 26), + (t += (i / 67108864) | 0), + (t += o >>> 26), + (this.words[r] = 67108863 & o); + } + return 0 !== t && ((this.words[r] = t), this.length++), this; + }), + (o.prototype.muln = function (e) { + return this.clone().imuln(e); + }), + (o.prototype.sqr = function () { + return this.mul(this); + }), + (o.prototype.isqr = function () { + return this.imul(this.clone()); + }), + (o.prototype.pow = function (e) { + var t = (function (e) { + for ( + var t = new Array(e.bitLength()), r = 0; + r < t.length; + r++ + ) { + var n = (r / 26) | 0, + i = r % 26; + t[r] = (e.words[n] & (1 << i)) >>> i; + } + return t; + })(e); + if (0 === t.length) return new o(1); + for ( + var r = this, n = 0; + n < t.length && 0 === t[n]; + n++, r = r.sqr() + ); + if (++n < t.length) + for (var i = r.sqr(); n < t.length; n++, i = i.sqr()) + 0 !== t[n] && (r = r.mul(i)); + return r; + }), + (o.prototype.iushln = function (e) { + n("number" == typeof e && e >= 0); + var t, + r = e % 26, + i = (e - r) / 26, + o = (67108863 >>> (26 - r)) << (26 - r); + if (0 !== r) { + var a = 0; + for (t = 0; t < this.length; t++) { + var s = this.words[t] & o, + f = ((0 | this.words[t]) - s) << r; + (this.words[t] = f | a), (a = s >>> (26 - r)); + } + a && ((this.words[t] = a), this.length++); + } + if (0 !== i) { + for (t = this.length - 1; t >= 0; t--) + this.words[t + i] = this.words[t]; + for (t = 0; t < i; t++) this.words[t] = 0; + this.length += i; + } + return this.strip(); + }), + (o.prototype.ishln = function (e) { + return n(0 === this.negative), this.iushln(e); + }), + (o.prototype.iushrn = function (e, t, r) { + var i; + n("number" == typeof e && e >= 0), + (i = t ? (t - (t % 26)) / 26 : 0); + var o = e % 26, + a = Math.min((e - o) / 26, this.length), + s = 67108863 ^ ((67108863 >>> o) << o), + f = r; + if (((i -= a), (i = Math.max(0, i)), f)) { + for (var c = 0; c < a; c++) f.words[c] = this.words[c]; + f.length = a; + } + if (0 === a); + else if (this.length > a) + for (this.length -= a, c = 0; c < this.length; c++) + this.words[c] = this.words[c + a]; + else (this.words[0] = 0), (this.length = 1); + var u = 0; + for (c = this.length - 1; c >= 0 && (0 !== u || c >= i); c--) { + var h = 0 | this.words[c]; + (this.words[c] = (u << (26 - o)) | (h >>> o)), (u = h & s); + } + return ( + f && 0 !== u && (f.words[f.length++] = u), + 0 === this.length && ((this.words[0] = 0), (this.length = 1)), + this.strip() + ); + }), + (o.prototype.ishrn = function (e, t, r) { + return n(0 === this.negative), this.iushrn(e, t, r); + }), + (o.prototype.shln = function (e) { + return this.clone().ishln(e); + }), + (o.prototype.ushln = function (e) { + return this.clone().iushln(e); + }), + (o.prototype.shrn = function (e) { + return this.clone().ishrn(e); + }), + (o.prototype.ushrn = function (e) { + return this.clone().iushrn(e); + }), + (o.prototype.testn = function (e) { + n("number" == typeof e && e >= 0); + var t = e % 26, + r = (e - t) / 26, + i = 1 << t; + return !(this.length <= r) && !!(this.words[r] & i); + }), + (o.prototype.imaskn = function (e) { + n("number" == typeof e && e >= 0); + var t = e % 26, + r = (e - t) / 26; + if ( + (n( + 0 === this.negative, + "imaskn works only with positive numbers", + ), + this.length <= r) + ) + return this; + if ( + (0 !== t && r++, + (this.length = Math.min(r, this.length)), + 0 !== t) + ) { + var i = 67108863 ^ ((67108863 >>> t) << t); + this.words[this.length - 1] &= i; + } + return this.strip(); + }), + (o.prototype.maskn = function (e) { + return this.clone().imaskn(e); + }), + (o.prototype.iaddn = function (e) { + return ( + n("number" == typeof e), + n(e < 67108864), + e < 0 + ? this.isubn(-e) + : 0 !== this.negative + ? 1 === this.length && (0 | this.words[0]) < e + ? ((this.words[0] = e - (0 | this.words[0])), + (this.negative = 0), + this) + : ((this.negative = 0), + this.isubn(e), + (this.negative = 1), + this) + : this._iaddn(e) + ); + }), + (o.prototype._iaddn = function (e) { + this.words[0] += e; + for ( + var t = 0; + t < this.length && this.words[t] >= 67108864; + t++ + ) + (this.words[t] -= 67108864), + t === this.length - 1 + ? (this.words[t + 1] = 1) + : this.words[t + 1]++; + return (this.length = Math.max(this.length, t + 1)), this; + }), + (o.prototype.isubn = function (e) { + if ((n("number" == typeof e), n(e < 67108864), e < 0)) + return this.iaddn(-e); + if (0 !== this.negative) + return ( + (this.negative = 0), + this.iaddn(e), + (this.negative = 1), + this + ); + if ( + ((this.words[0] -= e), 1 === this.length && this.words[0] < 0) + ) + (this.words[0] = -this.words[0]), (this.negative = 1); + else + for (var t = 0; t < this.length && this.words[t] < 0; t++) + (this.words[t] += 67108864), (this.words[t + 1] -= 1); + return this.strip(); + }), + (o.prototype.addn = function (e) { + return this.clone().iaddn(e); + }), + (o.prototype.subn = function (e) { + return this.clone().isubn(e); + }), + (o.prototype.iabs = function () { + return (this.negative = 0), this; + }), + (o.prototype.abs = function () { + return this.clone().iabs(); + }), + (o.prototype._ishlnsubmul = function (e, t, r) { + var i, + o, + a = e.length + r; + this._expand(a); + var s = 0; + for (i = 0; i < e.length; i++) { + o = (0 | this.words[i + r]) + s; + var f = (0 | e.words[i]) * t; + (s = ((o -= 67108863 & f) >> 26) - ((f / 67108864) | 0)), + (this.words[i + r] = 67108863 & o); + } + for (; i < this.length - r; i++) + (s = (o = (0 | this.words[i + r]) + s) >> 26), + (this.words[i + r] = 67108863 & o); + if (0 === s) return this.strip(); + for (n(-1 === s), s = 0, i = 0; i < this.length; i++) + (s = (o = -(0 | this.words[i]) + s) >> 26), + (this.words[i] = 67108863 & o); + return (this.negative = 1), this.strip(); + }), + (o.prototype._wordDiv = function (e, t) { + var r = (this.length, e.length), + n = this.clone(), + i = e, + a = 0 | i.words[i.length - 1]; + 0 !== (r = 26 - this._countBits(a)) && + ((i = i.ushln(r)), + n.iushln(r), + (a = 0 | i.words[i.length - 1])); + var s, + f = n.length - i.length; + if ("mod" !== t) { + ((s = new o(null)).length = f + 1), + (s.words = new Array(s.length)); + for (var c = 0; c < s.length; c++) s.words[c] = 0; + } + var u = n.clone()._ishlnsubmul(i, 1, f); + 0 === u.negative && ((n = u), s && (s.words[f] = 1)); + for (var h = f - 1; h >= 0; h--) { + var d = + 67108864 * (0 | n.words[i.length + h]) + + (0 | n.words[i.length + h - 1]); + for ( + d = Math.min((d / a) | 0, 67108863), + n._ishlnsubmul(i, d, h); + 0 !== n.negative; + + ) + d--, + (n.negative = 0), + n._ishlnsubmul(i, 1, h), + n.isZero() || (n.negative ^= 1); + s && (s.words[h] = d); + } + return ( + s && s.strip(), + n.strip(), + "div" !== t && 0 !== r && n.iushrn(r), + { div: s || null, mod: n } + ); + }), + (o.prototype.divmod = function (e, t, r) { + return ( + n(!e.isZero()), + this.isZero() + ? { div: new o(0), mod: new o(0) } + : 0 !== this.negative && 0 === e.negative + ? ((s = this.neg().divmod(e, t)), + "mod" !== t && (i = s.div.neg()), + "div" !== t && + ((a = s.mod.neg()), r && 0 !== a.negative && a.iadd(e)), + { div: i, mod: a }) + : 0 === this.negative && 0 !== e.negative + ? ((s = this.divmod(e.neg(), t)), + "mod" !== t && (i = s.div.neg()), + { div: i, mod: s.mod }) + : 0 != (this.negative & e.negative) + ? ((s = this.neg().divmod(e.neg(), t)), + "div" !== t && + ((a = s.mod.neg()), r && 0 !== a.negative && a.isub(e)), + { div: s.div, mod: a }) + : e.length > this.length || this.cmp(e) < 0 + ? { div: new o(0), mod: this } + : 1 === e.length + ? "div" === t + ? { div: this.divn(e.words[0]), mod: null } + : "mod" === t + ? { div: null, mod: new o(this.modn(e.words[0])) } + : { + div: this.divn(e.words[0]), + mod: new o(this.modn(e.words[0])), + } + : this._wordDiv(e, t) + ); + var i, a, s; + }), + (o.prototype.div = function (e) { + return this.divmod(e, "div", !1).div; + }), + (o.prototype.mod = function (e) { + return this.divmod(e, "mod", !1).mod; + }), + (o.prototype.umod = function (e) { + return this.divmod(e, "mod", !0).mod; + }), + (o.prototype.divRound = function (e) { + var t = this.divmod(e); + if (t.mod.isZero()) return t.div; + var r = 0 !== t.div.negative ? t.mod.isub(e) : t.mod, + n = e.ushrn(1), + i = e.andln(1), + o = r.cmp(n); + return o < 0 || (1 === i && 0 === o) + ? t.div + : 0 !== t.div.negative + ? t.div.isubn(1) + : t.div.iaddn(1); + }), + (o.prototype.modn = function (e) { + n(e <= 67108863); + for ( + var t = (1 << 26) % e, r = 0, i = this.length - 1; + i >= 0; + i-- + ) + r = (t * r + (0 | this.words[i])) % e; + return r; + }), + (o.prototype.idivn = function (e) { + n(e <= 67108863); + for (var t = 0, r = this.length - 1; r >= 0; r--) { + var i = (0 | this.words[r]) + 67108864 * t; + (this.words[r] = (i / e) | 0), (t = i % e); + } + return this.strip(); + }), + (o.prototype.divn = function (e) { + return this.clone().idivn(e); + }), + (o.prototype.egcd = function (e) { + n(0 === e.negative), n(!e.isZero()); + var t = this, + r = e.clone(); + t = 0 !== t.negative ? t.umod(e) : t.clone(); + for ( + var i = new o(1), + a = new o(0), + s = new o(0), + f = new o(1), + c = 0; + t.isEven() && r.isEven(); + + ) + t.iushrn(1), r.iushrn(1), ++c; + for (var u = r.clone(), h = t.clone(); !t.isZero(); ) { + for ( + var d = 0, l = 1; + 0 == (t.words[0] & l) && d < 26; + ++d, l <<= 1 + ); + if (d > 0) + for (t.iushrn(d); d-- > 0; ) + (i.isOdd() || a.isOdd()) && (i.iadd(u), a.isub(h)), + i.iushrn(1), + a.iushrn(1); + for ( + var p = 0, b = 1; + 0 == (r.words[0] & b) && p < 26; + ++p, b <<= 1 + ); + if (p > 0) + for (r.iushrn(p); p-- > 0; ) + (s.isOdd() || f.isOdd()) && (s.iadd(u), f.isub(h)), + s.iushrn(1), + f.iushrn(1); + t.cmp(r) >= 0 + ? (t.isub(r), i.isub(s), a.isub(f)) + : (r.isub(t), s.isub(i), f.isub(a)); + } + return { a: s, b: f, gcd: r.iushln(c) }; + }), + (o.prototype._invmp = function (e) { + n(0 === e.negative), n(!e.isZero()); + var t = this, + r = e.clone(); + t = 0 !== t.negative ? t.umod(e) : t.clone(); + for ( + var i, a = new o(1), s = new o(0), f = r.clone(); + t.cmpn(1) > 0 && r.cmpn(1) > 0; + + ) { + for ( + var c = 0, u = 1; + 0 == (t.words[0] & u) && c < 26; + ++c, u <<= 1 + ); + if (c > 0) + for (t.iushrn(c); c-- > 0; ) + a.isOdd() && a.iadd(f), a.iushrn(1); + for ( + var h = 0, d = 1; + 0 == (r.words[0] & d) && h < 26; + ++h, d <<= 1 + ); + if (h > 0) + for (r.iushrn(h); h-- > 0; ) + s.isOdd() && s.iadd(f), s.iushrn(1); + t.cmp(r) >= 0 + ? (t.isub(r), a.isub(s)) + : (r.isub(t), s.isub(a)); + } + return ( + (i = 0 === t.cmpn(1) ? a : s).cmpn(0) < 0 && i.iadd(e), i + ); + }), + (o.prototype.gcd = function (e) { + if (this.isZero()) return e.abs(); + if (e.isZero()) return this.abs(); + var t = this.clone(), + r = e.clone(); + (t.negative = 0), (r.negative = 0); + for (var n = 0; t.isEven() && r.isEven(); n++) + t.iushrn(1), r.iushrn(1); + for (;;) { + for (; t.isEven(); ) t.iushrn(1); + for (; r.isEven(); ) r.iushrn(1); + var i = t.cmp(r); + if (i < 0) { + var o = t; + (t = r), (r = o); + } else if (0 === i || 0 === r.cmpn(1)) break; + t.isub(r); + } + return r.iushln(n); + }), + (o.prototype.invm = function (e) { + return this.egcd(e).a.umod(e); + }), + (o.prototype.isEven = function () { + return 0 == (1 & this.words[0]); + }), + (o.prototype.isOdd = function () { + return 1 == (1 & this.words[0]); + }), + (o.prototype.andln = function (e) { + return this.words[0] & e; + }), + (o.prototype.bincn = function (e) { + n("number" == typeof e); + var t = e % 26, + r = (e - t) / 26, + i = 1 << t; + if (this.length <= r) + return this._expand(r + 1), (this.words[r] |= i), this; + for (var o = i, a = r; 0 !== o && a < this.length; a++) { + var s = 0 | this.words[a]; + (o = (s += o) >>> 26), (s &= 67108863), (this.words[a] = s); + } + return 0 !== o && ((this.words[a] = o), this.length++), this; + }), + (o.prototype.isZero = function () { + return 1 === this.length && 0 === this.words[0]; + }), + (o.prototype.cmpn = function (e) { + var t, + r = e < 0; + if (0 !== this.negative && !r) return -1; + if (0 === this.negative && r) return 1; + if ((this.strip(), this.length > 1)) t = 1; + else { + r && (e = -e), n(e <= 67108863, "Number is too big"); + var i = 0 | this.words[0]; + t = i === e ? 0 : i < e ? -1 : 1; + } + return 0 !== this.negative ? 0 | -t : t; + }), + (o.prototype.cmp = function (e) { + if (0 !== this.negative && 0 === e.negative) return -1; + if (0 === this.negative && 0 !== e.negative) return 1; + var t = this.ucmp(e); + return 0 !== this.negative ? 0 | -t : t; + }), + (o.prototype.ucmp = function (e) { + if (this.length > e.length) return 1; + if (this.length < e.length) return -1; + for (var t = 0, r = this.length - 1; r >= 0; r--) { + var n = 0 | this.words[r], + i = 0 | e.words[r]; + if (n !== i) { + n < i ? (t = -1) : n > i && (t = 1); + break; + } + } + return t; + }), + (o.prototype.gtn = function (e) { + return 1 === this.cmpn(e); + }), + (o.prototype.gt = function (e) { + return 1 === this.cmp(e); + }), + (o.prototype.gten = function (e) { + return this.cmpn(e) >= 0; + }), + (o.prototype.gte = function (e) { + return this.cmp(e) >= 0; + }), + (o.prototype.ltn = function (e) { + return -1 === this.cmpn(e); + }), + (o.prototype.lt = function (e) { + return -1 === this.cmp(e); + }), + (o.prototype.lten = function (e) { + return this.cmpn(e) <= 0; + }), + (o.prototype.lte = function (e) { + return this.cmp(e) <= 0; + }), + (o.prototype.eqn = function (e) { + return 0 === this.cmpn(e); + }), + (o.prototype.eq = function (e) { + return 0 === this.cmp(e); + }), + (o.red = function (e) { + return new S(e); + }), + (o.prototype.toRed = function (e) { + return ( + n(!this.red, "Already a number in reduction context"), + n(0 === this.negative, "red works only with positives"), + e.convertTo(this)._forceRed(e) + ); + }), + (o.prototype.fromRed = function () { + return ( + n( + this.red, + "fromRed works only with numbers in reduction context", + ), + this.red.convertFrom(this) + ); + }), + (o.prototype._forceRed = function (e) { + return (this.red = e), this; + }), + (o.prototype.forceRed = function (e) { + return ( + n(!this.red, "Already a number in reduction context"), + this._forceRed(e) + ); + }), + (o.prototype.redAdd = function (e) { + return ( + n(this.red, "redAdd works only with red numbers"), + this.red.add(this, e) + ); + }), + (o.prototype.redIAdd = function (e) { + return ( + n(this.red, "redIAdd works only with red numbers"), + this.red.iadd(this, e) + ); + }), + (o.prototype.redSub = function (e) { + return ( + n(this.red, "redSub works only with red numbers"), + this.red.sub(this, e) + ); + }), + (o.prototype.redISub = function (e) { + return ( + n(this.red, "redISub works only with red numbers"), + this.red.isub(this, e) + ); + }), + (o.prototype.redShl = function (e) { + return ( + n(this.red, "redShl works only with red numbers"), + this.red.shl(this, e) + ); + }), + (o.prototype.redMul = function (e) { + return ( + n(this.red, "redMul works only with red numbers"), + this.red._verify2(this, e), + this.red.mul(this, e) + ); + }), + (o.prototype.redIMul = function (e) { + return ( + n(this.red, "redMul works only with red numbers"), + this.red._verify2(this, e), + this.red.imul(this, e) + ); + }), + (o.prototype.redSqr = function () { + return ( + n(this.red, "redSqr works only with red numbers"), + this.red._verify1(this), + this.red.sqr(this) + ); + }), + (o.prototype.redISqr = function () { + return ( + n(this.red, "redISqr works only with red numbers"), + this.red._verify1(this), + this.red.isqr(this) + ); + }), + (o.prototype.redSqrt = function () { + return ( + n(this.red, "redSqrt works only with red numbers"), + this.red._verify1(this), + this.red.sqrt(this) + ); + }), + (o.prototype.redInvm = function () { + return ( + n(this.red, "redInvm works only with red numbers"), + this.red._verify1(this), + this.red.invm(this) + ); + }), + (o.prototype.redNeg = function () { + return ( + n(this.red, "redNeg works only with red numbers"), + this.red._verify1(this), + this.red.neg(this) + ); + }), + (o.prototype.redPow = function (e) { + return ( + n(this.red && !e.red, "redPow(normalNum)"), + this.red._verify1(this), + this.red.pow(this, e) + ); + }); + var y = { k256: null, p224: null, p192: null, p25519: null }; + function m(e, t) { + (this.name = e), + (this.p = new o(t, 16)), + (this.n = this.p.bitLength()), + (this.k = new o(1).iushln(this.n).isub(this.p)), + (this.tmp = this._tmp()); + } + function v() { + m.call( + this, + "k256", + "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f", + ); + } + function g() { + m.call( + this, + "p224", + "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001", + ); + } + function w() { + m.call( + this, + "p192", + "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff", + ); + } + function _() { + m.call( + this, + "25519", + "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed", + ); + } + function S(e) { + if ("string" == typeof e) { + var t = o._prime(e); + (this.m = t.p), (this.prime = t); + } else + n(e.gtn(1), "modulus must be greater than 1"), + (this.m = e), + (this.prime = null); + } + function E(e) { + S.call(this, e), + (this.shift = this.m.bitLength()), + this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), + (this.r = new o(1).iushln(this.shift)), + (this.r2 = this.imod(this.r.sqr())), + (this.rinv = this.r._invmp(this.m)), + (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), + (this.minv = this.minv.umod(this.r)), + (this.minv = this.r.sub(this.minv)); + } + (m.prototype._tmp = function () { + var e = new o(null); + return (e.words = new Array(Math.ceil(this.n / 13))), e; + }), + (m.prototype.ireduce = function (e) { + var t, + r = e; + do { + this.split(r, this.tmp), + (t = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); + } while (t > this.n); + var n = t < this.n ? -1 : r.ucmp(this.p); + return ( + 0 === n + ? ((r.words[0] = 0), (r.length = 1)) + : n > 0 + ? r.isub(this.p) + : r.strip(), + r + ); + }), + (m.prototype.split = function (e, t) { + e.iushrn(this.n, 0, t); + }), + (m.prototype.imulK = function (e) { + return e.imul(this.k); + }), + i(v, m), + (v.prototype.split = function (e, t) { + for (var r = Math.min(e.length, 9), n = 0; n < r; n++) + t.words[n] = e.words[n]; + if (((t.length = r), e.length <= 9)) + return (e.words[0] = 0), void (e.length = 1); + var i = e.words[9]; + for ( + t.words[t.length++] = 4194303 & i, n = 10; + n < e.length; + n++ + ) { + var o = 0 | e.words[n]; + (e.words[n - 10] = ((4194303 & o) << 4) | (i >>> 22)), + (i = o); + } + (i >>>= 22), + (e.words[n - 10] = i), + 0 === i && e.length > 10 ? (e.length -= 10) : (e.length -= 9); + }), + (v.prototype.imulK = function (e) { + (e.words[e.length] = 0), + (e.words[e.length + 1] = 0), + (e.length += 2); + for (var t = 0, r = 0; r < e.length; r++) { + var n = 0 | e.words[r]; + (t += 977 * n), + (e.words[r] = 67108863 & t), + (t = 64 * n + ((t / 67108864) | 0)); + } + return ( + 0 === e.words[e.length - 1] && + (e.length--, 0 === e.words[e.length - 1] && e.length--), + e + ); + }), + i(g, m), + i(w, m), + i(_, m), + (_.prototype.imulK = function (e) { + for (var t = 0, r = 0; r < e.length; r++) { + var n = 19 * (0 | e.words[r]) + t, + i = 67108863 & n; + (n >>>= 26), (e.words[r] = i), (t = n); + } + return 0 !== t && (e.words[e.length++] = t), e; + }), + (o._prime = function (e) { + if (y[e]) return y[e]; + var t; + if ("k256" === e) t = new v(); + else if ("p224" === e) t = new g(); + else if ("p192" === e) t = new w(); + else { + if ("p25519" !== e) throw new Error("Unknown prime " + e); + t = new _(); + } + return (y[e] = t), t; + }), + (S.prototype._verify1 = function (e) { + n(0 === e.negative, "red works only with positives"), + n(e.red, "red works only with red numbers"); + }), + (S.prototype._verify2 = function (e, t) { + n( + 0 == (e.negative | t.negative), + "red works only with positives", + ), + n( + e.red && e.red === t.red, + "red works only with red numbers", + ); + }), + (S.prototype.imod = function (e) { + return this.prime + ? this.prime.ireduce(e)._forceRed(this) + : e.umod(this.m)._forceRed(this); + }), + (S.prototype.neg = function (e) { + return e.isZero() ? e.clone() : this.m.sub(e)._forceRed(this); + }), + (S.prototype.add = function (e, t) { + this._verify2(e, t); + var r = e.add(t); + return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); + }), + (S.prototype.iadd = function (e, t) { + this._verify2(e, t); + var r = e.iadd(t); + return r.cmp(this.m) >= 0 && r.isub(this.m), r; + }), + (S.prototype.sub = function (e, t) { + this._verify2(e, t); + var r = e.sub(t); + return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); + }), + (S.prototype.isub = function (e, t) { + this._verify2(e, t); + var r = e.isub(t); + return r.cmpn(0) < 0 && r.iadd(this.m), r; + }), + (S.prototype.shl = function (e, t) { + return this._verify1(e), this.imod(e.ushln(t)); + }), + (S.prototype.imul = function (e, t) { + return this._verify2(e, t), this.imod(e.imul(t)); + }), + (S.prototype.mul = function (e, t) { + return this._verify2(e, t), this.imod(e.mul(t)); + }), + (S.prototype.isqr = function (e) { + return this.imul(e, e.clone()); + }), + (S.prototype.sqr = function (e) { + return this.mul(e, e); + }), + (S.prototype.sqrt = function (e) { + if (e.isZero()) return e.clone(); + var t = this.m.andln(3); + if ((n(t % 2 == 1), 3 === t)) { + var r = this.m.add(new o(1)).iushrn(2); + return this.pow(e, r); + } + for ( + var i = this.m.subn(1), a = 0; + !i.isZero() && 0 === i.andln(1); + + ) + a++, i.iushrn(1); + n(!i.isZero()); + var s = new o(1).toRed(this), + f = s.redNeg(), + c = this.m.subn(1).iushrn(1), + u = this.m.bitLength(); + for ( + u = new o(2 * u * u).toRed(this); + 0 !== this.pow(u, c).cmp(f); + + ) + u.redIAdd(f); + for ( + var h = this.pow(u, i), + d = this.pow(e, i.addn(1).iushrn(1)), + l = this.pow(e, i), + p = a; + 0 !== l.cmp(s); + + ) { + for (var b = l, y = 0; 0 !== b.cmp(s); y++) b = b.redSqr(); + n(y < p); + var m = this.pow(h, new o(1).iushln(p - y - 1)); + (d = d.redMul(m)), + (h = m.redSqr()), + (l = l.redMul(h)), + (p = y); + } + return d; + }), + (S.prototype.invm = function (e) { + var t = e._invmp(this.m); + return 0 !== t.negative + ? ((t.negative = 0), this.imod(t).redNeg()) + : this.imod(t); + }), + (S.prototype.pow = function (e, t) { + if (t.isZero()) return new o(1).toRed(this); + if (0 === t.cmpn(1)) return e.clone(); + var r = new Array(16); + (r[0] = new o(1).toRed(this)), (r[1] = e); + for (var n = 2; n < r.length; n++) r[n] = this.mul(r[n - 1], e); + var i = r[0], + a = 0, + s = 0, + f = t.bitLength() % 26; + for (0 === f && (f = 26), n = t.length - 1; n >= 0; n--) { + for (var c = t.words[n], u = f - 1; u >= 0; u--) { + var h = (c >> u) & 1; + i !== r[0] && (i = this.sqr(i)), + 0 !== h || 0 !== a + ? ((a <<= 1), + (a |= h), + (4 === ++s || (0 === n && 0 === u)) && + ((i = this.mul(i, r[a])), (s = 0), (a = 0))) + : (s = 0); + } + f = 26; + } + return i; + }), + (S.prototype.convertTo = function (e) { + var t = e.umod(this.m); + return t === e ? t.clone() : t; + }), + (S.prototype.convertFrom = function (e) { + var t = e.clone(); + return (t.red = null), t; + }), + (o.mont = function (e) { + return new E(e); + }), + i(E, S), + (E.prototype.convertTo = function (e) { + return this.imod(e.ushln(this.shift)); + }), + (E.prototype.convertFrom = function (e) { + var t = this.imod(e.mul(this.rinv)); + return (t.red = null), t; + }), + (E.prototype.imul = function (e, t) { + if (e.isZero() || t.isZero()) + return (e.words[0] = 0), (e.length = 1), e; + var r = e.imul(t), + n = r + .maskn(this.shift) + .mul(this.minv) + .imaskn(this.shift) + .mul(this.m), + i = r.isub(n).iushrn(this.shift), + o = i; + return ( + i.cmp(this.m) >= 0 + ? (o = i.isub(this.m)) + : i.cmpn(0) < 0 && (o = i.iadd(this.m)), + o._forceRed(this) + ); + }), + (E.prototype.mul = function (e, t) { + if (e.isZero() || t.isZero()) return new o(0)._forceRed(this); + var r = e.mul(t), + n = r + .maskn(this.shift) + .mul(this.minv) + .imaskn(this.shift) + .mul(this.m), + i = r.isub(n).iushrn(this.shift), + a = i; + return ( + i.cmp(this.m) >= 0 + ? (a = i.isub(this.m)) + : i.cmpn(0) < 0 && (a = i.iadd(this.m)), + a._forceRed(this) + ); + }), + (E.prototype.invm = function (e) { + return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this); + }); + })(void 0 === t || t, this); + }, + { buffer: 46 }, + ], + 45: [ + function (e, t, r) { + var n; + function i(e) { + this.rand = e; + } + if ( + ((t.exports = function (e) { + return n || (n = new i(null)), n.generate(e); + }), + (t.exports.Rand = i), + (i.prototype.generate = function (e) { + return this._rand(e); + }), + (i.prototype._rand = function (e) { + if (this.rand.getBytes) return this.rand.getBytes(e); + for (var t = new Uint8Array(e), r = 0; r < t.length; r++) + t[r] = this.rand.getByte(); + return t; + }), + "object" == typeof self) + ) + self.crypto && self.crypto.getRandomValues + ? (i.prototype._rand = function (e) { + var t = new Uint8Array(e); + return self.crypto.getRandomValues(t), t; + }) + : self.msCrypto && self.msCrypto.getRandomValues + ? (i.prototype._rand = function (e) { + var t = new Uint8Array(e); + return self.msCrypto.getRandomValues(t), t; + }) + : "object" == typeof window && + (i.prototype._rand = function () { + throw new Error("Not implemented yet"); + }); + else + try { + var o = e("crypto"); + if ("function" != typeof o.randomBytes) + throw new Error("Not supported"); + i.prototype._rand = function (e) { + return o.randomBytes(e); + }; + } catch (e) {} + }, + { crypto: 46 }, + ], + 46: [function (e, t, r) {}, {}], + 47: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer; + function i(e) { + n.isBuffer(e) || (e = n.from(e)); + for ( + var t = (e.length / 4) | 0, r = new Array(t), i = 0; + i < t; + i++ + ) + r[i] = e.readUInt32BE(4 * i); + return r; + } + function o(e) { + for (; 0 < e.length; e++) e[0] = 0; + } + function a(e, t, r, n, i) { + for ( + var o, + a, + s, + f, + c = r[0], + u = r[1], + h = r[2], + d = r[3], + l = e[0] ^ t[0], + p = e[1] ^ t[1], + b = e[2] ^ t[2], + y = e[3] ^ t[3], + m = 4, + v = 1; + v < i; + v++ + ) + (o = + c[l >>> 24] ^ + u[(p >>> 16) & 255] ^ + h[(b >>> 8) & 255] ^ + d[255 & y] ^ + t[m++]), + (a = + c[p >>> 24] ^ + u[(b >>> 16) & 255] ^ + h[(y >>> 8) & 255] ^ + d[255 & l] ^ + t[m++]), + (s = + c[b >>> 24] ^ + u[(y >>> 16) & 255] ^ + h[(l >>> 8) & 255] ^ + d[255 & p] ^ + t[m++]), + (f = + c[y >>> 24] ^ + u[(l >>> 16) & 255] ^ + h[(p >>> 8) & 255] ^ + d[255 & b] ^ + t[m++]), + (l = o), + (p = a), + (b = s), + (y = f); + return ( + (o = + ((n[l >>> 24] << 24) | + (n[(p >>> 16) & 255] << 16) | + (n[(b >>> 8) & 255] << 8) | + n[255 & y]) ^ + t[m++]), + (a = + ((n[p >>> 24] << 24) | + (n[(b >>> 16) & 255] << 16) | + (n[(y >>> 8) & 255] << 8) | + n[255 & l]) ^ + t[m++]), + (s = + ((n[b >>> 24] << 24) | + (n[(y >>> 16) & 255] << 16) | + (n[(l >>> 8) & 255] << 8) | + n[255 & p]) ^ + t[m++]), + (f = + ((n[y >>> 24] << 24) | + (n[(l >>> 16) & 255] << 16) | + (n[(p >>> 8) & 255] << 8) | + n[255 & b]) ^ + t[m++]), + [(o >>>= 0), (a >>>= 0), (s >>>= 0), (f >>>= 0)] + ); + } + var s = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], + f = (function () { + for (var e = new Array(256), t = 0; t < 256; t++) + e[t] = t < 128 ? t << 1 : (t << 1) ^ 283; + for ( + var r = [], + n = [], + i = [[], [], [], []], + o = [[], [], [], []], + a = 0, + s = 0, + f = 0; + f < 256; + ++f + ) { + var c = s ^ (s << 1) ^ (s << 2) ^ (s << 3) ^ (s << 4); + (c = (c >>> 8) ^ (255 & c) ^ 99), (r[a] = c), (n[c] = a); + var u = e[a], + h = e[u], + d = e[h], + l = (257 * e[c]) ^ (16843008 * c); + (i[0][a] = (l << 24) | (l >>> 8)), + (i[1][a] = (l << 16) | (l >>> 16)), + (i[2][a] = (l << 8) | (l >>> 24)), + (i[3][a] = l), + (l = + (16843009 * d) ^ (65537 * h) ^ (257 * u) ^ (16843008 * a)), + (o[0][c] = (l << 24) | (l >>> 8)), + (o[1][c] = (l << 16) | (l >>> 16)), + (o[2][c] = (l << 8) | (l >>> 24)), + (o[3][c] = l), + 0 === a + ? (a = s = 1) + : ((a = u ^ e[e[e[d ^ u]]]), (s ^= e[e[s]])); + } + return { SBOX: r, INV_SBOX: n, SUB_MIX: i, INV_SUB_MIX: o }; + })(); + function c(e) { + (this._key = i(e)), this._reset(); + } + (c.blockSize = 16), + (c.keySize = 32), + (c.prototype.blockSize = c.blockSize), + (c.prototype.keySize = c.keySize), + (c.prototype._reset = function () { + for ( + var e = this._key, + t = e.length, + r = t + 6, + n = 4 * (r + 1), + i = [], + o = 0; + o < t; + o++ + ) + i[o] = e[o]; + for (o = t; o < n; o++) { + var a = i[o - 1]; + o % t == 0 + ? ((a = (a << 8) | (a >>> 24)), + (a = + (f.SBOX[a >>> 24] << 24) | + (f.SBOX[(a >>> 16) & 255] << 16) | + (f.SBOX[(a >>> 8) & 255] << 8) | + f.SBOX[255 & a]), + (a ^= s[(o / t) | 0] << 24)) + : t > 6 && + o % t == 4 && + (a = + (f.SBOX[a >>> 24] << 24) | + (f.SBOX[(a >>> 16) & 255] << 16) | + (f.SBOX[(a >>> 8) & 255] << 8) | + f.SBOX[255 & a]), + (i[o] = i[o - t] ^ a); + } + for (var c = [], u = 0; u < n; u++) { + var h = n - u, + d = i[h - (u % 4 ? 0 : 4)]; + c[u] = + u < 4 || h <= 4 + ? d + : f.INV_SUB_MIX[0][f.SBOX[d >>> 24]] ^ + f.INV_SUB_MIX[1][f.SBOX[(d >>> 16) & 255]] ^ + f.INV_SUB_MIX[2][f.SBOX[(d >>> 8) & 255]] ^ + f.INV_SUB_MIX[3][f.SBOX[255 & d]]; + } + (this._nRounds = r), + (this._keySchedule = i), + (this._invKeySchedule = c); + }), + (c.prototype.encryptBlockRaw = function (e) { + return a( + (e = i(e)), + this._keySchedule, + f.SUB_MIX, + f.SBOX, + this._nRounds, + ); + }), + (c.prototype.encryptBlock = function (e) { + var t = this.encryptBlockRaw(e), + r = n.allocUnsafe(16); + return ( + r.writeUInt32BE(t[0], 0), + r.writeUInt32BE(t[1], 4), + r.writeUInt32BE(t[2], 8), + r.writeUInt32BE(t[3], 12), + r + ); + }), + (c.prototype.decryptBlock = function (e) { + var t = (e = i(e))[1]; + (e[1] = e[3]), (e[3] = t); + var r = a( + e, + this._invKeySchedule, + f.INV_SUB_MIX, + f.INV_SBOX, + this._nRounds, + ), + o = n.allocUnsafe(16); + return ( + o.writeUInt32BE(r[0], 0), + o.writeUInt32BE(r[3], 4), + o.writeUInt32BE(r[2], 8), + o.writeUInt32BE(r[1], 12), + o + ); + }), + (c.prototype.scrub = function () { + o(this._keySchedule), o(this._invKeySchedule), o(this._key); + }), + (t.exports.AES = c); + }, + { "safe-buffer": 170 }, + ], + 48: [ + function (e, t, r) { + var n = e("./aes"), + i = e("safe-buffer").Buffer, + o = e("cipher-base"), + a = e("inherits"), + s = e("./ghash"), + f = e("buffer-xor"), + c = e("./incr32"); + function u(e, t, r, a) { + o.call(this); + var f = i.alloc(4, 0); + this._cipher = new n.AES(t); + var u = this._cipher.encryptBlock(f); + (this._ghash = new s(u)), + (r = (function (e, t, r) { + if (12 === t.length) + return ( + (e._finID = i.concat([t, i.from([0, 0, 0, 1])])), + i.concat([t, i.from([0, 0, 0, 2])]) + ); + var n = new s(r), + o = t.length, + a = o % 16; + n.update(t), + a && ((a = 16 - a), n.update(i.alloc(a, 0))), + n.update(i.alloc(8, 0)); + var f = 8 * o, + u = i.alloc(8); + u.writeUIntBE(f, 0, 8), n.update(u), (e._finID = n.state); + var h = i.from(e._finID); + return c(h), h; + })(this, r, u)), + (this._prev = i.from(r)), + (this._cache = i.allocUnsafe(0)), + (this._secCache = i.allocUnsafe(0)), + (this._decrypt = a), + (this._alen = 0), + (this._len = 0), + (this._mode = e), + (this._authTag = null), + (this._called = !1); + } + a(u, o), + (u.prototype._update = function (e) { + if (!this._called && this._alen) { + var t = 16 - (this._alen % 16); + t < 16 && ((t = i.alloc(t, 0)), this._ghash.update(t)); + } + this._called = !0; + var r = this._mode.encrypt(this, e); + return ( + this._decrypt ? this._ghash.update(e) : this._ghash.update(r), + (this._len += e.length), + r + ); + }), + (u.prototype._final = function () { + if (this._decrypt && !this._authTag) + throw new Error( + "Unsupported state or unable to authenticate data", + ); + var e = f( + this._ghash.final(8 * this._alen, 8 * this._len), + this._cipher.encryptBlock(this._finID), + ); + if ( + this._decrypt && + (function (e, t) { + var r = 0; + e.length !== t.length && r++; + for (var n = Math.min(e.length, t.length), i = 0; i < n; ++i) + r += e[i] ^ t[i]; + return r; + })(e, this._authTag) + ) + throw new Error( + "Unsupported state or unable to authenticate data", + ); + (this._authTag = e), this._cipher.scrub(); + }), + (u.prototype.getAuthTag = function () { + if (this._decrypt || !i.isBuffer(this._authTag)) + throw new Error( + "Attempting to get auth tag in unsupported state", + ); + return this._authTag; + }), + (u.prototype.setAuthTag = function (e) { + if (!this._decrypt) + throw new Error( + "Attempting to set auth tag in unsupported state", + ); + this._authTag = e; + }), + (u.prototype.setAAD = function (e) { + if (this._called) + throw new Error("Attempting to set AAD in unsupported state"); + this._ghash.update(e), (this._alen += e.length); + }), + (t.exports = u); + }, + { + "./aes": 47, + "./ghash": 52, + "./incr32": 53, + "buffer-xor": 74, + "cipher-base": 76, + inherits: 127, + "safe-buffer": 170, + }, + ], + 49: [ + function (e, t, r) { + var n = e("./encrypter"), + i = e("./decrypter"), + o = e("./modes/list.json"); + (r.createCipher = r.Cipher = n.createCipher), + (r.createCipheriv = r.Cipheriv = n.createCipheriv), + (r.createDecipher = r.Decipher = i.createDecipher), + (r.createDecipheriv = r.Decipheriv = i.createDecipheriv), + (r.listCiphers = r.getCiphers = + function () { + return Object.keys(o); + }); + }, + { "./decrypter": 50, "./encrypter": 51, "./modes/list.json": 61 }, + ], + 50: [ + function (e, t, r) { + var n = e("./authCipher"), + i = e("safe-buffer").Buffer, + o = e("./modes"), + a = e("./streamCipher"), + s = e("cipher-base"), + f = e("./aes"), + c = e("evp_bytestokey"); + function u(e, t, r) { + s.call(this), + (this._cache = new h()), + (this._last = void 0), + (this._cipher = new f.AES(t)), + (this._prev = i.from(r)), + (this._mode = e), + (this._autopadding = !0); + } + function h() { + this.cache = i.allocUnsafe(0); + } + function d(e, t, r) { + var s = o[e.toLowerCase()]; + if (!s) throw new TypeError("invalid suite type"); + if ( + ("string" == typeof r && (r = i.from(r)), + "GCM" !== s.mode && r.length !== s.iv) + ) + throw new TypeError("invalid iv length " + r.length); + if ( + ("string" == typeof t && (t = i.from(t)), t.length !== s.key / 8) + ) + throw new TypeError("invalid key length " + t.length); + return "stream" === s.type + ? new a(s.module, t, r, !0) + : "auth" === s.type + ? new n(s.module, t, r, !0) + : new u(s.module, t, r); + } + e("inherits")(u, s), + (u.prototype._update = function (e) { + var t, r; + this._cache.add(e); + for (var n = []; (t = this._cache.get(this._autopadding)); ) + (r = this._mode.decrypt(this, t)), n.push(r); + return i.concat(n); + }), + (u.prototype._final = function () { + var e = this._cache.flush(); + if (this._autopadding) + return (function (e) { + var t = e[15]; + if (t < 1 || t > 16) + throw new Error("unable to decrypt data"); + var r = -1; + for (; ++r < t; ) + if (e[r + (16 - t)] !== t) + throw new Error("unable to decrypt data"); + if (16 === t) return; + return e.slice(0, 16 - t); + })(this._mode.decrypt(this, e)); + if (e) throw new Error("data not multiple of block length"); + }), + (u.prototype.setAutoPadding = function (e) { + return (this._autopadding = !!e), this; + }), + (h.prototype.add = function (e) { + this.cache = i.concat([this.cache, e]); + }), + (h.prototype.get = function (e) { + var t; + if (e) { + if (this.cache.length > 16) + return ( + (t = this.cache.slice(0, 16)), + (this.cache = this.cache.slice(16)), + t + ); + } else if (this.cache.length >= 16) + return ( + (t = this.cache.slice(0, 16)), + (this.cache = this.cache.slice(16)), + t + ); + return null; + }), + (h.prototype.flush = function () { + if (this.cache.length) return this.cache; + }), + (r.createDecipher = function (e, t) { + var r = o[e.toLowerCase()]; + if (!r) throw new TypeError("invalid suite type"); + var n = c(t, !1, r.key, r.iv); + return d(e, n.key, n.iv); + }), + (r.createDecipheriv = d); + }, + { + "./aes": 47, + "./authCipher": 48, + "./modes": 60, + "./streamCipher": 63, + "cipher-base": 76, + evp_bytestokey: 111, + inherits: 127, + "safe-buffer": 170, + }, + ], + 51: [ + function (e, t, r) { + var n = e("./modes"), + i = e("./authCipher"), + o = e("safe-buffer").Buffer, + a = e("./streamCipher"), + s = e("cipher-base"), + f = e("./aes"), + c = e("evp_bytestokey"); + function u(e, t, r) { + s.call(this), + (this._cache = new d()), + (this._cipher = new f.AES(t)), + (this._prev = o.from(r)), + (this._mode = e), + (this._autopadding = !0); + } + e("inherits")(u, s), + (u.prototype._update = function (e) { + var t, r; + this._cache.add(e); + for (var n = []; (t = this._cache.get()); ) + (r = this._mode.encrypt(this, t)), n.push(r); + return o.concat(n); + }); + var h = o.alloc(16, 16); + function d() { + this.cache = o.allocUnsafe(0); + } + function l(e, t, r) { + var s = n[e.toLowerCase()]; + if (!s) throw new TypeError("invalid suite type"); + if ( + ("string" == typeof t && (t = o.from(t)), t.length !== s.key / 8) + ) + throw new TypeError("invalid key length " + t.length); + if ( + ("string" == typeof r && (r = o.from(r)), + "GCM" !== s.mode && r.length !== s.iv) + ) + throw new TypeError("invalid iv length " + r.length); + return "stream" === s.type + ? new a(s.module, t, r) + : "auth" === s.type + ? new i(s.module, t, r) + : new u(s.module, t, r); + } + (u.prototype._final = function () { + var e = this._cache.flush(); + if (this._autopadding) + return (e = this._mode.encrypt(this, e)), this._cipher.scrub(), e; + if (!e.equals(h)) + throw ( + (this._cipher.scrub(), + new Error("data not multiple of block length")) + ); + }), + (u.prototype.setAutoPadding = function (e) { + return (this._autopadding = !!e), this; + }), + (d.prototype.add = function (e) { + this.cache = o.concat([this.cache, e]); + }), + (d.prototype.get = function () { + if (this.cache.length > 15) { + var e = this.cache.slice(0, 16); + return (this.cache = this.cache.slice(16)), e; + } + return null; + }), + (d.prototype.flush = function () { + for ( + var e = 16 - this.cache.length, t = o.allocUnsafe(e), r = -1; + ++r < e; + + ) + t.writeUInt8(e, r); + return o.concat([this.cache, t]); + }), + (r.createCipheriv = l), + (r.createCipher = function (e, t) { + var r = n[e.toLowerCase()]; + if (!r) throw new TypeError("invalid suite type"); + var i = c(t, !1, r.key, r.iv); + return l(e, i.key, i.iv); + }); + }, + { + "./aes": 47, + "./authCipher": 48, + "./modes": 60, + "./streamCipher": 63, + "cipher-base": 76, + evp_bytestokey: 111, + inherits: 127, + "safe-buffer": 170, + }, + ], + 52: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer, + i = n.alloc(16, 0); + function o(e) { + var t = n.allocUnsafe(16); + return ( + t.writeUInt32BE(e[0] >>> 0, 0), + t.writeUInt32BE(e[1] >>> 0, 4), + t.writeUInt32BE(e[2] >>> 0, 8), + t.writeUInt32BE(e[3] >>> 0, 12), + t + ); + } + function a(e) { + (this.h = e), + (this.state = n.alloc(16, 0)), + (this.cache = n.allocUnsafe(0)); + } + (a.prototype.ghash = function (e) { + for (var t = -1; ++t < e.length; ) this.state[t] ^= e[t]; + this._multiply(); + }), + (a.prototype._multiply = function () { + for ( + var e, + t, + r, + n = [ + (e = this.h).readUInt32BE(0), + e.readUInt32BE(4), + e.readUInt32BE(8), + e.readUInt32BE(12), + ], + i = [0, 0, 0, 0], + a = -1; + ++a < 128; + + ) { + for ( + 0 != (this.state[~~(a / 8)] & (1 << (7 - (a % 8)))) && + ((i[0] ^= n[0]), + (i[1] ^= n[1]), + (i[2] ^= n[2]), + (i[3] ^= n[3])), + r = 0 != (1 & n[3]), + t = 3; + t > 0; + t-- + ) + n[t] = (n[t] >>> 1) | ((1 & n[t - 1]) << 31); + (n[0] = n[0] >>> 1), r && (n[0] = n[0] ^ (225 << 24)); + } + this.state = o(i); + }), + (a.prototype.update = function (e) { + var t; + for ( + this.cache = n.concat([this.cache, e]); + this.cache.length >= 16; + + ) + (t = this.cache.slice(0, 16)), + (this.cache = this.cache.slice(16)), + this.ghash(t); + }), + (a.prototype.final = function (e, t) { + return ( + this.cache.length && this.ghash(n.concat([this.cache, i], 16)), + this.ghash(o([0, e, 0, t])), + this.state + ); + }), + (t.exports = a); + }, + { "safe-buffer": 170 }, + ], + 53: [ + function (e, t, r) { + t.exports = function (e) { + for (var t, r = e.length; r--; ) { + if (255 !== (t = e.readUInt8(r))) { + t++, e.writeUInt8(t, r); + break; + } + e.writeUInt8(0, r); + } + }; + }, + {}, + ], + 54: [ + function (e, t, r) { + var n = e("buffer-xor"); + (r.encrypt = function (e, t) { + var r = n(t, e._prev); + return (e._prev = e._cipher.encryptBlock(r)), e._prev; + }), + (r.decrypt = function (e, t) { + var r = e._prev; + e._prev = t; + var i = e._cipher.decryptBlock(t); + return n(i, r); + }); + }, + { "buffer-xor": 74 }, + ], + 55: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer, + i = e("buffer-xor"); + function o(e, t, r) { + var o = t.length, + a = i(t, e._cache); + return ( + (e._cache = e._cache.slice(o)), + (e._prev = n.concat([e._prev, r ? t : a])), + a + ); + } + r.encrypt = function (e, t, r) { + for (var i, a = n.allocUnsafe(0); t.length; ) { + if ( + (0 === e._cache.length && + ((e._cache = e._cipher.encryptBlock(e._prev)), + (e._prev = n.allocUnsafe(0))), + !(e._cache.length <= t.length)) + ) { + a = n.concat([a, o(e, t, r)]); + break; + } + (i = e._cache.length), + (a = n.concat([a, o(e, t.slice(0, i), r)])), + (t = t.slice(i)); + } + return a; + }; + }, + { "buffer-xor": 74, "safe-buffer": 170 }, + ], + 56: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer; + function i(e, t, r) { + for (var n, i, a = -1, s = 0; ++a < 8; ) + (n = t & (1 << (7 - a)) ? 128 : 0), + (s += + (128 & (i = e._cipher.encryptBlock(e._prev)[0] ^ n)) >> + a % 8), + (e._prev = o(e._prev, r ? n : i)); + return s; + } + function o(e, t) { + var r = e.length, + i = -1, + o = n.allocUnsafe(e.length); + for (e = n.concat([e, n.from([t])]); ++i < r; ) + o[i] = (e[i] << 1) | (e[i + 1] >> 7); + return o; + } + r.encrypt = function (e, t, r) { + for (var o = t.length, a = n.allocUnsafe(o), s = -1; ++s < o; ) + a[s] = i(e, t[s], r); + return a; + }; + }, + { "safe-buffer": 170 }, + ], + 57: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer; + function i(e, t, r) { + var i = e._cipher.encryptBlock(e._prev)[0] ^ t; + return ( + (e._prev = n.concat([e._prev.slice(1), n.from([r ? t : i])])), i + ); + } + r.encrypt = function (e, t, r) { + for (var o = t.length, a = n.allocUnsafe(o), s = -1; ++s < o; ) + a[s] = i(e, t[s], r); + return a; + }; + }, + { "safe-buffer": 170 }, + ], + 58: [ + function (e, t, r) { + var n = e("buffer-xor"), + i = e("safe-buffer").Buffer, + o = e("../incr32"); + function a(e) { + var t = e._cipher.encryptBlockRaw(e._prev); + return o(e._prev), t; + } + r.encrypt = function (e, t) { + var r = Math.ceil(t.length / 16), + o = e._cache.length; + e._cache = i.concat([e._cache, i.allocUnsafe(16 * r)]); + for (var s = 0; s < r; s++) { + var f = a(e), + c = o + 16 * s; + e._cache.writeUInt32BE(f[0], c + 0), + e._cache.writeUInt32BE(f[1], c + 4), + e._cache.writeUInt32BE(f[2], c + 8), + e._cache.writeUInt32BE(f[3], c + 12); + } + var u = e._cache.slice(0, t.length); + return (e._cache = e._cache.slice(t.length)), n(t, u); + }; + }, + { "../incr32": 53, "buffer-xor": 74, "safe-buffer": 170 }, + ], + 59: [ + function (e, t, r) { + (r.encrypt = function (e, t) { + return e._cipher.encryptBlock(t); + }), + (r.decrypt = function (e, t) { + return e._cipher.decryptBlock(t); + }); + }, + {}, + ], + 60: [ + function (e, t, r) { + var n = { + ECB: e("./ecb"), + CBC: e("./cbc"), + CFB: e("./cfb"), + CFB8: e("./cfb8"), + CFB1: e("./cfb1"), + OFB: e("./ofb"), + CTR: e("./ctr"), + GCM: e("./ctr"), + }, + i = e("./list.json"); + for (var o in i) i[o].module = n[i[o].mode]; + t.exports = i; + }, + { + "./cbc": 54, + "./cfb": 55, + "./cfb1": 56, + "./cfb8": 57, + "./ctr": 58, + "./ecb": 59, + "./list.json": 61, + "./ofb": 62, + }, + ], + 61: [ + function (e, t, r) { + t.exports = { + "aes-128-ecb": { + cipher: "AES", + key: 128, + iv: 0, + mode: "ECB", + type: "block", + }, + "aes-192-ecb": { + cipher: "AES", + key: 192, + iv: 0, + mode: "ECB", + type: "block", + }, + "aes-256-ecb": { + cipher: "AES", + key: 256, + iv: 0, + mode: "ECB", + type: "block", + }, + "aes-128-cbc": { + cipher: "AES", + key: 128, + iv: 16, + mode: "CBC", + type: "block", + }, + "aes-192-cbc": { + cipher: "AES", + key: 192, + iv: 16, + mode: "CBC", + type: "block", + }, + "aes-256-cbc": { + cipher: "AES", + key: 256, + iv: 16, + mode: "CBC", + type: "block", + }, + aes128: { + cipher: "AES", + key: 128, + iv: 16, + mode: "CBC", + type: "block", + }, + aes192: { + cipher: "AES", + key: 192, + iv: 16, + mode: "CBC", + type: "block", + }, + aes256: { + cipher: "AES", + key: 256, + iv: 16, + mode: "CBC", + type: "block", + }, + "aes-128-cfb": { + cipher: "AES", + key: 128, + iv: 16, + mode: "CFB", + type: "stream", + }, + "aes-192-cfb": { + cipher: "AES", + key: 192, + iv: 16, + mode: "CFB", + type: "stream", + }, + "aes-256-cfb": { + cipher: "AES", + key: 256, + iv: 16, + mode: "CFB", + type: "stream", + }, + "aes-128-cfb8": { + cipher: "AES", + key: 128, + iv: 16, + mode: "CFB8", + type: "stream", + }, + "aes-192-cfb8": { + cipher: "AES", + key: 192, + iv: 16, + mode: "CFB8", + type: "stream", + }, + "aes-256-cfb8": { + cipher: "AES", + key: 256, + iv: 16, + mode: "CFB8", + type: "stream", + }, + "aes-128-cfb1": { + cipher: "AES", + key: 128, + iv: 16, + mode: "CFB1", + type: "stream", + }, + "aes-192-cfb1": { + cipher: "AES", + key: 192, + iv: 16, + mode: "CFB1", + type: "stream", + }, + "aes-256-cfb1": { + cipher: "AES", + key: 256, + iv: 16, + mode: "CFB1", + type: "stream", + }, + "aes-128-ofb": { + cipher: "AES", + key: 128, + iv: 16, + mode: "OFB", + type: "stream", + }, + "aes-192-ofb": { + cipher: "AES", + key: 192, + iv: 16, + mode: "OFB", + type: "stream", + }, + "aes-256-ofb": { + cipher: "AES", + key: 256, + iv: 16, + mode: "OFB", + type: "stream", + }, + "aes-128-ctr": { + cipher: "AES", + key: 128, + iv: 16, + mode: "CTR", + type: "stream", + }, + "aes-192-ctr": { + cipher: "AES", + key: 192, + iv: 16, + mode: "CTR", + type: "stream", + }, + "aes-256-ctr": { + cipher: "AES", + key: 256, + iv: 16, + mode: "CTR", + type: "stream", + }, + "aes-128-gcm": { + cipher: "AES", + key: 128, + iv: 12, + mode: "GCM", + type: "auth", + }, + "aes-192-gcm": { + cipher: "AES", + key: 192, + iv: 12, + mode: "GCM", + type: "auth", + }, + "aes-256-gcm": { + cipher: "AES", + key: 256, + iv: 12, + mode: "GCM", + type: "auth", + }, + }; + }, + {}, + ], + 62: [ + function (e, t, r) { + (function (t) { + var n = e("buffer-xor"); + function i(e) { + return (e._prev = e._cipher.encryptBlock(e._prev)), e._prev; + } + r.encrypt = function (e, r) { + for (; e._cache.length < r.length; ) + e._cache = t.concat([e._cache, i(e)]); + var o = e._cache.slice(0, r.length); + return (e._cache = e._cache.slice(r.length)), n(r, o); + }; + }).call(this, e("buffer").Buffer); + }, + { buffer: 75, "buffer-xor": 74 }, + ], + 63: [ + function (e, t, r) { + var n = e("./aes"), + i = e("safe-buffer").Buffer, + o = e("cipher-base"); + function a(e, t, r, a) { + o.call(this), + (this._cipher = new n.AES(t)), + (this._prev = i.from(r)), + (this._cache = i.allocUnsafe(0)), + (this._secCache = i.allocUnsafe(0)), + (this._decrypt = a), + (this._mode = e); + } + e("inherits")(a, o), + (a.prototype._update = function (e) { + return this._mode.encrypt(this, e, this._decrypt); + }), + (a.prototype._final = function () { + this._cipher.scrub(); + }), + (t.exports = a); + }, + { "./aes": 47, "cipher-base": 76, inherits: 127, "safe-buffer": 170 }, + ], + 64: [ + function (e, t, r) { + var n = e("browserify-des"), + i = e("browserify-aes/browser"), + o = e("browserify-aes/modes"), + a = e("browserify-des/modes"), + s = e("evp_bytestokey"); + function f(e, t, r) { + if (((e = e.toLowerCase()), o[e])) return i.createCipheriv(e, t, r); + if (a[e]) return new n({ key: t, iv: r, mode: e }); + throw new TypeError("invalid suite type"); + } + function c(e, t, r) { + if (((e = e.toLowerCase()), o[e])) + return i.createDecipheriv(e, t, r); + if (a[e]) return new n({ key: t, iv: r, mode: e, decrypt: !0 }); + throw new TypeError("invalid suite type"); + } + (r.createCipher = r.Cipher = + function (e, t) { + var r, n; + if (((e = e.toLowerCase()), o[e])) (r = o[e].key), (n = o[e].iv); + else { + if (!a[e]) throw new TypeError("invalid suite type"); + (r = 8 * a[e].key), (n = a[e].iv); + } + var i = s(t, !1, r, n); + return f(e, i.key, i.iv); + }), + (r.createCipheriv = r.Cipheriv = f), + (r.createDecipher = r.Decipher = + function (e, t) { + var r, n; + if (((e = e.toLowerCase()), o[e])) + (r = o[e].key), (n = o[e].iv); + else { + if (!a[e]) throw new TypeError("invalid suite type"); + (r = 8 * a[e].key), (n = a[e].iv); + } + var i = s(t, !1, r, n); + return c(e, i.key, i.iv); + }), + (r.createDecipheriv = r.Decipheriv = c), + (r.listCiphers = r.getCiphers = + function () { + return Object.keys(a).concat(i.getCiphers()); + }); + }, + { + "browserify-aes/browser": 49, + "browserify-aes/modes": 60, + "browserify-des": 65, + "browserify-des/modes": 66, + evp_bytestokey: 111, + }, + ], + 65: [ + function (e, t, r) { + var n = e("cipher-base"), + i = e("des.js"), + o = e("inherits"), + a = e("safe-buffer").Buffer, + s = { + "des-ede3-cbc": i.CBC.instantiate(i.EDE), + "des-ede3": i.EDE, + "des-ede-cbc": i.CBC.instantiate(i.EDE), + "des-ede": i.EDE, + "des-cbc": i.CBC.instantiate(i.DES), + "des-ecb": i.DES, + }; + function f(e) { + n.call(this); + var t, + r = e.mode.toLowerCase(), + i = s[r]; + t = e.decrypt ? "decrypt" : "encrypt"; + var o = e.key; + a.isBuffer(o) || (o = a.from(o)), + ("des-ede" !== r && "des-ede-cbc" !== r) || + (o = a.concat([o, o.slice(0, 8)])); + var f = e.iv; + a.isBuffer(f) || (f = a.from(f)), + (this._des = i.create({ key: o, iv: f, type: t })); + } + (s.des = s["des-cbc"]), + (s.des3 = s["des-ede3-cbc"]), + (t.exports = f), + o(f, n), + (f.prototype._update = function (e) { + return a.from(this._des.update(e)); + }), + (f.prototype._final = function () { + return a.from(this._des.final()); + }); + }, + { "cipher-base": 76, "des.js": 84, inherits: 127, "safe-buffer": 170 }, + ], + 66: [ + function (e, t, r) { + (r["des-ecb"] = { key: 8, iv: 0 }), + (r["des-cbc"] = r.des = { key: 8, iv: 8 }), + (r["des-ede3-cbc"] = r.des3 = { key: 24, iv: 8 }), + (r["des-ede3"] = { key: 24, iv: 0 }), + (r["des-ede-cbc"] = { key: 16, iv: 8 }), + (r["des-ede"] = { key: 16, iv: 0 }); + }, + {}, + ], + 67: [ + function (e, t, r) { + (function (r) { + var n = e("bn.js"), + i = e("randombytes"); + function o(e, t) { + var i = (function (e) { + var t = a(e); + return { + blinder: t + .toRed(n.mont(e.modulus)) + .redPow(new n(e.publicExponent)) + .fromRed(), + unblinder: t.invm(e.modulus), + }; + })(t), + o = t.modulus.byteLength(), + s = + (n.mont(t.modulus), new n(e).mul(i.blinder).umod(t.modulus)), + f = s.toRed(n.mont(t.prime1)), + c = s.toRed(n.mont(t.prime2)), + u = t.coefficient, + h = t.prime1, + d = t.prime2, + l = f.redPow(t.exponent1), + p = c.redPow(t.exponent2); + (l = l.fromRed()), (p = p.fromRed()); + var b = l.isub(p).imul(u).umod(h); + return ( + b.imul(d), + p.iadd(b), + new r(p.imul(i.unblinder).umod(t.modulus).toArray(!1, o)) + ); + } + function a(e) { + for ( + var t = e.modulus.byteLength(), r = new n(i(t)); + r.cmp(e.modulus) >= 0 || !r.umod(e.prime1) || !r.umod(e.prime2); + + ) + r = new n(i(t)); + return r; + } + (t.exports = o), (o.getr = a); + }).call(this, e("buffer").Buffer); + }, + { "bn.js": 44, buffer: 75, randombytes: 152 }, + ], + 68: [ + function (e, t, r) { + t.exports = e("./browser/algorithms.json"); + }, + { "./browser/algorithms.json": 69 }, + ], + 69: [ + function (e, t, r) { + t.exports = { + sha224WithRSAEncryption: { + sign: "rsa", + hash: "sha224", + id: "302d300d06096086480165030402040500041c", + }, + "RSA-SHA224": { + sign: "ecdsa/rsa", + hash: "sha224", + id: "302d300d06096086480165030402040500041c", + }, + sha256WithRSAEncryption: { + sign: "rsa", + hash: "sha256", + id: "3031300d060960864801650304020105000420", + }, + "RSA-SHA256": { + sign: "ecdsa/rsa", + hash: "sha256", + id: "3031300d060960864801650304020105000420", + }, + sha384WithRSAEncryption: { + sign: "rsa", + hash: "sha384", + id: "3041300d060960864801650304020205000430", + }, + "RSA-SHA384": { + sign: "ecdsa/rsa", + hash: "sha384", + id: "3041300d060960864801650304020205000430", + }, + sha512WithRSAEncryption: { + sign: "rsa", + hash: "sha512", + id: "3051300d060960864801650304020305000440", + }, + "RSA-SHA512": { + sign: "ecdsa/rsa", + hash: "sha512", + id: "3051300d060960864801650304020305000440", + }, + "RSA-SHA1": { + sign: "rsa", + hash: "sha1", + id: "3021300906052b0e03021a05000414", + }, + "ecdsa-with-SHA1": { sign: "ecdsa", hash: "sha1", id: "" }, + sha256: { sign: "ecdsa", hash: "sha256", id: "" }, + sha224: { sign: "ecdsa", hash: "sha224", id: "" }, + sha384: { sign: "ecdsa", hash: "sha384", id: "" }, + sha512: { sign: "ecdsa", hash: "sha512", id: "" }, + "DSA-SHA": { sign: "dsa", hash: "sha1", id: "" }, + "DSA-SHA1": { sign: "dsa", hash: "sha1", id: "" }, + DSA: { sign: "dsa", hash: "sha1", id: "" }, + "DSA-WITH-SHA224": { sign: "dsa", hash: "sha224", id: "" }, + "DSA-SHA224": { sign: "dsa", hash: "sha224", id: "" }, + "DSA-WITH-SHA256": { sign: "dsa", hash: "sha256", id: "" }, + "DSA-SHA256": { sign: "dsa", hash: "sha256", id: "" }, + "DSA-WITH-SHA384": { sign: "dsa", hash: "sha384", id: "" }, + "DSA-SHA384": { sign: "dsa", hash: "sha384", id: "" }, + "DSA-WITH-SHA512": { sign: "dsa", hash: "sha512", id: "" }, + "DSA-SHA512": { sign: "dsa", hash: "sha512", id: "" }, + "DSA-RIPEMD160": { sign: "dsa", hash: "rmd160", id: "" }, + ripemd160WithRSA: { + sign: "rsa", + hash: "rmd160", + id: "3021300906052b2403020105000414", + }, + "RSA-RIPEMD160": { + sign: "rsa", + hash: "rmd160", + id: "3021300906052b2403020105000414", + }, + md5WithRSAEncryption: { + sign: "rsa", + hash: "md5", + id: "3020300c06082a864886f70d020505000410", + }, + "RSA-MD5": { + sign: "rsa", + hash: "md5", + id: "3020300c06082a864886f70d020505000410", + }, + }; + }, + {}, + ], + 70: [ + function (e, t, r) { + t.exports = { + "1.3.132.0.10": "secp256k1", + "1.3.132.0.33": "p224", + "1.2.840.10045.3.1.1": "p192", + "1.2.840.10045.3.1.7": "p256", + "1.3.132.0.34": "p384", + "1.3.132.0.35": "p521", + }; + }, + {}, + ], + 71: [ + function (e, t, r) { + (function (r) { + var n = e("create-hash"), + i = e("stream"), + o = e("inherits"), + a = e("./sign"), + s = e("./verify"), + f = e("./algorithms.json"); + function c(e) { + i.Writable.call(this); + var t = f[e]; + if (!t) throw new Error("Unknown message digest"); + (this._hashType = t.hash), + (this._hash = n(t.hash)), + (this._tag = t.id), + (this._signType = t.sign); + } + function u(e) { + i.Writable.call(this); + var t = f[e]; + if (!t) throw new Error("Unknown message digest"); + (this._hash = n(t.hash)), + (this._tag = t.id), + (this._signType = t.sign); + } + function h(e) { + return new c(e); + } + function d(e) { + return new u(e); + } + Object.keys(f).forEach(function (e) { + (f[e].id = new r(f[e].id, "hex")), (f[e.toLowerCase()] = f[e]); + }), + o(c, i.Writable), + (c.prototype._write = function (e, t, r) { + this._hash.update(e), r(); + }), + (c.prototype.update = function (e, t) { + return ( + "string" == typeof e && (e = new r(e, t)), + this._hash.update(e), + this + ); + }), + (c.prototype.sign = function (e, t) { + this.end(); + var r = this._hash.digest(), + n = a(r, e, this._hashType, this._signType, this._tag); + return t ? n.toString(t) : n; + }), + o(u, i.Writable), + (u.prototype._write = function (e, t, r) { + this._hash.update(e), r(); + }), + (u.prototype.update = function (e, t) { + return ( + "string" == typeof e && (e = new r(e, t)), + this._hash.update(e), + this + ); + }), + (u.prototype.verify = function (e, t, n) { + "string" == typeof t && (t = new r(t, n)), this.end(); + var i = this._hash.digest(); + return s(t, i, e, this._signType, this._tag); + }), + (t.exports = { + Sign: h, + Verify: d, + createSign: h, + createVerify: d, + }); + }).call(this, e("buffer").Buffer); + }, + { + "./algorithms.json": 69, + "./sign": 72, + "./verify": 73, + buffer: 75, + "create-hash": 79, + inherits: 127, + stream: 179, + }, + ], + 72: [ + function (e, t, r) { + (function (r) { + var n = e("create-hmac"), + i = e("browserify-rsa"), + o = e("elliptic").ec, + a = e("bn.js"), + s = e("parse-asn1"), + f = e("./curves.json"); + function c(e, t, i, o) { + if ((e = new r(e.toArray())).length < t.byteLength()) { + var a = new r(t.byteLength() - e.length); + a.fill(0), (e = r.concat([a, e])); + } + var s = i.length, + f = (function (e, t) { + e = (e = u(e, t)).mod(t); + var n = new r(e.toArray()); + if (n.length < t.byteLength()) { + var i = new r(t.byteLength() - n.length); + i.fill(0), (n = r.concat([i, n])); + } + return n; + })(i, t), + c = new r(s); + c.fill(1); + var h = new r(s); + return ( + h.fill(0), + (h = n(o, h) + .update(c) + .update(new r([0])) + .update(e) + .update(f) + .digest()), + (c = n(o, h).update(c).digest()), + { + k: (h = n(o, h) + .update(c) + .update(new r([1])) + .update(e) + .update(f) + .digest()), + v: (c = n(o, h).update(c).digest()), + } + ); + } + function u(e, t) { + var r = new a(e), + n = (e.length << 3) - t.bitLength(); + return n > 0 && r.ishrn(n), r; + } + function h(e, t, i) { + var o, a; + do { + for (o = new r(0); 8 * o.length < e.bitLength(); ) + (t.v = n(i, t.k).update(t.v).digest()), + (o = r.concat([o, t.v])); + (a = u(o, e)), + (t.k = n(i, t.k) + .update(t.v) + .update(new r([0])) + .digest()), + (t.v = n(i, t.k).update(t.v).digest()); + } while (-1 !== a.cmp(e)); + return a; + } + function d(e, t, r, n) { + return e.toRed(a.mont(r)).redPow(t).fromRed().mod(n); + } + (t.exports = function (e, t, n, l, p) { + var b = s(t); + if (b.curve) { + if ("ecdsa" !== l && "ecdsa/rsa" !== l) + throw new Error("wrong private key type"); + return (function (e, t) { + var n = f[t.curve.join(".")]; + if (!n) throw new Error("unknown curve " + t.curve.join(".")); + var i = new o(n).keyFromPrivate(t.privateKey).sign(e); + return new r(i.toDER()); + })(e, b); + } + if ("dsa" === b.type) { + if ("dsa" !== l) throw new Error("wrong private key type"); + return (function (e, t, n) { + for ( + var i, + o = t.params.priv_key, + s = t.params.p, + f = t.params.q, + l = t.params.g, + p = new a(0), + b = u(e, f).mod(f), + y = !1, + m = c(o, f, e, n); + !1 === y; + + ) + (i = h(f, m, n)), + (p = d(l, i, s, f)), + 0 === + (y = i + .invm(f) + .imul(b.add(o.mul(p))) + .mod(f)).cmpn(0) && ((y = !1), (p = new a(0))); + return (function (e, t) { + (e = e.toArray()), + (t = t.toArray()), + 128 & e[0] && (e = [0].concat(e)), + 128 & t[0] && (t = [0].concat(t)); + var n = [48, e.length + t.length + 4, 2, e.length]; + return (n = n.concat(e, [2, t.length], t)), new r(n); + })(p, y); + })(e, b, n); + } + if ("rsa" !== l && "ecdsa/rsa" !== l) + throw new Error("wrong private key type"); + e = r.concat([p, e]); + for ( + var y = b.modulus.byteLength(), m = [0, 1]; + e.length + m.length + 1 < y; + + ) + m.push(255); + m.push(0); + for (var v = -1; ++v < e.length; ) m.push(e[v]); + return i(m, b); + }), + (t.exports.getKey = c), + (t.exports.makeKey = h); + }).call(this, e("buffer").Buffer); + }, + { + "./curves.json": 70, + "bn.js": 44, + "browserify-rsa": 67, + buffer: 75, + "create-hmac": 81, + elliptic: 94, + "parse-asn1": 138, + }, + ], + 73: [ + function (e, t, r) { + (function (r) { + var n = e("bn.js"), + i = e("elliptic").ec, + o = e("parse-asn1"), + a = e("./curves.json"); + function s(e, t) { + if (e.cmpn(0) <= 0) throw new Error("invalid sig"); + if (e.cmp(t) >= t) throw new Error("invalid sig"); + } + t.exports = function (e, t, f, c, u) { + var h = o(f); + if ("ec" === h.type) { + if ("ecdsa" !== c && "ecdsa/rsa" !== c) + throw new Error("wrong public key type"); + return (function (e, t, r) { + var n = a[r.data.algorithm.curve.join(".")]; + if (!n) + throw new Error( + "unknown curve " + r.data.algorithm.curve.join("."), + ); + var o = new i(n), + s = r.data.subjectPrivateKey.data; + return o.verify(t, e, s); + })(e, t, h); + } + if ("dsa" === h.type) { + if ("dsa" !== c) throw new Error("wrong public key type"); + return (function (e, t, r) { + var i = r.data.p, + a = r.data.q, + f = r.data.g, + c = r.data.pub_key, + u = o.signature.decode(e, "der"), + h = u.s, + d = u.r; + s(h, a), s(d, a); + var l = n.mont(i), + p = h.invm(a); + return ( + 0 === + f + .toRed(l) + .redPow(new n(t).mul(p).mod(a)) + .fromRed() + .mul(c.toRed(l).redPow(d.mul(p).mod(a)).fromRed()) + .mod(i) + .mod(a) + .cmp(d) + ); + })(e, t, h); + } + if ("rsa" !== c && "ecdsa/rsa" !== c) + throw new Error("wrong public key type"); + t = r.concat([u, t]); + for ( + var d = h.modulus.byteLength(), l = [1], p = 0; + t.length + l.length + 2 < d; + + ) + l.push(255), p++; + l.push(0); + for (var b = -1; ++b < t.length; ) l.push(t[b]); + l = new r(l); + var y = n.mont(h.modulus); + (e = (e = new n(e).toRed(y)).redPow(new n(h.publicExponent))), + (e = new r(e.fromRed().toArray())); + var m = p < 8 ? 1 : 0; + for ( + d = Math.min(e.length, l.length), + e.length !== l.length && (m = 1), + b = -1; + ++b < d; + + ) + m |= e[b] ^ l[b]; + return 0 === m; + }; + }).call(this, e("buffer").Buffer); + }, + { + "./curves.json": 70, + "bn.js": 44, + buffer: 75, + elliptic: 94, + "parse-asn1": 138, + }, + ], + 74: [ + function (e, t, r) { + (function (e) { + t.exports = function (t, r) { + for ( + var n = Math.min(t.length, r.length), i = new e(n), o = 0; + o < n; + ++o + ) + i[o] = t[o] ^ r[o]; + return i; + }; + }).call(this, e("buffer").Buffer); + }, + { buffer: 75 }, + ], + 75: [ + function (e, t, r) { + (function (t) { + "use strict"; + var n = e("base64-js"), + i = e("ieee754"); + (r.Buffer = t), + (r.SlowBuffer = function (e) { + +e != e && (e = 0); + return t.alloc(+e); + }), + (r.INSPECT_MAX_BYTES = 50); + var o = 2147483647; + function a(e) { + if (e > o) + throw new RangeError( + 'The value "' + e + '" is invalid for option "size"', + ); + var r = new Uint8Array(e); + return (r.__proto__ = t.prototype), r; + } + function t(e, t, r) { + if ("number" == typeof e) { + if ("string" == typeof t) + throw new TypeError( + 'The "string" argument must be of type string. Received type number', + ); + return c(e); + } + return s(e, t, r); + } + function s(e, r, n) { + if ("string" == typeof e) + return (function (e, r) { + ("string" == typeof r && "" !== r) || (r = "utf8"); + if (!t.isEncoding(r)) + throw new TypeError("Unknown encoding: " + r); + var n = 0 | d(e, r), + i = a(n), + o = i.write(e, r); + o !== n && (i = i.slice(0, o)); + return i; + })(e, r); + if (ArrayBuffer.isView(e)) return u(e); + if (null == e) + throw TypeError( + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + + typeof e, + ); + if (U(e, ArrayBuffer) || (e && U(e.buffer, ArrayBuffer))) + return (function (e, r, n) { + if (r < 0 || e.byteLength < r) + throw new RangeError( + '"offset" is outside of buffer bounds', + ); + if (e.byteLength < r + (n || 0)) + throw new RangeError( + '"length" is outside of buffer bounds', + ); + var i; + i = + void 0 === r && void 0 === n + ? new Uint8Array(e) + : void 0 === n + ? new Uint8Array(e, r) + : new Uint8Array(e, r, n); + return (i.__proto__ = t.prototype), i; + })(e, r, n); + if ("number" == typeof e) + throw new TypeError( + 'The "value" argument must not be of type number. Received type number', + ); + var i = e.valueOf && e.valueOf(); + if (null != i && i !== e) return t.from(i, r, n); + var o = (function (e) { + if (t.isBuffer(e)) { + var r = 0 | h(e.length), + n = a(r); + return 0 === n.length ? n : (e.copy(n, 0, 0, r), n); + } + if (void 0 !== e.length) + return "number" != typeof e.length || q(e.length) + ? a(0) + : u(e); + if ("Buffer" === e.type && Array.isArray(e.data)) + return u(e.data); + })(e); + if (o) return o; + if ( + "undefined" != typeof Symbol && + null != Symbol.toPrimitive && + "function" == typeof e[Symbol.toPrimitive] + ) + return t.from(e[Symbol.toPrimitive]("string"), r, n); + throw new TypeError( + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + + typeof e, + ); + } + function f(e) { + if ("number" != typeof e) + throw new TypeError('"size" argument must be of type number'); + if (e < 0) + throw new RangeError( + 'The value "' + e + '" is invalid for option "size"', + ); + } + function c(e) { + return f(e), a(e < 0 ? 0 : 0 | h(e)); + } + function u(e) { + for ( + var t = e.length < 0 ? 0 : 0 | h(e.length), r = a(t), n = 0; + n < t; + n += 1 + ) + r[n] = 255 & e[n]; + return r; + } + function h(e) { + if (e >= o) + throw new RangeError( + "Attempt to allocate Buffer larger than maximum size: 0x" + + o.toString(16) + + " bytes", + ); + return 0 | e; + } + function d(e, r) { + if (t.isBuffer(e)) return e.length; + if (ArrayBuffer.isView(e) || U(e, ArrayBuffer)) + return e.byteLength; + if ("string" != typeof e) + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + + typeof e, + ); + var n = e.length, + i = arguments.length > 2 && !0 === arguments[2]; + if (!i && 0 === n) return 0; + for (var o = !1; ; ) + switch (r) { + case "ascii": + case "latin1": + case "binary": + return n; + case "utf8": + case "utf-8": + return D(e).length; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return 2 * n; + case "hex": + return n >>> 1; + case "base64": + return N(e).length; + default: + if (o) return i ? -1 : D(e).length; + (r = ("" + r).toLowerCase()), (o = !0); + } + } + function l(e, t, r) { + var n = e[t]; + (e[t] = e[r]), (e[r] = n); + } + function p(e, r, n, i, o) { + if (0 === e.length) return -1; + if ( + ("string" == typeof n + ? ((i = n), (n = 0)) + : n > 2147483647 + ? (n = 2147483647) + : n < -2147483648 && (n = -2147483648), + q((n = +n)) && (n = o ? 0 : e.length - 1), + n < 0 && (n = e.length + n), + n >= e.length) + ) { + if (o) return -1; + n = e.length - 1; + } else if (n < 0) { + if (!o) return -1; + n = 0; + } + if (("string" == typeof r && (r = t.from(r, i)), t.isBuffer(r))) + return 0 === r.length ? -1 : b(e, r, n, i, o); + if ("number" == typeof r) + return ( + (r &= 255), + "function" == typeof Uint8Array.prototype.indexOf + ? o + ? Uint8Array.prototype.indexOf.call(e, r, n) + : Uint8Array.prototype.lastIndexOf.call(e, r, n) + : b(e, [r], n, i, o) + ); + throw new TypeError("val must be string, number or Buffer"); + } + function b(e, t, r, n, i) { + var o, + a = 1, + s = e.length, + f = t.length; + if ( + void 0 !== n && + ("ucs2" === (n = String(n).toLowerCase()) || + "ucs-2" === n || + "utf16le" === n || + "utf-16le" === n) + ) { + if (e.length < 2 || t.length < 2) return -1; + (a = 2), (s /= 2), (f /= 2), (r /= 2); + } + function c(e, t) { + return 1 === a ? e[t] : e.readUInt16BE(t * a); + } + if (i) { + var u = -1; + for (o = r; o < s; o++) + if (c(e, o) === c(t, -1 === u ? 0 : o - u)) { + if ((-1 === u && (u = o), o - u + 1 === f)) return u * a; + } else -1 !== u && (o -= o - u), (u = -1); + } else + for (r + f > s && (r = s - f), o = r; o >= 0; o--) { + for (var h = !0, d = 0; d < f; d++) + if (c(e, o + d) !== c(t, d)) { + h = !1; + break; + } + if (h) return o; + } + return -1; + } + function y(e, t, r, n) { + r = Number(r) || 0; + var i = e.length - r; + n ? (n = Number(n)) > i && (n = i) : (n = i); + var o = t.length; + n > o / 2 && (n = o / 2); + for (var a = 0; a < n; ++a) { + var s = parseInt(t.substr(2 * a, 2), 16); + if (q(s)) return a; + e[r + a] = s; + } + return a; + } + function m(e, t, r, n) { + return L(D(t, e.length - r), e, r, n); + } + function v(e, t, r, n) { + return L( + (function (e) { + for (var t = [], r = 0; r < e.length; ++r) + t.push(255 & e.charCodeAt(r)); + return t; + })(t), + e, + r, + n, + ); + } + function g(e, t, r, n) { + return v(e, t, r, n); + } + function w(e, t, r, n) { + return L(N(t), e, r, n); + } + function _(e, t, r, n) { + return L( + (function (e, t) { + for ( + var r, n, i, o = [], a = 0; + a < e.length && !((t -= 2) < 0); + ++a + ) + (r = e.charCodeAt(a)), + (n = r >> 8), + (i = r % 256), + o.push(i), + o.push(n); + return o; + })(t, e.length - r), + e, + r, + n, + ); + } + function S(e, t, r) { + return 0 === t && r === e.length + ? n.fromByteArray(e) + : n.fromByteArray(e.slice(t, r)); + } + function E(e, t, r) { + r = Math.min(e.length, r); + for (var n = [], i = t; i < r; ) { + var o, + a, + s, + f, + c = e[i], + u = null, + h = c > 239 ? 4 : c > 223 ? 3 : c > 191 ? 2 : 1; + if (i + h <= r) + switch (h) { + case 1: + c < 128 && (u = c); + break; + case 2: + 128 == (192 & (o = e[i + 1])) && + (f = ((31 & c) << 6) | (63 & o)) > 127 && + (u = f); + break; + case 3: + (o = e[i + 1]), + (a = e[i + 2]), + 128 == (192 & o) && + 128 == (192 & a) && + (f = ((15 & c) << 12) | ((63 & o) << 6) | (63 & a)) > + 2047 && + (f < 55296 || f > 57343) && + (u = f); + break; + case 4: + (o = e[i + 1]), + (a = e[i + 2]), + (s = e[i + 3]), + 128 == (192 & o) && + 128 == (192 & a) && + 128 == (192 & s) && + (f = + ((15 & c) << 18) | + ((63 & o) << 12) | + ((63 & a) << 6) | + (63 & s)) > 65535 && + f < 1114112 && + (u = f); + } + null === u + ? ((u = 65533), (h = 1)) + : u > 65535 && + ((u -= 65536), + n.push(((u >>> 10) & 1023) | 55296), + (u = 56320 | (1023 & u))), + n.push(u), + (i += h); + } + return (function (e) { + var t = e.length; + if (t <= M) return String.fromCharCode.apply(String, e); + var r = "", + n = 0; + for (; n < t; ) + r += String.fromCharCode.apply(String, e.slice(n, (n += M))); + return r; + })(n); + } + (r.kMaxLength = o), + (t.TYPED_ARRAY_SUPPORT = (function () { + try { + var e = new Uint8Array(1); + return ( + (e.__proto__ = { + __proto__: Uint8Array.prototype, + foo: function () { + return 42; + }, + }), + 42 === e.foo() + ); + } catch (e) { + return !1; + } + })()), + t.TYPED_ARRAY_SUPPORT || + "undefined" == typeof console || + "function" != typeof console.error || + console.error( + "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.", + ), + Object.defineProperty(t.prototype, "parent", { + enumerable: !0, + get: function () { + if (t.isBuffer(this)) return this.buffer; + }, + }), + Object.defineProperty(t.prototype, "offset", { + enumerable: !0, + get: function () { + if (t.isBuffer(this)) return this.byteOffset; + }, + }), + "undefined" != typeof Symbol && + null != Symbol.species && + t[Symbol.species] === t && + Object.defineProperty(t, Symbol.species, { + value: null, + configurable: !0, + enumerable: !1, + writable: !1, + }), + (t.poolSize = 8192), + (t.from = function (e, t, r) { + return s(e, t, r); + }), + (t.prototype.__proto__ = Uint8Array.prototype), + (t.__proto__ = Uint8Array), + (t.alloc = function (e, t, r) { + return (function (e, t, r) { + return ( + f(e), + e <= 0 + ? a(e) + : void 0 !== t + ? "string" == typeof r + ? a(e).fill(t, r) + : a(e).fill(t) + : a(e) + ); + })(e, t, r); + }), + (t.allocUnsafe = function (e) { + return c(e); + }), + (t.allocUnsafeSlow = function (e) { + return c(e); + }), + (t.isBuffer = function (e) { + return null != e && !0 === e._isBuffer && e !== t.prototype; + }), + (t.compare = function (e, r) { + if ( + (U(e, Uint8Array) && (e = t.from(e, e.offset, e.byteLength)), + U(r, Uint8Array) && (r = t.from(r, r.offset, r.byteLength)), + !t.isBuffer(e) || !t.isBuffer(r)) + ) + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array', + ); + if (e === r) return 0; + for ( + var n = e.length, i = r.length, o = 0, a = Math.min(n, i); + o < a; + ++o + ) + if (e[o] !== r[o]) { + (n = e[o]), (i = r[o]); + break; + } + return n < i ? -1 : i < n ? 1 : 0; + }), + (t.isEncoding = function (e) { + switch (String(e).toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "latin1": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return !0; + default: + return !1; + } + }), + (t.concat = function (e, r) { + if (!Array.isArray(e)) + throw new TypeError( + '"list" argument must be an Array of Buffers', + ); + if (0 === e.length) return t.alloc(0); + var n; + if (void 0 === r) + for (r = 0, n = 0; n < e.length; ++n) r += e[n].length; + var i = t.allocUnsafe(r), + o = 0; + for (n = 0; n < e.length; ++n) { + var a = e[n]; + if ((U(a, Uint8Array) && (a = t.from(a)), !t.isBuffer(a))) + throw new TypeError( + '"list" argument must be an Array of Buffers', + ); + a.copy(i, o), (o += a.length); + } + return i; + }), + (t.byteLength = d), + (t.prototype._isBuffer = !0), + (t.prototype.swap16 = function () { + var e = this.length; + if (e % 2 != 0) + throw new RangeError( + "Buffer size must be a multiple of 16-bits", + ); + for (var t = 0; t < e; t += 2) l(this, t, t + 1); + return this; + }), + (t.prototype.swap32 = function () { + var e = this.length; + if (e % 4 != 0) + throw new RangeError( + "Buffer size must be a multiple of 32-bits", + ); + for (var t = 0; t < e; t += 4) + l(this, t, t + 3), l(this, t + 1, t + 2); + return this; + }), + (t.prototype.swap64 = function () { + var e = this.length; + if (e % 8 != 0) + throw new RangeError( + "Buffer size must be a multiple of 64-bits", + ); + for (var t = 0; t < e; t += 8) + l(this, t, t + 7), + l(this, t + 1, t + 6), + l(this, t + 2, t + 5), + l(this, t + 3, t + 4); + return this; + }), + (t.prototype.toString = function () { + var e = this.length; + return 0 === e + ? "" + : 0 === arguments.length + ? E(this, 0, e) + : function (e, t, r) { + var n = !1; + if (((void 0 === t || t < 0) && (t = 0), t > this.length)) + return ""; + if ( + ((void 0 === r || r > this.length) && (r = this.length), + r <= 0) + ) + return ""; + if ((r >>>= 0) <= (t >>>= 0)) return ""; + for (e || (e = "utf8"); ; ) + switch (e) { + case "hex": + return A(this, t, r); + case "utf8": + case "utf-8": + return E(this, t, r); + case "ascii": + return k(this, t, r); + case "latin1": + case "binary": + return x(this, t, r); + case "base64": + return S(this, t, r); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return j(this, t, r); + default: + if (n) + throw new TypeError("Unknown encoding: " + e); + (e = (e + "").toLowerCase()), (n = !0); + } + }.apply(this, arguments); + }), + (t.prototype.toLocaleString = t.prototype.toString), + (t.prototype.equals = function (e) { + if (!t.isBuffer(e)) + throw new TypeError("Argument must be a Buffer"); + return this === e || 0 === t.compare(this, e); + }), + (t.prototype.inspect = function () { + var e = "", + t = r.INSPECT_MAX_BYTES; + return ( + (e = this.toString("hex", 0, t) + .replace(/(.{2})/g, "$1 ") + .trim()), + this.length > t && (e += " ... "), + "" + ); + }), + (t.prototype.compare = function (e, r, n, i, o) { + if ( + (U(e, Uint8Array) && (e = t.from(e, e.offset, e.byteLength)), + !t.isBuffer(e)) + ) + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + + typeof e, + ); + if ( + (void 0 === r && (r = 0), + void 0 === n && (n = e ? e.length : 0), + void 0 === i && (i = 0), + void 0 === o && (o = this.length), + r < 0 || n > e.length || i < 0 || o > this.length) + ) + throw new RangeError("out of range index"); + if (i >= o && r >= n) return 0; + if (i >= o) return -1; + if (r >= n) return 1; + if (this === e) return 0; + for ( + var a = (o >>>= 0) - (i >>>= 0), + s = (n >>>= 0) - (r >>>= 0), + f = Math.min(a, s), + c = this.slice(i, o), + u = e.slice(r, n), + h = 0; + h < f; + ++h + ) + if (c[h] !== u[h]) { + (a = c[h]), (s = u[h]); + break; + } + return a < s ? -1 : s < a ? 1 : 0; + }), + (t.prototype.includes = function (e, t, r) { + return -1 !== this.indexOf(e, t, r); + }), + (t.prototype.indexOf = function (e, t, r) { + return p(this, e, t, r, !0); + }), + (t.prototype.lastIndexOf = function (e, t, r) { + return p(this, e, t, r, !1); + }), + (t.prototype.write = function (e, t, r, n) { + if (void 0 === t) (n = "utf8"), (r = this.length), (t = 0); + else if (void 0 === r && "string" == typeof t) + (n = t), (r = this.length), (t = 0); + else { + if (!isFinite(t)) + throw new Error( + "Buffer.write(string, encoding, offset[, length]) is no longer supported", + ); + (t >>>= 0), + isFinite(r) + ? ((r >>>= 0), void 0 === n && (n = "utf8")) + : ((n = r), (r = void 0)); + } + var i = this.length - t; + if ( + ((void 0 === r || r > i) && (r = i), + (e.length > 0 && (r < 0 || t < 0)) || t > this.length) + ) + throw new RangeError( + "Attempt to write outside buffer bounds", + ); + n || (n = "utf8"); + for (var o = !1; ; ) + switch (n) { + case "hex": + return y(this, e, t, r); + case "utf8": + case "utf-8": + return m(this, e, t, r); + case "ascii": + return v(this, e, t, r); + case "latin1": + case "binary": + return g(this, e, t, r); + case "base64": + return w(this, e, t, r); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return _(this, e, t, r); + default: + if (o) throw new TypeError("Unknown encoding: " + n); + (n = ("" + n).toLowerCase()), (o = !0); + } + }), + (t.prototype.toJSON = function () { + return { + type: "Buffer", + data: Array.prototype.slice.call(this._arr || this, 0), + }; + }); + var M = 4096; + function k(e, t, r) { + var n = ""; + r = Math.min(e.length, r); + for (var i = t; i < r; ++i) n += String.fromCharCode(127 & e[i]); + return n; + } + function x(e, t, r) { + var n = ""; + r = Math.min(e.length, r); + for (var i = t; i < r; ++i) n += String.fromCharCode(e[i]); + return n; + } + function A(e, t, r) { + var n = e.length; + (!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n); + for (var i = "", o = t; o < r; ++o) i += O(e[o]); + return i; + } + function j(e, t, r) { + for (var n = e.slice(t, r), i = "", o = 0; o < n.length; o += 2) + i += String.fromCharCode(n[o] + 256 * n[o + 1]); + return i; + } + function B(e, t, r) { + if (e % 1 != 0 || e < 0) + throw new RangeError("offset is not uint"); + if (e + t > r) + throw new RangeError("Trying to access beyond buffer length"); + } + function I(e, r, n, i, o, a) { + if (!t.isBuffer(e)) + throw new TypeError( + '"buffer" argument must be a Buffer instance', + ); + if (r > o || r < a) + throw new RangeError('"value" argument is out of bounds'); + if (n + i > e.length) throw new RangeError("Index out of range"); + } + function R(e, t, r, n, i, o) { + if (r + n > e.length) throw new RangeError("Index out of range"); + if (r < 0) throw new RangeError("Index out of range"); + } + function T(e, t, r, n, o) { + return ( + (t = +t), + (r >>>= 0), + o || R(e, 0, r, 4), + i.write(e, t, r, n, 23, 4), + r + 4 + ); + } + function C(e, t, r, n, o) { + return ( + (t = +t), + (r >>>= 0), + o || R(e, 0, r, 8), + i.write(e, t, r, n, 52, 8), + r + 8 + ); + } + (t.prototype.slice = function (e, r) { + var n = this.length; + (e = ~~e) < 0 ? (e += n) < 0 && (e = 0) : e > n && (e = n), + (r = void 0 === r ? n : ~~r) < 0 + ? (r += n) < 0 && (r = 0) + : r > n && (r = n), + r < e && (r = e); + var i = this.subarray(e, r); + return (i.__proto__ = t.prototype), i; + }), + (t.prototype.readUIntLE = function (e, t, r) { + (e >>>= 0), (t >>>= 0), r || B(e, t, this.length); + for (var n = this[e], i = 1, o = 0; ++o < t && (i *= 256); ) + n += this[e + o] * i; + return n; + }), + (t.prototype.readUIntBE = function (e, t, r) { + (e >>>= 0), (t >>>= 0), r || B(e, t, this.length); + for (var n = this[e + --t], i = 1; t > 0 && (i *= 256); ) + n += this[e + --t] * i; + return n; + }), + (t.prototype.readUInt8 = function (e, t) { + return (e >>>= 0), t || B(e, 1, this.length), this[e]; + }), + (t.prototype.readUInt16LE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 2, this.length), + this[e] | (this[e + 1] << 8) + ); + }), + (t.prototype.readUInt16BE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 2, this.length), + (this[e] << 8) | this[e + 1] + ); + }), + (t.prototype.readUInt32LE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 4, this.length), + (this[e] | (this[e + 1] << 8) | (this[e + 2] << 16)) + + 16777216 * this[e + 3] + ); + }), + (t.prototype.readUInt32BE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 4, this.length), + 16777216 * this[e] + + ((this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3]) + ); + }), + (t.prototype.readIntLE = function (e, t, r) { + (e >>>= 0), (t >>>= 0), r || B(e, t, this.length); + for (var n = this[e], i = 1, o = 0; ++o < t && (i *= 256); ) + n += this[e + o] * i; + return n >= (i *= 128) && (n -= Math.pow(2, 8 * t)), n; + }), + (t.prototype.readIntBE = function (e, t, r) { + (e >>>= 0), (t >>>= 0), r || B(e, t, this.length); + for (var n = t, i = 1, o = this[e + --n]; n > 0 && (i *= 256); ) + o += this[e + --n] * i; + return o >= (i *= 128) && (o -= Math.pow(2, 8 * t)), o; + }), + (t.prototype.readInt8 = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 1, this.length), + 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e] + ); + }), + (t.prototype.readInt16LE = function (e, t) { + (e >>>= 0), t || B(e, 2, this.length); + var r = this[e] | (this[e + 1] << 8); + return 32768 & r ? 4294901760 | r : r; + }), + (t.prototype.readInt16BE = function (e, t) { + (e >>>= 0), t || B(e, 2, this.length); + var r = this[e + 1] | (this[e] << 8); + return 32768 & r ? 4294901760 | r : r; + }), + (t.prototype.readInt32LE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 4, this.length), + this[e] | + (this[e + 1] << 8) | + (this[e + 2] << 16) | + (this[e + 3] << 24) + ); + }), + (t.prototype.readInt32BE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 4, this.length), + (this[e] << 24) | + (this[e + 1] << 16) | + (this[e + 2] << 8) | + this[e + 3] + ); + }), + (t.prototype.readFloatLE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 4, this.length), + i.read(this, e, !0, 23, 4) + ); + }), + (t.prototype.readFloatBE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 4, this.length), + i.read(this, e, !1, 23, 4) + ); + }), + (t.prototype.readDoubleLE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 8, this.length), + i.read(this, e, !0, 52, 8) + ); + }), + (t.prototype.readDoubleBE = function (e, t) { + return ( + (e >>>= 0), + t || B(e, 8, this.length), + i.read(this, e, !1, 52, 8) + ); + }), + (t.prototype.writeUIntLE = function (e, t, r, n) { + ((e = +e), (t >>>= 0), (r >>>= 0), n) || + I(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); + var i = 1, + o = 0; + for (this[t] = 255 & e; ++o < r && (i *= 256); ) + this[t + o] = (e / i) & 255; + return t + r; + }), + (t.prototype.writeUIntBE = function (e, t, r, n) { + ((e = +e), (t >>>= 0), (r >>>= 0), n) || + I(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); + var i = r - 1, + o = 1; + for (this[t + i] = 255 & e; --i >= 0 && (o *= 256); ) + this[t + i] = (e / o) & 255; + return t + r; + }), + (t.prototype.writeUInt8 = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 1, 255, 0), + (this[t] = 255 & e), + t + 1 + ); + }), + (t.prototype.writeUInt16LE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 2, 65535, 0), + (this[t] = 255 & e), + (this[t + 1] = e >>> 8), + t + 2 + ); + }), + (t.prototype.writeUInt16BE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 2, 65535, 0), + (this[t] = e >>> 8), + (this[t + 1] = 255 & e), + t + 2 + ); + }), + (t.prototype.writeUInt32LE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 4, 4294967295, 0), + (this[t + 3] = e >>> 24), + (this[t + 2] = e >>> 16), + (this[t + 1] = e >>> 8), + (this[t] = 255 & e), + t + 4 + ); + }), + (t.prototype.writeUInt32BE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 4, 4294967295, 0), + (this[t] = e >>> 24), + (this[t + 1] = e >>> 16), + (this[t + 2] = e >>> 8), + (this[t + 3] = 255 & e), + t + 4 + ); + }), + (t.prototype.writeIntLE = function (e, t, r, n) { + if (((e = +e), (t >>>= 0), !n)) { + var i = Math.pow(2, 8 * r - 1); + I(this, e, t, r, i - 1, -i); + } + var o = 0, + a = 1, + s = 0; + for (this[t] = 255 & e; ++o < r && (a *= 256); ) + e < 0 && 0 === s && 0 !== this[t + o - 1] && (s = 1), + (this[t + o] = (((e / a) >> 0) - s) & 255); + return t + r; + }), + (t.prototype.writeIntBE = function (e, t, r, n) { + if (((e = +e), (t >>>= 0), !n)) { + var i = Math.pow(2, 8 * r - 1); + I(this, e, t, r, i - 1, -i); + } + var o = r - 1, + a = 1, + s = 0; + for (this[t + o] = 255 & e; --o >= 0 && (a *= 256); ) + e < 0 && 0 === s && 0 !== this[t + o + 1] && (s = 1), + (this[t + o] = (((e / a) >> 0) - s) & 255); + return t + r; + }), + (t.prototype.writeInt8 = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 1, 127, -128), + e < 0 && (e = 255 + e + 1), + (this[t] = 255 & e), + t + 1 + ); + }), + (t.prototype.writeInt16LE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 2, 32767, -32768), + (this[t] = 255 & e), + (this[t + 1] = e >>> 8), + t + 2 + ); + }), + (t.prototype.writeInt16BE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 2, 32767, -32768), + (this[t] = e >>> 8), + (this[t + 1] = 255 & e), + t + 2 + ); + }), + (t.prototype.writeInt32LE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 4, 2147483647, -2147483648), + (this[t] = 255 & e), + (this[t + 1] = e >>> 8), + (this[t + 2] = e >>> 16), + (this[t + 3] = e >>> 24), + t + 4 + ); + }), + (t.prototype.writeInt32BE = function (e, t, r) { + return ( + (e = +e), + (t >>>= 0), + r || I(this, e, t, 4, 2147483647, -2147483648), + e < 0 && (e = 4294967295 + e + 1), + (this[t] = e >>> 24), + (this[t + 1] = e >>> 16), + (this[t + 2] = e >>> 8), + (this[t + 3] = 255 & e), + t + 4 + ); + }), + (t.prototype.writeFloatLE = function (e, t, r) { + return T(this, e, t, !0, r); + }), + (t.prototype.writeFloatBE = function (e, t, r) { + return T(this, e, t, !1, r); + }), + (t.prototype.writeDoubleLE = function (e, t, r) { + return C(this, e, t, !0, r); + }), + (t.prototype.writeDoubleBE = function (e, t, r) { + return C(this, e, t, !1, r); + }), + (t.prototype.copy = function (e, r, n, i) { + if (!t.isBuffer(e)) + throw new TypeError("argument should be a Buffer"); + if ( + (n || (n = 0), + i || 0 === i || (i = this.length), + r >= e.length && (r = e.length), + r || (r = 0), + i > 0 && i < n && (i = n), + i === n) + ) + return 0; + if (0 === e.length || 0 === this.length) return 0; + if (r < 0) throw new RangeError("targetStart out of bounds"); + if (n < 0 || n >= this.length) + throw new RangeError("Index out of range"); + if (i < 0) throw new RangeError("sourceEnd out of bounds"); + i > this.length && (i = this.length), + e.length - r < i - n && (i = e.length - r + n); + var o = i - n; + if ( + this === e && + "function" == typeof Uint8Array.prototype.copyWithin + ) + this.copyWithin(r, n, i); + else if (this === e && n < r && r < i) + for (var a = o - 1; a >= 0; --a) e[a + r] = this[a + n]; + else Uint8Array.prototype.set.call(e, this.subarray(n, i), r); + return o; + }), + (t.prototype.fill = function (e, r, n, i) { + if ("string" == typeof e) { + if ( + ("string" == typeof r + ? ((i = r), (r = 0), (n = this.length)) + : "string" == typeof n && ((i = n), (n = this.length)), + void 0 !== i && "string" != typeof i) + ) + throw new TypeError("encoding must be a string"); + if ("string" == typeof i && !t.isEncoding(i)) + throw new TypeError("Unknown encoding: " + i); + if (1 === e.length) { + var o = e.charCodeAt(0); + (("utf8" === i && o < 128) || "latin1" === i) && (e = o); + } + } else "number" == typeof e && (e &= 255); + if (r < 0 || this.length < r || this.length < n) + throw new RangeError("Out of range index"); + if (n <= r) return this; + var a; + if ( + ((r >>>= 0), + (n = void 0 === n ? this.length : n >>> 0), + e || (e = 0), + "number" == typeof e) + ) + for (a = r; a < n; ++a) this[a] = e; + else { + var s = t.isBuffer(e) ? e : t.from(e, i), + f = s.length; + if (0 === f) + throw new TypeError( + 'The value "' + e + '" is invalid for argument "value"', + ); + for (a = 0; a < n - r; ++a) this[a + r] = s[a % f]; + } + return this; + }); + var P = /[^+/0-9A-Za-z-_]/g; + function O(e) { + return e < 16 ? "0" + e.toString(16) : e.toString(16); + } + function D(e, t) { + var r; + t = t || 1 / 0; + for (var n = e.length, i = null, o = [], a = 0; a < n; ++a) { + if ((r = e.charCodeAt(a)) > 55295 && r < 57344) { + if (!i) { + if (r > 56319) { + (t -= 3) > -1 && o.push(239, 191, 189); + continue; + } + if (a + 1 === n) { + (t -= 3) > -1 && o.push(239, 191, 189); + continue; + } + i = r; + continue; + } + if (r < 56320) { + (t -= 3) > -1 && o.push(239, 191, 189), (i = r); + continue; + } + r = 65536 + (((i - 55296) << 10) | (r - 56320)); + } else i && (t -= 3) > -1 && o.push(239, 191, 189); + if (((i = null), r < 128)) { + if ((t -= 1) < 0) break; + o.push(r); + } else if (r < 2048) { + if ((t -= 2) < 0) break; + o.push((r >> 6) | 192, (63 & r) | 128); + } else if (r < 65536) { + if ((t -= 3) < 0) break; + o.push( + (r >> 12) | 224, + ((r >> 6) & 63) | 128, + (63 & r) | 128, + ); + } else { + if (!(r < 1114112)) throw new Error("Invalid code point"); + if ((t -= 4) < 0) break; + o.push( + (r >> 18) | 240, + ((r >> 12) & 63) | 128, + ((r >> 6) & 63) | 128, + (63 & r) | 128, + ); + } + } + return o; + } + function N(e) { + return n.toByteArray( + (function (e) { + if ( + (e = (e = e.split("=")[0]).trim().replace(P, "")).length < 2 + ) + return ""; + for (; e.length % 4 != 0; ) e += "="; + return e; + })(e), + ); + } + function L(e, t, r, n) { + for ( + var i = 0; + i < n && !(i + r >= t.length || i >= e.length); + ++i + ) + t[i + r] = e[i]; + return i; + } + function U(e, t) { + return ( + e instanceof t || + (null != e && + null != e.constructor && + null != e.constructor.name && + e.constructor.name === t.name) + ); + } + function q(e) { + return e != e; + } + }).call(this, e("buffer").Buffer); + }, + { "base64-js": 43, buffer: 75, ieee754: 126 }, + ], + 76: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer, + i = e("stream").Transform, + o = e("string_decoder").StringDecoder; + function a(e) { + i.call(this), + (this.hashMode = "string" == typeof e), + this.hashMode + ? (this[e] = this._finalOrDigest) + : (this.final = this._finalOrDigest), + this._final && + ((this.__final = this._final), (this._final = null)), + (this._decoder = null), + (this._encoding = null); + } + e("inherits")(a, i), + (a.prototype.update = function (e, t, r) { + "string" == typeof e && (e = n.from(e, t)); + var i = this._update(e); + return this.hashMode + ? this + : (r && (i = this._toString(i, r)), i); + }), + (a.prototype.setAutoPadding = function () {}), + (a.prototype.getAuthTag = function () { + throw new Error("trying to get auth tag in unsupported state"); + }), + (a.prototype.setAuthTag = function () { + throw new Error("trying to set auth tag in unsupported state"); + }), + (a.prototype.setAAD = function () { + throw new Error("trying to set aad in unsupported state"); + }), + (a.prototype._transform = function (e, t, r) { + var n; + try { + this.hashMode ? this._update(e) : this.push(this._update(e)); + } catch (e) { + n = e; + } finally { + r(n); + } + }), + (a.prototype._flush = function (e) { + var t; + try { + this.push(this.__final()); + } catch (e) { + t = e; + } + e(t); + }), + (a.prototype._finalOrDigest = function (e) { + var t = this.__final() || n.alloc(0); + return e && (t = this._toString(t, e, !0)), t; + }), + (a.prototype._toString = function (e, t, r) { + if ( + (this._decoder || + ((this._decoder = new o(t)), (this._encoding = t)), + this._encoding !== t) + ) + throw new Error("can't switch encodings"); + var n = this._decoder.write(e); + return r && (n += this._decoder.end()), n; + }), + (t.exports = a); + }, + { inherits: 127, "safe-buffer": 170, stream: 179, string_decoder: 180 }, + ], + 77: [ + function (e, t, r) { + (function (e) { + function t(e) { + return Object.prototype.toString.call(e); + } + (r.isArray = function (e) { + return Array.isArray + ? Array.isArray(e) + : "[object Array]" === t(e); + }), + (r.isBoolean = function (e) { + return "boolean" == typeof e; + }), + (r.isNull = function (e) { + return null === e; + }), + (r.isNullOrUndefined = function (e) { + return null == e; + }), + (r.isNumber = function (e) { + return "number" == typeof e; + }), + (r.isString = function (e) { + return "string" == typeof e; + }), + (r.isSymbol = function (e) { + return "symbol" == typeof e; + }), + (r.isUndefined = function (e) { + return void 0 === e; + }), + (r.isRegExp = function (e) { + return "[object RegExp]" === t(e); + }), + (r.isObject = function (e) { + return "object" == typeof e && null !== e; + }), + (r.isDate = function (e) { + return "[object Date]" === t(e); + }), + (r.isError = function (e) { + return "[object Error]" === t(e) || e instanceof Error; + }), + (r.isFunction = function (e) { + return "function" == typeof e; + }), + (r.isPrimitive = function (e) { + return ( + null === e || + "boolean" == typeof e || + "number" == typeof e || + "string" == typeof e || + "symbol" == typeof e || + void 0 === e + ); + }), + (r.isBuffer = e.isBuffer); + }).call(this, { isBuffer: e("../../is-buffer/index.js") }); + }, + { "../../is-buffer/index.js": 128 }, + ], + 78: [ + function (e, t, r) { + (function (r) { + var n = e("elliptic"), + i = e("bn.js"); + t.exports = function (e) { + return new a(e); + }; + var o = { + secp256k1: { name: "secp256k1", byteLength: 32 }, + secp224r1: { name: "p224", byteLength: 28 }, + prime256v1: { name: "p256", byteLength: 32 }, + prime192v1: { name: "p192", byteLength: 24 }, + ed25519: { name: "ed25519", byteLength: 32 }, + secp384r1: { name: "p384", byteLength: 48 }, + secp521r1: { name: "p521", byteLength: 66 }, + }; + function a(e) { + (this.curveType = o[e]), + this.curveType || (this.curveType = { name: e }), + (this.curve = new n.ec(this.curveType.name)), + (this.keys = void 0); + } + function s(e, t, n) { + Array.isArray(e) || (e = e.toArray()); + var i = new r(e); + if (n && i.length < n) { + var o = new r(n - i.length); + o.fill(0), (i = r.concat([o, i])); + } + return t ? i.toString(t) : i; + } + (o.p224 = o.secp224r1), + (o.p256 = o.secp256r1 = o.prime256v1), + (o.p192 = o.secp192r1 = o.prime192v1), + (o.p384 = o.secp384r1), + (o.p521 = o.secp521r1), + (a.prototype.generateKeys = function (e, t) { + return ( + (this.keys = this.curve.genKeyPair()), this.getPublicKey(e, t) + ); + }), + (a.prototype.computeSecret = function (e, t, n) { + return ( + (t = t || "utf8"), + r.isBuffer(e) || (e = new r(e, t)), + s( + this.curve + .keyFromPublic(e) + .getPublic() + .mul(this.keys.getPrivate()) + .getX(), + n, + this.curveType.byteLength, + ) + ); + }), + (a.prototype.getPublicKey = function (e, t) { + var r = this.keys.getPublic("compressed" === t, !0); + return ( + "hybrid" === t && + (r[r.length - 1] % 2 ? (r[0] = 7) : (r[0] = 6)), + s(r, e) + ); + }), + (a.prototype.getPrivateKey = function (e) { + return s(this.keys.getPrivate(), e); + }), + (a.prototype.setPublicKey = function (e, t) { + return ( + (t = t || "utf8"), + r.isBuffer(e) || (e = new r(e, t)), + this.keys._importPublic(e), + this + ); + }), + (a.prototype.setPrivateKey = function (e, t) { + (t = t || "utf8"), r.isBuffer(e) || (e = new r(e, t)); + var n = new i(e); + return ( + (n = n.toString(16)), + (this.keys = this.curve.genKeyPair()), + this.keys._importPrivate(n), + this + ); + }); + }).call(this, e("buffer").Buffer); + }, + { "bn.js": 44, buffer: 75, elliptic: 94 }, + ], + 79: [ + function (e, t, r) { + "use strict"; + var n = e("inherits"), + i = e("md5.js"), + o = e("ripemd160"), + a = e("sha.js"), + s = e("cipher-base"); + function f(e) { + s.call(this, "digest"), (this._hash = e); + } + n(f, s), + (f.prototype._update = function (e) { + this._hash.update(e); + }), + (f.prototype._final = function () { + return this._hash.digest(); + }), + (t.exports = function (e) { + return "md5" === (e = e.toLowerCase()) + ? new i() + : "rmd160" === e || "ripemd160" === e + ? new o() + : new f(a(e)); + }); + }, + { + "cipher-base": 76, + inherits: 127, + "md5.js": 130, + ripemd160: 169, + "sha.js": 172, + }, + ], + 80: [ + function (e, t, r) { + var n = e("md5.js"); + t.exports = function (e) { + return new n().update(e).digest(); + }; + }, + { "md5.js": 130 }, + ], + 81: [ + function (e, t, r) { + "use strict"; + var n = e("inherits"), + i = e("./legacy"), + o = e("cipher-base"), + a = e("safe-buffer").Buffer, + s = e("create-hash/md5"), + f = e("ripemd160"), + c = e("sha.js"), + u = a.alloc(128); + function h(e, t) { + o.call(this, "digest"), "string" == typeof t && (t = a.from(t)); + var r = "sha512" === e || "sha384" === e ? 128 : 64; + ((this._alg = e), (this._key = t), t.length > r) + ? (t = ("rmd160" === e ? new f() : c(e)).update(t).digest()) + : t.length < r && (t = a.concat([t, u], r)); + for ( + var n = (this._ipad = a.allocUnsafe(r)), + i = (this._opad = a.allocUnsafe(r)), + s = 0; + s < r; + s++ + ) + (n[s] = 54 ^ t[s]), (i[s] = 92 ^ t[s]); + (this._hash = "rmd160" === e ? new f() : c(e)), + this._hash.update(n); + } + n(h, o), + (h.prototype._update = function (e) { + this._hash.update(e); + }), + (h.prototype._final = function () { + var e = this._hash.digest(); + return ("rmd160" === this._alg ? new f() : c(this._alg)) + .update(this._opad) + .update(e) + .digest(); + }), + (t.exports = function (e, t) { + return "rmd160" === (e = e.toLowerCase()) || "ripemd160" === e + ? new h("rmd160", t) + : "md5" === e + ? new i(s, t) + : new h(e, t); + }); + }, + { + "./legacy": 82, + "cipher-base": 76, + "create-hash/md5": 80, + inherits: 127, + ripemd160: 169, + "safe-buffer": 170, + "sha.js": 172, + }, + ], + 82: [ + function (e, t, r) { + "use strict"; + var n = e("inherits"), + i = e("safe-buffer").Buffer, + o = e("cipher-base"), + a = i.alloc(128), + s = 64; + function f(e, t) { + o.call(this, "digest"), + "string" == typeof t && (t = i.from(t)), + (this._alg = e), + (this._key = t), + t.length > s + ? (t = e(t)) + : t.length < s && (t = i.concat([t, a], s)); + for ( + var r = (this._ipad = i.allocUnsafe(s)), + n = (this._opad = i.allocUnsafe(s)), + f = 0; + f < s; + f++ + ) + (r[f] = 54 ^ t[f]), (n[f] = 92 ^ t[f]); + this._hash = [r]; + } + n(f, o), + (f.prototype._update = function (e) { + this._hash.push(e); + }), + (f.prototype._final = function () { + var e = this._alg(i.concat(this._hash)); + return this._alg(i.concat([this._opad, e])); + }), + (t.exports = f); + }, + { "cipher-base": 76, inherits: 127, "safe-buffer": 170 }, + ], + 83: [ + function (e, t, r) { + "use strict"; + (r.randomBytes = + r.rng = + r.pseudoRandomBytes = + r.prng = + e("randombytes")), + (r.createHash = r.Hash = e("create-hash")), + (r.createHmac = r.Hmac = e("create-hmac")); + var n = e("browserify-sign/algos"), + i = Object.keys(n), + o = [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", + "md5", + "rmd160", + ].concat(i); + r.getHashes = function () { + return o; + }; + var a = e("pbkdf2"); + (r.pbkdf2 = a.pbkdf2), (r.pbkdf2Sync = a.pbkdf2Sync); + var s = e("browserify-cipher"); + (r.Cipher = s.Cipher), + (r.createCipher = s.createCipher), + (r.Cipheriv = s.Cipheriv), + (r.createCipheriv = s.createCipheriv), + (r.Decipher = s.Decipher), + (r.createDecipher = s.createDecipher), + (r.Decipheriv = s.Decipheriv), + (r.createDecipheriv = s.createDecipheriv), + (r.getCiphers = s.getCiphers), + (r.listCiphers = s.listCiphers); + var f = e("diffie-hellman"); + (r.DiffieHellmanGroup = f.DiffieHellmanGroup), + (r.createDiffieHellmanGroup = f.createDiffieHellmanGroup), + (r.getDiffieHellman = f.getDiffieHellman), + (r.createDiffieHellman = f.createDiffieHellman), + (r.DiffieHellman = f.DiffieHellman); + var c = e("browserify-sign"); + (r.createSign = c.createSign), + (r.Sign = c.Sign), + (r.createVerify = c.createVerify), + (r.Verify = c.Verify), + (r.createECDH = e("create-ecdh")); + var u = e("public-encrypt"); + (r.publicEncrypt = u.publicEncrypt), + (r.privateEncrypt = u.privateEncrypt), + (r.publicDecrypt = u.publicDecrypt), + (r.privateDecrypt = u.privateDecrypt); + var h = e("randomfill"); + (r.randomFill = h.randomFill), + (r.randomFillSync = h.randomFillSync), + (r.createCredentials = function () { + throw new Error( + [ + "sorry, createCredentials is not implemented yet", + "we accept pull requests", + "https://github.com/crypto-browserify/crypto-browserify", + ].join("\n"), + ); + }), + (r.constants = { + DH_CHECK_P_NOT_SAFE_PRIME: 2, + DH_CHECK_P_NOT_PRIME: 1, + DH_UNABLE_TO_CHECK_GENERATOR: 4, + DH_NOT_SUITABLE_GENERATOR: 8, + NPN_ENABLED: 1, + ALPN_ENABLED: 1, + RSA_PKCS1_PADDING: 1, + RSA_SSLV23_PADDING: 2, + RSA_NO_PADDING: 3, + RSA_PKCS1_OAEP_PADDING: 4, + RSA_X931_PADDING: 5, + RSA_PKCS1_PSS_PADDING: 6, + POINT_CONVERSION_COMPRESSED: 2, + POINT_CONVERSION_UNCOMPRESSED: 4, + POINT_CONVERSION_HYBRID: 6, + }); + }, + { + "browserify-cipher": 64, + "browserify-sign": 71, + "browserify-sign/algos": 68, + "create-ecdh": 78, + "create-hash": 79, + "create-hmac": 81, + "diffie-hellman": 90, + pbkdf2: 139, + "public-encrypt": 146, + randombytes: 152, + randomfill: 153, + }, + ], + 84: [ + function (e, t, r) { + "use strict"; + (r.utils = e("./des/utils")), + (r.Cipher = e("./des/cipher")), + (r.DES = e("./des/des")), + (r.CBC = e("./des/cbc")), + (r.EDE = e("./des/ede")); + }, + { + "./des/cbc": 85, + "./des/cipher": 86, + "./des/des": 87, + "./des/ede": 88, + "./des/utils": 89, + }, + ], + 85: [ + function (e, t, r) { + "use strict"; + var n = e("minimalistic-assert"), + i = e("inherits"), + o = {}; + function a(e) { + n.equal(e.length, 8, "Invalid IV length"), (this.iv = new Array(8)); + for (var t = 0; t < this.iv.length; t++) this.iv[t] = e[t]; + } + (r.instantiate = function (e) { + function t(t) { + e.call(this, t), this._cbcInit(); + } + i(t, e); + for (var r = Object.keys(o), n = 0; n < r.length; n++) { + var a = r[n]; + t.prototype[a] = o[a]; + } + return ( + (t.create = function (e) { + return new t(e); + }), + t + ); + }), + (o._cbcInit = function () { + var e = new a(this.options.iv); + this._cbcState = e; + }), + (o._update = function (e, t, r, n) { + var i = this._cbcState, + o = this.constructor.super_.prototype, + a = i.iv; + if ("encrypt" === this.type) { + for (var s = 0; s < this.blockSize; s++) a[s] ^= e[t + s]; + o._update.call(this, a, 0, r, n); + for (s = 0; s < this.blockSize; s++) a[s] = r[n + s]; + } else { + o._update.call(this, e, t, r, n); + for (s = 0; s < this.blockSize; s++) r[n + s] ^= a[s]; + for (s = 0; s < this.blockSize; s++) a[s] = e[t + s]; + } + }); + }, + { inherits: 127, "minimalistic-assert": 132 }, + ], + 86: [ + function (e, t, r) { + "use strict"; + var n = e("minimalistic-assert"); + function i(e) { + (this.options = e), + (this.type = this.options.type), + (this.blockSize = 8), + this._init(), + (this.buffer = new Array(this.blockSize)), + (this.bufferOff = 0); + } + (t.exports = i), + (i.prototype._init = function () {}), + (i.prototype.update = function (e) { + return 0 === e.length + ? [] + : "decrypt" === this.type + ? this._updateDecrypt(e) + : this._updateEncrypt(e); + }), + (i.prototype._buffer = function (e, t) { + for ( + var r = Math.min( + this.buffer.length - this.bufferOff, + e.length - t, + ), + n = 0; + n < r; + n++ + ) + this.buffer[this.bufferOff + n] = e[t + n]; + return (this.bufferOff += r), r; + }), + (i.prototype._flushBuffer = function (e, t) { + return ( + this._update(this.buffer, 0, e, t), + (this.bufferOff = 0), + this.blockSize + ); + }), + (i.prototype._updateEncrypt = function (e) { + var t = 0, + r = 0, + n = ((this.bufferOff + e.length) / this.blockSize) | 0, + i = new Array(n * this.blockSize); + 0 !== this.bufferOff && + ((t += this._buffer(e, t)), + this.bufferOff === this.buffer.length && + (r += this._flushBuffer(i, r))); + for ( + var o = e.length - ((e.length - t) % this.blockSize); + t < o; + t += this.blockSize + ) + this._update(e, t, i, r), (r += this.blockSize); + for (; t < e.length; t++, this.bufferOff++) + this.buffer[this.bufferOff] = e[t]; + return i; + }), + (i.prototype._updateDecrypt = function (e) { + for ( + var t = 0, + r = 0, + n = + Math.ceil((this.bufferOff + e.length) / this.blockSize) - 1, + i = new Array(n * this.blockSize); + n > 0; + n-- + ) + (t += this._buffer(e, t)), (r += this._flushBuffer(i, r)); + return (t += this._buffer(e, t)), i; + }), + (i.prototype.final = function (e) { + var t, r; + return ( + e && (t = this.update(e)), + (r = + "encrypt" === this.type + ? this._finalEncrypt() + : this._finalDecrypt()), + t ? t.concat(r) : r + ); + }), + (i.prototype._pad = function (e, t) { + if (0 === t) return !1; + for (; t < e.length; ) e[t++] = 0; + return !0; + }), + (i.prototype._finalEncrypt = function () { + if (!this._pad(this.buffer, this.bufferOff)) return []; + var e = new Array(this.blockSize); + return this._update(this.buffer, 0, e, 0), e; + }), + (i.prototype._unpad = function (e) { + return e; + }), + (i.prototype._finalDecrypt = function () { + n.equal( + this.bufferOff, + this.blockSize, + "Not enough data to decrypt", + ); + var e = new Array(this.blockSize); + return this._flushBuffer(e, 0), this._unpad(e); + }); + }, + { "minimalistic-assert": 132 }, + ], + 87: [ + function (e, t, r) { + "use strict"; + var n = e("minimalistic-assert"), + i = e("inherits"), + o = e("../des"), + a = o.utils, + s = o.Cipher; + function f() { + (this.tmp = new Array(2)), (this.keys = null); + } + function c(e) { + s.call(this, e); + var t = new f(); + (this._desState = t), this.deriveKeys(t, e.key); + } + i(c, s), + (t.exports = c), + (c.create = function (e) { + return new c(e); + }); + var u = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1]; + (c.prototype.deriveKeys = function (e, t) { + (e.keys = new Array(32)), + n.equal(t.length, this.blockSize, "Invalid key length"); + var r = a.readUInt32BE(t, 0), + i = a.readUInt32BE(t, 4); + a.pc1(r, i, e.tmp, 0), (r = e.tmp[0]), (i = e.tmp[1]); + for (var o = 0; o < e.keys.length; o += 2) { + var s = u[o >>> 1]; + (r = a.r28shl(r, s)), + (i = a.r28shl(i, s)), + a.pc2(r, i, e.keys, o); + } + }), + (c.prototype._update = function (e, t, r, n) { + var i = this._desState, + o = a.readUInt32BE(e, t), + s = a.readUInt32BE(e, t + 4); + a.ip(o, s, i.tmp, 0), + (o = i.tmp[0]), + (s = i.tmp[1]), + "encrypt" === this.type + ? this._encrypt(i, o, s, i.tmp, 0) + : this._decrypt(i, o, s, i.tmp, 0), + (o = i.tmp[0]), + (s = i.tmp[1]), + a.writeUInt32BE(r, o, n), + a.writeUInt32BE(r, s, n + 4); + }), + (c.prototype._pad = function (e, t) { + for (var r = e.length - t, n = t; n < e.length; n++) e[n] = r; + return !0; + }), + (c.prototype._unpad = function (e) { + for (var t = e[e.length - 1], r = e.length - t; r < e.length; r++) + n.equal(e[r], t); + return e.slice(0, e.length - t); + }), + (c.prototype._encrypt = function (e, t, r, n, i) { + for (var o = t, s = r, f = 0; f < e.keys.length; f += 2) { + var c = e.keys[f], + u = e.keys[f + 1]; + a.expand(s, e.tmp, 0), (c ^= e.tmp[0]), (u ^= e.tmp[1]); + var h = a.substitute(c, u), + d = s; + (s = (o ^ a.permute(h)) >>> 0), (o = d); + } + a.rip(s, o, n, i); + }), + (c.prototype._decrypt = function (e, t, r, n, i) { + for (var o = r, s = t, f = e.keys.length - 2; f >= 0; f -= 2) { + var c = e.keys[f], + u = e.keys[f + 1]; + a.expand(o, e.tmp, 0), (c ^= e.tmp[0]), (u ^= e.tmp[1]); + var h = a.substitute(c, u), + d = o; + (o = (s ^ a.permute(h)) >>> 0), (s = d); + } + a.rip(o, s, n, i); + }); + }, + { "../des": 84, inherits: 127, "minimalistic-assert": 132 }, + ], + 88: [ + function (e, t, r) { + "use strict"; + var n = e("minimalistic-assert"), + i = e("inherits"), + o = e("../des"), + a = o.Cipher, + s = o.DES; + function f(e, t) { + n.equal(t.length, 24, "Invalid key length"); + var r = t.slice(0, 8), + i = t.slice(8, 16), + o = t.slice(16, 24); + this.ciphers = + "encrypt" === e + ? [ + s.create({ type: "encrypt", key: r }), + s.create({ type: "decrypt", key: i }), + s.create({ type: "encrypt", key: o }), + ] + : [ + s.create({ type: "decrypt", key: o }), + s.create({ type: "encrypt", key: i }), + s.create({ type: "decrypt", key: r }), + ]; + } + function c(e) { + a.call(this, e); + var t = new f(this.type, this.options.key); + this._edeState = t; + } + i(c, a), + (t.exports = c), + (c.create = function (e) { + return new c(e); + }), + (c.prototype._update = function (e, t, r, n) { + var i = this._edeState; + i.ciphers[0]._update(e, t, r, n), + i.ciphers[1]._update(r, n, r, n), + i.ciphers[2]._update(r, n, r, n); + }), + (c.prototype._pad = s.prototype._pad), + (c.prototype._unpad = s.prototype._unpad); + }, + { "../des": 84, inherits: 127, "minimalistic-assert": 132 }, + ], + 89: [ + function (e, t, r) { + "use strict"; + (r.readUInt32BE = function (e, t) { + return ( + ((e[0 + t] << 24) | + (e[1 + t] << 16) | + (e[2 + t] << 8) | + e[3 + t]) >>> + 0 + ); + }), + (r.writeUInt32BE = function (e, t, r) { + (e[0 + r] = t >>> 24), + (e[1 + r] = (t >>> 16) & 255), + (e[2 + r] = (t >>> 8) & 255), + (e[3 + r] = 255 & t); + }), + (r.ip = function (e, t, r, n) { + for (var i = 0, o = 0, a = 6; a >= 0; a -= 2) { + for (var s = 0; s <= 24; s += 8) + (i <<= 1), (i |= (t >>> (s + a)) & 1); + for (s = 0; s <= 24; s += 8) + (i <<= 1), (i |= (e >>> (s + a)) & 1); + } + for (a = 6; a >= 0; a -= 2) { + for (s = 1; s <= 25; s += 8) + (o <<= 1), (o |= (t >>> (s + a)) & 1); + for (s = 1; s <= 25; s += 8) + (o <<= 1), (o |= (e >>> (s + a)) & 1); + } + (r[n + 0] = i >>> 0), (r[n + 1] = o >>> 0); + }), + (r.rip = function (e, t, r, n) { + for (var i = 0, o = 0, a = 0; a < 4; a++) + for (var s = 24; s >= 0; s -= 8) + (i <<= 1), + (i |= (t >>> (s + a)) & 1), + (i <<= 1), + (i |= (e >>> (s + a)) & 1); + for (a = 4; a < 8; a++) + for (s = 24; s >= 0; s -= 8) + (o <<= 1), + (o |= (t >>> (s + a)) & 1), + (o <<= 1), + (o |= (e >>> (s + a)) & 1); + (r[n + 0] = i >>> 0), (r[n + 1] = o >>> 0); + }), + (r.pc1 = function (e, t, r, n) { + for (var i = 0, o = 0, a = 7; a >= 5; a--) { + for (var s = 0; s <= 24; s += 8) + (i <<= 1), (i |= (t >> (s + a)) & 1); + for (s = 0; s <= 24; s += 8) + (i <<= 1), (i |= (e >> (s + a)) & 1); + } + for (s = 0; s <= 24; s += 8) (i <<= 1), (i |= (t >> (s + a)) & 1); + for (a = 1; a <= 3; a++) { + for (s = 0; s <= 24; s += 8) + (o <<= 1), (o |= (t >> (s + a)) & 1); + for (s = 0; s <= 24; s += 8) + (o <<= 1), (o |= (e >> (s + a)) & 1); + } + for (s = 0; s <= 24; s += 8) (o <<= 1), (o |= (e >> (s + a)) & 1); + (r[n + 0] = i >>> 0), (r[n + 1] = o >>> 0); + }), + (r.r28shl = function (e, t) { + return ((e << t) & 268435455) | (e >>> (28 - t)); + }); + var n = [ + 14, 11, 17, 4, 27, 23, 25, 0, 13, 22, 7, 18, 5, 9, 16, 24, 2, 20, + 12, 21, 1, 8, 15, 26, 15, 4, 25, 19, 9, 1, 26, 16, 5, 11, 23, 8, 12, + 7, 17, 0, 22, 3, 10, 14, 6, 20, 27, 24, + ]; + (r.pc2 = function (e, t, r, i) { + for (var o = 0, a = 0, s = n.length >>> 1, f = 0; f < s; f++) + (o <<= 1), (o |= (e >>> n[f]) & 1); + for (f = s; f < n.length; f++) (a <<= 1), (a |= (t >>> n[f]) & 1); + (r[i + 0] = o >>> 0), (r[i + 1] = a >>> 0); + }), + (r.expand = function (e, t, r) { + var n = 0, + i = 0; + n = ((1 & e) << 5) | (e >>> 27); + for (var o = 23; o >= 15; o -= 4) + (n <<= 6), (n |= (e >>> o) & 63); + for (o = 11; o >= 3; o -= 4) (i |= (e >>> o) & 63), (i <<= 6); + (i |= ((31 & e) << 1) | (e >>> 31)), + (t[r + 0] = n >>> 0), + (t[r + 1] = i >>> 0); + }); + var i = [ + 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, 3, 10, 10, 6, + 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, 4, 15, 1, 12, 14, 8, 8, 2, + 13, 4, 6, 9, 2, 1, 11, 7, 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, + 5, 6, 0, 13, 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14, + 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, 0, 13, 14, 8, + 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2, 5, 11, 8, 6, 12, 7, 6, 12, + 9, 0, 3, 5, 2, 14, 15, 9, 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, + 6, 5, 10, 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1, 13, + 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7, 11, 4, 1, 15, 2, 14, + 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, + 6, 15, 9, 0, 10, 3, 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, + 15, 9, 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8, 15, 9, + 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14, 2, 14, 12, 11, 4, 2, + 1, 12, 7, 4, 10, 7, 11, 13, 6, 1, 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, + 0, 9, 14, 8, 9, 6, 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, + 8, 13, 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3, 12, 10, + 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, 0, 6, 13, 1, 3, 13, 4, + 14, 14, 0, 7, 11, 5, 3, 11, 8, 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, + 5, 12, 15, 3, 10, 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, + 13, 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, 3, 14, + 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6, 1, 6, 4, 11, 11, 13, + 13, 8, 12, 1, 3, 4, 7, 10, 14, 7, 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, + 5, 2, 9, 3, 2, 12, 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, + 1, 4, 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, 7, 2, + 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, 0, 15, 6, 12, 10, 9, + 13, 0, 15, 3, 3, 5, 5, 6, 8, 11, + ]; + r.substitute = function (e, t) { + for (var r = 0, n = 0; n < 4; n++) { + (r <<= 4), (r |= i[64 * n + ((e >>> (18 - 6 * n)) & 63)]); + } + for (n = 0; n < 4; n++) { + (r <<= 4), (r |= i[256 + 64 * n + ((t >>> (18 - 6 * n)) & 63)]); + } + return r >>> 0; + }; + var o = [ + 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, 30, 24, + 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7, + ]; + (r.permute = function (e) { + for (var t = 0, r = 0; r < o.length; r++) + (t <<= 1), (t |= (e >>> o[r]) & 1); + return t >>> 0; + }), + (r.padSplit = function (e, t, r) { + for (var n = e.toString(2); n.length < t; ) n = "0" + n; + for (var i = [], o = 0; o < t; o += r) i.push(n.slice(o, o + r)); + return i.join(" "); + }); + }, + {}, + ], + 90: [ + function (e, t, r) { + (function (t) { + var n = e("./lib/generatePrime"), + i = e("./lib/primes.json"), + o = e("./lib/dh"); + var a = { binary: !0, hex: !0, base64: !0 }; + (r.DiffieHellmanGroup = + r.createDiffieHellmanGroup = + r.getDiffieHellman = + function (e) { + var r = new t(i[e].prime, "hex"), + n = new t(i[e].gen, "hex"); + return new o(r, n); + }), + (r.createDiffieHellman = r.DiffieHellman = + function e(r, i, s, f) { + return t.isBuffer(i) || void 0 === a[i] + ? e(r, "binary", i, s) + : ((i = i || "binary"), + (f = f || "binary"), + (s = s || new t([2])), + t.isBuffer(s) || (s = new t(s, f)), + "number" == typeof r + ? new o(n(r, s), s, !0) + : (t.isBuffer(r) || (r = new t(r, i)), + new o(r, s, !0))); + }); + }).call(this, e("buffer").Buffer); + }, + { + "./lib/dh": 91, + "./lib/generatePrime": 92, + "./lib/primes.json": 93, + buffer: 75, + }, + ], + 91: [ + function (e, t, r) { + (function (r) { + var n = e("bn.js"), + i = new (e("miller-rabin"))(), + o = new n(24), + a = new n(11), + s = new n(10), + f = new n(3), + c = new n(7), + u = e("./generatePrime"), + h = e("randombytes"); + function d(e, t) { + return ( + (t = t || "utf8"), + r.isBuffer(e) || (e = new r(e, t)), + (this._pub = new n(e)), + this + ); + } + function l(e, t) { + return ( + (t = t || "utf8"), + r.isBuffer(e) || (e = new r(e, t)), + (this._priv = new n(e)), + this + ); + } + t.exports = b; + var p = {}; + function b(e, t, r) { + this.setGenerator(t), + (this.__prime = new n(e)), + (this._prime = n.mont(this.__prime)), + (this._primeLen = e.length), + (this._pub = void 0), + (this._priv = void 0), + (this._primeCode = void 0), + r + ? ((this.setPublicKey = d), (this.setPrivateKey = l)) + : (this._primeCode = 8); + } + function y(e, t) { + var n = new r(e.toArray()); + return t ? n.toString(t) : n; + } + Object.defineProperty(b.prototype, "verifyError", { + enumerable: !0, + get: function () { + return ( + "number" != typeof this._primeCode && + (this._primeCode = (function (e, t) { + var r = t.toString("hex"), + n = [r, e.toString(16)].join("_"); + if (n in p) return p[n]; + var h, + d = 0; + if ( + e.isEven() || + !u.simpleSieve || + !u.fermatTest(e) || + !i.test(e) + ) + return ( + (d += 1), + (d += "02" === r || "05" === r ? 8 : 4), + (p[n] = d), + d + ); + switch ((i.test(e.shrn(1)) || (d += 2), r)) { + case "02": + e.mod(o).cmp(a) && (d += 8); + break; + case "05": + (h = e.mod(s)).cmp(f) && h.cmp(c) && (d += 8); + break; + default: + d += 4; + } + return (p[n] = d), d; + })(this.__prime, this.__gen)), + this._primeCode + ); + }, + }), + (b.prototype.generateKeys = function () { + return ( + this._priv || (this._priv = new n(h(this._primeLen))), + (this._pub = this._gen + .toRed(this._prime) + .redPow(this._priv) + .fromRed()), + this.getPublicKey() + ); + }), + (b.prototype.computeSecret = function (e) { + var t = (e = (e = new n(e)).toRed(this._prime)) + .redPow(this._priv) + .fromRed(), + i = new r(t.toArray()), + o = this.getPrime(); + if (i.length < o.length) { + var a = new r(o.length - i.length); + a.fill(0), (i = r.concat([a, i])); + } + return i; + }), + (b.prototype.getPublicKey = function (e) { + return y(this._pub, e); + }), + (b.prototype.getPrivateKey = function (e) { + return y(this._priv, e); + }), + (b.prototype.getPrime = function (e) { + return y(this.__prime, e); + }), + (b.prototype.getGenerator = function (e) { + return y(this._gen, e); + }), + (b.prototype.setGenerator = function (e, t) { + return ( + (t = t || "utf8"), + r.isBuffer(e) || (e = new r(e, t)), + (this.__gen = e), + (this._gen = new n(e)), + this + ); + }); + }).call(this, e("buffer").Buffer); + }, + { + "./generatePrime": 92, + "bn.js": 44, + buffer: 75, + "miller-rabin": 131, + randombytes: 152, + }, + ], + 92: [ + function (e, t, r) { + var n = e("randombytes"); + (t.exports = v), (v.simpleSieve = y), (v.fermatTest = m); + var i = e("bn.js"), + o = new i(24), + a = new (e("miller-rabin"))(), + s = new i(1), + f = new i(2), + c = new i(5), + u = (new i(16), new i(8), new i(10)), + h = new i(3), + d = (new i(7), new i(11)), + l = new i(4), + p = (new i(12), null); + function b() { + if (null !== p) return p; + var e = []; + e[0] = 2; + for (var t = 1, r = 3; r < 1048576; r += 2) { + for ( + var n = Math.ceil(Math.sqrt(r)), i = 0; + i < t && e[i] <= n && r % e[i] != 0; + i++ + ); + (t !== i && e[i] <= n) || (e[t++] = r); + } + return (p = e), e; + } + function y(e) { + for (var t = b(), r = 0; r < t.length; r++) + if (0 === e.modn(t[r])) return 0 === e.cmpn(t[r]); + return !0; + } + function m(e) { + var t = i.mont(e); + return 0 === f.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1); + } + function v(e, t) { + if (e < 16) + return new i(2 === t || 5 === t ? [140, 123] : [140, 39]); + var r, p; + for (t = new i(t); ; ) { + for (r = new i(n(Math.ceil(e / 8))); r.bitLength() > e; ) + r.ishrn(1); + if ( + (r.isEven() && r.iadd(s), r.testn(1) || r.iadd(f), t.cmp(f)) + ) { + if (!t.cmp(c)) for (; r.mod(u).cmp(h); ) r.iadd(l); + } else for (; r.mod(o).cmp(d); ) r.iadd(l); + if ( + y((p = r.shrn(1))) && + y(r) && + m(p) && + m(r) && + a.test(p) && + a.test(r) + ) + return r; + } + } + }, + { "bn.js": 44, "miller-rabin": 131, randombytes: 152 }, + ], + 93: [ + function (e, t, r) { + t.exports = { + modp1: { + gen: "02", + prime: + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff", + }, + modp2: { + gen: "02", + prime: + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff", + }, + modp5: { + gen: "02", + prime: + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff", + }, + modp14: { + gen: "02", + prime: + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff", + }, + modp15: { + gen: "02", + prime: + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff", + }, + modp16: { + gen: "02", + prime: + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff", + }, + modp17: { + gen: "02", + prime: + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff", + }, + modp18: { + gen: "02", + prime: + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff", + }, + }; + }, + {}, + ], + 94: [ + function (e, t, r) { + "use strict"; + var n = r; + (n.version = e("../package.json").version), + (n.utils = e("./elliptic/utils")), + (n.rand = e("brorand")), + (n.curve = e("./elliptic/curve")), + (n.curves = e("./elliptic/curves")), + (n.ec = e("./elliptic/ec")), + (n.eddsa = e("./elliptic/eddsa")); + }, + { + "../package.json": 109, + "./elliptic/curve": 97, + "./elliptic/curves": 100, + "./elliptic/ec": 101, + "./elliptic/eddsa": 104, + "./elliptic/utils": 108, + brorand: 45, + }, + ], + 95: [ + function (e, t, r) { + "use strict"; + var n = e("bn.js"), + i = e("../utils"), + o = i.getNAF, + a = i.getJSF, + s = i.assert; + function f(e, t) { + (this.type = e), + (this.p = new n(t.p, 16)), + (this.red = t.prime ? n.red(t.prime) : n.mont(this.p)), + (this.zero = new n(0).toRed(this.red)), + (this.one = new n(1).toRed(this.red)), + (this.two = new n(2).toRed(this.red)), + (this.n = t.n && new n(t.n, 16)), + (this.g = t.g && this.pointFromJSON(t.g, t.gRed)), + (this._wnafT1 = new Array(4)), + (this._wnafT2 = new Array(4)), + (this._wnafT3 = new Array(4)), + (this._wnafT4 = new Array(4)); + var r = this.n && this.p.div(this.n); + !r || r.cmpn(100) > 0 + ? (this.redN = null) + : ((this._maxwellTrick = !0), + (this.redN = this.n.toRed(this.red))); + } + function c(e, t) { + (this.curve = e), (this.type = t), (this.precomputed = null); + } + (t.exports = f), + (f.prototype.point = function () { + throw new Error("Not implemented"); + }), + (f.prototype.validate = function () { + throw new Error("Not implemented"); + }), + (f.prototype._fixedNafMul = function (e, t) { + s(e.precomputed); + var r = e._getDoubles(), + n = o(t, 1), + i = (1 << (r.step + 1)) - (r.step % 2 == 0 ? 2 : 1); + i /= 3; + for (var a = [], f = 0; f < n.length; f += r.step) { + var c = 0; + for (t = f + r.step - 1; t >= f; t--) c = (c << 1) + n[t]; + a.push(c); + } + for ( + var u = this.jpoint(null, null, null), + h = this.jpoint(null, null, null), + d = i; + d > 0; + d-- + ) { + for (f = 0; f < a.length; f++) { + (c = a[f]) === d + ? (h = h.mixedAdd(r.points[f])) + : c === -d && (h = h.mixedAdd(r.points[f].neg())); + } + u = u.add(h); + } + return u.toP(); + }), + (f.prototype._wnafMul = function (e, t) { + var r = 4, + n = e._getNAFPoints(r); + r = n.wnd; + for ( + var i = n.points, + a = o(t, r), + f = this.jpoint(null, null, null), + c = a.length - 1; + c >= 0; + c-- + ) { + for (t = 0; c >= 0 && 0 === a[c]; c--) t++; + if ((c >= 0 && t++, (f = f.dblp(t)), c < 0)) break; + var u = a[c]; + s(0 !== u), + (f = + "affine" === e.type + ? u > 0 + ? f.mixedAdd(i[(u - 1) >> 1]) + : f.mixedAdd(i[(-u - 1) >> 1].neg()) + : u > 0 + ? f.add(i[(u - 1) >> 1]) + : f.add(i[(-u - 1) >> 1].neg())); + } + return "affine" === e.type ? f.toP() : f; + }), + (f.prototype._wnafMulAdd = function (e, t, r, n, i) { + for ( + var s = this._wnafT1, + f = this._wnafT2, + c = this._wnafT3, + u = 0, + h = 0; + h < n; + h++ + ) { + var d = (k = t[h])._getNAFPoints(e); + (s[h] = d.wnd), (f[h] = d.points); + } + for (h = n - 1; h >= 1; h -= 2) { + var l = h - 1, + p = h; + if (1 === s[l] && 1 === s[p]) { + var b = [t[l], null, null, t[p]]; + 0 === t[l].y.cmp(t[p].y) + ? ((b[1] = t[l].add(t[p])), + (b[2] = t[l].toJ().mixedAdd(t[p].neg()))) + : 0 === t[l].y.cmp(t[p].y.redNeg()) + ? ((b[1] = t[l].toJ().mixedAdd(t[p])), + (b[2] = t[l].add(t[p].neg()))) + : ((b[1] = t[l].toJ().mixedAdd(t[p])), + (b[2] = t[l].toJ().mixedAdd(t[p].neg()))); + var y = [-3, -1, -5, -7, 0, 7, 5, 1, 3], + m = a(r[l], r[p]); + (u = Math.max(m[0].length, u)), + (c[l] = new Array(u)), + (c[p] = new Array(u)); + for (var v = 0; v < u; v++) { + var g = 0 | m[0][v], + w = 0 | m[1][v]; + (c[l][v] = y[3 * (g + 1) + (w + 1)]), + (c[p][v] = 0), + (f[l] = b); + } + } else + (c[l] = o(r[l], s[l])), + (c[p] = o(r[p], s[p])), + (u = Math.max(c[l].length, u)), + (u = Math.max(c[p].length, u)); + } + var _ = this.jpoint(null, null, null), + S = this._wnafT4; + for (h = u; h >= 0; h--) { + for (var E = 0; h >= 0; ) { + var M = !0; + for (v = 0; v < n; v++) + (S[v] = 0 | c[v][h]), 0 !== S[v] && (M = !1); + if (!M) break; + E++, h--; + } + if ((h >= 0 && E++, (_ = _.dblp(E)), h < 0)) break; + for (v = 0; v < n; v++) { + var k, + x = S[v]; + 0 !== x && + (x > 0 + ? (k = f[v][(x - 1) >> 1]) + : x < 0 && (k = f[v][(-x - 1) >> 1].neg()), + (_ = "affine" === k.type ? _.mixedAdd(k) : _.add(k))); + } + } + for (h = 0; h < n; h++) f[h] = null; + return i ? _ : _.toP(); + }), + (f.BasePoint = c), + (c.prototype.eq = function () { + throw new Error("Not implemented"); + }), + (c.prototype.validate = function () { + return this.curve.validate(this); + }), + (f.prototype.decodePoint = function (e, t) { + e = i.toArray(e, t); + var r = this.p.byteLength(); + if ( + (4 === e[0] || 6 === e[0] || 7 === e[0]) && + e.length - 1 == 2 * r + ) + return ( + 6 === e[0] + ? s(e[e.length - 1] % 2 == 0) + : 7 === e[0] && s(e[e.length - 1] % 2 == 1), + this.point(e.slice(1, 1 + r), e.slice(1 + r, 1 + 2 * r)) + ); + if ((2 === e[0] || 3 === e[0]) && e.length - 1 === r) + return this.pointFromX(e.slice(1, 1 + r), 3 === e[0]); + throw new Error("Unknown point format"); + }), + (c.prototype.encodeCompressed = function (e) { + return this.encode(e, !0); + }), + (c.prototype._encode = function (e) { + var t = this.curve.p.byteLength(), + r = this.getX().toArray("be", t); + return e + ? [this.getY().isEven() ? 2 : 3].concat(r) + : [4].concat(r, this.getY().toArray("be", t)); + }), + (c.prototype.encode = function (e, t) { + return i.encode(this._encode(t), e); + }), + (c.prototype.precompute = function (e) { + if (this.precomputed) return this; + var t = { doubles: null, naf: null, beta: null }; + return ( + (t.naf = this._getNAFPoints(8)), + (t.doubles = this._getDoubles(4, e)), + (t.beta = this._getBeta()), + (this.precomputed = t), + this + ); + }), + (c.prototype._hasDoubles = function (e) { + if (!this.precomputed) return !1; + var t = this.precomputed.doubles; + return ( + !!t && + t.points.length >= Math.ceil((e.bitLength() + 1) / t.step) + ); + }), + (c.prototype._getDoubles = function (e, t) { + if (this.precomputed && this.precomputed.doubles) + return this.precomputed.doubles; + for (var r = [this], n = this, i = 0; i < t; i += e) { + for (var o = 0; o < e; o++) n = n.dbl(); + r.push(n); + } + return { step: e, points: r }; + }), + (c.prototype._getNAFPoints = function (e) { + if (this.precomputed && this.precomputed.naf) + return this.precomputed.naf; + for ( + var t = [this], + r = (1 << e) - 1, + n = 1 === r ? null : this.dbl(), + i = 1; + i < r; + i++ + ) + t[i] = t[i - 1].add(n); + return { wnd: e, points: t }; + }), + (c.prototype._getBeta = function () { + return null; + }), + (c.prototype.dblp = function (e) { + for (var t = this, r = 0; r < e; r++) t = t.dbl(); + return t; + }); + }, + { "../utils": 108, "bn.js": 44 }, + ], + 96: [ + function (e, t, r) { + "use strict"; + var n = e("../utils"), + i = e("bn.js"), + o = e("inherits"), + a = e("./base"), + s = n.assert; + function f(e) { + (this.twisted = 1 != (0 | e.a)), + (this.mOneA = this.twisted && -1 == (0 | e.a)), + (this.extended = this.mOneA), + a.call(this, "edwards", e), + (this.a = new i(e.a, 16).umod(this.red.m)), + (this.a = this.a.toRed(this.red)), + (this.c = new i(e.c, 16).toRed(this.red)), + (this.c2 = this.c.redSqr()), + (this.d = new i(e.d, 16).toRed(this.red)), + (this.dd = this.d.redAdd(this.d)), + s(!this.twisted || 0 === this.c.fromRed().cmpn(1)), + (this.oneC = 1 == (0 | e.c)); + } + function c(e, t, r, n, o) { + a.BasePoint.call(this, e, "projective"), + null === t && null === r && null === n + ? ((this.x = this.curve.zero), + (this.y = this.curve.one), + (this.z = this.curve.one), + (this.t = this.curve.zero), + (this.zOne = !0)) + : ((this.x = new i(t, 16)), + (this.y = new i(r, 16)), + (this.z = n ? new i(n, 16) : this.curve.one), + (this.t = o && new i(o, 16)), + this.x.red || (this.x = this.x.toRed(this.curve.red)), + this.y.red || (this.y = this.y.toRed(this.curve.red)), + this.z.red || (this.z = this.z.toRed(this.curve.red)), + this.t && + !this.t.red && + (this.t = this.t.toRed(this.curve.red)), + (this.zOne = this.z === this.curve.one), + this.curve.extended && + !this.t && + ((this.t = this.x.redMul(this.y)), + this.zOne || (this.t = this.t.redMul(this.z.redInvm())))); + } + o(f, a), + (t.exports = f), + (f.prototype._mulA = function (e) { + return this.mOneA ? e.redNeg() : this.a.redMul(e); + }), + (f.prototype._mulC = function (e) { + return this.oneC ? e : this.c.redMul(e); + }), + (f.prototype.jpoint = function (e, t, r, n) { + return this.point(e, t, r, n); + }), + (f.prototype.pointFromX = function (e, t) { + (e = new i(e, 16)).red || (e = e.toRed(this.red)); + var r = e.redSqr(), + n = this.c2.redSub(this.a.redMul(r)), + o = this.one.redSub(this.c2.redMul(this.d).redMul(r)), + a = n.redMul(o.redInvm()), + s = a.redSqrt(); + if (0 !== s.redSqr().redSub(a).cmp(this.zero)) + throw new Error("invalid point"); + var f = s.fromRed().isOdd(); + return ( + ((t && !f) || (!t && f)) && (s = s.redNeg()), this.point(e, s) + ); + }), + (f.prototype.pointFromY = function (e, t) { + (e = new i(e, 16)).red || (e = e.toRed(this.red)); + var r = e.redSqr(), + n = r.redSub(this.c2), + o = r.redMul(this.d).redMul(this.c2).redSub(this.a), + a = n.redMul(o.redInvm()); + if (0 === a.cmp(this.zero)) { + if (t) throw new Error("invalid point"); + return this.point(this.zero, e); + } + var s = a.redSqrt(); + if (0 !== s.redSqr().redSub(a).cmp(this.zero)) + throw new Error("invalid point"); + return ( + s.fromRed().isOdd() !== t && (s = s.redNeg()), this.point(s, e) + ); + }), + (f.prototype.validate = function (e) { + if (e.isInfinity()) return !0; + e.normalize(); + var t = e.x.redSqr(), + r = e.y.redSqr(), + n = t.redMul(this.a).redAdd(r), + i = this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r))); + return 0 === n.cmp(i); + }), + o(c, a.BasePoint), + (f.prototype.pointFromJSON = function (e) { + return c.fromJSON(this, e); + }), + (f.prototype.point = function (e, t, r, n) { + return new c(this, e, t, r, n); + }), + (c.fromJSON = function (e, t) { + return new c(e, t[0], t[1], t[2]); + }), + (c.prototype.inspect = function () { + return this.isInfinity() + ? "" + : ""; + }), + (c.prototype.isInfinity = function () { + return ( + 0 === this.x.cmpn(0) && + (0 === this.y.cmp(this.z) || + (this.zOne && 0 === this.y.cmp(this.curve.c))) + ); + }), + (c.prototype._extDbl = function () { + var e = this.x.redSqr(), + t = this.y.redSqr(), + r = this.z.redSqr(); + r = r.redIAdd(r); + var n = this.curve._mulA(e), + i = this.x.redAdd(this.y).redSqr().redISub(e).redISub(t), + o = n.redAdd(t), + a = o.redSub(r), + s = n.redSub(t), + f = i.redMul(a), + c = o.redMul(s), + u = i.redMul(s), + h = a.redMul(o); + return this.curve.point(f, c, h, u); + }), + (c.prototype._projDbl = function () { + var e, + t, + r, + n = this.x.redAdd(this.y).redSqr(), + i = this.x.redSqr(), + o = this.y.redSqr(); + if (this.curve.twisted) { + var a = (c = this.curve._mulA(i)).redAdd(o); + if (this.zOne) + (e = n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two))), + (t = a.redMul(c.redSub(o))), + (r = a.redSqr().redSub(a).redSub(a)); + else { + var s = this.z.redSqr(), + f = a.redSub(s).redISub(s); + (e = n.redSub(i).redISub(o).redMul(f)), + (t = a.redMul(c.redSub(o))), + (r = a.redMul(f)); + } + } else { + var c = i.redAdd(o); + (s = this.curve._mulC(this.z).redSqr()), + (f = c.redSub(s).redSub(s)); + (e = this.curve._mulC(n.redISub(c)).redMul(f)), + (t = this.curve._mulC(c).redMul(i.redISub(o))), + (r = c.redMul(f)); + } + return this.curve.point(e, t, r); + }), + (c.prototype.dbl = function () { + return this.isInfinity() + ? this + : this.curve.extended + ? this._extDbl() + : this._projDbl(); + }), + (c.prototype._extAdd = function (e) { + var t = this.y.redSub(this.x).redMul(e.y.redSub(e.x)), + r = this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)), + n = this.t.redMul(this.curve.dd).redMul(e.t), + i = this.z.redMul(e.z.redAdd(e.z)), + o = r.redSub(t), + a = i.redSub(n), + s = i.redAdd(n), + f = r.redAdd(t), + c = o.redMul(a), + u = s.redMul(f), + h = o.redMul(f), + d = a.redMul(s); + return this.curve.point(c, u, d, h); + }), + (c.prototype._projAdd = function (e) { + var t, + r, + n = this.z.redMul(e.z), + i = n.redSqr(), + o = this.x.redMul(e.x), + a = this.y.redMul(e.y), + s = this.curve.d.redMul(o).redMul(a), + f = i.redSub(s), + c = i.redAdd(s), + u = this.x + .redAdd(this.y) + .redMul(e.x.redAdd(e.y)) + .redISub(o) + .redISub(a), + h = n.redMul(f).redMul(u); + return ( + this.curve.twisted + ? ((t = n.redMul(c).redMul(a.redSub(this.curve._mulA(o)))), + (r = f.redMul(c))) + : ((t = n.redMul(c).redMul(a.redSub(o))), + (r = this.curve._mulC(f).redMul(c))), + this.curve.point(h, t, r) + ); + }), + (c.prototype.add = function (e) { + return this.isInfinity() + ? e + : e.isInfinity() + ? this + : this.curve.extended + ? this._extAdd(e) + : this._projAdd(e); + }), + (c.prototype.mul = function (e) { + return this._hasDoubles(e) + ? this.curve._fixedNafMul(this, e) + : this.curve._wnafMul(this, e); + }), + (c.prototype.mulAdd = function (e, t, r) { + return this.curve._wnafMulAdd(1, [this, t], [e, r], 2, !1); + }), + (c.prototype.jmulAdd = function (e, t, r) { + return this.curve._wnafMulAdd(1, [this, t], [e, r], 2, !0); + }), + (c.prototype.normalize = function () { + if (this.zOne) return this; + var e = this.z.redInvm(); + return ( + (this.x = this.x.redMul(e)), + (this.y = this.y.redMul(e)), + this.t && (this.t = this.t.redMul(e)), + (this.z = this.curve.one), + (this.zOne = !0), + this + ); + }), + (c.prototype.neg = function () { + return this.curve.point( + this.x.redNeg(), + this.y, + this.z, + this.t && this.t.redNeg(), + ); + }), + (c.prototype.getX = function () { + return this.normalize(), this.x.fromRed(); + }), + (c.prototype.getY = function () { + return this.normalize(), this.y.fromRed(); + }), + (c.prototype.eq = function (e) { + return ( + this === e || + (0 === this.getX().cmp(e.getX()) && + 0 === this.getY().cmp(e.getY())) + ); + }), + (c.prototype.eqXToP = function (e) { + var t = e.toRed(this.curve.red).redMul(this.z); + if (0 === this.x.cmp(t)) return !0; + for (var r = e.clone(), n = this.curve.redN.redMul(this.z); ; ) { + if ((r.iadd(this.curve.n), r.cmp(this.curve.p) >= 0)) return !1; + if ((t.redIAdd(n), 0 === this.x.cmp(t))) return !0; + } + }), + (c.prototype.toP = c.prototype.normalize), + (c.prototype.mixedAdd = c.prototype.add); + }, + { "../utils": 108, "./base": 95, "bn.js": 44, inherits: 127 }, + ], + 97: [ + function (e, t, r) { + "use strict"; + var n = r; + (n.base = e("./base")), + (n.short = e("./short")), + (n.mont = e("./mont")), + (n.edwards = e("./edwards")); + }, + { "./base": 95, "./edwards": 96, "./mont": 98, "./short": 99 }, + ], + 98: [ + function (e, t, r) { + "use strict"; + var n = e("bn.js"), + i = e("inherits"), + o = e("./base"), + a = e("../utils"); + function s(e) { + o.call(this, "mont", e), + (this.a = new n(e.a, 16).toRed(this.red)), + (this.b = new n(e.b, 16).toRed(this.red)), + (this.i4 = new n(4).toRed(this.red).redInvm()), + (this.two = new n(2).toRed(this.red)), + (this.a24 = this.i4.redMul(this.a.redAdd(this.two))); + } + function f(e, t, r) { + o.BasePoint.call(this, e, "projective"), + null === t && null === r + ? ((this.x = this.curve.one), (this.z = this.curve.zero)) + : ((this.x = new n(t, 16)), + (this.z = new n(r, 16)), + this.x.red || (this.x = this.x.toRed(this.curve.red)), + this.z.red || (this.z = this.z.toRed(this.curve.red))); + } + i(s, o), + (t.exports = s), + (s.prototype.validate = function (e) { + var t = e.normalize().x, + r = t.redSqr(), + n = r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t); + return 0 === n.redSqrt().redSqr().cmp(n); + }), + i(f, o.BasePoint), + (s.prototype.decodePoint = function (e, t) { + return this.point(a.toArray(e, t), 1); + }), + (s.prototype.point = function (e, t) { + return new f(this, e, t); + }), + (s.prototype.pointFromJSON = function (e) { + return f.fromJSON(this, e); + }), + (f.prototype.precompute = function () {}), + (f.prototype._encode = function () { + return this.getX().toArray("be", this.curve.p.byteLength()); + }), + (f.fromJSON = function (e, t) { + return new f(e, t[0], t[1] || e.one); + }), + (f.prototype.inspect = function () { + return this.isInfinity() + ? "" + : ""; + }), + (f.prototype.isInfinity = function () { + return 0 === this.z.cmpn(0); + }), + (f.prototype.dbl = function () { + var e = this.x.redAdd(this.z).redSqr(), + t = this.x.redSub(this.z).redSqr(), + r = e.redSub(t), + n = e.redMul(t), + i = r.redMul(t.redAdd(this.curve.a24.redMul(r))); + return this.curve.point(n, i); + }), + (f.prototype.add = function () { + throw new Error("Not supported on Montgomery curve"); + }), + (f.prototype.diffAdd = function (e, t) { + var r = this.x.redAdd(this.z), + n = this.x.redSub(this.z), + i = e.x.redAdd(e.z), + o = e.x.redSub(e.z).redMul(r), + a = i.redMul(n), + s = t.z.redMul(o.redAdd(a).redSqr()), + f = t.x.redMul(o.redISub(a).redSqr()); + return this.curve.point(s, f); + }), + (f.prototype.mul = function (e) { + for ( + var t = e.clone(), + r = this, + n = this.curve.point(null, null), + i = []; + 0 !== t.cmpn(0); + t.iushrn(1) + ) + i.push(t.andln(1)); + for (var o = i.length - 1; o >= 0; o--) + 0 === i[o] + ? ((r = r.diffAdd(n, this)), (n = n.dbl())) + : ((n = r.diffAdd(n, this)), (r = r.dbl())); + return n; + }), + (f.prototype.mulAdd = function () { + throw new Error("Not supported on Montgomery curve"); + }), + (f.prototype.jumlAdd = function () { + throw new Error("Not supported on Montgomery curve"); + }), + (f.prototype.eq = function (e) { + return 0 === this.getX().cmp(e.getX()); + }), + (f.prototype.normalize = function () { + return ( + (this.x = this.x.redMul(this.z.redInvm())), + (this.z = this.curve.one), + this + ); + }), + (f.prototype.getX = function () { + return this.normalize(), this.x.fromRed(); + }); + }, + { "../utils": 108, "./base": 95, "bn.js": 44, inherits: 127 }, + ], + 99: [ + function (e, t, r) { + "use strict"; + var n = e("../utils"), + i = e("bn.js"), + o = e("inherits"), + a = e("./base"), + s = n.assert; + function f(e) { + a.call(this, "short", e), + (this.a = new i(e.a, 16).toRed(this.red)), + (this.b = new i(e.b, 16).toRed(this.red)), + (this.tinv = this.two.redInvm()), + (this.zeroA = 0 === this.a.fromRed().cmpn(0)), + (this.threeA = 0 === this.a.fromRed().sub(this.p).cmpn(-3)), + (this.endo = this._getEndomorphism(e)), + (this._endoWnafT1 = new Array(4)), + (this._endoWnafT2 = new Array(4)); + } + function c(e, t, r, n) { + a.BasePoint.call(this, e, "affine"), + null === t && null === r + ? ((this.x = null), (this.y = null), (this.inf = !0)) + : ((this.x = new i(t, 16)), + (this.y = new i(r, 16)), + n && + (this.x.forceRed(this.curve.red), + this.y.forceRed(this.curve.red)), + this.x.red || (this.x = this.x.toRed(this.curve.red)), + this.y.red || (this.y = this.y.toRed(this.curve.red)), + (this.inf = !1)); + } + function u(e, t, r, n) { + a.BasePoint.call(this, e, "jacobian"), + null === t && null === r && null === n + ? ((this.x = this.curve.one), + (this.y = this.curve.one), + (this.z = new i(0))) + : ((this.x = new i(t, 16)), + (this.y = new i(r, 16)), + (this.z = new i(n, 16))), + this.x.red || (this.x = this.x.toRed(this.curve.red)), + this.y.red || (this.y = this.y.toRed(this.curve.red)), + this.z.red || (this.z = this.z.toRed(this.curve.red)), + (this.zOne = this.z === this.curve.one); + } + o(f, a), + (t.exports = f), + (f.prototype._getEndomorphism = function (e) { + if (this.zeroA && this.g && this.n && 1 === this.p.modn(3)) { + var t, r; + if (e.beta) t = new i(e.beta, 16).toRed(this.red); + else { + var n = this._getEndoRoots(this.p); + t = (t = n[0].cmp(n[1]) < 0 ? n[0] : n[1]).toRed(this.red); + } + if (e.lambda) r = new i(e.lambda, 16); + else { + var o = this._getEndoRoots(this.n); + 0 === this.g.mul(o[0]).x.cmp(this.g.x.redMul(t)) + ? (r = o[0]) + : ((r = o[1]), + s(0 === this.g.mul(r).x.cmp(this.g.x.redMul(t)))); + } + return { + beta: t, + lambda: r, + basis: e.basis + ? e.basis.map(function (e) { + return { a: new i(e.a, 16), b: new i(e.b, 16) }; + }) + : this._getEndoBasis(r), + }; + } + }), + (f.prototype._getEndoRoots = function (e) { + var t = e === this.p ? this.red : i.mont(e), + r = new i(2).toRed(t).redInvm(), + n = r.redNeg(), + o = new i(3).toRed(t).redNeg().redSqrt().redMul(r); + return [n.redAdd(o).fromRed(), n.redSub(o).fromRed()]; + }), + (f.prototype._getEndoBasis = function (e) { + for ( + var t, + r, + n, + o, + a, + s, + f, + c, + u, + h = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), + d = e, + l = this.n.clone(), + p = new i(1), + b = new i(0), + y = new i(0), + m = new i(1), + v = 0; + 0 !== d.cmpn(0); + + ) { + var g = l.div(d); + (c = l.sub(g.mul(d))), (u = y.sub(g.mul(p))); + var w = m.sub(g.mul(b)); + if (!n && c.cmp(h) < 0) + (t = f.neg()), (r = p), (n = c.neg()), (o = u); + else if (n && 2 == ++v) break; + (f = c), (l = d), (d = c), (y = p), (p = u), (m = b), (b = w); + } + (a = c.neg()), (s = u); + var _ = n.sqr().add(o.sqr()); + return ( + a.sqr().add(s.sqr()).cmp(_) >= 0 && ((a = t), (s = r)), + n.negative && ((n = n.neg()), (o = o.neg())), + a.negative && ((a = a.neg()), (s = s.neg())), + [ + { a: n, b: o }, + { a: a, b: s }, + ] + ); + }), + (f.prototype._endoSplit = function (e) { + var t = this.endo.basis, + r = t[0], + n = t[1], + i = n.b.mul(e).divRound(this.n), + o = r.b.neg().mul(e).divRound(this.n), + a = i.mul(r.a), + s = o.mul(n.a), + f = i.mul(r.b), + c = o.mul(n.b); + return { k1: e.sub(a).sub(s), k2: f.add(c).neg() }; + }), + (f.prototype.pointFromX = function (e, t) { + (e = new i(e, 16)).red || (e = e.toRed(this.red)); + var r = e + .redSqr() + .redMul(e) + .redIAdd(e.redMul(this.a)) + .redIAdd(this.b), + n = r.redSqrt(); + if (0 !== n.redSqr().redSub(r).cmp(this.zero)) + throw new Error("invalid point"); + var o = n.fromRed().isOdd(); + return ( + ((t && !o) || (!t && o)) && (n = n.redNeg()), this.point(e, n) + ); + }), + (f.prototype.validate = function (e) { + if (e.inf) return !0; + var t = e.x, + r = e.y, + n = this.a.redMul(t), + i = t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b); + return 0 === r.redSqr().redISub(i).cmpn(0); + }), + (f.prototype._endoWnafMulAdd = function (e, t, r) { + for ( + var n = this._endoWnafT1, i = this._endoWnafT2, o = 0; + o < e.length; + o++ + ) { + var a = this._endoSplit(t[o]), + s = e[o], + f = s._getBeta(); + a.k1.negative && (a.k1.ineg(), (s = s.neg(!0))), + a.k2.negative && (a.k2.ineg(), (f = f.neg(!0))), + (n[2 * o] = s), + (n[2 * o + 1] = f), + (i[2 * o] = a.k1), + (i[2 * o + 1] = a.k2); + } + for ( + var c = this._wnafMulAdd(1, n, i, 2 * o, r), u = 0; + u < 2 * o; + u++ + ) + (n[u] = null), (i[u] = null); + return c; + }), + o(c, a.BasePoint), + (f.prototype.point = function (e, t, r) { + return new c(this, e, t, r); + }), + (f.prototype.pointFromJSON = function (e, t) { + return c.fromJSON(this, e, t); + }), + (c.prototype._getBeta = function () { + if (this.curve.endo) { + var e = this.precomputed; + if (e && e.beta) return e.beta; + var t = this.curve.point( + this.x.redMul(this.curve.endo.beta), + this.y, + ); + if (e) { + var r = this.curve, + n = function (e) { + return r.point(e.x.redMul(r.endo.beta), e.y); + }; + (e.beta = t), + (t.precomputed = { + beta: null, + naf: e.naf && { + wnd: e.naf.wnd, + points: e.naf.points.map(n), + }, + doubles: e.doubles && { + step: e.doubles.step, + points: e.doubles.points.map(n), + }, + }); + } + return t; + } + }), + (c.prototype.toJSON = function () { + return this.precomputed + ? [ + this.x, + this.y, + this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1), + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1), + }, + }, + ] + : [this.x, this.y]; + }), + (c.fromJSON = function (e, t, r) { + "string" == typeof t && (t = JSON.parse(t)); + var n = e.point(t[0], t[1], r); + if (!t[2]) return n; + function i(t) { + return e.point(t[0], t[1], r); + } + var o = t[2]; + return ( + (n.precomputed = { + beta: null, + doubles: o.doubles && { + step: o.doubles.step, + points: [n].concat(o.doubles.points.map(i)), + }, + naf: o.naf && { + wnd: o.naf.wnd, + points: [n].concat(o.naf.points.map(i)), + }, + }), + n + ); + }), + (c.prototype.inspect = function () { + return this.isInfinity() + ? "" + : ""; + }), + (c.prototype.isInfinity = function () { + return this.inf; + }), + (c.prototype.add = function (e) { + if (this.inf) return e; + if (e.inf) return this; + if (this.eq(e)) return this.dbl(); + if (this.neg().eq(e)) return this.curve.point(null, null); + if (0 === this.x.cmp(e.x)) return this.curve.point(null, null); + var t = this.y.redSub(e.y); + 0 !== t.cmpn(0) && (t = t.redMul(this.x.redSub(e.x).redInvm())); + var r = t.redSqr().redISub(this.x).redISub(e.x), + n = t.redMul(this.x.redSub(r)).redISub(this.y); + return this.curve.point(r, n); + }), + (c.prototype.dbl = function () { + if (this.inf) return this; + var e = this.y.redAdd(this.y); + if (0 === e.cmpn(0)) return this.curve.point(null, null); + var t = this.curve.a, + r = this.x.redSqr(), + n = e.redInvm(), + i = r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n), + o = i.redSqr().redISub(this.x.redAdd(this.x)), + a = i.redMul(this.x.redSub(o)).redISub(this.y); + return this.curve.point(o, a); + }), + (c.prototype.getX = function () { + return this.x.fromRed(); + }), + (c.prototype.getY = function () { + return this.y.fromRed(); + }), + (c.prototype.mul = function (e) { + return ( + (e = new i(e, 16)), + this._hasDoubles(e) + ? this.curve._fixedNafMul(this, e) + : this.curve.endo + ? this.curve._endoWnafMulAdd([this], [e]) + : this.curve._wnafMul(this, e) + ); + }), + (c.prototype.mulAdd = function (e, t, r) { + var n = [this, t], + i = [e, r]; + return this.curve.endo + ? this.curve._endoWnafMulAdd(n, i) + : this.curve._wnafMulAdd(1, n, i, 2); + }), + (c.prototype.jmulAdd = function (e, t, r) { + var n = [this, t], + i = [e, r]; + return this.curve.endo + ? this.curve._endoWnafMulAdd(n, i, !0) + : this.curve._wnafMulAdd(1, n, i, 2, !0); + }), + (c.prototype.eq = function (e) { + return ( + this === e || + (this.inf === e.inf && + (this.inf || + (0 === this.x.cmp(e.x) && 0 === this.y.cmp(e.y)))) + ); + }), + (c.prototype.neg = function (e) { + if (this.inf) return this; + var t = this.curve.point(this.x, this.y.redNeg()); + if (e && this.precomputed) { + var r = this.precomputed, + n = function (e) { + return e.neg(); + }; + t.precomputed = { + naf: r.naf && { wnd: r.naf.wnd, points: r.naf.points.map(n) }, + doubles: r.doubles && { + step: r.doubles.step, + points: r.doubles.points.map(n), + }, + }; + } + return t; + }), + (c.prototype.toJ = function () { + return this.inf + ? this.curve.jpoint(null, null, null) + : this.curve.jpoint(this.x, this.y, this.curve.one); + }), + o(u, a.BasePoint), + (f.prototype.jpoint = function (e, t, r) { + return new u(this, e, t, r); + }), + (u.prototype.toP = function () { + if (this.isInfinity()) return this.curve.point(null, null); + var e = this.z.redInvm(), + t = e.redSqr(), + r = this.x.redMul(t), + n = this.y.redMul(t).redMul(e); + return this.curve.point(r, n); + }), + (u.prototype.neg = function () { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z); + }), + (u.prototype.add = function (e) { + if (this.isInfinity()) return e; + if (e.isInfinity()) return this; + var t = e.z.redSqr(), + r = this.z.redSqr(), + n = this.x.redMul(t), + i = e.x.redMul(r), + o = this.y.redMul(t.redMul(e.z)), + a = e.y.redMul(r.redMul(this.z)), + s = n.redSub(i), + f = o.redSub(a); + if (0 === s.cmpn(0)) + return 0 !== f.cmpn(0) + ? this.curve.jpoint(null, null, null) + : this.dbl(); + var c = s.redSqr(), + u = c.redMul(s), + h = n.redMul(c), + d = f.redSqr().redIAdd(u).redISub(h).redISub(h), + l = f.redMul(h.redISub(d)).redISub(o.redMul(u)), + p = this.z.redMul(e.z).redMul(s); + return this.curve.jpoint(d, l, p); + }), + (u.prototype.mixedAdd = function (e) { + if (this.isInfinity()) return e.toJ(); + if (e.isInfinity()) return this; + var t = this.z.redSqr(), + r = this.x, + n = e.x.redMul(t), + i = this.y, + o = e.y.redMul(t).redMul(this.z), + a = r.redSub(n), + s = i.redSub(o); + if (0 === a.cmpn(0)) + return 0 !== s.cmpn(0) + ? this.curve.jpoint(null, null, null) + : this.dbl(); + var f = a.redSqr(), + c = f.redMul(a), + u = r.redMul(f), + h = s.redSqr().redIAdd(c).redISub(u).redISub(u), + d = s.redMul(u.redISub(h)).redISub(i.redMul(c)), + l = this.z.redMul(a); + return this.curve.jpoint(h, d, l); + }), + (u.prototype.dblp = function (e) { + if (0 === e) return this; + if (this.isInfinity()) return this; + if (!e) return this.dbl(); + if (this.curve.zeroA || this.curve.threeA) { + for (var t = this, r = 0; r < e; r++) t = t.dbl(); + return t; + } + var n = this.curve.a, + i = this.curve.tinv, + o = this.x, + a = this.y, + s = this.z, + f = s.redSqr().redSqr(), + c = a.redAdd(a); + for (r = 0; r < e; r++) { + var u = o.redSqr(), + h = c.redSqr(), + d = h.redSqr(), + l = u.redAdd(u).redIAdd(u).redIAdd(n.redMul(f)), + p = o.redMul(h), + b = l.redSqr().redISub(p.redAdd(p)), + y = p.redISub(b), + m = l.redMul(y); + m = m.redIAdd(m).redISub(d); + var v = c.redMul(s); + r + 1 < e && (f = f.redMul(d)), (o = b), (s = v), (c = m); + } + return this.curve.jpoint(o, c.redMul(i), s); + }), + (u.prototype.dbl = function () { + return this.isInfinity() + ? this + : this.curve.zeroA + ? this._zeroDbl() + : this.curve.threeA + ? this._threeDbl() + : this._dbl(); + }), + (u.prototype._zeroDbl = function () { + var e, t, r; + if (this.zOne) { + var n = this.x.redSqr(), + i = this.y.redSqr(), + o = i.redSqr(), + a = this.x.redAdd(i).redSqr().redISub(n).redISub(o); + a = a.redIAdd(a); + var s = n.redAdd(n).redIAdd(n), + f = s.redSqr().redISub(a).redISub(a), + c = o.redIAdd(o); + (c = (c = c.redIAdd(c)).redIAdd(c)), + (e = f), + (t = s.redMul(a.redISub(f)).redISub(c)), + (r = this.y.redAdd(this.y)); + } else { + var u = this.x.redSqr(), + h = this.y.redSqr(), + d = h.redSqr(), + l = this.x.redAdd(h).redSqr().redISub(u).redISub(d); + l = l.redIAdd(l); + var p = u.redAdd(u).redIAdd(u), + b = p.redSqr(), + y = d.redIAdd(d); + (y = (y = y.redIAdd(y)).redIAdd(y)), + (e = b.redISub(l).redISub(l)), + (t = p.redMul(l.redISub(e)).redISub(y)), + (r = (r = this.y.redMul(this.z)).redIAdd(r)); + } + return this.curve.jpoint(e, t, r); + }), + (u.prototype._threeDbl = function () { + var e, t, r; + if (this.zOne) { + var n = this.x.redSqr(), + i = this.y.redSqr(), + o = i.redSqr(), + a = this.x.redAdd(i).redSqr().redISub(n).redISub(o); + a = a.redIAdd(a); + var s = n.redAdd(n).redIAdd(n).redIAdd(this.curve.a), + f = s.redSqr().redISub(a).redISub(a); + e = f; + var c = o.redIAdd(o); + (c = (c = c.redIAdd(c)).redIAdd(c)), + (t = s.redMul(a.redISub(f)).redISub(c)), + (r = this.y.redAdd(this.y)); + } else { + var u = this.z.redSqr(), + h = this.y.redSqr(), + d = this.x.redMul(h), + l = this.x.redSub(u).redMul(this.x.redAdd(u)); + l = l.redAdd(l).redIAdd(l); + var p = d.redIAdd(d), + b = (p = p.redIAdd(p)).redAdd(p); + (e = l.redSqr().redISub(b)), + (r = this.y.redAdd(this.z).redSqr().redISub(h).redISub(u)); + var y = h.redSqr(); + (y = (y = (y = y.redIAdd(y)).redIAdd(y)).redIAdd(y)), + (t = l.redMul(p.redISub(e)).redISub(y)); + } + return this.curve.jpoint(e, t, r); + }), + (u.prototype._dbl = function () { + var e = this.curve.a, + t = this.x, + r = this.y, + n = this.z, + i = n.redSqr().redSqr(), + o = t.redSqr(), + a = r.redSqr(), + s = o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)), + f = t.redAdd(t), + c = (f = f.redIAdd(f)).redMul(a), + u = s.redSqr().redISub(c.redAdd(c)), + h = c.redISub(u), + d = a.redSqr(); + d = (d = (d = d.redIAdd(d)).redIAdd(d)).redIAdd(d); + var l = s.redMul(h).redISub(d), + p = r.redAdd(r).redMul(n); + return this.curve.jpoint(u, l, p); + }), + (u.prototype.trpl = function () { + if (!this.curve.zeroA) return this.dbl().add(this); + var e = this.x.redSqr(), + t = this.y.redSqr(), + r = this.z.redSqr(), + n = t.redSqr(), + i = e.redAdd(e).redIAdd(e), + o = i.redSqr(), + a = this.x.redAdd(t).redSqr().redISub(e).redISub(n), + s = (a = (a = (a = a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub( + o, + )).redSqr(), + f = n.redIAdd(n); + f = (f = (f = f.redIAdd(f)).redIAdd(f)).redIAdd(f); + var c = i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(f), + u = t.redMul(c); + u = (u = u.redIAdd(u)).redIAdd(u); + var h = this.x.redMul(s).redISub(u); + h = (h = h.redIAdd(h)).redIAdd(h); + var d = this.y.redMul( + c.redMul(f.redISub(c)).redISub(a.redMul(s)), + ); + d = (d = (d = d.redIAdd(d)).redIAdd(d)).redIAdd(d); + var l = this.z.redAdd(a).redSqr().redISub(r).redISub(s); + return this.curve.jpoint(h, d, l); + }), + (u.prototype.mul = function (e, t) { + return (e = new i(e, t)), this.curve._wnafMul(this, e); + }), + (u.prototype.eq = function (e) { + if ("affine" === e.type) return this.eq(e.toJ()); + if (this === e) return !0; + var t = this.z.redSqr(), + r = e.z.redSqr(); + if (0 !== this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)) + return !1; + var n = t.redMul(this.z), + i = r.redMul(e.z); + return 0 === this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0); + }), + (u.prototype.eqXToP = function (e) { + var t = this.z.redSqr(), + r = e.toRed(this.curve.red).redMul(t); + if (0 === this.x.cmp(r)) return !0; + for (var n = e.clone(), i = this.curve.redN.redMul(t); ; ) { + if ((n.iadd(this.curve.n), n.cmp(this.curve.p) >= 0)) return !1; + if ((r.redIAdd(i), 0 === this.x.cmp(r))) return !0; + } + }), + (u.prototype.inspect = function () { + return this.isInfinity() + ? "" + : ""; + }), + (u.prototype.isInfinity = function () { + return 0 === this.z.cmpn(0); + }); + }, + { "../utils": 108, "./base": 95, "bn.js": 44, inherits: 127 }, + ], + 100: [ + function (e, t, r) { + "use strict"; + var n, + i = r, + o = e("hash.js"), + a = e("./curve"), + s = e("./utils").assert; + function f(e) { + "short" === e.type + ? (this.curve = new a.short(e)) + : "edwards" === e.type + ? (this.curve = new a.edwards(e)) + : (this.curve = new a.mont(e)), + (this.g = this.curve.g), + (this.n = this.curve.n), + (this.hash = e.hash), + s(this.g.validate(), "Invalid curve"), + s(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O"); + } + function c(e, t) { + Object.defineProperty(i, e, { + configurable: !0, + enumerable: !0, + get: function () { + var r = new f(t); + return ( + Object.defineProperty(i, e, { + configurable: !0, + enumerable: !0, + value: r, + }), + r + ); + }, + }); + } + (i.PresetCurve = f), + c("p192", { + type: "short", + prime: "p192", + p: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff", + a: "ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc", + b: "64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1", + n: "ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831", + hash: o.sha256, + gRed: !1, + g: [ + "188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012", + "07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811", + ], + }), + c("p224", { + type: "short", + prime: "p224", + p: "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001", + a: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe", + b: "b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4", + n: "ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d", + hash: o.sha256, + gRed: !1, + g: [ + "b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21", + "bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34", + ], + }), + c("p256", { + type: "short", + prime: null, + p: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff", + a: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc", + b: "5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b", + n: "ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551", + hash: o.sha256, + gRed: !1, + g: [ + "6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296", + "4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5", + ], + }), + c("p384", { + type: "short", + prime: null, + p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff", + a: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc", + b: "b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef", + n: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973", + hash: o.sha384, + gRed: !1, + g: [ + "aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7", + "3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f", + ], + }), + c("p521", { + type: "short", + prime: null, + p: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff", + a: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc", + b: "00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00", + n: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409", + hash: o.sha512, + gRed: !1, + g: [ + "000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66", + "00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650", + ], + }), + c("curve25519", { + type: "mont", + prime: "p25519", + p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed", + a: "76d06", + b: "1", + n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed", + hash: o.sha256, + gRed: !1, + g: ["9"], + }), + c("ed25519", { + type: "edwards", + prime: "p25519", + p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed", + a: "-1", + c: "1", + d: "52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3", + n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed", + hash: o.sha256, + gRed: !1, + g: [ + "216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a", + "6666666666666666666666666666666666666666666666666666666666666658", + ], + }); + try { + n = e("./precomputed/secp256k1"); + } catch (e) { + n = void 0; + } + c("secp256k1", { + type: "short", + prime: "k256", + p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f", + a: "0", + b: "7", + n: "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141", + h: "1", + hash: o.sha256, + beta: "7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee", + lambda: + "5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72", + basis: [ + { + a: "3086d221a7d46bcde86c90e49284eb15", + b: "-e4437ed6010e88286f547fa90abfe4c3", + }, + { + a: "114ca50f7a8e2f3f657c1108d9d44cfd8", + b: "3086d221a7d46bcde86c90e49284eb15", + }, + ], + gRed: !1, + g: [ + "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", + "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", + n, + ], + }); + }, + { + "./curve": 97, + "./precomputed/secp256k1": 107, + "./utils": 108, + "hash.js": 113, + }, + ], + 101: [ + function (e, t, r) { + "use strict"; + var n = e("bn.js"), + i = e("hmac-drbg"), + o = e("../utils"), + a = e("../curves"), + s = e("brorand"), + f = o.assert, + c = e("./key"), + u = e("./signature"); + function h(e) { + if (!(this instanceof h)) return new h(e); + "string" == typeof e && + (f(a.hasOwnProperty(e), "Unknown curve " + e), (e = a[e])), + e instanceof a.PresetCurve && (e = { curve: e }), + (this.curve = e.curve.curve), + (this.n = this.curve.n), + (this.nh = this.n.ushrn(1)), + (this.g = this.curve.g), + (this.g = e.curve.g), + this.g.precompute(e.curve.n.bitLength() + 1), + (this.hash = e.hash || e.curve.hash); + } + (t.exports = h), + (h.prototype.keyPair = function (e) { + return new c(this, e); + }), + (h.prototype.keyFromPrivate = function (e, t) { + return c.fromPrivate(this, e, t); + }), + (h.prototype.keyFromPublic = function (e, t) { + return c.fromPublic(this, e, t); + }), + (h.prototype.genKeyPair = function (e) { + e || (e = {}); + for ( + var t = new i({ + hash: this.hash, + pers: e.pers, + persEnc: e.persEnc || "utf8", + entropy: e.entropy || s(this.hash.hmacStrength), + entropyEnc: (e.entropy && e.entropyEnc) || "utf8", + nonce: this.n.toArray(), + }), + r = this.n.byteLength(), + o = this.n.sub(new n(2)); + ; + + ) { + var a = new n(t.generate(r)); + if (!(a.cmp(o) > 0)) return a.iaddn(1), this.keyFromPrivate(a); + } + }), + (h.prototype._truncateToN = function (e, t) { + var r = 8 * e.byteLength() - this.n.bitLength(); + return ( + r > 0 && (e = e.ushrn(r)), + !t && e.cmp(this.n) >= 0 ? e.sub(this.n) : e + ); + }), + (h.prototype.sign = function (e, t, r, o) { + "object" == typeof r && ((o = r), (r = null)), + o || (o = {}), + (t = this.keyFromPrivate(t, r)), + (e = this._truncateToN(new n(e, 16))); + for ( + var a = this.n.byteLength(), + s = t.getPrivate().toArray("be", a), + f = e.toArray("be", a), + c = new i({ + hash: this.hash, + entropy: s, + nonce: f, + pers: o.pers, + persEnc: o.persEnc || "utf8", + }), + h = this.n.sub(new n(1)), + d = 0; + ; + d++ + ) { + var l = o.k ? o.k(d) : new n(c.generate(this.n.byteLength())); + if ( + !( + (l = this._truncateToN(l, !0)).cmpn(1) <= 0 || l.cmp(h) >= 0 + ) + ) { + var p = this.g.mul(l); + if (!p.isInfinity()) { + var b = p.getX(), + y = b.umod(this.n); + if (0 !== y.cmpn(0)) { + var m = l.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e)); + if (0 !== (m = m.umod(this.n)).cmpn(0)) { + var v = + (p.getY().isOdd() ? 1 : 0) | (0 !== b.cmp(y) ? 2 : 0); + return ( + o.canonical && + m.cmp(this.nh) > 0 && + ((m = this.n.sub(m)), (v ^= 1)), + new u({ r: y, s: m, recoveryParam: v }) + ); + } + } + } + } + } + }), + (h.prototype.verify = function (e, t, r, i) { + (e = this._truncateToN(new n(e, 16))), + (r = this.keyFromPublic(r, i)); + var o = (t = new u(t, "hex")).r, + a = t.s; + if (o.cmpn(1) < 0 || o.cmp(this.n) >= 0) return !1; + if (a.cmpn(1) < 0 || a.cmp(this.n) >= 0) return !1; + var s, + f = a.invm(this.n), + c = f.mul(e).umod(this.n), + h = f.mul(o).umod(this.n); + return this.curve._maxwellTrick + ? !(s = this.g.jmulAdd(c, r.getPublic(), h)).isInfinity() && + s.eqXToP(o) + : !(s = this.g.mulAdd(c, r.getPublic(), h)).isInfinity() && + 0 === s.getX().umod(this.n).cmp(o); + }), + (h.prototype.recoverPubKey = function (e, t, r, i) { + f((3 & r) === r, "The recovery param is more than two bits"), + (t = new u(t, i)); + var o = this.n, + a = new n(e), + s = t.r, + c = t.s, + h = 1 & r, + d = r >> 1; + if (s.cmp(this.curve.p.umod(this.curve.n)) >= 0 && d) + throw new Error("Unable to find sencond key candinate"); + s = d + ? this.curve.pointFromX(s.add(this.curve.n), h) + : this.curve.pointFromX(s, h); + var l = t.r.invm(o), + p = o.sub(a).mul(l).umod(o), + b = c.mul(l).umod(o); + return this.g.mulAdd(p, s, b); + }), + (h.prototype.getKeyRecoveryParam = function (e, t, r, n) { + if (null !== (t = new u(t, n)).recoveryParam) + return t.recoveryParam; + for (var i = 0; i < 4; i++) { + var o; + try { + o = this.recoverPubKey(e, t, i); + } catch (e) { + continue; + } + if (o.eq(r)) return i; + } + throw new Error("Unable to find valid recovery factor"); + }); + }, + { + "../curves": 100, + "../utils": 108, + "./key": 102, + "./signature": 103, + "bn.js": 44, + brorand: 45, + "hmac-drbg": 125, + }, + ], + 102: [ + function (e, t, r) { + "use strict"; + var n = e("bn.js"), + i = e("../utils").assert; + function o(e, t) { + (this.ec = e), + (this.priv = null), + (this.pub = null), + t.priv && this._importPrivate(t.priv, t.privEnc), + t.pub && this._importPublic(t.pub, t.pubEnc); + } + (t.exports = o), + (o.fromPublic = function (e, t, r) { + return t instanceof o ? t : new o(e, { pub: t, pubEnc: r }); + }), + (o.fromPrivate = function (e, t, r) { + return t instanceof o ? t : new o(e, { priv: t, privEnc: r }); + }), + (o.prototype.validate = function () { + var e = this.getPublic(); + return e.isInfinity() + ? { result: !1, reason: "Invalid public key" } + : e.validate() + ? e.mul(this.ec.curve.n).isInfinity() + ? { result: !0, reason: null } + : { result: !1, reason: "Public key * N != O" } + : { result: !1, reason: "Public key is not a point" }; + }), + (o.prototype.getPublic = function (e, t) { + return ( + "string" == typeof e && ((t = e), (e = null)), + this.pub || (this.pub = this.ec.g.mul(this.priv)), + t ? this.pub.encode(t, e) : this.pub + ); + }), + (o.prototype.getPrivate = function (e) { + return "hex" === e ? this.priv.toString(16, 2) : this.priv; + }), + (o.prototype._importPrivate = function (e, t) { + (this.priv = new n(e, t || 16)), + (this.priv = this.priv.umod(this.ec.curve.n)); + }), + (o.prototype._importPublic = function (e, t) { + if (e.x || e.y) + return ( + "mont" === this.ec.curve.type + ? i(e.x, "Need x coordinate") + : ("short" !== this.ec.curve.type && + "edwards" !== this.ec.curve.type) || + i(e.x && e.y, "Need both x and y coordinate"), + void (this.pub = this.ec.curve.point(e.x, e.y)) + ); + this.pub = this.ec.curve.decodePoint(e, t); + }), + (o.prototype.derive = function (e) { + return e.mul(this.priv).getX(); + }), + (o.prototype.sign = function (e, t, r) { + return this.ec.sign(e, this, t, r); + }), + (o.prototype.verify = function (e, t) { + return this.ec.verify(e, t, this); + }), + (o.prototype.inspect = function () { + return ( + "" + ); + }); + }, + { "../utils": 108, "bn.js": 44 }, + ], + 103: [ + function (e, t, r) { + "use strict"; + var n = e("bn.js"), + i = e("../utils"), + o = i.assert; + function a(e, t) { + if (e instanceof a) return e; + this._importDER(e, t) || + (o(e.r && e.s, "Signature without r or s"), + (this.r = new n(e.r, 16)), + (this.s = new n(e.s, 16)), + void 0 === e.recoveryParam + ? (this.recoveryParam = null) + : (this.recoveryParam = e.recoveryParam)); + } + function s() { + this.place = 0; + } + function f(e, t) { + var r = e[t.place++]; + if (!(128 & r)) return r; + for (var n = 15 & r, i = 0, o = 0, a = t.place; o < n; o++, a++) + (i <<= 8), (i |= e[a]); + return (t.place = a), i; + } + function c(e) { + for ( + var t = 0, r = e.length - 1; + !e[t] && !(128 & e[t + 1]) && t < r; + + ) + t++; + return 0 === t ? e : e.slice(t); + } + function u(e, t) { + if (t < 128) e.push(t); + else { + var r = 1 + ((Math.log(t) / Math.LN2) >>> 3); + for (e.push(128 | r); --r; ) e.push((t >>> (r << 3)) & 255); + e.push(t); + } + } + (t.exports = a), + (a.prototype._importDER = function (e, t) { + e = i.toArray(e, t); + var r = new s(); + if (48 !== e[r.place++]) return !1; + if (f(e, r) + r.place !== e.length) return !1; + if (2 !== e[r.place++]) return !1; + var o = f(e, r), + a = e.slice(r.place, o + r.place); + if (((r.place += o), 2 !== e[r.place++])) return !1; + var c = f(e, r); + if (e.length !== c + r.place) return !1; + var u = e.slice(r.place, c + r.place); + return ( + 0 === a[0] && 128 & a[1] && (a = a.slice(1)), + 0 === u[0] && 128 & u[1] && (u = u.slice(1)), + (this.r = new n(a)), + (this.s = new n(u)), + (this.recoveryParam = null), + !0 + ); + }), + (a.prototype.toDER = function (e) { + var t = this.r.toArray(), + r = this.s.toArray(); + for ( + 128 & t[0] && (t = [0].concat(t)), + 128 & r[0] && (r = [0].concat(r)), + t = c(t), + r = c(r); + !(r[0] || 128 & r[1]); + + ) + r = r.slice(1); + var n = [2]; + u(n, t.length), (n = n.concat(t)).push(2), u(n, r.length); + var o = n.concat(r), + a = [48]; + return u(a, o.length), (a = a.concat(o)), i.encode(a, e); + }); + }, + { "../utils": 108, "bn.js": 44 }, + ], + 104: [ + function (e, t, r) { + "use strict"; + var n = e("hash.js"), + i = e("../curves"), + o = e("../utils"), + a = o.assert, + s = o.parseBytes, + f = e("./key"), + c = e("./signature"); + function u(e) { + if ( + (a("ed25519" === e, "only tested with ed25519 so far"), + !(this instanceof u)) + ) + return new u(e); + e = i[e].curve; + (this.curve = e), + (this.g = e.g), + this.g.precompute(e.n.bitLength() + 1), + (this.pointClass = e.point().constructor), + (this.encodingLength = Math.ceil(e.n.bitLength() / 8)), + (this.hash = n.sha512); + } + (t.exports = u), + (u.prototype.sign = function (e, t) { + e = s(e); + var r = this.keyFromSecret(t), + n = this.hashInt(r.messagePrefix(), e), + i = this.g.mul(n), + o = this.encodePoint(i), + a = this.hashInt(o, r.pubBytes(), e).mul(r.priv()), + f = n.add(a).umod(this.curve.n); + return this.makeSignature({ R: i, S: f, Rencoded: o }); + }), + (u.prototype.verify = function (e, t, r) { + (e = s(e)), (t = this.makeSignature(t)); + var n = this.keyFromPublic(r), + i = this.hashInt(t.Rencoded(), n.pubBytes(), e), + o = this.g.mul(t.S()); + return t.R().add(n.pub().mul(i)).eq(o); + }), + (u.prototype.hashInt = function () { + for (var e = this.hash(), t = 0; t < arguments.length; t++) + e.update(arguments[t]); + return o.intFromLE(e.digest()).umod(this.curve.n); + }), + (u.prototype.keyFromPublic = function (e) { + return f.fromPublic(this, e); + }), + (u.prototype.keyFromSecret = function (e) { + return f.fromSecret(this, e); + }), + (u.prototype.makeSignature = function (e) { + return e instanceof c ? e : new c(this, e); + }), + (u.prototype.encodePoint = function (e) { + var t = e.getY().toArray("le", this.encodingLength); + return ( + (t[this.encodingLength - 1] |= e.getX().isOdd() ? 128 : 0), t + ); + }), + (u.prototype.decodePoint = function (e) { + var t = (e = o.parseBytes(e)).length - 1, + r = e.slice(0, t).concat(-129 & e[t]), + n = 0 != (128 & e[t]), + i = o.intFromLE(r); + return this.curve.pointFromY(i, n); + }), + (u.prototype.encodeInt = function (e) { + return e.toArray("le", this.encodingLength); + }), + (u.prototype.decodeInt = function (e) { + return o.intFromLE(e); + }), + (u.prototype.isPoint = function (e) { + return e instanceof this.pointClass; + }); + }, + { + "../curves": 100, + "../utils": 108, + "./key": 105, + "./signature": 106, + "hash.js": 113, + }, + ], + 105: [ + function (e, t, r) { + "use strict"; + var n = e("../utils"), + i = n.assert, + o = n.parseBytes, + a = n.cachedProperty; + function s(e, t) { + (this.eddsa = e), + (this._secret = o(t.secret)), + e.isPoint(t.pub) + ? (this._pub = t.pub) + : (this._pubBytes = o(t.pub)); + } + (s.fromPublic = function (e, t) { + return t instanceof s ? t : new s(e, { pub: t }); + }), + (s.fromSecret = function (e, t) { + return t instanceof s ? t : new s(e, { secret: t }); + }), + (s.prototype.secret = function () { + return this._secret; + }), + a(s, "pubBytes", function () { + return this.eddsa.encodePoint(this.pub()); + }), + a(s, "pub", function () { + return this._pubBytes + ? this.eddsa.decodePoint(this._pubBytes) + : this.eddsa.g.mul(this.priv()); + }), + a(s, "privBytes", function () { + var e = this.eddsa, + t = this.hash(), + r = e.encodingLength - 1, + n = t.slice(0, e.encodingLength); + return (n[0] &= 248), (n[r] &= 127), (n[r] |= 64), n; + }), + a(s, "priv", function () { + return this.eddsa.decodeInt(this.privBytes()); + }), + a(s, "hash", function () { + return this.eddsa.hash().update(this.secret()).digest(); + }), + a(s, "messagePrefix", function () { + return this.hash().slice(this.eddsa.encodingLength); + }), + (s.prototype.sign = function (e) { + return ( + i(this._secret, "KeyPair can only verify"), + this.eddsa.sign(e, this) + ); + }), + (s.prototype.verify = function (e, t) { + return this.eddsa.verify(e, t, this); + }), + (s.prototype.getSecret = function (e) { + return ( + i(this._secret, "KeyPair is public only"), + n.encode(this.secret(), e) + ); + }), + (s.prototype.getPublic = function (e) { + return n.encode(this.pubBytes(), e); + }), + (t.exports = s); + }, + { "../utils": 108 }, + ], + 106: [ + function (e, t, r) { + "use strict"; + var n = e("bn.js"), + i = e("../utils"), + o = i.assert, + a = i.cachedProperty, + s = i.parseBytes; + function f(e, t) { + (this.eddsa = e), + "object" != typeof t && (t = s(t)), + Array.isArray(t) && + (t = { + R: t.slice(0, e.encodingLength), + S: t.slice(e.encodingLength), + }), + o(t.R && t.S, "Signature without R or S"), + e.isPoint(t.R) && (this._R = t.R), + t.S instanceof n && (this._S = t.S), + (this._Rencoded = Array.isArray(t.R) ? t.R : t.Rencoded), + (this._Sencoded = Array.isArray(t.S) ? t.S : t.Sencoded); + } + a(f, "S", function () { + return this.eddsa.decodeInt(this.Sencoded()); + }), + a(f, "R", function () { + return this.eddsa.decodePoint(this.Rencoded()); + }), + a(f, "Rencoded", function () { + return this.eddsa.encodePoint(this.R()); + }), + a(f, "Sencoded", function () { + return this.eddsa.encodeInt(this.S()); + }), + (f.prototype.toBytes = function () { + return this.Rencoded().concat(this.Sencoded()); + }), + (f.prototype.toHex = function () { + return i.encode(this.toBytes(), "hex").toUpperCase(); + }), + (t.exports = f); + }, + { "../utils": 108, "bn.js": 44 }, + ], + 107: [ + function (e, t, r) { + t.exports = { + doubles: { + step: 4, + points: [ + [ + "e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a", + "f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821", + ], + [ + "8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508", + "11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf", + ], + [ + "175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739", + "d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695", + ], + [ + "363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640", + "4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9", + ], + [ + "8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c", + "4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36", + ], + [ + "723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda", + "96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f", + ], + [ + "eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa", + "5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999", + ], + [ + "100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0", + "cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09", + ], + [ + "e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d", + "9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d", + ], + [ + "feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d", + "e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088", + ], + [ + "da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1", + "9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d", + ], + [ + "53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0", + "5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8", + ], + [ + "8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047", + "10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a", + ], + [ + "385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862", + "283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453", + ], + [ + "6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7", + "7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160", + ], + [ + "3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd", + "56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0", + ], + [ + "85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83", + "7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6", + ], + [ + "948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a", + "53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589", + ], + [ + "6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8", + "bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17", + ], + [ + "e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d", + "4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda", + ], + [ + "e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725", + "7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd", + ], + [ + "213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754", + "4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2", + ], + [ + "4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c", + "17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6", + ], + [ + "fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6", + "6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f", + ], + [ + "76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39", + "c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01", + ], + [ + "c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891", + "893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3", + ], + [ + "d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b", + "febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f", + ], + [ + "b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03", + "2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7", + ], + [ + "e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d", + "eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78", + ], + [ + "a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070", + "7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1", + ], + [ + "90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4", + "e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150", + ], + [ + "8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da", + "662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82", + ], + [ + "e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11", + "1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc", + ], + [ + "8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e", + "efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b", + ], + [ + "e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41", + "2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51", + ], + [ + "b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef", + "67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45", + ], + [ + "d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8", + "db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120", + ], + [ + "324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d", + "648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84", + ], + [ + "4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96", + "35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d", + ], + [ + "9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd", + "ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d", + ], + [ + "6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5", + "9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8", + ], + [ + "a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266", + "40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8", + ], + [ + "7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71", + "34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac", + ], + [ + "928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac", + "c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f", + ], + [ + "85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751", + "1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962", + ], + [ + "ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e", + "493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907", + ], + [ + "827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241", + "c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec", + ], + [ + "eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3", + "be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d", + ], + [ + "e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f", + "4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414", + ], + [ + "1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19", + "aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd", + ], + [ + "146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be", + "b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0", + ], + [ + "fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9", + "6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811", + ], + [ + "da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2", + "8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1", + ], + [ + "a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13", + "7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c", + ], + [ + "174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c", + "ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73", + ], + [ + "959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba", + "2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd", + ], + [ + "d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151", + "e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405", + ], + [ + "64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073", + "d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589", + ], + [ + "8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458", + "38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e", + ], + [ + "13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b", + "69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27", + ], + [ + "bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366", + "d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1", + ], + [ + "8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa", + "40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482", + ], + [ + "8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0", + "620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945", + ], + [ + "dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787", + "7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573", + ], + [ + "f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e", + "ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82", + ], + ], + }, + naf: { + wnd: 7, + points: [ + [ + "f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9", + "388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672", + ], + [ + "2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4", + "d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6", + ], + [ + "5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc", + "6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da", + ], + [ + "acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe", + "cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37", + ], + [ + "774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb", + "d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b", + ], + [ + "f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8", + "ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81", + ], + [ + "d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e", + "581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58", + ], + [ + "defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34", + "4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77", + ], + [ + "2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c", + "85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a", + ], + [ + "352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5", + "321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c", + ], + [ + "2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f", + "2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67", + ], + [ + "9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714", + "73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402", + ], + [ + "daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729", + "a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55", + ], + [ + "c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db", + "2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482", + ], + [ + "6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4", + "e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82", + ], + [ + "1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5", + "b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396", + ], + [ + "605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479", + "2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49", + ], + [ + "62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d", + "80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf", + ], + [ + "80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f", + "1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a", + ], + [ + "7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb", + "d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7", + ], + [ + "d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9", + "eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933", + ], + [ + "49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963", + "758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a", + ], + [ + "77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74", + "958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6", + ], + [ + "f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530", + "e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37", + ], + [ + "463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b", + "5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e", + ], + [ + "f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247", + "cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6", + ], + [ + "caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1", + "cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476", + ], + [ + "2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120", + "4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40", + ], + [ + "7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435", + "91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61", + ], + [ + "754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18", + "673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683", + ], + [ + "e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8", + "59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5", + ], + [ + "186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb", + "3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b", + ], + [ + "df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f", + "55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417", + ], + [ + "5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143", + "efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868", + ], + [ + "290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba", + "e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a", + ], + [ + "af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45", + "f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6", + ], + [ + "766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a", + "744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996", + ], + [ + "59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e", + "c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e", + ], + [ + "f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8", + "e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d", + ], + [ + "7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c", + "30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2", + ], + [ + "948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519", + "e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e", + ], + [ + "7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab", + "100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437", + ], + [ + "3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca", + "ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311", + ], + [ + "d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf", + "8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4", + ], + [ + "1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610", + "68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575", + ], + [ + "733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4", + "f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d", + ], + [ + "15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c", + "d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d", + ], + [ + "a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940", + "edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629", + ], + [ + "e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980", + "a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06", + ], + [ + "311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3", + "66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374", + ], + [ + "34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf", + "9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee", + ], + [ + "f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63", + "4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1", + ], + [ + "d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448", + "fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b", + ], + [ + "32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf", + "5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661", + ], + [ + "7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5", + "8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6", + ], + [ + "ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6", + "8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e", + ], + [ + "16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5", + "5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d", + ], + [ + "eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99", + "f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc", + ], + [ + "78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51", + "f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4", + ], + [ + "494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5", + "42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c", + ], + [ + "a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5", + "204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b", + ], + [ + "c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997", + "4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913", + ], + [ + "841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881", + "73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154", + ], + [ + "5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5", + "39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865", + ], + [ + "36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66", + "d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc", + ], + [ + "336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726", + "ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224", + ], + [ + "8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede", + "6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e", + ], + [ + "1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94", + "60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6", + ], + [ + "85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31", + "3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511", + ], + [ + "29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51", + "b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b", + ], + [ + "a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252", + "ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2", + ], + [ + "4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5", + "cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c", + ], + [ + "d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b", + "6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3", + ], + [ + "ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4", + "322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d", + ], + [ + "af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f", + "6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700", + ], + [ + "e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889", + "2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4", + ], + [ + "591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246", + "b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196", + ], + [ + "11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984", + "998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4", + ], + [ + "3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a", + "b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257", + ], + [ + "cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030", + "bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13", + ], + [ + "c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197", + "6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096", + ], + [ + "c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593", + "c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38", + ], + [ + "a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef", + "21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f", + ], + [ + "347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38", + "60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448", + ], + [ + "da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a", + "49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a", + ], + [ + "c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111", + "5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4", + ], + [ + "4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502", + "7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437", + ], + [ + "3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea", + "be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7", + ], + [ + "cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26", + "8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d", + ], + [ + "b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986", + "39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a", + ], + [ + "d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e", + "62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54", + ], + [ + "48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4", + "25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77", + ], + [ + "dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda", + "ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517", + ], + [ + "6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859", + "cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10", + ], + [ + "e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f", + "f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125", + ], + [ + "eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c", + "6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e", + ], + [ + "13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942", + "fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1", + ], + [ + "ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a", + "1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2", + ], + [ + "b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80", + "5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423", + ], + [ + "ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d", + "438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8", + ], + [ + "8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1", + "cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758", + ], + [ + "52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63", + "c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375", + ], + [ + "e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352", + "6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d", + ], + [ + "7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193", + "ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec", + ], + [ + "5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00", + "9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0", + ], + [ + "32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58", + "ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c", + ], + [ + "e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7", + "d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4", + ], + [ + "8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8", + "c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f", + ], + [ + "4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e", + "67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649", + ], + [ + "3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d", + "cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826", + ], + [ + "674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b", + "299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5", + ], + [ + "d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f", + "f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87", + ], + [ + "30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6", + "462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b", + ], + [ + "be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297", + "62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc", + ], + [ + "93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a", + "7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c", + ], + [ + "b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c", + "ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f", + ], + [ + "d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52", + "4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a", + ], + [ + "d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb", + "bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46", + ], + [ + "463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065", + "bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f", + ], + [ + "7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917", + "603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03", + ], + [ + "74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9", + "cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08", + ], + [ + "30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3", + "553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8", + ], + [ + "9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57", + "712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373", + ], + [ + "176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66", + "ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3", + ], + [ + "75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8", + "9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8", + ], + [ + "809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721", + "9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1", + ], + [ + "1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180", + "4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9", + ], + ], + }, + }; + }, + {}, + ], + 108: [ + function (e, t, r) { + "use strict"; + var n = r, + i = e("bn.js"), + o = e("minimalistic-assert"), + a = e("minimalistic-crypto-utils"); + (n.assert = o), + (n.toArray = a.toArray), + (n.zero2 = a.zero2), + (n.toHex = a.toHex), + (n.encode = a.encode), + (n.getNAF = function (e, t) { + for ( + var r = [], n = 1 << (t + 1), i = e.clone(); + i.cmpn(1) >= 0; + + ) { + var o; + if (i.isOdd()) { + var a = i.andln(n - 1); + (o = a > (n >> 1) - 1 ? (n >> 1) - a : a), i.isubn(o); + } else o = 0; + r.push(o); + for ( + var s = 0 !== i.cmpn(0) && 0 === i.andln(n - 1) ? t + 1 : 1, + f = 1; + f < s; + f++ + ) + r.push(0); + i.iushrn(s); + } + return r; + }), + (n.getJSF = function (e, t) { + var r = [[], []]; + (e = e.clone()), (t = t.clone()); + for (var n = 0, i = 0; e.cmpn(-n) > 0 || t.cmpn(-i) > 0; ) { + var o, + a, + s, + f = (e.andln(3) + n) & 3, + c = (t.andln(3) + i) & 3; + 3 === f && (f = -1), + 3 === c && (c = -1), + (o = + 0 == (1 & f) + ? 0 + : (3 != (s = (e.andln(7) + n) & 7) && 5 !== s) || 2 !== c + ? f + : -f), + r[0].push(o), + (a = + 0 == (1 & c) + ? 0 + : (3 != (s = (t.andln(7) + i) & 7) && 5 !== s) || 2 !== f + ? c + : -c), + r[1].push(a), + 2 * n === o + 1 && (n = 1 - n), + 2 * i === a + 1 && (i = 1 - i), + e.iushrn(1), + t.iushrn(1); + } + return r; + }), + (n.cachedProperty = function (e, t, r) { + var n = "_" + t; + e.prototype[t] = function () { + return void 0 !== this[n] ? this[n] : (this[n] = r.call(this)); + }; + }), + (n.parseBytes = function (e) { + return "string" == typeof e ? n.toArray(e, "hex") : e; + }), + (n.intFromLE = function (e) { + return new i(e, "hex", "le"); + }); + }, + { + "bn.js": 44, + "minimalistic-assert": 132, + "minimalistic-crypto-utils": 133, + }, + ], + 109: [ + function (e, t, r) { + t.exports = { + name: "elliptic", + version: "6.5.0", + description: "EC cryptography", + main: "lib/elliptic.js", + files: ["lib"], + scripts: { + jscs: "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + jshint: + "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + lint: "npm run jscs && npm run jshint", + unit: "istanbul test _mocha --reporter=spec test/index.js", + test: "npm run lint && npm run unit", + version: "grunt dist && git add dist/", + }, + repository: { type: "git", url: "git@github.com:indutny/elliptic" }, + keywords: ["EC", "Elliptic", "curve", "Cryptography"], + author: "Fedor Indutny ", + license: "MIT", + bugs: { url: "https://github.com/indutny/elliptic/issues" }, + homepage: "https://github.com/indutny/elliptic", + devDependencies: { + brfs: "^1.4.3", + coveralls: "^2.11.3", + grunt: "^0.4.5", + "grunt-browserify": "^5.0.0", + "grunt-cli": "^1.2.0", + "grunt-contrib-connect": "^1.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "^1.0.1", + "grunt-mocha-istanbul": "^3.0.1", + "grunt-saucelabs": "^8.6.2", + istanbul: "^0.4.2", + jscs: "^2.9.0", + jshint: "^2.6.0", + mocha: "^2.1.0", + }, + dependencies: { + "bn.js": "^4.4.0", + brorand: "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + inherits: "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0", + }, + }; + }, + {}, + ], + 110: [ + function (e, t, r) { + var n = + Object.create || + function (e) { + var t = function () {}; + return (t.prototype = e), new t(); + }, + i = + Object.keys || + function (e) { + var t = []; + for (var r in e) + Object.prototype.hasOwnProperty.call(e, r) && t.push(r); + return r; + }, + o = + Function.prototype.bind || + function (e) { + var t = this; + return function () { + return t.apply(e, arguments); + }; + }; + function a() { + (this._events && + Object.prototype.hasOwnProperty.call(this, "_events")) || + ((this._events = n(null)), (this._eventsCount = 0)), + (this._maxListeners = this._maxListeners || void 0); + } + (t.exports = a), + (a.EventEmitter = a), + (a.prototype._events = void 0), + (a.prototype._maxListeners = void 0); + var s, + f = 10; + try { + var c = {}; + Object.defineProperty && + Object.defineProperty(c, "x", { value: 0 }), + (s = 0 === c.x); + } catch (e) { + s = !1; + } + function u(e) { + return void 0 === e._maxListeners + ? a.defaultMaxListeners + : e._maxListeners; + } + function h(e, t, r, i) { + var o, a, s; + if ("function" != typeof r) + throw new TypeError('"listener" argument must be a function'); + if ( + ((a = e._events) + ? (a.newListener && + (e.emit("newListener", t, r.listener ? r.listener : r), + (a = e._events)), + (s = a[t])) + : ((a = e._events = n(null)), (e._eventsCount = 0)), + s) + ) { + if ( + ("function" == typeof s + ? (s = a[t] = i ? [r, s] : [s, r]) + : i + ? s.unshift(r) + : s.push(r), + !s.warned && (o = u(e)) && o > 0 && s.length > o) + ) { + s.warned = !0; + var f = new Error( + "Possible EventEmitter memory leak detected. " + + s.length + + ' "' + + String(t) + + '" listeners added. Use emitter.setMaxListeners() to increase limit.', + ); + (f.name = "MaxListenersExceededWarning"), + (f.emitter = e), + (f.type = t), + (f.count = s.length), + "object" == typeof console && + console.warn && + console.warn("%s: %s", f.name, f.message); + } + } else (s = a[t] = r), ++e._eventsCount; + return e; + } + function d() { + if (!this.fired) + switch ( + (this.target.removeListener(this.type, this.wrapFn), + (this.fired = !0), + arguments.length) + ) { + case 0: + return this.listener.call(this.target); + case 1: + return this.listener.call(this.target, arguments[0]); + case 2: + return this.listener.call( + this.target, + arguments[0], + arguments[1], + ); + case 3: + return this.listener.call( + this.target, + arguments[0], + arguments[1], + arguments[2], + ); + default: + for ( + var e = new Array(arguments.length), t = 0; + t < e.length; + ++t + ) + e[t] = arguments[t]; + this.listener.apply(this.target, e); + } + } + function l(e, t, r) { + var n = { + fired: !1, + wrapFn: void 0, + target: e, + type: t, + listener: r, + }, + i = o.call(d, n); + return (i.listener = r), (n.wrapFn = i), i; + } + function p(e, t, r) { + var n = e._events; + if (!n) return []; + var i = n[t]; + return i + ? "function" == typeof i + ? r + ? [i.listener || i] + : [i] + : r + ? (function (e) { + for (var t = new Array(e.length), r = 0; r < t.length; ++r) + t[r] = e[r].listener || e[r]; + return t; + })(i) + : y(i, i.length) + : []; + } + function b(e) { + var t = this._events; + if (t) { + var r = t[e]; + if ("function" == typeof r) return 1; + if (r) return r.length; + } + return 0; + } + function y(e, t) { + for (var r = new Array(t), n = 0; n < t; ++n) r[n] = e[n]; + return r; + } + s + ? Object.defineProperty(a, "defaultMaxListeners", { + enumerable: !0, + get: function () { + return f; + }, + set: function (e) { + if ("number" != typeof e || e < 0 || e != e) + throw new TypeError( + '"defaultMaxListeners" must be a positive number', + ); + f = e; + }, + }) + : (a.defaultMaxListeners = f), + (a.prototype.setMaxListeners = function (e) { + if ("number" != typeof e || e < 0 || isNaN(e)) + throw new TypeError('"n" argument must be a positive number'); + return (this._maxListeners = e), this; + }), + (a.prototype.getMaxListeners = function () { + return u(this); + }), + (a.prototype.emit = function (e) { + var t, + r, + n, + i, + o, + a, + s = "error" === e; + if ((a = this._events)) s = s && null == a.error; + else if (!s) return !1; + if (s) { + if ( + (arguments.length > 1 && (t = arguments[1]), + t instanceof Error) + ) + throw t; + var f = new Error('Unhandled "error" event. (' + t + ")"); + throw ((f.context = t), f); + } + if (!(r = a[e])) return !1; + var c = "function" == typeof r; + switch ((n = arguments.length)) { + case 1: + !(function (e, t, r) { + if (t) e.call(r); + else + for (var n = e.length, i = y(e, n), o = 0; o < n; ++o) + i[o].call(r); + })(r, c, this); + break; + case 2: + !(function (e, t, r, n) { + if (t) e.call(r, n); + else + for (var i = e.length, o = y(e, i), a = 0; a < i; ++a) + o[a].call(r, n); + })(r, c, this, arguments[1]); + break; + case 3: + !(function (e, t, r, n, i) { + if (t) e.call(r, n, i); + else + for (var o = e.length, a = y(e, o), s = 0; s < o; ++s) + a[s].call(r, n, i); + })(r, c, this, arguments[1], arguments[2]); + break; + case 4: + !(function (e, t, r, n, i, o) { + if (t) e.call(r, n, i, o); + else + for (var a = e.length, s = y(e, a), f = 0; f < a; ++f) + s[f].call(r, n, i, o); + })(r, c, this, arguments[1], arguments[2], arguments[3]); + break; + default: + for (i = new Array(n - 1), o = 1; o < n; o++) + i[o - 1] = arguments[o]; + !(function (e, t, r, n) { + if (t) e.apply(r, n); + else + for (var i = e.length, o = y(e, i), a = 0; a < i; ++a) + o[a].apply(r, n); + })(r, c, this, i); + } + return !0; + }), + (a.prototype.addListener = function (e, t) { + return h(this, e, t, !1); + }), + (a.prototype.on = a.prototype.addListener), + (a.prototype.prependListener = function (e, t) { + return h(this, e, t, !0); + }), + (a.prototype.once = function (e, t) { + if ("function" != typeof t) + throw new TypeError('"listener" argument must be a function'); + return this.on(e, l(this, e, t)), this; + }), + (a.prototype.prependOnceListener = function (e, t) { + if ("function" != typeof t) + throw new TypeError('"listener" argument must be a function'); + return this.prependListener(e, l(this, e, t)), this; + }), + (a.prototype.removeListener = function (e, t) { + var r, i, o, a, s; + if ("function" != typeof t) + throw new TypeError('"listener" argument must be a function'); + if (!(i = this._events)) return this; + if (!(r = i[e])) return this; + if (r === t || r.listener === t) + 0 == --this._eventsCount + ? (this._events = n(null)) + : (delete i[e], + i.removeListener && + this.emit("removeListener", e, r.listener || t)); + else if ("function" != typeof r) { + for (o = -1, a = r.length - 1; a >= 0; a--) + if (r[a] === t || r[a].listener === t) { + (s = r[a].listener), (o = a); + break; + } + if (o < 0) return this; + 0 === o + ? r.shift() + : (function (e, t) { + for ( + var r = t, n = r + 1, i = e.length; + n < i; + r += 1, n += 1 + ) + e[r] = e[n]; + e.pop(); + })(r, o), + 1 === r.length && (i[e] = r[0]), + i.removeListener && this.emit("removeListener", e, s || t); + } + return this; + }), + (a.prototype.removeAllListeners = function (e) { + var t, r, o; + if (!(r = this._events)) return this; + if (!r.removeListener) + return ( + 0 === arguments.length + ? ((this._events = n(null)), (this._eventsCount = 0)) + : r[e] && + (0 == --this._eventsCount + ? (this._events = n(null)) + : delete r[e]), + this + ); + if (0 === arguments.length) { + var a, + s = i(r); + for (o = 0; o < s.length; ++o) + "removeListener" !== (a = s[o]) && this.removeAllListeners(a); + return ( + this.removeAllListeners("removeListener"), + (this._events = n(null)), + (this._eventsCount = 0), + this + ); + } + if ("function" == typeof (t = r[e])) this.removeListener(e, t); + else if (t) + for (o = t.length - 1; o >= 0; o--) + this.removeListener(e, t[o]); + return this; + }), + (a.prototype.listeners = function (e) { + return p(this, e, !0); + }), + (a.prototype.rawListeners = function (e) { + return p(this, e, !1); + }), + (a.listenerCount = function (e, t) { + return "function" == typeof e.listenerCount + ? e.listenerCount(t) + : b.call(e, t); + }), + (a.prototype.listenerCount = b), + (a.prototype.eventNames = function () { + return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; + }); + }, + {}, + ], + 111: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer, + i = e("md5.js"); + t.exports = function (e, t, r, o) { + if ( + (n.isBuffer(e) || (e = n.from(e, "binary")), + t && (n.isBuffer(t) || (t = n.from(t, "binary")), 8 !== t.length)) + ) + throw new RangeError("salt should be Buffer with 8 byte length"); + for ( + var a = r / 8, + s = n.alloc(a), + f = n.alloc(o || 0), + c = n.alloc(0); + a > 0 || o > 0; + + ) { + var u = new i(); + u.update(c), u.update(e), t && u.update(t), (c = u.digest()); + var h = 0; + if (a > 0) { + var d = s.length - a; + (h = Math.min(a, c.length)), c.copy(s, d, 0, h), (a -= h); + } + if (h < c.length && o > 0) { + var l = f.length - o, + p = Math.min(o, c.length - h); + c.copy(f, l, h, h + p), (o -= p); + } + } + return c.fill(0), { key: s, iv: f }; + }; + }, + { "md5.js": 130, "safe-buffer": 170 }, + ], + 112: [ + function (e, t, r) { + "use strict"; + var n = e("safe-buffer").Buffer, + i = e("stream").Transform; + function o(e) { + i.call(this), + (this._block = n.allocUnsafe(e)), + (this._blockSize = e), + (this._blockOffset = 0), + (this._length = [0, 0, 0, 0]), + (this._finalized = !1); + } + e("inherits")(o, i), + (o.prototype._transform = function (e, t, r) { + var n = null; + try { + this.update(e, t); + } catch (e) { + n = e; + } + r(n); + }), + (o.prototype._flush = function (e) { + var t = null; + try { + this.push(this.digest()); + } catch (e) { + t = e; + } + e(t); + }), + (o.prototype.update = function (e, t) { + if ( + ((function (e, t) { + if (!n.isBuffer(e) && "string" != typeof e) + throw new TypeError(t + " must be a string or a buffer"); + })(e, "Data"), + this._finalized) + ) + throw new Error("Digest already called"); + n.isBuffer(e) || (e = n.from(e, t)); + for ( + var r = this._block, i = 0; + this._blockOffset + e.length - i >= this._blockSize; + + ) { + for (var o = this._blockOffset; o < this._blockSize; ) + r[o++] = e[i++]; + this._update(), (this._blockOffset = 0); + } + for (; i < e.length; ) r[this._blockOffset++] = e[i++]; + for (var a = 0, s = 8 * e.length; s > 0; ++a) + (this._length[a] += s), + (s = (this._length[a] / 4294967296) | 0) > 0 && + (this._length[a] -= 4294967296 * s); + return this; + }), + (o.prototype._update = function () { + throw new Error("_update is not implemented"); + }), + (o.prototype.digest = function (e) { + if (this._finalized) throw new Error("Digest already called"); + this._finalized = !0; + var t = this._digest(); + void 0 !== e && (t = t.toString(e)), + this._block.fill(0), + (this._blockOffset = 0); + for (var r = 0; r < 4; ++r) this._length[r] = 0; + return t; + }), + (o.prototype._digest = function () { + throw new Error("_digest is not implemented"); + }), + (t.exports = o); + }, + { inherits: 127, "safe-buffer": 170, stream: 179 }, + ], + 113: [ + function (e, t, r) { + var n = r; + (n.utils = e("./hash/utils")), + (n.common = e("./hash/common")), + (n.sha = e("./hash/sha")), + (n.ripemd = e("./hash/ripemd")), + (n.hmac = e("./hash/hmac")), + (n.sha1 = n.sha.sha1), + (n.sha256 = n.sha.sha256), + (n.sha224 = n.sha.sha224), + (n.sha384 = n.sha.sha384), + (n.sha512 = n.sha.sha512), + (n.ripemd160 = n.ripemd.ripemd160); + }, + { + "./hash/common": 114, + "./hash/hmac": 115, + "./hash/ripemd": 116, + "./hash/sha": 117, + "./hash/utils": 124, + }, + ], + 114: [ + function (e, t, r) { + "use strict"; + var n = e("./utils"), + i = e("minimalistic-assert"); + function o() { + (this.pending = null), + (this.pendingTotal = 0), + (this.blockSize = this.constructor.blockSize), + (this.outSize = this.constructor.outSize), + (this.hmacStrength = this.constructor.hmacStrength), + (this.padLength = this.constructor.padLength / 8), + (this.endian = "big"), + (this._delta8 = this.blockSize / 8), + (this._delta32 = this.blockSize / 32); + } + (r.BlockHash = o), + (o.prototype.update = function (e, t) { + if ( + ((e = n.toArray(e, t)), + this.pending + ? (this.pending = this.pending.concat(e)) + : (this.pending = e), + (this.pendingTotal += e.length), + this.pending.length >= this._delta8) + ) { + var r = (e = this.pending).length % this._delta8; + (this.pending = e.slice(e.length - r, e.length)), + 0 === this.pending.length && (this.pending = null), + (e = n.join32(e, 0, e.length - r, this.endian)); + for (var i = 0; i < e.length; i += this._delta32) + this._update(e, i, i + this._delta32); + } + return this; + }), + (o.prototype.digest = function (e) { + return ( + this.update(this._pad()), + i(null === this.pending), + this._digest(e) + ); + }), + (o.prototype._pad = function () { + var e = this.pendingTotal, + t = this._delta8, + r = t - ((e + this.padLength) % t), + n = new Array(r + this.padLength); + n[0] = 128; + for (var i = 1; i < r; i++) n[i] = 0; + if (((e <<= 3), "big" === this.endian)) { + for (var o = 8; o < this.padLength; o++) n[i++] = 0; + (n[i++] = 0), + (n[i++] = 0), + (n[i++] = 0), + (n[i++] = 0), + (n[i++] = (e >>> 24) & 255), + (n[i++] = (e >>> 16) & 255), + (n[i++] = (e >>> 8) & 255), + (n[i++] = 255 & e); + } else + for ( + n[i++] = 255 & e, + n[i++] = (e >>> 8) & 255, + n[i++] = (e >>> 16) & 255, + n[i++] = (e >>> 24) & 255, + n[i++] = 0, + n[i++] = 0, + n[i++] = 0, + n[i++] = 0, + o = 8; + o < this.padLength; + o++ + ) + n[i++] = 0; + return n; + }); + }, + { "./utils": 124, "minimalistic-assert": 132 }, + ], + 115: [ + function (e, t, r) { + "use strict"; + var n = e("./utils"), + i = e("minimalistic-assert"); + function o(e, t, r) { + if (!(this instanceof o)) return new o(e, t, r); + (this.Hash = e), + (this.blockSize = e.blockSize / 8), + (this.outSize = e.outSize / 8), + (this.inner = null), + (this.outer = null), + this._init(n.toArray(t, r)); + } + (t.exports = o), + (o.prototype._init = function (e) { + e.length > this.blockSize && + (e = new this.Hash().update(e).digest()), + i(e.length <= this.blockSize); + for (var t = e.length; t < this.blockSize; t++) e.push(0); + for (t = 0; t < e.length; t++) e[t] ^= 54; + for ( + this.inner = new this.Hash().update(e), t = 0; + t < e.length; + t++ + ) + e[t] ^= 106; + this.outer = new this.Hash().update(e); + }), + (o.prototype.update = function (e, t) { + return this.inner.update(e, t), this; + }), + (o.prototype.digest = function (e) { + return ( + this.outer.update(this.inner.digest()), this.outer.digest(e) + ); + }); + }, + { "./utils": 124, "minimalistic-assert": 132 }, + ], + 116: [ + function (e, t, r) { + "use strict"; + var n = e("./utils"), + i = e("./common"), + o = n.rotl32, + a = n.sum32, + s = n.sum32_3, + f = n.sum32_4, + c = i.BlockHash; + function u() { + if (!(this instanceof u)) return new u(); + c.call(this), + (this.h = [ + 1732584193, 4023233417, 2562383102, 271733878, 3285377520, + ]), + (this.endian = "little"); + } + function h(e, t, r, n) { + return e <= 15 + ? t ^ r ^ n + : e <= 31 + ? (t & r) | (~t & n) + : e <= 47 + ? (t | ~r) ^ n + : e <= 63 + ? (t & n) | (r & ~n) + : t ^ (r | ~n); + } + function d(e) { + return e <= 15 + ? 0 + : e <= 31 + ? 1518500249 + : e <= 47 + ? 1859775393 + : e <= 63 + ? 2400959708 + : 2840853838; + } + function l(e) { + return e <= 15 + ? 1352829926 + : e <= 31 + ? 1548603684 + : e <= 47 + ? 1836072691 + : e <= 63 + ? 2053994217 + : 0; + } + n.inherits(u, c), + (r.ripemd160 = u), + (u.blockSize = 512), + (u.outSize = 160), + (u.hmacStrength = 192), + (u.padLength = 64), + (u.prototype._update = function (e, t) { + for ( + var r = this.h[0], + n = this.h[1], + i = this.h[2], + c = this.h[3], + u = this.h[4], + v = r, + g = n, + w = i, + _ = c, + S = u, + E = 0; + E < 80; + E++ + ) { + var M = a(o(f(r, h(E, n, i, c), e[p[E] + t], d(E)), y[E]), u); + (r = u), + (u = c), + (c = o(i, 10)), + (i = n), + (n = M), + (M = a( + o(f(v, h(79 - E, g, w, _), e[b[E] + t], l(E)), m[E]), + S, + )), + (v = S), + (S = _), + (_ = o(w, 10)), + (w = g), + (g = M); + } + (M = s(this.h[1], i, _)), + (this.h[1] = s(this.h[2], c, S)), + (this.h[2] = s(this.h[3], u, v)), + (this.h[3] = s(this.h[4], r, g)), + (this.h[4] = s(this.h[0], n, w)), + (this.h[0] = M); + }), + (u.prototype._digest = function (e) { + return "hex" === e + ? n.toHex32(this.h, "little") + : n.split32(this.h, "little"); + }); + var p = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, + 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, + 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, + 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, + 13, + ], + b = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, + 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, + 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, + 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, + 9, 11, + ], + y = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, + 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, + 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, + 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, + 13, 14, 11, 8, 5, 6, + ], + m = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, + 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, + 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, + 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, + 15, 13, 11, 11, + ]; + }, + { "./common": 114, "./utils": 124 }, + ], + 117: [ + function (e, t, r) { + "use strict"; + (r.sha1 = e("./sha/1")), + (r.sha224 = e("./sha/224")), + (r.sha256 = e("./sha/256")), + (r.sha384 = e("./sha/384")), + (r.sha512 = e("./sha/512")); + }, + { + "./sha/1": 118, + "./sha/224": 119, + "./sha/256": 120, + "./sha/384": 121, + "./sha/512": 122, + }, + ], + 118: [ + function (e, t, r) { + "use strict"; + var n = e("../utils"), + i = e("../common"), + o = e("./common"), + a = n.rotl32, + s = n.sum32, + f = n.sum32_5, + c = o.ft_1, + u = i.BlockHash, + h = [1518500249, 1859775393, 2400959708, 3395469782]; + function d() { + if (!(this instanceof d)) return new d(); + u.call(this), + (this.h = [ + 1732584193, 4023233417, 2562383102, 271733878, 3285377520, + ]), + (this.W = new Array(80)); + } + n.inherits(d, u), + (t.exports = d), + (d.blockSize = 512), + (d.outSize = 160), + (d.hmacStrength = 80), + (d.padLength = 64), + (d.prototype._update = function (e, t) { + for (var r = this.W, n = 0; n < 16; n++) r[n] = e[t + n]; + for (; n < r.length; n++) + r[n] = a(r[n - 3] ^ r[n - 8] ^ r[n - 14] ^ r[n - 16], 1); + var i = this.h[0], + o = this.h[1], + u = this.h[2], + d = this.h[3], + l = this.h[4]; + for (n = 0; n < r.length; n++) { + var p = ~~(n / 20), + b = f(a(i, 5), c(p, o, u, d), l, r[n], h[p]); + (l = d), (d = u), (u = a(o, 30)), (o = i), (i = b); + } + (this.h[0] = s(this.h[0], i)), + (this.h[1] = s(this.h[1], o)), + (this.h[2] = s(this.h[2], u)), + (this.h[3] = s(this.h[3], d)), + (this.h[4] = s(this.h[4], l)); + }), + (d.prototype._digest = function (e) { + return "hex" === e + ? n.toHex32(this.h, "big") + : n.split32(this.h, "big"); + }); + }, + { "../common": 114, "../utils": 124, "./common": 123 }, + ], + 119: [ + function (e, t, r) { + "use strict"; + var n = e("../utils"), + i = e("./256"); + function o() { + if (!(this instanceof o)) return new o(); + i.call(this), + (this.h = [ + 3238371032, 914150663, 812702999, 4144912697, 4290775857, + 1750603025, 1694076839, 3204075428, + ]); + } + n.inherits(o, i), + (t.exports = o), + (o.blockSize = 512), + (o.outSize = 224), + (o.hmacStrength = 192), + (o.padLength = 64), + (o.prototype._digest = function (e) { + return "hex" === e + ? n.toHex32(this.h.slice(0, 7), "big") + : n.split32(this.h.slice(0, 7), "big"); + }); + }, + { "../utils": 124, "./256": 120 }, + ], + 120: [ + function (e, t, r) { + "use strict"; + var n = e("../utils"), + i = e("../common"), + o = e("./common"), + a = e("minimalistic-assert"), + s = n.sum32, + f = n.sum32_4, + c = n.sum32_5, + u = o.ch32, + h = o.maj32, + d = o.s0_256, + l = o.s1_256, + p = o.g0_256, + b = o.g1_256, + y = i.BlockHash, + m = [ + 1116352408, 1899447441, 3049323471, 3921009573, 961987163, + 1508970993, 2453635748, 2870763221, 3624381080, 310598401, + 607225278, 1426881987, 1925078388, 2162078206, 2614888103, + 3248222580, 3835390401, 4022224774, 264347078, 604807628, + 770255983, 1249150122, 1555081692, 1996064986, 2554220882, + 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, + 113926993, 338241895, 666307205, 773529912, 1294757372, + 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, + 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, + 3600352804, 4094571909, 275423344, 430227734, 506948616, + 659060556, 883997877, 958139571, 1322822218, 1537002063, + 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, + 2428436474, 2756734187, 3204031479, 3329325298, + ]; + function v() { + if (!(this instanceof v)) return new v(); + y.call(this), + (this.h = [ + 1779033703, 3144134277, 1013904242, 2773480762, 1359893119, + 2600822924, 528734635, 1541459225, + ]), + (this.k = m), + (this.W = new Array(64)); + } + n.inherits(v, y), + (t.exports = v), + (v.blockSize = 512), + (v.outSize = 256), + (v.hmacStrength = 192), + (v.padLength = 64), + (v.prototype._update = function (e, t) { + for (var r = this.W, n = 0; n < 16; n++) r[n] = e[t + n]; + for (; n < r.length; n++) + r[n] = f(b(r[n - 2]), r[n - 7], p(r[n - 15]), r[n - 16]); + var i = this.h[0], + o = this.h[1], + y = this.h[2], + m = this.h[3], + v = this.h[4], + g = this.h[5], + w = this.h[6], + _ = this.h[7]; + for (a(this.k.length === r.length), n = 0; n < r.length; n++) { + var S = c(_, l(v), u(v, g, w), this.k[n], r[n]), + E = s(d(i), h(i, o, y)); + (_ = w), + (w = g), + (g = v), + (v = s(m, S)), + (m = y), + (y = o), + (o = i), + (i = s(S, E)); + } + (this.h[0] = s(this.h[0], i)), + (this.h[1] = s(this.h[1], o)), + (this.h[2] = s(this.h[2], y)), + (this.h[3] = s(this.h[3], m)), + (this.h[4] = s(this.h[4], v)), + (this.h[5] = s(this.h[5], g)), + (this.h[6] = s(this.h[6], w)), + (this.h[7] = s(this.h[7], _)); + }), + (v.prototype._digest = function (e) { + return "hex" === e + ? n.toHex32(this.h, "big") + : n.split32(this.h, "big"); + }); + }, + { + "../common": 114, + "../utils": 124, + "./common": 123, + "minimalistic-assert": 132, + }, + ], + 121: [ + function (e, t, r) { + "use strict"; + var n = e("../utils"), + i = e("./512"); + function o() { + if (!(this instanceof o)) return new o(); + i.call(this), + (this.h = [ + 3418070365, 3238371032, 1654270250, 914150663, 2438529370, + 812702999, 355462360, 4144912697, 1731405415, 4290775857, + 2394180231, 1750603025, 3675008525, 1694076839, 1203062813, + 3204075428, + ]); + } + n.inherits(o, i), + (t.exports = o), + (o.blockSize = 1024), + (o.outSize = 384), + (o.hmacStrength = 192), + (o.padLength = 128), + (o.prototype._digest = function (e) { + return "hex" === e + ? n.toHex32(this.h.slice(0, 12), "big") + : n.split32(this.h.slice(0, 12), "big"); + }); + }, + { "../utils": 124, "./512": 122 }, + ], + 122: [ + function (e, t, r) { + "use strict"; + var n = e("../utils"), + i = e("../common"), + o = e("minimalistic-assert"), + a = n.rotr64_hi, + s = n.rotr64_lo, + f = n.shr64_hi, + c = n.shr64_lo, + u = n.sum64, + h = n.sum64_hi, + d = n.sum64_lo, + l = n.sum64_4_hi, + p = n.sum64_4_lo, + b = n.sum64_5_hi, + y = n.sum64_5_lo, + m = i.BlockHash, + v = [ + 1116352408, 3609767458, 1899447441, 602891725, 3049323471, + 3964484399, 3921009573, 2173295548, 961987163, 4081628472, + 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, + 3664609560, 3624381080, 2734883394, 310598401, 1164996542, + 607225278, 1323610764, 1426881987, 3590304994, 1925078388, + 4068182383, 2162078206, 991336113, 2614888103, 633803317, + 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, + 944711139, 264347078, 2341262773, 604807628, 2007800933, + 770255983, 1495990901, 1249150122, 1856431235, 1555081692, + 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, + 2821834349, 766784016, 2952996808, 2566594879, 3210313671, + 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, + 113926993, 3758326383, 338241895, 168717936, 666307205, + 1188179964, 773529912, 1546045734, 1294757372, 1522805485, + 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, + 1014477480, 2177026350, 1206759142, 2456956037, 344077627, + 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, + 3505952657, 3345764771, 106217008, 3516065817, 3606008344, + 3600352804, 1432725776, 4094571909, 1467031594, 275423344, + 851169720, 430227734, 3100823752, 506948616, 1363258195, + 659060556, 3750685593, 883997877, 3785050280, 958139571, + 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, + 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, + 1125592928, 2227730452, 2716904306, 2361852424, 442776044, + 2428436474, 593698344, 2756734187, 3733110249, 3204031479, + 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, + 3515267271, 566280711, 3940187606, 3454069534, 4118630271, + 4000239992, 116418474, 1914138554, 174292421, 2731055270, + 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, + 852142971, 1086792851, 1017036298, 365543100, 1126000580, + 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, + 1607167915, 987167468, 1816402316, 1246189591, + ]; + function g() { + if (!(this instanceof g)) return new g(); + m.call(this), + (this.h = [ + 1779033703, 4089235720, 3144134277, 2227873595, 1013904242, + 4271175723, 2773480762, 1595750129, 1359893119, 2917565137, + 2600822924, 725511199, 528734635, 4215389547, 1541459225, + 327033209, + ]), + (this.k = v), + (this.W = new Array(160)); + } + function w(e, t, r, n, i) { + var o = (e & r) ^ (~e & i); + return o < 0 && (o += 4294967296), o; + } + function _(e, t, r, n, i, o) { + var a = (t & n) ^ (~t & o); + return a < 0 && (a += 4294967296), a; + } + function S(e, t, r, n, i) { + var o = (e & r) ^ (e & i) ^ (r & i); + return o < 0 && (o += 4294967296), o; + } + function E(e, t, r, n, i, o) { + var a = (t & n) ^ (t & o) ^ (n & o); + return a < 0 && (a += 4294967296), a; + } + function M(e, t) { + var r = a(e, t, 28) ^ a(t, e, 2) ^ a(t, e, 7); + return r < 0 && (r += 4294967296), r; + } + function k(e, t) { + var r = s(e, t, 28) ^ s(t, e, 2) ^ s(t, e, 7); + return r < 0 && (r += 4294967296), r; + } + function x(e, t) { + var r = a(e, t, 14) ^ a(e, t, 18) ^ a(t, e, 9); + return r < 0 && (r += 4294967296), r; + } + function A(e, t) { + var r = s(e, t, 14) ^ s(e, t, 18) ^ s(t, e, 9); + return r < 0 && (r += 4294967296), r; + } + function j(e, t) { + var r = a(e, t, 1) ^ a(e, t, 8) ^ f(e, t, 7); + return r < 0 && (r += 4294967296), r; + } + function B(e, t) { + var r = s(e, t, 1) ^ s(e, t, 8) ^ c(e, t, 7); + return r < 0 && (r += 4294967296), r; + } + function I(e, t) { + var r = a(e, t, 19) ^ a(t, e, 29) ^ f(e, t, 6); + return r < 0 && (r += 4294967296), r; + } + function R(e, t) { + var r = s(e, t, 19) ^ s(t, e, 29) ^ c(e, t, 6); + return r < 0 && (r += 4294967296), r; + } + n.inherits(g, m), + (t.exports = g), + (g.blockSize = 1024), + (g.outSize = 512), + (g.hmacStrength = 192), + (g.padLength = 128), + (g.prototype._prepareBlock = function (e, t) { + for (var r = this.W, n = 0; n < 32; n++) r[n] = e[t + n]; + for (; n < r.length; n += 2) { + var i = I(r[n - 4], r[n - 3]), + o = R(r[n - 4], r[n - 3]), + a = r[n - 14], + s = r[n - 13], + f = j(r[n - 30], r[n - 29]), + c = B(r[n - 30], r[n - 29]), + u = r[n - 32], + h = r[n - 31]; + (r[n] = l(i, o, a, s, f, c, u, h)), + (r[n + 1] = p(i, o, a, s, f, c, u, h)); + } + }), + (g.prototype._update = function (e, t) { + this._prepareBlock(e, t); + var r = this.W, + n = this.h[0], + i = this.h[1], + a = this.h[2], + s = this.h[3], + f = this.h[4], + c = this.h[5], + l = this.h[6], + p = this.h[7], + m = this.h[8], + v = this.h[9], + g = this.h[10], + j = this.h[11], + B = this.h[12], + I = this.h[13], + R = this.h[14], + T = this.h[15]; + o(this.k.length === r.length); + for (var C = 0; C < r.length; C += 2) { + var P = R, + O = T, + D = x(m, v), + N = A(m, v), + L = w(m, v, g, j, B), + U = _(m, v, g, j, B, I), + q = this.k[C], + z = this.k[C + 1], + K = r[C], + F = r[C + 1], + H = b(P, O, D, N, L, U, q, z, K, F), + V = y(P, O, D, N, L, U, q, z, K, F); + (P = M(n, i)), + (O = k(n, i)), + (D = S(n, i, a, s, f)), + (N = E(n, i, a, s, f, c)); + var W = h(P, O, D, N), + J = d(P, O, D, N); + (R = B), + (T = I), + (B = g), + (I = j), + (g = m), + (j = v), + (m = h(l, p, H, V)), + (v = d(p, p, H, V)), + (l = f), + (p = c), + (f = a), + (c = s), + (a = n), + (s = i), + (n = h(H, V, W, J)), + (i = d(H, V, W, J)); + } + u(this.h, 0, n, i), + u(this.h, 2, a, s), + u(this.h, 4, f, c), + u(this.h, 6, l, p), + u(this.h, 8, m, v), + u(this.h, 10, g, j), + u(this.h, 12, B, I), + u(this.h, 14, R, T); + }), + (g.prototype._digest = function (e) { + return "hex" === e + ? n.toHex32(this.h, "big") + : n.split32(this.h, "big"); + }); + }, + { "../common": 114, "../utils": 124, "minimalistic-assert": 132 }, + ], + 123: [ + function (e, t, r) { + "use strict"; + var n = e("../utils").rotr32; + function i(e, t, r) { + return (e & t) ^ (~e & r); + } + function o(e, t, r) { + return (e & t) ^ (e & r) ^ (t & r); + } + function a(e, t, r) { + return e ^ t ^ r; + } + (r.ft_1 = function (e, t, r, n) { + return 0 === e + ? i(t, r, n) + : 1 === e || 3 === e + ? a(t, r, n) + : 2 === e + ? o(t, r, n) + : void 0; + }), + (r.ch32 = i), + (r.maj32 = o), + (r.p32 = a), + (r.s0_256 = function (e) { + return n(e, 2) ^ n(e, 13) ^ n(e, 22); + }), + (r.s1_256 = function (e) { + return n(e, 6) ^ n(e, 11) ^ n(e, 25); + }), + (r.g0_256 = function (e) { + return n(e, 7) ^ n(e, 18) ^ (e >>> 3); + }), + (r.g1_256 = function (e) { + return n(e, 17) ^ n(e, 19) ^ (e >>> 10); + }); + }, + { "../utils": 124 }, + ], + 124: [ + function (e, t, r) { + "use strict"; + var n = e("minimalistic-assert"), + i = e("inherits"); + function o(e, t) { + return ( + 55296 == (64512 & e.charCodeAt(t)) && + !(t < 0 || t + 1 >= e.length) && + 56320 == (64512 & e.charCodeAt(t + 1)) + ); + } + function a(e) { + return ( + ((e >>> 24) | + ((e >>> 8) & 65280) | + ((e << 8) & 16711680) | + ((255 & e) << 24)) >>> + 0 + ); + } + function s(e) { + return 1 === e.length ? "0" + e : e; + } + function f(e) { + return 7 === e.length + ? "0" + e + : 6 === e.length + ? "00" + e + : 5 === e.length + ? "000" + e + : 4 === e.length + ? "0000" + e + : 3 === e.length + ? "00000" + e + : 2 === e.length + ? "000000" + e + : 1 === e.length + ? "0000000" + e + : e; + } + (r.inherits = i), + (r.toArray = function (e, t) { + if (Array.isArray(e)) return e.slice(); + if (!e) return []; + var r = []; + if ("string" == typeof e) + if (t) { + if ("hex" === t) + for ( + (e = e.replace(/[^a-z0-9]+/gi, "")).length % 2 != 0 && + (e = "0" + e), + i = 0; + i < e.length; + i += 2 + ) + r.push(parseInt(e[i] + e[i + 1], 16)); + } else + for (var n = 0, i = 0; i < e.length; i++) { + var a = e.charCodeAt(i); + a < 128 + ? (r[n++] = a) + : a < 2048 + ? ((r[n++] = (a >> 6) | 192), (r[n++] = (63 & a) | 128)) + : o(e, i) + ? ((a = + 65536 + + ((1023 & a) << 10) + + (1023 & e.charCodeAt(++i))), + (r[n++] = (a >> 18) | 240), + (r[n++] = ((a >> 12) & 63) | 128), + (r[n++] = ((a >> 6) & 63) | 128), + (r[n++] = (63 & a) | 128)) + : ((r[n++] = (a >> 12) | 224), + (r[n++] = ((a >> 6) & 63) | 128), + (r[n++] = (63 & a) | 128)); + } + else for (i = 0; i < e.length; i++) r[i] = 0 | e[i]; + return r; + }), + (r.toHex = function (e) { + for (var t = "", r = 0; r < e.length; r++) + t += s(e[r].toString(16)); + return t; + }), + (r.htonl = a), + (r.toHex32 = function (e, t) { + for (var r = "", n = 0; n < e.length; n++) { + var i = e[n]; + "little" === t && (i = a(i)), (r += f(i.toString(16))); + } + return r; + }), + (r.zero2 = s), + (r.zero8 = f), + (r.join32 = function (e, t, r, i) { + var o = r - t; + n(o % 4 == 0); + for ( + var a = new Array(o / 4), s = 0, f = t; + s < a.length; + s++, f += 4 + ) { + var c; + (c = + "big" === i + ? (e[f] << 24) | + (e[f + 1] << 16) | + (e[f + 2] << 8) | + e[f + 3] + : (e[f + 3] << 24) | + (e[f + 2] << 16) | + (e[f + 1] << 8) | + e[f]), + (a[s] = c >>> 0); + } + return a; + }), + (r.split32 = function (e, t) { + for ( + var r = new Array(4 * e.length), n = 0, i = 0; + n < e.length; + n++, i += 4 + ) { + var o = e[n]; + "big" === t + ? ((r[i] = o >>> 24), + (r[i + 1] = (o >>> 16) & 255), + (r[i + 2] = (o >>> 8) & 255), + (r[i + 3] = 255 & o)) + : ((r[i + 3] = o >>> 24), + (r[i + 2] = (o >>> 16) & 255), + (r[i + 1] = (o >>> 8) & 255), + (r[i] = 255 & o)); + } + return r; + }), + (r.rotr32 = function (e, t) { + return (e >>> t) | (e << (32 - t)); + }), + (r.rotl32 = function (e, t) { + return (e << t) | (e >>> (32 - t)); + }), + (r.sum32 = function (e, t) { + return (e + t) >>> 0; + }), + (r.sum32_3 = function (e, t, r) { + return (e + t + r) >>> 0; + }), + (r.sum32_4 = function (e, t, r, n) { + return (e + t + r + n) >>> 0; + }), + (r.sum32_5 = function (e, t, r, n, i) { + return (e + t + r + n + i) >>> 0; + }), + (r.sum64 = function (e, t, r, n) { + var i = e[t], + o = (n + e[t + 1]) >>> 0, + a = (o < n ? 1 : 0) + r + i; + (e[t] = a >>> 0), (e[t + 1] = o); + }), + (r.sum64_hi = function (e, t, r, n) { + return (((t + n) >>> 0 < t ? 1 : 0) + e + r) >>> 0; + }), + (r.sum64_lo = function (e, t, r, n) { + return (t + n) >>> 0; + }), + (r.sum64_4_hi = function (e, t, r, n, i, o, a, s) { + var f = 0, + c = t; + return ( + (f += (c = (c + n) >>> 0) < t ? 1 : 0), + (f += (c = (c + o) >>> 0) < o ? 1 : 0), + (e + r + i + a + (f += (c = (c + s) >>> 0) < s ? 1 : 0)) >>> 0 + ); + }), + (r.sum64_4_lo = function (e, t, r, n, i, o, a, s) { + return (t + n + o + s) >>> 0; + }), + (r.sum64_5_hi = function (e, t, r, n, i, o, a, s, f, c) { + var u = 0, + h = t; + return ( + (u += (h = (h + n) >>> 0) < t ? 1 : 0), + (u += (h = (h + o) >>> 0) < o ? 1 : 0), + (u += (h = (h + s) >>> 0) < s ? 1 : 0), + (e + r + i + a + f + (u += (h = (h + c) >>> 0) < c ? 1 : 0)) >>> + 0 + ); + }), + (r.sum64_5_lo = function (e, t, r, n, i, o, a, s, f, c) { + return (t + n + o + s + c) >>> 0; + }), + (r.rotr64_hi = function (e, t, r) { + return ((t << (32 - r)) | (e >>> r)) >>> 0; + }), + (r.rotr64_lo = function (e, t, r) { + return ((e << (32 - r)) | (t >>> r)) >>> 0; + }), + (r.shr64_hi = function (e, t, r) { + return e >>> r; + }), + (r.shr64_lo = function (e, t, r) { + return ((e << (32 - r)) | (t >>> r)) >>> 0; + }); + }, + { inherits: 127, "minimalistic-assert": 132 }, + ], + 125: [ + function (e, t, r) { + "use strict"; + var n = e("hash.js"), + i = e("minimalistic-crypto-utils"), + o = e("minimalistic-assert"); + function a(e) { + if (!(this instanceof a)) return new a(e); + (this.hash = e.hash), + (this.predResist = !!e.predResist), + (this.outLen = this.hash.outSize), + (this.minEntropy = e.minEntropy || this.hash.hmacStrength), + (this._reseed = null), + (this.reseedInterval = null), + (this.K = null), + (this.V = null); + var t = i.toArray(e.entropy, e.entropyEnc || "hex"), + r = i.toArray(e.nonce, e.nonceEnc || "hex"), + n = i.toArray(e.pers, e.persEnc || "hex"); + o( + t.length >= this.minEntropy / 8, + "Not enough entropy. Minimum is: " + this.minEntropy + " bits", + ), + this._init(t, r, n); + } + (t.exports = a), + (a.prototype._init = function (e, t, r) { + var n = e.concat(t).concat(r); + (this.K = new Array(this.outLen / 8)), + (this.V = new Array(this.outLen / 8)); + for (var i = 0; i < this.V.length; i++) + (this.K[i] = 0), (this.V[i] = 1); + this._update(n), + (this._reseed = 1), + (this.reseedInterval = 281474976710656); + }), + (a.prototype._hmac = function () { + return new n.hmac(this.hash, this.K); + }), + (a.prototype._update = function (e) { + var t = this._hmac().update(this.V).update([0]); + e && (t = t.update(e)), + (this.K = t.digest()), + (this.V = this._hmac().update(this.V).digest()), + e && + ((this.K = this._hmac() + .update(this.V) + .update([1]) + .update(e) + .digest()), + (this.V = this._hmac().update(this.V).digest())); + }), + (a.prototype.reseed = function (e, t, r, n) { + "string" != typeof t && ((n = r), (r = t), (t = null)), + (e = i.toArray(e, t)), + (r = i.toArray(r, n)), + o( + e.length >= this.minEntropy / 8, + "Not enough entropy. Minimum is: " + + this.minEntropy + + " bits", + ), + this._update(e.concat(r || [])), + (this._reseed = 1); + }), + (a.prototype.generate = function (e, t, r, n) { + if (this._reseed > this.reseedInterval) + throw new Error("Reseed is required"); + "string" != typeof t && ((n = r), (r = t), (t = null)), + r && ((r = i.toArray(r, n || "hex")), this._update(r)); + for (var o = []; o.length < e; ) + (this.V = this._hmac().update(this.V).digest()), + (o = o.concat(this.V)); + var a = o.slice(0, e); + return this._update(r), this._reseed++, i.encode(a, t); + }); + }, + { + "hash.js": 113, + "minimalistic-assert": 132, + "minimalistic-crypto-utils": 133, + }, + ], + 126: [ + function (e, t, r) { + (r.read = function (e, t, r, n, i) { + var o, + a, + s = 8 * i - n - 1, + f = (1 << s) - 1, + c = f >> 1, + u = -7, + h = r ? i - 1 : 0, + d = r ? -1 : 1, + l = e[t + h]; + for ( + h += d, o = l & ((1 << -u) - 1), l >>= -u, u += s; + u > 0; + o = 256 * o + e[t + h], h += d, u -= 8 + ); + for ( + a = o & ((1 << -u) - 1), o >>= -u, u += n; + u > 0; + a = 256 * a + e[t + h], h += d, u -= 8 + ); + if (0 === o) o = 1 - c; + else { + if (o === f) return a ? NaN : (1 / 0) * (l ? -1 : 1); + (a += Math.pow(2, n)), (o -= c); + } + return (l ? -1 : 1) * a * Math.pow(2, o - n); + }), + (r.write = function (e, t, r, n, i, o) { + var a, + s, + f, + c = 8 * o - i - 1, + u = (1 << c) - 1, + h = u >> 1, + d = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, + l = n ? 0 : o - 1, + p = n ? 1 : -1, + b = t < 0 || (0 === t && 1 / t < 0) ? 1 : 0; + for ( + t = Math.abs(t), + isNaN(t) || t === 1 / 0 + ? ((s = isNaN(t) ? 1 : 0), (a = u)) + : ((a = Math.floor(Math.log(t) / Math.LN2)), + t * (f = Math.pow(2, -a)) < 1 && (a--, (f *= 2)), + (t += a + h >= 1 ? d / f : d * Math.pow(2, 1 - h)) * f >= + 2 && (a++, (f /= 2)), + a + h >= u + ? ((s = 0), (a = u)) + : a + h >= 1 + ? ((s = (t * f - 1) * Math.pow(2, i)), (a += h)) + : ((s = t * Math.pow(2, h - 1) * Math.pow(2, i)), + (a = 0))); + i >= 8; + e[r + l] = 255 & s, l += p, s /= 256, i -= 8 + ); + for ( + a = (a << i) | s, c += i; + c > 0; + e[r + l] = 255 & a, l += p, a /= 256, c -= 8 + ); + e[r + l - p] |= 128 * b; + }); + }, + {}, + ], + 127: [ + function (e, t, r) { + "function" == typeof Object.create + ? (t.exports = function (e, t) { + t && + ((e.super_ = t), + (e.prototype = Object.create(t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0, + }, + }))); + }) + : (t.exports = function (e, t) { + if (t) { + e.super_ = t; + var r = function () {}; + (r.prototype = t.prototype), + (e.prototype = new r()), + (e.prototype.constructor = e); + } + }); + }, + {}, + ], + 128: [ + function (e, t, r) { + function n(e) { + return ( + !!e.constructor && + "function" == typeof e.constructor.isBuffer && + e.constructor.isBuffer(e) + ); + } + t.exports = function (e) { + return ( + null != e && + (n(e) || + (function (e) { + return ( + "function" == typeof e.readFloatLE && + "function" == typeof e.slice && + n(e.slice(0, 0)) + ); + })(e) || + !!e._isBuffer) + ); + }; + }, + {}, + ], + 129: [ + function (e, t, r) { + var n = {}.toString; + t.exports = + Array.isArray || + function (e) { + return "[object Array]" == n.call(e); + }; + }, + {}, + ], + 130: [ + function (e, t, r) { + "use strict"; + var n = e("inherits"), + i = e("hash-base"), + o = e("safe-buffer").Buffer, + a = new Array(16); + function s() { + i.call(this, 64), + (this._a = 1732584193), + (this._b = 4023233417), + (this._c = 2562383102), + (this._d = 271733878); + } + function f(e, t) { + return (e << t) | (e >>> (32 - t)); + } + function c(e, t, r, n, i, o, a) { + return (f((e + ((t & r) | (~t & n)) + i + o) | 0, a) + t) | 0; + } + function u(e, t, r, n, i, o, a) { + return (f((e + ((t & n) | (r & ~n)) + i + o) | 0, a) + t) | 0; + } + function h(e, t, r, n, i, o, a) { + return (f((e + (t ^ r ^ n) + i + o) | 0, a) + t) | 0; + } + function d(e, t, r, n, i, o, a) { + return (f((e + (r ^ (t | ~n)) + i + o) | 0, a) + t) | 0; + } + n(s, i), + (s.prototype._update = function () { + for (var e = a, t = 0; t < 16; ++t) + e[t] = this._block.readInt32LE(4 * t); + var r = this._a, + n = this._b, + i = this._c, + o = this._d; + (r = c(r, n, i, o, e[0], 3614090360, 7)), + (o = c(o, r, n, i, e[1], 3905402710, 12)), + (i = c(i, o, r, n, e[2], 606105819, 17)), + (n = c(n, i, o, r, e[3], 3250441966, 22)), + (r = c(r, n, i, o, e[4], 4118548399, 7)), + (o = c(o, r, n, i, e[5], 1200080426, 12)), + (i = c(i, o, r, n, e[6], 2821735955, 17)), + (n = c(n, i, o, r, e[7], 4249261313, 22)), + (r = c(r, n, i, o, e[8], 1770035416, 7)), + (o = c(o, r, n, i, e[9], 2336552879, 12)), + (i = c(i, o, r, n, e[10], 4294925233, 17)), + (n = c(n, i, o, r, e[11], 2304563134, 22)), + (r = c(r, n, i, o, e[12], 1804603682, 7)), + (o = c(o, r, n, i, e[13], 4254626195, 12)), + (i = c(i, o, r, n, e[14], 2792965006, 17)), + (r = u( + r, + (n = c(n, i, o, r, e[15], 1236535329, 22)), + i, + o, + e[1], + 4129170786, + 5, + )), + (o = u(o, r, n, i, e[6], 3225465664, 9)), + (i = u(i, o, r, n, e[11], 643717713, 14)), + (n = u(n, i, o, r, e[0], 3921069994, 20)), + (r = u(r, n, i, o, e[5], 3593408605, 5)), + (o = u(o, r, n, i, e[10], 38016083, 9)), + (i = u(i, o, r, n, e[15], 3634488961, 14)), + (n = u(n, i, o, r, e[4], 3889429448, 20)), + (r = u(r, n, i, o, e[9], 568446438, 5)), + (o = u(o, r, n, i, e[14], 3275163606, 9)), + (i = u(i, o, r, n, e[3], 4107603335, 14)), + (n = u(n, i, o, r, e[8], 1163531501, 20)), + (r = u(r, n, i, o, e[13], 2850285829, 5)), + (o = u(o, r, n, i, e[2], 4243563512, 9)), + (i = u(i, o, r, n, e[7], 1735328473, 14)), + (r = h( + r, + (n = u(n, i, o, r, e[12], 2368359562, 20)), + i, + o, + e[5], + 4294588738, + 4, + )), + (o = h(o, r, n, i, e[8], 2272392833, 11)), + (i = h(i, o, r, n, e[11], 1839030562, 16)), + (n = h(n, i, o, r, e[14], 4259657740, 23)), + (r = h(r, n, i, o, e[1], 2763975236, 4)), + (o = h(o, r, n, i, e[4], 1272893353, 11)), + (i = h(i, o, r, n, e[7], 4139469664, 16)), + (n = h(n, i, o, r, e[10], 3200236656, 23)), + (r = h(r, n, i, o, e[13], 681279174, 4)), + (o = h(o, r, n, i, e[0], 3936430074, 11)), + (i = h(i, o, r, n, e[3], 3572445317, 16)), + (n = h(n, i, o, r, e[6], 76029189, 23)), + (r = h(r, n, i, o, e[9], 3654602809, 4)), + (o = h(o, r, n, i, e[12], 3873151461, 11)), + (i = h(i, o, r, n, e[15], 530742520, 16)), + (r = d( + r, + (n = h(n, i, o, r, e[2], 3299628645, 23)), + i, + o, + e[0], + 4096336452, + 6, + )), + (o = d(o, r, n, i, e[7], 1126891415, 10)), + (i = d(i, o, r, n, e[14], 2878612391, 15)), + (n = d(n, i, o, r, e[5], 4237533241, 21)), + (r = d(r, n, i, o, e[12], 1700485571, 6)), + (o = d(o, r, n, i, e[3], 2399980690, 10)), + (i = d(i, o, r, n, e[10], 4293915773, 15)), + (n = d(n, i, o, r, e[1], 2240044497, 21)), + (r = d(r, n, i, o, e[8], 1873313359, 6)), + (o = d(o, r, n, i, e[15], 4264355552, 10)), + (i = d(i, o, r, n, e[6], 2734768916, 15)), + (n = d(n, i, o, r, e[13], 1309151649, 21)), + (r = d(r, n, i, o, e[4], 4149444226, 6)), + (o = d(o, r, n, i, e[11], 3174756917, 10)), + (i = d(i, o, r, n, e[2], 718787259, 15)), + (n = d(n, i, o, r, e[9], 3951481745, 21)), + (this._a = (this._a + r) | 0), + (this._b = (this._b + n) | 0), + (this._c = (this._c + i) | 0), + (this._d = (this._d + o) | 0); + }), + (s.prototype._digest = function () { + (this._block[this._blockOffset++] = 128), + this._blockOffset > 56 && + (this._block.fill(0, this._blockOffset, 64), + this._update(), + (this._blockOffset = 0)), + this._block.fill(0, this._blockOffset, 56), + this._block.writeUInt32LE(this._length[0], 56), + this._block.writeUInt32LE(this._length[1], 60), + this._update(); + var e = o.allocUnsafe(16); + return ( + e.writeInt32LE(this._a, 0), + e.writeInt32LE(this._b, 4), + e.writeInt32LE(this._c, 8), + e.writeInt32LE(this._d, 12), + e + ); + }), + (t.exports = s); + }, + { "hash-base": 112, inherits: 127, "safe-buffer": 170 }, + ], + 131: [ + function (e, t, r) { + var n = e("bn.js"), + i = e("brorand"); + function o(e) { + this.rand = e || new i.Rand(); + } + (t.exports = o), + (o.create = function (e) { + return new o(e); + }), + (o.prototype._randbelow = function (e) { + var t = e.bitLength(), + r = Math.ceil(t / 8); + do { + var i = new n(this.rand.generate(r)); + } while (i.cmp(e) >= 0); + return i; + }), + (o.prototype._randrange = function (e, t) { + var r = t.sub(e); + return e.add(this._randbelow(r)); + }), + (o.prototype.test = function (e, t, r) { + var i = e.bitLength(), + o = n.mont(e), + a = new n(1).toRed(o); + t || (t = Math.max(1, (i / 48) | 0)); + for (var s = e.subn(1), f = 0; !s.testn(f); f++); + for (var c = e.shrn(f), u = s.toRed(o); t > 0; t--) { + var h = this._randrange(new n(2), s); + r && r(h); + var d = h.toRed(o).redPow(c); + if (0 !== d.cmp(a) && 0 !== d.cmp(u)) { + for (var l = 1; l < f; l++) { + if (0 === (d = d.redSqr()).cmp(a)) return !1; + if (0 === d.cmp(u)) break; + } + if (l === f) return !1; + } + } + return !0; + }), + (o.prototype.getDivisor = function (e, t) { + var r = e.bitLength(), + i = n.mont(e), + o = new n(1).toRed(i); + t || (t = Math.max(1, (r / 48) | 0)); + for (var a = e.subn(1), s = 0; !a.testn(s); s++); + for (var f = e.shrn(s), c = a.toRed(i); t > 0; t--) { + var u = this._randrange(new n(2), a), + h = e.gcd(u); + if (0 !== h.cmpn(1)) return h; + var d = u.toRed(i).redPow(f); + if (0 !== d.cmp(o) && 0 !== d.cmp(c)) { + for (var l = 1; l < s; l++) { + if (0 === (d = d.redSqr()).cmp(o)) + return d.fromRed().subn(1).gcd(e); + if (0 === d.cmp(c)) break; + } + if (l === s) return (d = d.redSqr()).fromRed().subn(1).gcd(e); + } + } + return !1; + }); + }, + { "bn.js": 44, brorand: 45 }, + ], + 132: [ + function (e, t, r) { + function n(e, t) { + if (!e) throw new Error(t || "Assertion failed"); + } + (t.exports = n), + (n.equal = function (e, t, r) { + if (e != t) + throw new Error(r || "Assertion failed: " + e + " != " + t); + }); + }, + {}, + ], + 133: [ + function (e, t, r) { + "use strict"; + var n = r; + function i(e) { + return 1 === e.length ? "0" + e : e; + } + function o(e) { + for (var t = "", r = 0; r < e.length; r++) + t += i(e[r].toString(16)); + return t; + } + (n.toArray = function (e, t) { + if (Array.isArray(e)) return e.slice(); + if (!e) return []; + var r = []; + if ("string" != typeof e) { + for (var n = 0; n < e.length; n++) r[n] = 0 | e[n]; + return r; + } + if ("hex" === t) + for ( + (e = e.replace(/[^a-z0-9]+/gi, "")).length % 2 != 0 && + (e = "0" + e), + n = 0; + n < e.length; + n += 2 + ) + r.push(parseInt(e[n] + e[n + 1], 16)); + else + for (n = 0; n < e.length; n++) { + var i = e.charCodeAt(n), + o = i >> 8, + a = 255 & i; + o ? r.push(o, a) : r.push(a); + } + return r; + }), + (n.zero2 = i), + (n.toHex = o), + (n.encode = function (e, t) { + return "hex" === t ? o(e) : e; + }); + }, + {}, + ], + 134: [ + function (e, t, r) { + t.exports = { + "2.16.840.1.101.3.4.1.1": "aes-128-ecb", + "2.16.840.1.101.3.4.1.2": "aes-128-cbc", + "2.16.840.1.101.3.4.1.3": "aes-128-ofb", + "2.16.840.1.101.3.4.1.4": "aes-128-cfb", + "2.16.840.1.101.3.4.1.21": "aes-192-ecb", + "2.16.840.1.101.3.4.1.22": "aes-192-cbc", + "2.16.840.1.101.3.4.1.23": "aes-192-ofb", + "2.16.840.1.101.3.4.1.24": "aes-192-cfb", + "2.16.840.1.101.3.4.1.41": "aes-256-ecb", + "2.16.840.1.101.3.4.1.42": "aes-256-cbc", + "2.16.840.1.101.3.4.1.43": "aes-256-ofb", + "2.16.840.1.101.3.4.1.44": "aes-256-cfb", + }; + }, + {}, + ], + 135: [ + function (e, t, r) { + "use strict"; + var n = e("asn1.js"); + r.certificate = e("./certificate"); + var i = n.define("RSAPrivateKey", function () { + this.seq().obj( + this.key("version").int(), + this.key("modulus").int(), + this.key("publicExponent").int(), + this.key("privateExponent").int(), + this.key("prime1").int(), + this.key("prime2").int(), + this.key("exponent1").int(), + this.key("exponent2").int(), + this.key("coefficient").int(), + ); + }); + r.RSAPrivateKey = i; + var o = n.define("RSAPublicKey", function () { + this.seq().obj( + this.key("modulus").int(), + this.key("publicExponent").int(), + ); + }); + r.RSAPublicKey = o; + var a = n.define("SubjectPublicKeyInfo", function () { + this.seq().obj( + this.key("algorithm").use(s), + this.key("subjectPublicKey").bitstr(), + ); + }); + r.PublicKey = a; + var s = n.define("AlgorithmIdentifier", function () { + this.seq().obj( + this.key("algorithm").objid(), + this.key("none").null_().optional(), + this.key("curve").objid().optional(), + this.key("params") + .seq() + .obj( + this.key("p").int(), + this.key("q").int(), + this.key("g").int(), + ) + .optional(), + ); + }), + f = n.define("PrivateKeyInfo", function () { + this.seq().obj( + this.key("version").int(), + this.key("algorithm").use(s), + this.key("subjectPrivateKey").octstr(), + ); + }); + r.PrivateKey = f; + var c = n.define("EncryptedPrivateKeyInfo", function () { + this.seq().obj( + this.key("algorithm") + .seq() + .obj( + this.key("id").objid(), + this.key("decrypt") + .seq() + .obj( + this.key("kde") + .seq() + .obj( + this.key("id").objid(), + this.key("kdeparams") + .seq() + .obj( + this.key("salt").octstr(), + this.key("iters").int(), + ), + ), + this.key("cipher") + .seq() + .obj(this.key("algo").objid(), this.key("iv").octstr()), + ), + ), + this.key("subjectPrivateKey").octstr(), + ); + }); + r.EncryptedPrivateKey = c; + var u = n.define("DSAPrivateKey", function () { + this.seq().obj( + this.key("version").int(), + this.key("p").int(), + this.key("q").int(), + this.key("g").int(), + this.key("pub_key").int(), + this.key("priv_key").int(), + ); + }); + (r.DSAPrivateKey = u), + (r.DSAparam = n.define("DSAparam", function () { + this.int(); + })); + var h = n.define("ECPrivateKey", function () { + this.seq().obj( + this.key("version").int(), + this.key("privateKey").octstr(), + this.key("parameters").optional().explicit(0).use(d), + this.key("publicKey").optional().explicit(1).bitstr(), + ); + }); + r.ECPrivateKey = h; + var d = n.define("ECParameters", function () { + this.choice({ namedCurve: this.objid() }); + }); + r.signature = n.define("signature", function () { + this.seq().obj(this.key("r").int(), this.key("s").int()); + }); + }, + { "./certificate": 136, "asn1.js": 29 }, + ], + 136: [ + function (e, t, r) { + "use strict"; + var n = e("asn1.js"), + i = n.define("Time", function () { + this.choice({ + utcTime: this.utctime(), + generalTime: this.gentime(), + }); + }), + o = n.define("AttributeTypeValue", function () { + this.seq().obj(this.key("type").objid(), this.key("value").any()); + }), + a = n.define("AlgorithmIdentifier", function () { + this.seq().obj( + this.key("algorithm").objid(), + this.key("parameters").optional(), + this.key("curve").objid().optional(), + ); + }), + s = n.define("SubjectPublicKeyInfo", function () { + this.seq().obj( + this.key("algorithm").use(a), + this.key("subjectPublicKey").bitstr(), + ); + }), + f = n.define("RelativeDistinguishedName", function () { + this.setof(o); + }), + c = n.define("RDNSequence", function () { + this.seqof(f); + }), + u = n.define("Name", function () { + this.choice({ rdnSequence: this.use(c) }); + }), + h = n.define("Validity", function () { + this.seq().obj( + this.key("notBefore").use(i), + this.key("notAfter").use(i), + ); + }), + d = n.define("Extension", function () { + this.seq().obj( + this.key("extnID").objid(), + this.key("critical").bool().def(!1), + this.key("extnValue").octstr(), + ); + }), + l = n.define("TBSCertificate", function () { + this.seq().obj( + this.key("version").explicit(0).int().optional(), + this.key("serialNumber").int(), + this.key("signature").use(a), + this.key("issuer").use(u), + this.key("validity").use(h), + this.key("subject").use(u), + this.key("subjectPublicKeyInfo").use(s), + this.key("issuerUniqueID").implicit(1).bitstr().optional(), + this.key("subjectUniqueID").implicit(2).bitstr().optional(), + this.key("extensions").explicit(3).seqof(d).optional(), + ); + }), + p = n.define("X509Certificate", function () { + this.seq().obj( + this.key("tbsCertificate").use(l), + this.key("signatureAlgorithm").use(a), + this.key("signatureValue").bitstr(), + ); + }); + t.exports = p; + }, + { "asn1.js": 29 }, + ], + 137: [ + function (e, t, r) { + var n = + /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m, + i = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m, + o = + /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m, + a = e("evp_bytestokey"), + s = e("browserify-aes"), + f = e("safe-buffer").Buffer; + t.exports = function (e, t) { + var r, + c = e.toString(), + u = c.match(n); + if (u) { + var h = "aes" + u[1], + d = f.from(u[2], "hex"), + l = f.from(u[3].replace(/[\r\n]/g, ""), "base64"), + p = a(t, d.slice(0, 8), parseInt(u[1], 10)).key, + b = [], + y = s.createDecipheriv(h, p, d); + b.push(y.update(l)), b.push(y.final()), (r = f.concat(b)); + } else { + var m = c.match(o); + r = new f(m[2].replace(/[\r\n]/g, ""), "base64"); + } + return { tag: c.match(i)[1], data: r }; + }; + }, + { "browserify-aes": 49, evp_bytestokey: 111, "safe-buffer": 170 }, + ], + 138: [ + function (e, t, r) { + var n = e("./asn1"), + i = e("./aesid.json"), + o = e("./fixProc"), + a = e("browserify-aes"), + s = e("pbkdf2"), + f = e("safe-buffer").Buffer; + function c(e) { + var t; + "object" != typeof e || + f.isBuffer(e) || + ((t = e.passphrase), (e = e.key)), + "string" == typeof e && (e = f.from(e)); + var r, + c, + u = o(e, t), + h = u.tag, + d = u.data; + switch (h) { + case "CERTIFICATE": + c = n.certificate.decode(d, "der").tbsCertificate + .subjectPublicKeyInfo; + case "PUBLIC KEY": + switch ( + (c || (c = n.PublicKey.decode(d, "der")), + (r = c.algorithm.algorithm.join("."))) + ) { + case "1.2.840.113549.1.1.1": + return n.RSAPublicKey.decode( + c.subjectPublicKey.data, + "der", + ); + case "1.2.840.10045.2.1": + return ( + (c.subjectPrivateKey = c.subjectPublicKey), + { type: "ec", data: c } + ); + case "1.2.840.10040.4.1": + return ( + (c.algorithm.params.pub_key = n.DSAparam.decode( + c.subjectPublicKey.data, + "der", + )), + { type: "dsa", data: c.algorithm.params } + ); + default: + throw new Error("unknown key id " + r); + } + throw new Error("unknown key type " + h); + case "ENCRYPTED PRIVATE KEY": + d = (function (e, t) { + var r = e.algorithm.decrypt.kde.kdeparams.salt, + n = parseInt( + e.algorithm.decrypt.kde.kdeparams.iters.toString(), + 10, + ), + o = i[e.algorithm.decrypt.cipher.algo.join(".")], + c = e.algorithm.decrypt.cipher.iv, + u = e.subjectPrivateKey, + h = parseInt(o.split("-")[1], 10) / 8, + d = s.pbkdf2Sync(t, r, n, h, "sha1"), + l = a.createDecipheriv(o, d, c), + p = []; + return p.push(l.update(u)), p.push(l.final()), f.concat(p); + })((d = n.EncryptedPrivateKey.decode(d, "der")), t); + case "PRIVATE KEY": + switch ( + (r = (c = n.PrivateKey.decode( + d, + "der", + )).algorithm.algorithm.join(".")) + ) { + case "1.2.840.113549.1.1.1": + return n.RSAPrivateKey.decode(c.subjectPrivateKey, "der"); + case "1.2.840.10045.2.1": + return { + curve: c.algorithm.curve, + privateKey: n.ECPrivateKey.decode( + c.subjectPrivateKey, + "der", + ).privateKey, + }; + case "1.2.840.10040.4.1": + return ( + (c.algorithm.params.priv_key = n.DSAparam.decode( + c.subjectPrivateKey, + "der", + )), + { type: "dsa", params: c.algorithm.params } + ); + default: + throw new Error("unknown key id " + r); + } + throw new Error("unknown key type " + h); + case "RSA PUBLIC KEY": + return n.RSAPublicKey.decode(d, "der"); + case "RSA PRIVATE KEY": + return n.RSAPrivateKey.decode(d, "der"); + case "DSA PRIVATE KEY": + return { + type: "dsa", + params: n.DSAPrivateKey.decode(d, "der"), + }; + case "EC PRIVATE KEY": + return { + curve: (d = n.ECPrivateKey.decode(d, "der")).parameters.value, + privateKey: d.privateKey, + }; + default: + throw new Error("unknown key type " + h); + } + } + (t.exports = c), (c.signature = n.signature); + }, + { + "./aesid.json": 134, + "./asn1": 135, + "./fixProc": 137, + "browserify-aes": 49, + pbkdf2: 139, + "safe-buffer": 170, + }, + ], + 139: [ + function (e, t, r) { + (r.pbkdf2 = e("./lib/async")), (r.pbkdf2Sync = e("./lib/sync")); + }, + { "./lib/async": 140, "./lib/sync": 143 }, + ], + 140: [ + function (e, t, r) { + (function (r, n) { + var i, + o = e("./precondition"), + a = e("./default-encoding"), + s = e("./sync"), + f = e("safe-buffer").Buffer, + c = n.crypto && n.crypto.subtle, + u = { + sha: "SHA-1", + "sha-1": "SHA-1", + sha1: "SHA-1", + sha256: "SHA-256", + "sha-256": "SHA-256", + sha384: "SHA-384", + "sha-384": "SHA-384", + "sha-512": "SHA-512", + sha512: "SHA-512", + }, + h = []; + function d(e, t, r, n, i) { + return c + .importKey("raw", e, { name: "PBKDF2" }, !1, ["deriveBits"]) + .then(function (e) { + return c.deriveBits( + { + name: "PBKDF2", + salt: t, + iterations: r, + hash: { name: i }, + }, + e, + n << 3, + ); + }) + .then(function (e) { + return f.from(e); + }); + } + t.exports = function (e, t, l, p, b, y) { + "function" == typeof b && ((y = b), (b = void 0)); + var m = u[(b = b || "sha1").toLowerCase()]; + if (!m || "function" != typeof n.Promise) + return r.nextTick(function () { + var r; + try { + r = s(e, t, l, p, b); + } catch (e) { + return y(e); + } + y(null, r); + }); + if ((o(e, t, l, p), "function" != typeof y)) + throw new Error("No callback provided to pbkdf2"); + f.isBuffer(e) || (e = f.from(e, a)), + f.isBuffer(t) || (t = f.from(t, a)), + (function (e, t) { + e.then( + function (e) { + r.nextTick(function () { + t(null, e); + }); + }, + function (e) { + r.nextTick(function () { + t(e); + }); + }, + ); + })( + (function (e) { + if (n.process && !n.process.browser) + return Promise.resolve(!1); + if (!c || !c.importKey || !c.deriveBits) + return Promise.resolve(!1); + if (void 0 !== h[e]) return h[e]; + var t = d((i = i || f.alloc(8)), i, 10, 128, e) + .then(function () { + return !0; + }) + .catch(function () { + return !1; + }); + return (h[e] = t), t; + })(m).then(function (r) { + return r ? d(e, t, l, p, m) : s(e, t, l, p, b); + }), + y, + ); + }; + }).call( + this, + e("_process"), + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + { + "./default-encoding": 141, + "./precondition": 142, + "./sync": 143, + _process: 145, + "safe-buffer": 170, + }, + ], + 141: [ + function (e, t, r) { + (function (e) { + var r; + e.browser + ? (r = "utf-8") + : (r = + parseInt(e.version.split(".")[0].slice(1), 10) >= 6 + ? "utf-8" + : "binary"); + t.exports = r; + }).call(this, e("_process")); + }, + { _process: 145 }, + ], + 142: [ + function (e, t, r) { + (function (e) { + var r = Math.pow(2, 30) - 1; + function n(t, r) { + if ("string" != typeof t && !e.isBuffer(t)) + throw new TypeError(r + " must be a buffer or string"); + } + t.exports = function (e, t, i, o) { + if ((n(e, "Password"), n(t, "Salt"), "number" != typeof i)) + throw new TypeError("Iterations not a number"); + if (i < 0) throw new TypeError("Bad iterations"); + if ("number" != typeof o) + throw new TypeError("Key length not a number"); + if (o < 0 || o > r || o != o) + throw new TypeError("Bad key length"); + }; + }).call(this, { isBuffer: e("../../is-buffer/index.js") }); + }, + { "../../is-buffer/index.js": 128 }, + ], + 143: [ + function (e, t, r) { + var n = e("create-hash/md5"), + i = e("ripemd160"), + o = e("sha.js"), + a = e("./precondition"), + s = e("./default-encoding"), + f = e("safe-buffer").Buffer, + c = f.alloc(128), + u = { + md5: 16, + sha1: 20, + sha224: 28, + sha256: 32, + sha384: 48, + sha512: 64, + rmd160: 20, + ripemd160: 20, + }; + function h(e, t, r) { + var a = (function (e) { + return "rmd160" === e || "ripemd160" === e + ? function (e) { + return new i().update(e).digest(); + } + : "md5" === e + ? n + : function (t) { + return o(e).update(t).digest(); + }; + })(e), + s = "sha512" === e || "sha384" === e ? 128 : 64; + t.length > s + ? (t = a(t)) + : t.length < s && (t = f.concat([t, c], s)); + for ( + var h = f.allocUnsafe(s + u[e]), + d = f.allocUnsafe(s + u[e]), + l = 0; + l < s; + l++ + ) + (h[l] = 54 ^ t[l]), (d[l] = 92 ^ t[l]); + var p = f.allocUnsafe(s + r + 4); + h.copy(p, 0, 0, s), + (this.ipad1 = p), + (this.ipad2 = h), + (this.opad = d), + (this.alg = e), + (this.blocksize = s), + (this.hash = a), + (this.size = u[e]); + } + (h.prototype.run = function (e, t) { + return ( + e.copy(t, this.blocksize), + this.hash(t).copy(this.opad, this.blocksize), + this.hash(this.opad) + ); + }), + (t.exports = function (e, t, r, n, i) { + a(e, t, r, n), + f.isBuffer(e) || (e = f.from(e, s)), + f.isBuffer(t) || (t = f.from(t, s)); + var o = new h((i = i || "sha1"), e, t.length), + c = f.allocUnsafe(n), + d = f.allocUnsafe(t.length + 4); + t.copy(d, 0, 0, t.length); + for ( + var l = 0, p = u[i], b = Math.ceil(n / p), y = 1; + y <= b; + y++ + ) { + d.writeUInt32BE(y, t.length); + for (var m = o.run(d, o.ipad1), v = m, g = 1; g < r; g++) { + v = o.run(v, o.ipad2); + for (var w = 0; w < p; w++) m[w] ^= v[w]; + } + m.copy(c, l), (l += p); + } + return c; + }); + }, + { + "./default-encoding": 141, + "./precondition": 142, + "create-hash/md5": 80, + ripemd160: 169, + "safe-buffer": 170, + "sha.js": 172, + }, + ], + 144: [ + function (e, t, r) { + (function (e) { + "use strict"; + void 0 === e || + !e.version || + 0 === e.version.indexOf("v0.") || + (0 === e.version.indexOf("v1.") && 0 !== e.version.indexOf("v1.8.")) + ? (t.exports = { + nextTick: function (t, r, n, i) { + if ("function" != typeof t) + throw new TypeError( + '"callback" argument must be a function', + ); + var o, + a, + s = arguments.length; + switch (s) { + case 0: + case 1: + return e.nextTick(t); + case 2: + return e.nextTick(function () { + t.call(null, r); + }); + case 3: + return e.nextTick(function () { + t.call(null, r, n); + }); + case 4: + return e.nextTick(function () { + t.call(null, r, n, i); + }); + default: + for (o = new Array(s - 1), a = 0; a < o.length; ) + o[a++] = arguments[a]; + return e.nextTick(function () { + t.apply(null, o); + }); + } + }, + }) + : (t.exports = e); + }).call(this, e("_process")); + }, + { _process: 145 }, + ], + 145: [ + function (e, t, r) { + var n, + i, + o = (t.exports = {}); + function a() { + throw new Error("setTimeout has not been defined"); + } + function s() { + throw new Error("clearTimeout has not been defined"); + } + function f(e) { + if (n === setTimeout) return setTimeout(e, 0); + if ((n === a || !n) && setTimeout) + return (n = setTimeout), setTimeout(e, 0); + try { + return n(e, 0); + } catch (t) { + try { + return n.call(null, e, 0); + } catch (t) { + return n.call(this, e, 0); + } + } + } + !(function () { + try { + n = "function" == typeof setTimeout ? setTimeout : a; + } catch (e) { + n = a; + } + try { + i = "function" == typeof clearTimeout ? clearTimeout : s; + } catch (e) { + i = s; + } + })(); + var c, + u = [], + h = !1, + d = -1; + function l() { + h && + c && + ((h = !1), + c.length ? (u = c.concat(u)) : (d = -1), + u.length && p()); + } + function p() { + if (!h) { + var e = f(l); + h = !0; + for (var t = u.length; t; ) { + for (c = u, u = []; ++d < t; ) c && c[d].run(); + (d = -1), (t = u.length); + } + (c = null), + (h = !1), + (function (e) { + if (i === clearTimeout) return clearTimeout(e); + if ((i === s || !i) && clearTimeout) + return (i = clearTimeout), clearTimeout(e); + try { + i(e); + } catch (t) { + try { + return i.call(null, e); + } catch (t) { + return i.call(this, e); + } + } + })(e); + } + } + function b(e, t) { + (this.fun = e), (this.array = t); + } + function y() {} + (o.nextTick = function (e) { + var t = new Array(arguments.length - 1); + if (arguments.length > 1) + for (var r = 1; r < arguments.length; r++) + t[r - 1] = arguments[r]; + u.push(new b(e, t)), 1 !== u.length || h || f(p); + }), + (b.prototype.run = function () { + this.fun.apply(null, this.array); + }), + (o.title = "browser"), + (o.browser = !0), + (o.env = {}), + (o.argv = []), + (o.version = ""), + (o.versions = {}), + (o.on = y), + (o.addListener = y), + (o.once = y), + (o.off = y), + (o.removeListener = y), + (o.removeAllListeners = y), + (o.emit = y), + (o.prependListener = y), + (o.prependOnceListener = y), + (o.listeners = function (e) { + return []; + }), + (o.binding = function (e) { + throw new Error("process.binding is not supported"); + }), + (o.cwd = function () { + return "/"; + }), + (o.chdir = function (e) { + throw new Error("process.chdir is not supported"); + }), + (o.umask = function () { + return 0; + }); + }, + {}, + ], + 146: [ + function (e, t, r) { + (r.publicEncrypt = e("./publicEncrypt")), + (r.privateDecrypt = e("./privateDecrypt")), + (r.privateEncrypt = function (e, t) { + return r.publicEncrypt(e, t, !0); + }), + (r.publicDecrypt = function (e, t) { + return r.privateDecrypt(e, t, !0); + }); + }, + { "./privateDecrypt": 148, "./publicEncrypt": 149 }, + ], + 147: [ + function (e, t, r) { + var n = e("create-hash"), + i = e("safe-buffer").Buffer; + function o(e) { + var t = i.allocUnsafe(4); + return t.writeUInt32BE(e, 0), t; + } + t.exports = function (e, t) { + for (var r, a = i.alloc(0), s = 0; a.length < t; ) + (r = o(s++)), + (a = i.concat([a, n("sha1").update(e).update(r).digest()])); + return a.slice(0, t); + }; + }, + { "create-hash": 79, "safe-buffer": 170 }, + ], + 148: [ + function (e, t, r) { + var n = e("parse-asn1"), + i = e("./mgf"), + o = e("./xor"), + a = e("bn.js"), + s = e("browserify-rsa"), + f = e("create-hash"), + c = e("./withPublic"), + u = e("safe-buffer").Buffer; + t.exports = function (e, t, r) { + var h; + h = e.padding ? e.padding : r ? 1 : 4; + var d, + l = n(e), + p = l.modulus.byteLength(); + if (t.length > p || new a(t).cmp(l.modulus) >= 0) + throw new Error("decryption error"); + d = r ? c(new a(t), l) : s(t, l); + var b = u.alloc(p - d.length); + if (((d = u.concat([b, d], p)), 4 === h)) + return (function (e, t) { + var r = e.modulus.byteLength(), + n = f("sha1").update(u.alloc(0)).digest(), + a = n.length; + if (0 !== t[0]) throw new Error("decryption error"); + var s = t.slice(1, a + 1), + c = t.slice(a + 1), + h = o(s, i(c, a)), + d = o(c, i(h, r - a - 1)); + if ( + (function (e, t) { + (e = u.from(e)), (t = u.from(t)); + var r = 0, + n = e.length; + e.length !== t.length && + (r++, (n = Math.min(e.length, t.length))); + var i = -1; + for (; ++i < n; ) r += e[i] ^ t[i]; + return r; + })(n, d.slice(0, a)) + ) + throw new Error("decryption error"); + var l = a; + for (; 0 === d[l]; ) l++; + if (1 !== d[l++]) throw new Error("decryption error"); + return d.slice(l); + })(l, d); + if (1 === h) + return (function (e, t, r) { + var n = t.slice(0, 2), + i = 2, + o = 0; + for (; 0 !== t[i++]; ) + if (i >= t.length) { + o++; + break; + } + var a = t.slice(2, i - 1); + (("0002" !== n.toString("hex") && !r) || + ("0001" !== n.toString("hex") && r)) && + o++; + a.length < 8 && o++; + if (o) throw new Error("decryption error"); + return t.slice(i); + })(0, d, r); + if (3 === h) return d; + throw new Error("unknown padding"); + }; + }, + { + "./mgf": 147, + "./withPublic": 150, + "./xor": 151, + "bn.js": 44, + "browserify-rsa": 67, + "create-hash": 79, + "parse-asn1": 138, + "safe-buffer": 170, + }, + ], + 149: [ + function (e, t, r) { + var n = e("parse-asn1"), + i = e("randombytes"), + o = e("create-hash"), + a = e("./mgf"), + s = e("./xor"), + f = e("bn.js"), + c = e("./withPublic"), + u = e("browserify-rsa"), + h = e("safe-buffer").Buffer; + t.exports = function (e, t, r) { + var d; + d = e.padding ? e.padding : r ? 1 : 4; + var l, + p = n(e); + if (4 === d) + l = (function (e, t) { + var r = e.modulus.byteLength(), + n = t.length, + c = o("sha1").update(h.alloc(0)).digest(), + u = c.length, + d = 2 * u; + if (n > r - d - 2) throw new Error("message too long"); + var l = h.alloc(r - n - d - 2), + p = r - u - 1, + b = i(u), + y = s(h.concat([c, l, h.alloc(1, 1), t], p), a(b, p)), + m = s(b, a(y, u)); + return new f(h.concat([h.alloc(1), m, y], r)); + })(p, t); + else if (1 === d) + l = (function (e, t, r) { + var n, + o = t.length, + a = e.modulus.byteLength(); + if (o > a - 11) throw new Error("message too long"); + n = r + ? h.alloc(a - o - 3, 255) + : (function (e) { + var t, + r = h.allocUnsafe(e), + n = 0, + o = i(2 * e), + a = 0; + for (; n < e; ) + a === o.length && ((o = i(2 * e)), (a = 0)), + (t = o[a++]) && (r[n++] = t); + return r; + })(a - o - 3); + return new f( + h.concat([h.from([0, r ? 1 : 2]), n, h.alloc(1), t], a), + ); + })(p, t, r); + else { + if (3 !== d) throw new Error("unknown padding"); + if ((l = new f(t)).cmp(p.modulus) >= 0) + throw new Error("data too long for modulus"); + } + return r ? u(l, p) : c(l, p); + }; + }, + { + "./mgf": 147, + "./withPublic": 150, + "./xor": 151, + "bn.js": 44, + "browserify-rsa": 67, + "create-hash": 79, + "parse-asn1": 138, + randombytes: 152, + "safe-buffer": 170, + }, + ], + 150: [ + function (e, t, r) { + var n = e("bn.js"), + i = e("safe-buffer").Buffer; + t.exports = function (e, t) { + return i.from( + e + .toRed(n.mont(t.modulus)) + .redPow(new n(t.publicExponent)) + .fromRed() + .toArray(), + ); + }; + }, + { "bn.js": 44, "safe-buffer": 170 }, + ], + 151: [ + function (e, t, r) { + t.exports = function (e, t) { + for (var r = e.length, n = -1; ++n < r; ) e[n] ^= t[n]; + return e; + }; + }, + {}, + ], + 152: [ + function (e, t, r) { + (function (r, n) { + "use strict"; + var i = 65536, + o = 4294967295; + var a = e("safe-buffer").Buffer, + s = n.crypto || n.msCrypto; + s && s.getRandomValues + ? (t.exports = function (e, t) { + if (e > o) + throw new RangeError("requested too many random bytes"); + var n = a.allocUnsafe(e); + if (e > 0) + if (e > i) + for (var f = 0; f < e; f += i) + s.getRandomValues(n.slice(f, f + i)); + else s.getRandomValues(n); + if ("function" == typeof t) + return r.nextTick(function () { + t(null, n); + }); + return n; + }) + : (t.exports = function () { + throw new Error( + "Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11", + ); + }); + }).call( + this, + e("_process"), + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + { _process: 145, "safe-buffer": 170 }, + ], + 153: [ + function (e, t, r) { + (function (t, n) { + "use strict"; + function i() { + throw new Error( + "secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11", + ); + } + var o = e("safe-buffer"), + a = e("randombytes"), + s = o.Buffer, + f = o.kMaxLength, + c = n.crypto || n.msCrypto, + u = Math.pow(2, 32) - 1; + function h(e, t) { + if ("number" != typeof e || e != e) + throw new TypeError("offset must be a number"); + if (e > u || e < 0) + throw new TypeError("offset must be a uint32"); + if (e > f || e > t) throw new RangeError("offset out of range"); + } + function d(e, t, r) { + if ("number" != typeof e || e != e) + throw new TypeError("size must be a number"); + if (e > u || e < 0) throw new TypeError("size must be a uint32"); + if (e + t > r || e > f) throw new RangeError("buffer too small"); + } + function l(e, r, n, i) { + if (t.browser) { + var o = e.buffer, + s = new Uint8Array(o, r, n); + return ( + c.getRandomValues(s), + i + ? void t.nextTick(function () { + i(null, e); + }) + : e + ); + } + if (!i) return a(n).copy(e, r), e; + a(n, function (t, n) { + if (t) return i(t); + n.copy(e, r), i(null, e); + }); + } + (c && c.getRandomValues) || !t.browser + ? ((r.randomFill = function (e, t, r, i) { + if (!(s.isBuffer(e) || e instanceof n.Uint8Array)) + throw new TypeError( + '"buf" argument must be a Buffer or Uint8Array', + ); + if ("function" == typeof t) (i = t), (t = 0), (r = e.length); + else if ("function" == typeof r) (i = r), (r = e.length - t); + else if ("function" != typeof i) + throw new TypeError('"cb" argument must be a function'); + return h(t, e.length), d(r, t, e.length), l(e, t, r, i); + }), + (r.randomFillSync = function (e, t, r) { + void 0 === t && (t = 0); + if (!(s.isBuffer(e) || e instanceof n.Uint8Array)) + throw new TypeError( + '"buf" argument must be a Buffer or Uint8Array', + ); + h(t, e.length), void 0 === r && (r = e.length - t); + return d(r, t, e.length), l(e, t, r); + })) + : ((r.randomFill = i), (r.randomFillSync = i)); + }).call( + this, + e("_process"), + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + { _process: 145, randombytes: 152, "safe-buffer": 170 }, + ], + 154: [ + function (e, t, r) { + t.exports = e("./lib/_stream_duplex.js"); + }, + { "./lib/_stream_duplex.js": 155 }, + ], + 155: [ + function (e, t, r) { + "use strict"; + var n = e("process-nextick-args"), + i = + Object.keys || + function (e) { + var t = []; + for (var r in e) t.push(r); + return t; + }; + t.exports = h; + var o = e("core-util-is"); + o.inherits = e("inherits"); + var a = e("./_stream_readable"), + s = e("./_stream_writable"); + o.inherits(h, a); + for (var f = i(s.prototype), c = 0; c < f.length; c++) { + var u = f[c]; + h.prototype[u] || (h.prototype[u] = s.prototype[u]); + } + function h(e) { + if (!(this instanceof h)) return new h(e); + a.call(this, e), + s.call(this, e), + e && !1 === e.readable && (this.readable = !1), + e && !1 === e.writable && (this.writable = !1), + (this.allowHalfOpen = !0), + e && !1 === e.allowHalfOpen && (this.allowHalfOpen = !1), + this.once("end", d); + } + function d() { + this.allowHalfOpen || + this._writableState.ended || + n.nextTick(l, this); + } + function l(e) { + e.end(); + } + Object.defineProperty(h.prototype, "writableHighWaterMark", { + enumerable: !1, + get: function () { + return this._writableState.highWaterMark; + }, + }), + Object.defineProperty(h.prototype, "destroyed", { + get: function () { + return ( + void 0 !== this._readableState && + void 0 !== this._writableState && + this._readableState.destroyed && + this._writableState.destroyed + ); + }, + set: function (e) { + void 0 !== this._readableState && + void 0 !== this._writableState && + ((this._readableState.destroyed = e), + (this._writableState.destroyed = e)); + }, + }), + (h.prototype._destroy = function (e, t) { + this.push(null), this.end(), n.nextTick(t, e); + }); + }, + { + "./_stream_readable": 157, + "./_stream_writable": 159, + "core-util-is": 77, + inherits: 127, + "process-nextick-args": 144, + }, + ], + 156: [ + function (e, t, r) { + "use strict"; + t.exports = o; + var n = e("./_stream_transform"), + i = e("core-util-is"); + function o(e) { + if (!(this instanceof o)) return new o(e); + n.call(this, e); + } + (i.inherits = e("inherits")), + i.inherits(o, n), + (o.prototype._transform = function (e, t, r) { + r(null, e); + }); + }, + { "./_stream_transform": 158, "core-util-is": 77, inherits: 127 }, + ], + 157: [ + function (e, t, r) { + (function (r, n) { + "use strict"; + var i = e("process-nextick-args"); + t.exports = g; + var o, + a = e("isarray"); + g.ReadableState = v; + e("events").EventEmitter; + var s = function (e, t) { + return e.listeners(t).length; + }, + f = e("./internal/streams/stream"), + c = e("safe-buffer").Buffer, + u = n.Uint8Array || function () {}; + var h = e("core-util-is"); + h.inherits = e("inherits"); + var d = e("util"), + l = void 0; + l = d && d.debuglog ? d.debuglog("stream") : function () {}; + var p, + b = e("./internal/streams/BufferList"), + y = e("./internal/streams/destroy"); + h.inherits(g, f); + var m = ["error", "close", "destroy", "pause", "resume"]; + function v(t, r) { + t = t || {}; + var n = r instanceof (o = o || e("./_stream_duplex")); + (this.objectMode = !!t.objectMode), + n && + (this.objectMode = this.objectMode || !!t.readableObjectMode); + var i = t.highWaterMark, + a = t.readableHighWaterMark, + s = this.objectMode ? 16 : 16384; + (this.highWaterMark = + i || 0 === i ? i : n && (a || 0 === a) ? a : s), + (this.highWaterMark = Math.floor(this.highWaterMark)), + (this.buffer = new b()), + (this.length = 0), + (this.pipes = null), + (this.pipesCount = 0), + (this.flowing = null), + (this.ended = !1), + (this.endEmitted = !1), + (this.reading = !1), + (this.sync = !0), + (this.needReadable = !1), + (this.emittedReadable = !1), + (this.readableListening = !1), + (this.resumeScheduled = !1), + (this.destroyed = !1), + (this.defaultEncoding = t.defaultEncoding || "utf8"), + (this.awaitDrain = 0), + (this.readingMore = !1), + (this.decoder = null), + (this.encoding = null), + t.encoding && + (p || (p = e("string_decoder/").StringDecoder), + (this.decoder = new p(t.encoding)), + (this.encoding = t.encoding)); + } + function g(t) { + if (((o = o || e("./_stream_duplex")), !(this instanceof g))) + return new g(t); + (this._readableState = new v(t, this)), + (this.readable = !0), + t && + ("function" == typeof t.read && (this._read = t.read), + "function" == typeof t.destroy && + (this._destroy = t.destroy)), + f.call(this); + } + function w(e, t, r, n, i) { + var o, + a = e._readableState; + null === t + ? ((a.reading = !1), + (function (e, t) { + if (t.ended) return; + if (t.decoder) { + var r = t.decoder.end(); + r && + r.length && + (t.buffer.push(r), + (t.length += t.objectMode ? 1 : r.length)); + } + (t.ended = !0), M(e); + })(e, a)) + : (i || + (o = (function (e, t) { + var r; + (n = t), + c.isBuffer(n) || + n instanceof u || + "string" == typeof t || + void 0 === t || + e.objectMode || + (r = new TypeError( + "Invalid non-string/buffer chunk", + )); + var n; + return r; + })(a, t)), + o + ? e.emit("error", o) + : a.objectMode || (t && t.length > 0) + ? ("string" == typeof t || + a.objectMode || + Object.getPrototypeOf(t) === c.prototype || + (t = (function (e) { + return c.from(e); + })(t)), + n + ? a.endEmitted + ? e.emit( + "error", + new Error("stream.unshift() after end event"), + ) + : _(e, a, t, !0) + : a.ended + ? e.emit("error", new Error("stream.push() after EOF")) + : ((a.reading = !1), + a.decoder && !r + ? ((t = a.decoder.write(t)), + a.objectMode || 0 !== t.length + ? _(e, a, t, !1) + : x(e, a)) + : _(e, a, t, !1))) + : n || (a.reading = !1)); + return (function (e) { + return ( + !e.ended && + (e.needReadable || + e.length < e.highWaterMark || + 0 === e.length) + ); + })(a); + } + function _(e, t, r, n) { + t.flowing && 0 === t.length && !t.sync + ? (e.emit("data", r), e.read(0)) + : ((t.length += t.objectMode ? 1 : r.length), + n ? t.buffer.unshift(r) : t.buffer.push(r), + t.needReadable && M(e)), + x(e, t); + } + Object.defineProperty(g.prototype, "destroyed", { + get: function () { + return ( + void 0 !== this._readableState && + this._readableState.destroyed + ); + }, + set: function (e) { + this._readableState && (this._readableState.destroyed = e); + }, + }), + (g.prototype.destroy = y.destroy), + (g.prototype._undestroy = y.undestroy), + (g.prototype._destroy = function (e, t) { + this.push(null), t(e); + }), + (g.prototype.push = function (e, t) { + var r, + n = this._readableState; + return ( + n.objectMode + ? (r = !0) + : "string" == typeof e && + ((t = t || n.defaultEncoding) !== n.encoding && + ((e = c.from(e, t)), (t = "")), + (r = !0)), + w(this, e, t, !1, r) + ); + }), + (g.prototype.unshift = function (e) { + return w(this, e, null, !0, !1); + }), + (g.prototype.isPaused = function () { + return !1 === this._readableState.flowing; + }), + (g.prototype.setEncoding = function (t) { + return ( + p || (p = e("string_decoder/").StringDecoder), + (this._readableState.decoder = new p(t)), + (this._readableState.encoding = t), + this + ); + }); + var S = 8388608; + function E(e, t) { + return e <= 0 || (0 === t.length && t.ended) + ? 0 + : t.objectMode + ? 1 + : e != e + ? t.flowing && t.length + ? t.buffer.head.data.length + : t.length + : (e > t.highWaterMark && + (t.highWaterMark = (function (e) { + return ( + e >= S + ? (e = S) + : (e--, + (e |= e >>> 1), + (e |= e >>> 2), + (e |= e >>> 4), + (e |= e >>> 8), + (e |= e >>> 16), + e++), + e + ); + })(e)), + e <= t.length + ? e + : t.ended + ? t.length + : ((t.needReadable = !0), 0)); + } + function M(e) { + var t = e._readableState; + (t.needReadable = !1), + t.emittedReadable || + (l("emitReadable", t.flowing), + (t.emittedReadable = !0), + t.sync ? i.nextTick(k, e) : k(e)); + } + function k(e) { + l("emit readable"), e.emit("readable"), I(e); + } + function x(e, t) { + t.readingMore || ((t.readingMore = !0), i.nextTick(A, e, t)); + } + function A(e, t) { + for ( + var r = t.length; + !t.reading && + !t.flowing && + !t.ended && + t.length < t.highWaterMark && + (l("maybeReadMore read 0"), e.read(0), r !== t.length); + + ) + r = t.length; + t.readingMore = !1; + } + function j(e) { + l("readable nexttick read 0"), e.read(0); + } + function B(e, t) { + t.reading || (l("resume read 0"), e.read(0)), + (t.resumeScheduled = !1), + (t.awaitDrain = 0), + e.emit("resume"), + I(e), + t.flowing && !t.reading && e.read(0); + } + function I(e) { + var t = e._readableState; + for (l("flow", t.flowing); t.flowing && null !== e.read(); ); + } + function R(e, t) { + return 0 === t.length + ? null + : (t.objectMode + ? (r = t.buffer.shift()) + : !e || e >= t.length + ? ((r = t.decoder + ? t.buffer.join("") + : 1 === t.buffer.length + ? t.buffer.head.data + : t.buffer.concat(t.length)), + t.buffer.clear()) + : (r = (function (e, t, r) { + var n; + e < t.head.data.length + ? ((n = t.head.data.slice(0, e)), + (t.head.data = t.head.data.slice(e))) + : (n = + e === t.head.data.length + ? t.shift() + : r + ? (function (e, t) { + var r = t.head, + n = 1, + i = r.data; + e -= i.length; + for (; (r = r.next); ) { + var o = r.data, + a = e > o.length ? o.length : e; + if ( + (a === o.length + ? (i += o) + : (i += o.slice(0, e)), + 0 === (e -= a)) + ) { + a === o.length + ? (++n, + r.next + ? (t.head = r.next) + : (t.head = t.tail = null)) + : ((t.head = r), + (r.data = o.slice(a))); + break; + } + ++n; + } + return (t.length -= n), i; + })(e, t) + : (function (e, t) { + var r = c.allocUnsafe(e), + n = t.head, + i = 1; + n.data.copy(r), (e -= n.data.length); + for (; (n = n.next); ) { + var o = n.data, + a = e > o.length ? o.length : e; + if ( + (o.copy(r, r.length - e, 0, a), + 0 === (e -= a)) + ) { + a === o.length + ? (++i, + n.next + ? (t.head = n.next) + : (t.head = t.tail = null)) + : ((t.head = n), + (n.data = o.slice(a))); + break; + } + ++i; + } + return (t.length -= i), r; + })(e, t)); + return n; + })(e, t.buffer, t.decoder)), + r); + var r; + } + function T(e) { + var t = e._readableState; + if (t.length > 0) + throw new Error('"endReadable()" called on non-empty stream'); + t.endEmitted || ((t.ended = !0), i.nextTick(C, t, e)); + } + function C(e, t) { + e.endEmitted || + 0 !== e.length || + ((e.endEmitted = !0), (t.readable = !1), t.emit("end")); + } + function P(e, t) { + for (var r = 0, n = e.length; r < n; r++) + if (e[r] === t) return r; + return -1; + } + (g.prototype.read = function (e) { + l("read", e), (e = parseInt(e, 10)); + var t = this._readableState, + r = e; + if ( + (0 !== e && (t.emittedReadable = !1), + 0 === e && + t.needReadable && + (t.length >= t.highWaterMark || t.ended)) + ) + return ( + l("read: emitReadable", t.length, t.ended), + 0 === t.length && t.ended ? T(this) : M(this), + null + ); + if (0 === (e = E(e, t)) && t.ended) + return 0 === t.length && T(this), null; + var n, + i = t.needReadable; + return ( + l("need readable", i), + (0 === t.length || t.length - e < t.highWaterMark) && + l("length less than watermark", (i = !0)), + t.ended || t.reading + ? l("reading or ended", (i = !1)) + : i && + (l("do read"), + (t.reading = !0), + (t.sync = !0), + 0 === t.length && (t.needReadable = !0), + this._read(t.highWaterMark), + (t.sync = !1), + t.reading || (e = E(r, t))), + null === (n = e > 0 ? R(e, t) : null) + ? ((t.needReadable = !0), (e = 0)) + : (t.length -= e), + 0 === t.length && + (t.ended || (t.needReadable = !0), + r !== e && t.ended && T(this)), + null !== n && this.emit("data", n), + n + ); + }), + (g.prototype._read = function (e) { + this.emit("error", new Error("_read() is not implemented")); + }), + (g.prototype.pipe = function (e, t) { + var n = this, + o = this._readableState; + switch (o.pipesCount) { + case 0: + o.pipes = e; + break; + case 1: + o.pipes = [o.pipes, e]; + break; + default: + o.pipes.push(e); + } + (o.pipesCount += 1), + l("pipe count=%d opts=%j", o.pipesCount, t); + var f = + (!t || !1 !== t.end) && e !== r.stdout && e !== r.stderr + ? u + : g; + function c(t, r) { + l("onunpipe"), + t === n && + r && + !1 === r.hasUnpiped && + ((r.hasUnpiped = !0), + l("cleanup"), + e.removeListener("close", m), + e.removeListener("finish", v), + e.removeListener("drain", h), + e.removeListener("error", y), + e.removeListener("unpipe", c), + n.removeListener("end", u), + n.removeListener("end", g), + n.removeListener("data", b), + (d = !0), + !o.awaitDrain || + (e._writableState && !e._writableState.needDrain) || + h()); + } + function u() { + l("onend"), e.end(); + } + o.endEmitted ? i.nextTick(f) : n.once("end", f), + e.on("unpipe", c); + var h = (function (e) { + return function () { + var t = e._readableState; + l("pipeOnDrain", t.awaitDrain), + t.awaitDrain && t.awaitDrain--, + 0 === t.awaitDrain && + s(e, "data") && + ((t.flowing = !0), I(e)); + }; + })(n); + e.on("drain", h); + var d = !1; + var p = !1; + function b(t) { + l("ondata"), + (p = !1), + !1 !== e.write(t) || + p || + (((1 === o.pipesCount && o.pipes === e) || + (o.pipesCount > 1 && -1 !== P(o.pipes, e))) && + !d && + (l( + "false write response, pause", + n._readableState.awaitDrain, + ), + n._readableState.awaitDrain++, + (p = !0)), + n.pause()); + } + function y(t) { + l("onerror", t), + g(), + e.removeListener("error", y), + 0 === s(e, "error") && e.emit("error", t); + } + function m() { + e.removeListener("finish", v), g(); + } + function v() { + l("onfinish"), e.removeListener("close", m), g(); + } + function g() { + l("unpipe"), n.unpipe(e); + } + return ( + n.on("data", b), + (function (e, t, r) { + if ("function" == typeof e.prependListener) + return e.prependListener(t, r); + e._events && e._events[t] + ? a(e._events[t]) + ? e._events[t].unshift(r) + : (e._events[t] = [r, e._events[t]]) + : e.on(t, r); + })(e, "error", y), + e.once("close", m), + e.once("finish", v), + e.emit("pipe", n), + o.flowing || (l("pipe resume"), n.resume()), + e + ); + }), + (g.prototype.unpipe = function (e) { + var t = this._readableState, + r = { hasUnpiped: !1 }; + if (0 === t.pipesCount) return this; + if (1 === t.pipesCount) + return e && e !== t.pipes + ? this + : (e || (e = t.pipes), + (t.pipes = null), + (t.pipesCount = 0), + (t.flowing = !1), + e && e.emit("unpipe", this, r), + this); + if (!e) { + var n = t.pipes, + i = t.pipesCount; + (t.pipes = null), (t.pipesCount = 0), (t.flowing = !1); + for (var o = 0; o < i; o++) n[o].emit("unpipe", this, r); + return this; + } + var a = P(t.pipes, e); + return -1 === a + ? this + : (t.pipes.splice(a, 1), + (t.pipesCount -= 1), + 1 === t.pipesCount && (t.pipes = t.pipes[0]), + e.emit("unpipe", this, r), + this); + }), + (g.prototype.on = function (e, t) { + var r = f.prototype.on.call(this, e, t); + if ("data" === e) + !1 !== this._readableState.flowing && this.resume(); + else if ("readable" === e) { + var n = this._readableState; + n.endEmitted || + n.readableListening || + ((n.readableListening = n.needReadable = !0), + (n.emittedReadable = !1), + n.reading ? n.length && M(this) : i.nextTick(j, this)); + } + return r; + }), + (g.prototype.addListener = g.prototype.on), + (g.prototype.resume = function () { + var e = this._readableState; + return ( + e.flowing || + (l("resume"), + (e.flowing = !0), + (function (e, t) { + t.resumeScheduled || + ((t.resumeScheduled = !0), i.nextTick(B, e, t)); + })(this, e)), + this + ); + }), + (g.prototype.pause = function () { + return ( + l("call pause flowing=%j", this._readableState.flowing), + !1 !== this._readableState.flowing && + (l("pause"), + (this._readableState.flowing = !1), + this.emit("pause")), + this + ); + }), + (g.prototype.wrap = function (e) { + var t = this, + r = this._readableState, + n = !1; + for (var i in (e.on("end", function () { + if ((l("wrapped end"), r.decoder && !r.ended)) { + var e = r.decoder.end(); + e && e.length && t.push(e); + } + t.push(null); + }), + e.on("data", function (i) { + (l("wrapped data"), + r.decoder && (i = r.decoder.write(i)), + r.objectMode && null == i) || + ((r.objectMode || (i && i.length)) && + (t.push(i) || ((n = !0), e.pause()))); + }), + e)) + void 0 === this[i] && + "function" == typeof e[i] && + (this[i] = (function (t) { + return function () { + return e[t].apply(e, arguments); + }; + })(i)); + for (var o = 0; o < m.length; o++) + e.on(m[o], this.emit.bind(this, m[o])); + return ( + (this._read = function (t) { + l("wrapped _read", t), n && ((n = !1), e.resume()); + }), + this + ); + }), + Object.defineProperty(g.prototype, "readableHighWaterMark", { + enumerable: !1, + get: function () { + return this._readableState.highWaterMark; + }, + }), + (g._fromList = R); + }).call( + this, + e("_process"), + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + { + "./_stream_duplex": 155, + "./internal/streams/BufferList": 160, + "./internal/streams/destroy": 161, + "./internal/streams/stream": 162, + _process: 145, + "core-util-is": 77, + events: 110, + inherits: 127, + isarray: 129, + "process-nextick-args": 144, + "safe-buffer": 163, + "string_decoder/": 164, + util: 46, + }, + ], + 158: [ + function (e, t, r) { + "use strict"; + t.exports = a; + var n = e("./_stream_duplex"), + i = e("core-util-is"); + function o(e, t) { + var r = this._transformState; + r.transforming = !1; + var n = r.writecb; + if (!n) + return this.emit( + "error", + new Error("write callback called multiple times"), + ); + (r.writechunk = null), + (r.writecb = null), + null != t && this.push(t), + n(e); + var i = this._readableState; + (i.reading = !1), + (i.needReadable || i.length < i.highWaterMark) && + this._read(i.highWaterMark); + } + function a(e) { + if (!(this instanceof a)) return new a(e); + n.call(this, e), + (this._transformState = { + afterTransform: o.bind(this), + needTransform: !1, + transforming: !1, + writecb: null, + writechunk: null, + writeencoding: null, + }), + (this._readableState.needReadable = !0), + (this._readableState.sync = !1), + e && + ("function" == typeof e.transform && + (this._transform = e.transform), + "function" == typeof e.flush && (this._flush = e.flush)), + this.on("prefinish", s); + } + function s() { + var e = this; + "function" == typeof this._flush + ? this._flush(function (t, r) { + f(e, t, r); + }) + : f(this, null, null); + } + function f(e, t, r) { + if (t) return e.emit("error", t); + if ((null != r && e.push(r), e._writableState.length)) + throw new Error("Calling transform done when ws.length != 0"); + if (e._transformState.transforming) + throw new Error("Calling transform done when still transforming"); + return e.push(null); + } + (i.inherits = e("inherits")), + i.inherits(a, n), + (a.prototype.push = function (e, t) { + return ( + (this._transformState.needTransform = !1), + n.prototype.push.call(this, e, t) + ); + }), + (a.prototype._transform = function (e, t, r) { + throw new Error("_transform() is not implemented"); + }), + (a.prototype._write = function (e, t, r) { + var n = this._transformState; + if ( + ((n.writecb = r), + (n.writechunk = e), + (n.writeencoding = t), + !n.transforming) + ) { + var i = this._readableState; + (n.needTransform || + i.needReadable || + i.length < i.highWaterMark) && + this._read(i.highWaterMark); + } + }), + (a.prototype._read = function (e) { + var t = this._transformState; + null !== t.writechunk && t.writecb && !t.transforming + ? ((t.transforming = !0), + this._transform( + t.writechunk, + t.writeencoding, + t.afterTransform, + )) + : (t.needTransform = !0); + }), + (a.prototype._destroy = function (e, t) { + var r = this; + n.prototype._destroy.call(this, e, function (e) { + t(e), r.emit("close"); + }); + }); + }, + { "./_stream_duplex": 155, "core-util-is": 77, inherits: 127 }, + ], + 159: [ + function (e, t, r) { + (function (r, n, i) { + "use strict"; + var o = e("process-nextick-args"); + function a(e) { + var t = this; + (this.next = null), + (this.entry = null), + (this.finish = function () { + !(function (e, t, r) { + var n = e.entry; + e.entry = null; + for (; n; ) { + var i = n.callback; + t.pendingcb--, i(r), (n = n.next); + } + t.corkedRequestsFree + ? (t.corkedRequestsFree.next = e) + : (t.corkedRequestsFree = e); + })(t, e); + }); + } + t.exports = v; + var s, + f = + !r.browser && + ["v0.10", "v0.9."].indexOf(r.version.slice(0, 5)) > -1 + ? i + : o.nextTick; + v.WritableState = m; + var c = e("core-util-is"); + c.inherits = e("inherits"); + var u = { deprecate: e("util-deprecate") }, + h = e("./internal/streams/stream"), + d = e("safe-buffer").Buffer, + l = n.Uint8Array || function () {}; + var p, + b = e("./internal/streams/destroy"); + function y() {} + function m(t, r) { + (s = s || e("./_stream_duplex")), (t = t || {}); + var n = r instanceof s; + (this.objectMode = !!t.objectMode), + n && + (this.objectMode = this.objectMode || !!t.writableObjectMode); + var i = t.highWaterMark, + c = t.writableHighWaterMark, + u = this.objectMode ? 16 : 16384; + (this.highWaterMark = + i || 0 === i ? i : n && (c || 0 === c) ? c : u), + (this.highWaterMark = Math.floor(this.highWaterMark)), + (this.finalCalled = !1), + (this.needDrain = !1), + (this.ending = !1), + (this.ended = !1), + (this.finished = !1), + (this.destroyed = !1); + var h = !1 === t.decodeStrings; + (this.decodeStrings = !h), + (this.defaultEncoding = t.defaultEncoding || "utf8"), + (this.length = 0), + (this.writing = !1), + (this.corked = 0), + (this.sync = !0), + (this.bufferProcessing = !1), + (this.onwrite = function (e) { + !(function (e, t) { + var r = e._writableState, + n = r.sync, + i = r.writecb; + if ( + ((function (e) { + (e.writing = !1), + (e.writecb = null), + (e.length -= e.writelen), + (e.writelen = 0); + })(r), + t) + ) + !(function (e, t, r, n, i) { + --t.pendingcb, + r + ? (o.nextTick(i, n), + o.nextTick(M, e, t), + (e._writableState.errorEmitted = !0), + e.emit("error", n)) + : (i(n), + (e._writableState.errorEmitted = !0), + e.emit("error", n), + M(e, t)); + })(e, r, n, t, i); + else { + var a = S(r); + a || + r.corked || + r.bufferProcessing || + !r.bufferedRequest || + _(e, r), + n ? f(w, e, r, a, i) : w(e, r, a, i); + } + })(r, e); + }), + (this.writecb = null), + (this.writelen = 0), + (this.bufferedRequest = null), + (this.lastBufferedRequest = null), + (this.pendingcb = 0), + (this.prefinished = !1), + (this.errorEmitted = !1), + (this.bufferedRequestCount = 0), + (this.corkedRequestsFree = new a(this)); + } + function v(t) { + if ( + ((s = s || e("./_stream_duplex")), + !(p.call(v, this) || this instanceof s)) + ) + return new v(t); + (this._writableState = new m(t, this)), + (this.writable = !0), + t && + ("function" == typeof t.write && (this._write = t.write), + "function" == typeof t.writev && (this._writev = t.writev), + "function" == typeof t.destroy && (this._destroy = t.destroy), + "function" == typeof t.final && (this._final = t.final)), + h.call(this); + } + function g(e, t, r, n, i, o, a) { + (t.writelen = n), + (t.writecb = a), + (t.writing = !0), + (t.sync = !0), + r ? e._writev(i, t.onwrite) : e._write(i, o, t.onwrite), + (t.sync = !1); + } + function w(e, t, r, n) { + r || + (function (e, t) { + 0 === t.length && + t.needDrain && + ((t.needDrain = !1), e.emit("drain")); + })(e, t), + t.pendingcb--, + n(), + M(e, t); + } + function _(e, t) { + t.bufferProcessing = !0; + var r = t.bufferedRequest; + if (e._writev && r && r.next) { + var n = t.bufferedRequestCount, + i = new Array(n), + o = t.corkedRequestsFree; + o.entry = r; + for (var s = 0, f = !0; r; ) + (i[s] = r), r.isBuf || (f = !1), (r = r.next), (s += 1); + (i.allBuffers = f), + g(e, t, !0, t.length, i, "", o.finish), + t.pendingcb++, + (t.lastBufferedRequest = null), + o.next + ? ((t.corkedRequestsFree = o.next), (o.next = null)) + : (t.corkedRequestsFree = new a(t)), + (t.bufferedRequestCount = 0); + } else { + for (; r; ) { + var c = r.chunk, + u = r.encoding, + h = r.callback; + if ( + (g(e, t, !1, t.objectMode ? 1 : c.length, c, u, h), + (r = r.next), + t.bufferedRequestCount--, + t.writing) + ) + break; + } + null === r && (t.lastBufferedRequest = null); + } + (t.bufferedRequest = r), (t.bufferProcessing = !1); + } + function S(e) { + return ( + e.ending && + 0 === e.length && + null === e.bufferedRequest && + !e.finished && + !e.writing + ); + } + function E(e, t) { + e._final(function (r) { + t.pendingcb--, + r && e.emit("error", r), + (t.prefinished = !0), + e.emit("prefinish"), + M(e, t); + }); + } + function M(e, t) { + var r = S(t); + return ( + r && + (!(function (e, t) { + t.prefinished || + t.finalCalled || + ("function" == typeof e._final + ? (t.pendingcb++, + (t.finalCalled = !0), + o.nextTick(E, e, t)) + : ((t.prefinished = !0), e.emit("prefinish"))); + })(e, t), + 0 === t.pendingcb && ((t.finished = !0), e.emit("finish"))), + r + ); + } + c.inherits(v, h), + (m.prototype.getBuffer = function () { + for (var e = this.bufferedRequest, t = []; e; ) + t.push(e), (e = e.next); + return t; + }), + (function () { + try { + Object.defineProperty(m.prototype, "buffer", { + get: u.deprecate( + function () { + return this.getBuffer(); + }, + "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", + "DEP0003", + ), + }); + } catch (e) {} + })(), + "function" == typeof Symbol && + Symbol.hasInstance && + "function" == typeof Function.prototype[Symbol.hasInstance] + ? ((p = Function.prototype[Symbol.hasInstance]), + Object.defineProperty(v, Symbol.hasInstance, { + value: function (e) { + return ( + !!p.call(this, e) || + (this === v && e && e._writableState instanceof m) + ); + }, + })) + : (p = function (e) { + return e instanceof this; + }), + (v.prototype.pipe = function () { + this.emit("error", new Error("Cannot pipe, not readable")); + }), + (v.prototype.write = function (e, t, r) { + var n, + i = this._writableState, + a = !1, + s = + !i.objectMode && ((n = e), d.isBuffer(n) || n instanceof l); + return ( + s && + !d.isBuffer(e) && + (e = (function (e) { + return d.from(e); + })(e)), + "function" == typeof t && ((r = t), (t = null)), + s ? (t = "buffer") : t || (t = i.defaultEncoding), + "function" != typeof r && (r = y), + i.ended + ? (function (e, t) { + var r = new Error("write after end"); + e.emit("error", r), o.nextTick(t, r); + })(this, r) + : (s || + (function (e, t, r, n) { + var i = !0, + a = !1; + return ( + null === r + ? (a = new TypeError( + "May not write null values to stream", + )) + : "string" == typeof r || + void 0 === r || + t.objectMode || + (a = new TypeError( + "Invalid non-string/buffer chunk", + )), + a && + (e.emit("error", a), o.nextTick(n, a), (i = !1)), + i + ); + })(this, i, e, r)) && + (i.pendingcb++, + (a = (function (e, t, r, n, i, o) { + if (!r) { + var a = (function (e, t, r) { + e.objectMode || + !1 === e.decodeStrings || + "string" != typeof t || + (t = d.from(t, r)); + return t; + })(t, n, i); + n !== a && ((r = !0), (i = "buffer"), (n = a)); + } + var s = t.objectMode ? 1 : n.length; + t.length += s; + var f = t.length < t.highWaterMark; + f || (t.needDrain = !0); + if (t.writing || t.corked) { + var c = t.lastBufferedRequest; + (t.lastBufferedRequest = { + chunk: n, + encoding: i, + isBuf: r, + callback: o, + next: null, + }), + c + ? (c.next = t.lastBufferedRequest) + : (t.bufferedRequest = t.lastBufferedRequest), + (t.bufferedRequestCount += 1); + } else g(e, t, !1, s, n, i, o); + return f; + })(this, i, s, e, t, r))), + a + ); + }), + (v.prototype.cork = function () { + this._writableState.corked++; + }), + (v.prototype.uncork = function () { + var e = this._writableState; + e.corked && + (e.corked--, + e.writing || + e.corked || + e.finished || + e.bufferProcessing || + !e.bufferedRequest || + _(this, e)); + }), + (v.prototype.setDefaultEncoding = function (e) { + if ( + ("string" == typeof e && (e = e.toLowerCase()), + !( + [ + "hex", + "utf8", + "utf-8", + "ascii", + "binary", + "base64", + "ucs2", + "ucs-2", + "utf16le", + "utf-16le", + "raw", + ].indexOf((e + "").toLowerCase()) > -1 + )) + ) + throw new TypeError("Unknown encoding: " + e); + return (this._writableState.defaultEncoding = e), this; + }), + Object.defineProperty(v.prototype, "writableHighWaterMark", { + enumerable: !1, + get: function () { + return this._writableState.highWaterMark; + }, + }), + (v.prototype._write = function (e, t, r) { + r(new Error("_write() is not implemented")); + }), + (v.prototype._writev = null), + (v.prototype.end = function (e, t, r) { + var n = this._writableState; + "function" == typeof e + ? ((r = e), (e = null), (t = null)) + : "function" == typeof t && ((r = t), (t = null)), + null != e && this.write(e, t), + n.corked && ((n.corked = 1), this.uncork()), + n.ending || + n.finished || + (function (e, t, r) { + (t.ending = !0), + M(e, t), + r && (t.finished ? o.nextTick(r) : e.once("finish", r)); + (t.ended = !0), (e.writable = !1); + })(this, n, r); + }), + Object.defineProperty(v.prototype, "destroyed", { + get: function () { + return ( + void 0 !== this._writableState && + this._writableState.destroyed + ); + }, + set: function (e) { + this._writableState && (this._writableState.destroyed = e); + }, + }), + (v.prototype.destroy = b.destroy), + (v.prototype._undestroy = b.undestroy), + (v.prototype._destroy = function (e, t) { + this.end(), t(e); + }); + }).call( + this, + e("_process"), + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + e("timers").setImmediate, + ); + }, + { + "./_stream_duplex": 155, + "./internal/streams/destroy": 161, + "./internal/streams/stream": 162, + _process: 145, + "core-util-is": 77, + inherits: 127, + "process-nextick-args": 144, + "safe-buffer": 163, + timers: 181, + "util-deprecate": 182, + }, + ], + 160: [ + function (e, t, r) { + "use strict"; + var n = e("safe-buffer").Buffer, + i = e("util"); + (t.exports = (function () { + function e() { + !(function (e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + })(this, e), + (this.head = null), + (this.tail = null), + (this.length = 0); + } + return ( + (e.prototype.push = function (e) { + var t = { data: e, next: null }; + this.length > 0 ? (this.tail.next = t) : (this.head = t), + (this.tail = t), + ++this.length; + }), + (e.prototype.unshift = function (e) { + var t = { data: e, next: this.head }; + 0 === this.length && (this.tail = t), + (this.head = t), + ++this.length; + }), + (e.prototype.shift = function () { + if (0 !== this.length) { + var e = this.head.data; + return ( + 1 === this.length + ? (this.head = this.tail = null) + : (this.head = this.head.next), + --this.length, + e + ); + } + }), + (e.prototype.clear = function () { + (this.head = this.tail = null), (this.length = 0); + }), + (e.prototype.join = function (e) { + if (0 === this.length) return ""; + for (var t = this.head, r = "" + t.data; (t = t.next); ) + r += e + t.data; + return r; + }), + (e.prototype.concat = function (e) { + if (0 === this.length) return n.alloc(0); + if (1 === this.length) return this.head.data; + for ( + var t, r, i, o = n.allocUnsafe(e >>> 0), a = this.head, s = 0; + a; + + ) + (t = a.data), + (r = o), + (i = s), + t.copy(r, i), + (s += a.data.length), + (a = a.next); + return o; + }), + e + ); + })()), + i && + i.inspect && + i.inspect.custom && + (t.exports.prototype[i.inspect.custom] = function () { + var e = i.inspect({ length: this.length }); + return this.constructor.name + " " + e; + }); + }, + { "safe-buffer": 163, util: 46 }, + ], + 161: [ + function (e, t, r) { + "use strict"; + var n = e("process-nextick-args"); + function i(e, t) { + e.emit("error", t); + } + t.exports = { + destroy: function (e, t) { + var r = this, + o = this._readableState && this._readableState.destroyed, + a = this._writableState && this._writableState.destroyed; + return o || a + ? (t + ? t(e) + : !e || + (this._writableState && + this._writableState.errorEmitted) || + n.nextTick(i, this, e), + this) + : (this._readableState && (this._readableState.destroyed = !0), + this._writableState && (this._writableState.destroyed = !0), + this._destroy(e || null, function (e) { + !t && e + ? (n.nextTick(i, r, e), + r._writableState && + (r._writableState.errorEmitted = !0)) + : t && t(e); + }), + this); + }, + undestroy: function () { + this._readableState && + ((this._readableState.destroyed = !1), + (this._readableState.reading = !1), + (this._readableState.ended = !1), + (this._readableState.endEmitted = !1)), + this._writableState && + ((this._writableState.destroyed = !1), + (this._writableState.ended = !1), + (this._writableState.ending = !1), + (this._writableState.finished = !1), + (this._writableState.errorEmitted = !1)); + }, + }; + }, + { "process-nextick-args": 144 }, + ], + 162: [ + function (e, t, r) { + t.exports = e("events").EventEmitter; + }, + { events: 110 }, + ], + 163: [ + function (e, t, r) { + var n = e("buffer"), + i = n.Buffer; + function o(e, t) { + for (var r in e) t[r] = e[r]; + } + function a(e, t, r) { + return i(e, t, r); + } + i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow + ? (t.exports = n) + : (o(n, r), (r.Buffer = a)), + o(i, a), + (a.from = function (e, t, r) { + if ("number" == typeof e) + throw new TypeError("Argument must not be a number"); + return i(e, t, r); + }), + (a.alloc = function (e, t, r) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + var n = i(e); + return ( + void 0 !== t + ? "string" == typeof r + ? n.fill(t, r) + : n.fill(t) + : n.fill(0), + n + ); + }), + (a.allocUnsafe = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return i(e); + }), + (a.allocUnsafeSlow = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return n.SlowBuffer(e); + }); + }, + { buffer: 75 }, + ], + 164: [ + function (e, t, r) { + "use strict"; + var n = e("safe-buffer").Buffer, + i = + n.isEncoding || + function (e) { + switch ((e = "" + e) && e.toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + case "raw": + return !0; + default: + return !1; + } + }; + function o(e) { + var t; + switch ( + ((this.encoding = (function (e) { + var t = (function (e) { + if (!e) return "utf8"; + for (var t; ; ) + switch (e) { + case "utf8": + case "utf-8": + return "utf8"; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return "utf16le"; + case "latin1": + case "binary": + return "latin1"; + case "base64": + case "ascii": + case "hex": + return e; + default: + if (t) return; + (e = ("" + e).toLowerCase()), (t = !0); + } + })(e); + if ("string" != typeof t && (n.isEncoding === i || !i(e))) + throw new Error("Unknown encoding: " + e); + return t || e; + })(e)), + this.encoding) + ) { + case "utf16le": + (this.text = f), (this.end = c), (t = 4); + break; + case "utf8": + (this.fillLast = s), (t = 4); + break; + case "base64": + (this.text = u), (this.end = h), (t = 3); + break; + default: + return (this.write = d), void (this.end = l); + } + (this.lastNeed = 0), + (this.lastTotal = 0), + (this.lastChar = n.allocUnsafe(t)); + } + function a(e) { + return e <= 127 + ? 0 + : e >> 5 == 6 + ? 2 + : e >> 4 == 14 + ? 3 + : e >> 3 == 30 + ? 4 + : e >> 6 == 2 + ? -1 + : -2; + } + function s(e) { + var t = this.lastTotal - this.lastNeed, + r = (function (e, t, r) { + if (128 != (192 & t[0])) return (e.lastNeed = 0), "�"; + if (e.lastNeed > 1 && t.length > 1) { + if (128 != (192 & t[1])) return (e.lastNeed = 1), "�"; + if (e.lastNeed > 2 && t.length > 2 && 128 != (192 & t[2])) + return (e.lastNeed = 2), "�"; + } + })(this, e); + return void 0 !== r + ? r + : this.lastNeed <= e.length + ? (e.copy(this.lastChar, t, 0, this.lastNeed), + this.lastChar.toString(this.encoding, 0, this.lastTotal)) + : (e.copy(this.lastChar, t, 0, e.length), + void (this.lastNeed -= e.length)); + } + function f(e, t) { + if ((e.length - t) % 2 == 0) { + var r = e.toString("utf16le", t); + if (r) { + var n = r.charCodeAt(r.length - 1); + if (n >= 55296 && n <= 56319) + return ( + (this.lastNeed = 2), + (this.lastTotal = 4), + (this.lastChar[0] = e[e.length - 2]), + (this.lastChar[1] = e[e.length - 1]), + r.slice(0, -1) + ); + } + return r; + } + return ( + (this.lastNeed = 1), + (this.lastTotal = 2), + (this.lastChar[0] = e[e.length - 1]), + e.toString("utf16le", t, e.length - 1) + ); + } + function c(e) { + var t = e && e.length ? this.write(e) : ""; + if (this.lastNeed) { + var r = this.lastTotal - this.lastNeed; + return t + this.lastChar.toString("utf16le", 0, r); + } + return t; + } + function u(e, t) { + var r = (e.length - t) % 3; + return 0 === r + ? e.toString("base64", t) + : ((this.lastNeed = 3 - r), + (this.lastTotal = 3), + 1 === r + ? (this.lastChar[0] = e[e.length - 1]) + : ((this.lastChar[0] = e[e.length - 2]), + (this.lastChar[1] = e[e.length - 1])), + e.toString("base64", t, e.length - r)); + } + function h(e) { + var t = e && e.length ? this.write(e) : ""; + return this.lastNeed + ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) + : t; + } + function d(e) { + return e.toString(this.encoding); + } + function l(e) { + return e && e.length ? this.write(e) : ""; + } + (r.StringDecoder = o), + (o.prototype.write = function (e) { + if (0 === e.length) return ""; + var t, r; + if (this.lastNeed) { + if (void 0 === (t = this.fillLast(e))) return ""; + (r = this.lastNeed), (this.lastNeed = 0); + } else r = 0; + return r < e.length + ? t + ? t + this.text(e, r) + : this.text(e, r) + : t || ""; + }), + (o.prototype.end = function (e) { + var t = e && e.length ? this.write(e) : ""; + return this.lastNeed ? t + "�" : t; + }), + (o.prototype.text = function (e, t) { + var r = (function (e, t, r) { + var n = t.length - 1; + if (n < r) return 0; + var i = a(t[n]); + if (i >= 0) return i > 0 && (e.lastNeed = i - 1), i; + if (--n < r || -2 === i) return 0; + if ((i = a(t[n])) >= 0) return i > 0 && (e.lastNeed = i - 2), i; + if (--n < r || -2 === i) return 0; + if ((i = a(t[n])) >= 0) + return i > 0 && (2 === i ? (i = 0) : (e.lastNeed = i - 3)), i; + return 0; + })(this, e, t); + if (!this.lastNeed) return e.toString("utf8", t); + this.lastTotal = r; + var n = e.length - (r - this.lastNeed); + return e.copy(this.lastChar, 0, n), e.toString("utf8", t, n); + }), + (o.prototype.fillLast = function (e) { + if (this.lastNeed <= e.length) + return ( + e.copy( + this.lastChar, + this.lastTotal - this.lastNeed, + 0, + this.lastNeed, + ), + this.lastChar.toString(this.encoding, 0, this.lastTotal) + ); + e.copy( + this.lastChar, + this.lastTotal - this.lastNeed, + 0, + e.length, + ), + (this.lastNeed -= e.length); + }); + }, + { "safe-buffer": 163 }, + ], + 165: [ + function (e, t, r) { + t.exports = e("./readable").PassThrough; + }, + { "./readable": 166 }, + ], + 166: [ + function (e, t, r) { + ((r = t.exports = e("./lib/_stream_readable.js")).Stream = r), + (r.Readable = r), + (r.Writable = e("./lib/_stream_writable.js")), + (r.Duplex = e("./lib/_stream_duplex.js")), + (r.Transform = e("./lib/_stream_transform.js")), + (r.PassThrough = e("./lib/_stream_passthrough.js")); + }, + { + "./lib/_stream_duplex.js": 155, + "./lib/_stream_passthrough.js": 156, + "./lib/_stream_readable.js": 157, + "./lib/_stream_transform.js": 158, + "./lib/_stream_writable.js": 159, + }, + ], + 167: [ + function (e, t, r) { + t.exports = e("./readable").Transform; + }, + { "./readable": 166 }, + ], + 168: [ + function (e, t, r) { + t.exports = e("./lib/_stream_writable.js"); + }, + { "./lib/_stream_writable.js": 159 }, + ], + 169: [ + function (e, t, r) { + "use strict"; + var n = e("buffer").Buffer, + i = e("inherits"), + o = e("hash-base"), + a = new Array(16), + s = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, + 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, + 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, + 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, + 13, + ], + f = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, + 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, + 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, + 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, + 9, 11, + ], + c = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, + 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, + 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, + 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, + 13, 14, 11, 8, 5, 6, + ], + u = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, + 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, + 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, + 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, + 15, 13, 11, 11, + ], + h = [0, 1518500249, 1859775393, 2400959708, 2840853838], + d = [1352829926, 1548603684, 1836072691, 2053994217, 0]; + function l() { + o.call(this, 64), + (this._a = 1732584193), + (this._b = 4023233417), + (this._c = 2562383102), + (this._d = 271733878), + (this._e = 3285377520); + } + function p(e, t) { + return (e << t) | (e >>> (32 - t)); + } + function b(e, t, r, n, i, o, a, s) { + return (p((e + (t ^ r ^ n) + o + a) | 0, s) + i) | 0; + } + function y(e, t, r, n, i, o, a, s) { + return (p((e + ((t & r) | (~t & n)) + o + a) | 0, s) + i) | 0; + } + function m(e, t, r, n, i, o, a, s) { + return (p((e + ((t | ~r) ^ n) + o + a) | 0, s) + i) | 0; + } + function v(e, t, r, n, i, o, a, s) { + return (p((e + ((t & n) | (r & ~n)) + o + a) | 0, s) + i) | 0; + } + function g(e, t, r, n, i, o, a, s) { + return (p((e + (t ^ (r | ~n)) + o + a) | 0, s) + i) | 0; + } + i(l, o), + (l.prototype._update = function () { + for (var e = a, t = 0; t < 16; ++t) + e[t] = this._block.readInt32LE(4 * t); + for ( + var r = 0 | this._a, + n = 0 | this._b, + i = 0 | this._c, + o = 0 | this._d, + l = 0 | this._e, + w = 0 | this._a, + _ = 0 | this._b, + S = 0 | this._c, + E = 0 | this._d, + M = 0 | this._e, + k = 0; + k < 80; + k += 1 + ) { + var x, A; + k < 16 + ? ((x = b(r, n, i, o, l, e[s[k]], h[0], c[k])), + (A = g(w, _, S, E, M, e[f[k]], d[0], u[k]))) + : k < 32 + ? ((x = y(r, n, i, o, l, e[s[k]], h[1], c[k])), + (A = v(w, _, S, E, M, e[f[k]], d[1], u[k]))) + : k < 48 + ? ((x = m(r, n, i, o, l, e[s[k]], h[2], c[k])), + (A = m(w, _, S, E, M, e[f[k]], d[2], u[k]))) + : k < 64 + ? ((x = v(r, n, i, o, l, e[s[k]], h[3], c[k])), + (A = y(w, _, S, E, M, e[f[k]], d[3], u[k]))) + : ((x = g(r, n, i, o, l, e[s[k]], h[4], c[k])), + (A = b(w, _, S, E, M, e[f[k]], d[4], u[k]))), + (r = l), + (l = o), + (o = p(i, 10)), + (i = n), + (n = x), + (w = M), + (M = E), + (E = p(S, 10)), + (S = _), + (_ = A); + } + var j = (this._b + i + E) | 0; + (this._b = (this._c + o + M) | 0), + (this._c = (this._d + l + w) | 0), + (this._d = (this._e + r + _) | 0), + (this._e = (this._a + n + S) | 0), + (this._a = j); + }), + (l.prototype._digest = function () { + (this._block[this._blockOffset++] = 128), + this._blockOffset > 56 && + (this._block.fill(0, this._blockOffset, 64), + this._update(), + (this._blockOffset = 0)), + this._block.fill(0, this._blockOffset, 56), + this._block.writeUInt32LE(this._length[0], 56), + this._block.writeUInt32LE(this._length[1], 60), + this._update(); + var e = n.alloc ? n.alloc(20) : new n(20); + return ( + e.writeInt32LE(this._a, 0), + e.writeInt32LE(this._b, 4), + e.writeInt32LE(this._c, 8), + e.writeInt32LE(this._d, 12), + e.writeInt32LE(this._e, 16), + e + ); + }), + (t.exports = l); + }, + { buffer: 75, "hash-base": 112, inherits: 127 }, + ], + 170: [ + function (e, t, r) { + var n = e("buffer"), + i = n.Buffer; + function o(e, t) { + for (var r in e) t[r] = e[r]; + } + function a(e, t, r) { + return i(e, t, r); + } + i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow + ? (t.exports = n) + : (o(n, r), (r.Buffer = a)), + (a.prototype = Object.create(i.prototype)), + o(i, a), + (a.from = function (e, t, r) { + if ("number" == typeof e) + throw new TypeError("Argument must not be a number"); + return i(e, t, r); + }), + (a.alloc = function (e, t, r) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + var n = i(e); + return ( + void 0 !== t + ? "string" == typeof r + ? n.fill(t, r) + : n.fill(t) + : n.fill(0), + n + ); + }), + (a.allocUnsafe = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return i(e); + }), + (a.allocUnsafeSlow = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return n.SlowBuffer(e); + }); + }, + { buffer: 75 }, + ], + 171: [ + function (e, t, r) { + var n = e("safe-buffer").Buffer; + function i(e, t) { + (this._block = n.alloc(e)), + (this._finalSize = t), + (this._blockSize = e), + (this._len = 0); + } + (i.prototype.update = function (e, t) { + "string" == typeof e && ((t = t || "utf8"), (e = n.from(e, t))); + for ( + var r = this._block, + i = this._blockSize, + o = e.length, + a = this._len, + s = 0; + s < o; + + ) { + for (var f = a % i, c = Math.min(o - s, i - f), u = 0; u < c; u++) + r[f + u] = e[s + u]; + (s += c), (a += c) % i == 0 && this._update(r); + } + return (this._len += o), this; + }), + (i.prototype.digest = function (e) { + var t = this._len % this._blockSize; + (this._block[t] = 128), + this._block.fill(0, t + 1), + t >= this._finalSize && + (this._update(this._block), this._block.fill(0)); + var r = 8 * this._len; + if (r <= 4294967295) + this._block.writeUInt32BE(r, this._blockSize - 4); + else { + var n = (4294967295 & r) >>> 0, + i = (r - n) / 4294967296; + this._block.writeUInt32BE(i, this._blockSize - 8), + this._block.writeUInt32BE(n, this._blockSize - 4); + } + this._update(this._block); + var o = this._hash(); + return e ? o.toString(e) : o; + }), + (i.prototype._update = function () { + throw new Error("_update must be implemented by subclass"); + }), + (t.exports = i); + }, + { "safe-buffer": 170 }, + ], + 172: [ + function (e, t, r) { + ((r = t.exports = + function (e) { + e = e.toLowerCase(); + var t = r[e]; + if (!t) + throw new Error( + e + " is not supported (we accept pull requests)", + ); + return new t(); + }).sha = e("./sha")), + (r.sha1 = e("./sha1")), + (r.sha224 = e("./sha224")), + (r.sha256 = e("./sha256")), + (r.sha384 = e("./sha384")), + (r.sha512 = e("./sha512")); + }, + { + "./sha": 173, + "./sha1": 174, + "./sha224": 175, + "./sha256": 176, + "./sha384": 177, + "./sha512": 178, + }, + ], + 173: [ + function (e, t, r) { + var n = e("inherits"), + i = e("./hash"), + o = e("safe-buffer").Buffer, + a = [1518500249, 1859775393, -1894007588, -899497514], + s = new Array(80); + function f() { + this.init(), (this._w = s), i.call(this, 64, 56); + } + function c(e) { + return (e << 30) | (e >>> 2); + } + function u(e, t, r, n) { + return 0 === e + ? (t & r) | (~t & n) + : 2 === e + ? (t & r) | (t & n) | (r & n) + : t ^ r ^ n; + } + n(f, i), + (f.prototype.init = function () { + return ( + (this._a = 1732584193), + (this._b = 4023233417), + (this._c = 2562383102), + (this._d = 271733878), + (this._e = 3285377520), + this + ); + }), + (f.prototype._update = function (e) { + for ( + var t, + r = this._w, + n = 0 | this._a, + i = 0 | this._b, + o = 0 | this._c, + s = 0 | this._d, + f = 0 | this._e, + h = 0; + h < 16; + ++h + ) + r[h] = e.readInt32BE(4 * h); + for (; h < 80; ++h) + r[h] = r[h - 3] ^ r[h - 8] ^ r[h - 14] ^ r[h - 16]; + for (var d = 0; d < 80; ++d) { + var l = ~~(d / 20), + p = + 0 | + ((((t = n) << 5) | (t >>> 27)) + + u(l, i, o, s) + + f + + r[d] + + a[l]); + (f = s), (s = o), (o = c(i)), (i = n), (n = p); + } + (this._a = (n + this._a) | 0), + (this._b = (i + this._b) | 0), + (this._c = (o + this._c) | 0), + (this._d = (s + this._d) | 0), + (this._e = (f + this._e) | 0); + }), + (f.prototype._hash = function () { + var e = o.allocUnsafe(20); + return ( + e.writeInt32BE(0 | this._a, 0), + e.writeInt32BE(0 | this._b, 4), + e.writeInt32BE(0 | this._c, 8), + e.writeInt32BE(0 | this._d, 12), + e.writeInt32BE(0 | this._e, 16), + e + ); + }), + (t.exports = f); + }, + { "./hash": 171, inherits: 127, "safe-buffer": 170 }, + ], + 174: [ + function (e, t, r) { + var n = e("inherits"), + i = e("./hash"), + o = e("safe-buffer").Buffer, + a = [1518500249, 1859775393, -1894007588, -899497514], + s = new Array(80); + function f() { + this.init(), (this._w = s), i.call(this, 64, 56); + } + function c(e) { + return (e << 5) | (e >>> 27); + } + function u(e) { + return (e << 30) | (e >>> 2); + } + function h(e, t, r, n) { + return 0 === e + ? (t & r) | (~t & n) + : 2 === e + ? (t & r) | (t & n) | (r & n) + : t ^ r ^ n; + } + n(f, i), + (f.prototype.init = function () { + return ( + (this._a = 1732584193), + (this._b = 4023233417), + (this._c = 2562383102), + (this._d = 271733878), + (this._e = 3285377520), + this + ); + }), + (f.prototype._update = function (e) { + for ( + var t, + r = this._w, + n = 0 | this._a, + i = 0 | this._b, + o = 0 | this._c, + s = 0 | this._d, + f = 0 | this._e, + d = 0; + d < 16; + ++d + ) + r[d] = e.readInt32BE(4 * d); + for (; d < 80; ++d) + r[d] = + ((t = r[d - 3] ^ r[d - 8] ^ r[d - 14] ^ r[d - 16]) << 1) | + (t >>> 31); + for (var l = 0; l < 80; ++l) { + var p = ~~(l / 20), + b = (c(n) + h(p, i, o, s) + f + r[l] + a[p]) | 0; + (f = s), (s = o), (o = u(i)), (i = n), (n = b); + } + (this._a = (n + this._a) | 0), + (this._b = (i + this._b) | 0), + (this._c = (o + this._c) | 0), + (this._d = (s + this._d) | 0), + (this._e = (f + this._e) | 0); + }), + (f.prototype._hash = function () { + var e = o.allocUnsafe(20); + return ( + e.writeInt32BE(0 | this._a, 0), + e.writeInt32BE(0 | this._b, 4), + e.writeInt32BE(0 | this._c, 8), + e.writeInt32BE(0 | this._d, 12), + e.writeInt32BE(0 | this._e, 16), + e + ); + }), + (t.exports = f); + }, + { "./hash": 171, inherits: 127, "safe-buffer": 170 }, + ], + 175: [ + function (e, t, r) { + var n = e("inherits"), + i = e("./sha256"), + o = e("./hash"), + a = e("safe-buffer").Buffer, + s = new Array(64); + function f() { + this.init(), (this._w = s), o.call(this, 64, 56); + } + n(f, i), + (f.prototype.init = function () { + return ( + (this._a = 3238371032), + (this._b = 914150663), + (this._c = 812702999), + (this._d = 4144912697), + (this._e = 4290775857), + (this._f = 1750603025), + (this._g = 1694076839), + (this._h = 3204075428), + this + ); + }), + (f.prototype._hash = function () { + var e = a.allocUnsafe(28); + return ( + e.writeInt32BE(this._a, 0), + e.writeInt32BE(this._b, 4), + e.writeInt32BE(this._c, 8), + e.writeInt32BE(this._d, 12), + e.writeInt32BE(this._e, 16), + e.writeInt32BE(this._f, 20), + e.writeInt32BE(this._g, 24), + e + ); + }), + (t.exports = f); + }, + { "./hash": 171, "./sha256": 176, inherits: 127, "safe-buffer": 170 }, + ], + 176: [ + function (e, t, r) { + var n = e("inherits"), + i = e("./hash"), + o = e("safe-buffer").Buffer, + a = [ + 1116352408, 1899447441, 3049323471, 3921009573, 961987163, + 1508970993, 2453635748, 2870763221, 3624381080, 310598401, + 607225278, 1426881987, 1925078388, 2162078206, 2614888103, + 3248222580, 3835390401, 4022224774, 264347078, 604807628, + 770255983, 1249150122, 1555081692, 1996064986, 2554220882, + 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, + 113926993, 338241895, 666307205, 773529912, 1294757372, + 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, + 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, + 3600352804, 4094571909, 275423344, 430227734, 506948616, + 659060556, 883997877, 958139571, 1322822218, 1537002063, + 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, + 2428436474, 2756734187, 3204031479, 3329325298, + ], + s = new Array(64); + function f() { + this.init(), (this._w = s), i.call(this, 64, 56); + } + function c(e, t, r) { + return r ^ (e & (t ^ r)); + } + function u(e, t, r) { + return (e & t) | (r & (e | t)); + } + function h(e) { + return ( + ((e >>> 2) | (e << 30)) ^ + ((e >>> 13) | (e << 19)) ^ + ((e >>> 22) | (e << 10)) + ); + } + function d(e) { + return ( + ((e >>> 6) | (e << 26)) ^ + ((e >>> 11) | (e << 21)) ^ + ((e >>> 25) | (e << 7)) + ); + } + function l(e) { + return ( + ((e >>> 7) | (e << 25)) ^ ((e >>> 18) | (e << 14)) ^ (e >>> 3) + ); + } + n(f, i), + (f.prototype.init = function () { + return ( + (this._a = 1779033703), + (this._b = 3144134277), + (this._c = 1013904242), + (this._d = 2773480762), + (this._e = 1359893119), + (this._f = 2600822924), + (this._g = 528734635), + (this._h = 1541459225), + this + ); + }), + (f.prototype._update = function (e) { + for ( + var t, + r = this._w, + n = 0 | this._a, + i = 0 | this._b, + o = 0 | this._c, + s = 0 | this._d, + f = 0 | this._e, + p = 0 | this._f, + b = 0 | this._g, + y = 0 | this._h, + m = 0; + m < 16; + ++m + ) + r[m] = e.readInt32BE(4 * m); + for (; m < 64; ++m) + r[m] = + 0 | + (((((t = r[m - 2]) >>> 17) | (t << 15)) ^ + ((t >>> 19) | (t << 13)) ^ + (t >>> 10)) + + r[m - 7] + + l(r[m - 15]) + + r[m - 16]); + for (var v = 0; v < 64; ++v) { + var g = (y + d(f) + c(f, p, b) + a[v] + r[v]) | 0, + w = (h(n) + u(n, i, o)) | 0; + (y = b), + (b = p), + (p = f), + (f = (s + g) | 0), + (s = o), + (o = i), + (i = n), + (n = (g + w) | 0); + } + (this._a = (n + this._a) | 0), + (this._b = (i + this._b) | 0), + (this._c = (o + this._c) | 0), + (this._d = (s + this._d) | 0), + (this._e = (f + this._e) | 0), + (this._f = (p + this._f) | 0), + (this._g = (b + this._g) | 0), + (this._h = (y + this._h) | 0); + }), + (f.prototype._hash = function () { + var e = o.allocUnsafe(32); + return ( + e.writeInt32BE(this._a, 0), + e.writeInt32BE(this._b, 4), + e.writeInt32BE(this._c, 8), + e.writeInt32BE(this._d, 12), + e.writeInt32BE(this._e, 16), + e.writeInt32BE(this._f, 20), + e.writeInt32BE(this._g, 24), + e.writeInt32BE(this._h, 28), + e + ); + }), + (t.exports = f); + }, + { "./hash": 171, inherits: 127, "safe-buffer": 170 }, + ], + 177: [ + function (e, t, r) { + var n = e("inherits"), + i = e("./sha512"), + o = e("./hash"), + a = e("safe-buffer").Buffer, + s = new Array(160); + function f() { + this.init(), (this._w = s), o.call(this, 128, 112); + } + n(f, i), + (f.prototype.init = function () { + return ( + (this._ah = 3418070365), + (this._bh = 1654270250), + (this._ch = 2438529370), + (this._dh = 355462360), + (this._eh = 1731405415), + (this._fh = 2394180231), + (this._gh = 3675008525), + (this._hh = 1203062813), + (this._al = 3238371032), + (this._bl = 914150663), + (this._cl = 812702999), + (this._dl = 4144912697), + (this._el = 4290775857), + (this._fl = 1750603025), + (this._gl = 1694076839), + (this._hl = 3204075428), + this + ); + }), + (f.prototype._hash = function () { + var e = a.allocUnsafe(48); + function t(t, r, n) { + e.writeInt32BE(t, n), e.writeInt32BE(r, n + 4); + } + return ( + t(this._ah, this._al, 0), + t(this._bh, this._bl, 8), + t(this._ch, this._cl, 16), + t(this._dh, this._dl, 24), + t(this._eh, this._el, 32), + t(this._fh, this._fl, 40), + e + ); + }), + (t.exports = f); + }, + { "./hash": 171, "./sha512": 178, inherits: 127, "safe-buffer": 170 }, + ], + 178: [ + function (e, t, r) { + var n = e("inherits"), + i = e("./hash"), + o = e("safe-buffer").Buffer, + a = [ + 1116352408, 3609767458, 1899447441, 602891725, 3049323471, + 3964484399, 3921009573, 2173295548, 961987163, 4081628472, + 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, + 3664609560, 3624381080, 2734883394, 310598401, 1164996542, + 607225278, 1323610764, 1426881987, 3590304994, 1925078388, + 4068182383, 2162078206, 991336113, 2614888103, 633803317, + 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, + 944711139, 264347078, 2341262773, 604807628, 2007800933, + 770255983, 1495990901, 1249150122, 1856431235, 1555081692, + 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, + 2821834349, 766784016, 2952996808, 2566594879, 3210313671, + 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, + 113926993, 3758326383, 338241895, 168717936, 666307205, + 1188179964, 773529912, 1546045734, 1294757372, 1522805485, + 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, + 1014477480, 2177026350, 1206759142, 2456956037, 344077627, + 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, + 3505952657, 3345764771, 106217008, 3516065817, 3606008344, + 3600352804, 1432725776, 4094571909, 1467031594, 275423344, + 851169720, 430227734, 3100823752, 506948616, 1363258195, + 659060556, 3750685593, 883997877, 3785050280, 958139571, + 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, + 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, + 1125592928, 2227730452, 2716904306, 2361852424, 442776044, + 2428436474, 593698344, 2756734187, 3733110249, 3204031479, + 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, + 3515267271, 566280711, 3940187606, 3454069534, 4118630271, + 4000239992, 116418474, 1914138554, 174292421, 2731055270, + 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, + 852142971, 1086792851, 1017036298, 365543100, 1126000580, + 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, + 1607167915, 987167468, 1816402316, 1246189591, + ], + s = new Array(160); + function f() { + this.init(), (this._w = s), i.call(this, 128, 112); + } + function c(e, t, r) { + return r ^ (e & (t ^ r)); + } + function u(e, t, r) { + return (e & t) | (r & (e | t)); + } + function h(e, t) { + return ( + ((e >>> 28) | (t << 4)) ^ + ((t >>> 2) | (e << 30)) ^ + ((t >>> 7) | (e << 25)) + ); + } + function d(e, t) { + return ( + ((e >>> 14) | (t << 18)) ^ + ((e >>> 18) | (t << 14)) ^ + ((t >>> 9) | (e << 23)) + ); + } + function l(e, t) { + return ( + ((e >>> 1) | (t << 31)) ^ ((e >>> 8) | (t << 24)) ^ (e >>> 7) + ); + } + function p(e, t) { + return ( + ((e >>> 1) | (t << 31)) ^ + ((e >>> 8) | (t << 24)) ^ + ((e >>> 7) | (t << 25)) + ); + } + function b(e, t) { + return ( + ((e >>> 19) | (t << 13)) ^ ((t >>> 29) | (e << 3)) ^ (e >>> 6) + ); + } + function y(e, t) { + return ( + ((e >>> 19) | (t << 13)) ^ + ((t >>> 29) | (e << 3)) ^ + ((e >>> 6) | (t << 26)) + ); + } + function m(e, t) { + return e >>> 0 < t >>> 0 ? 1 : 0; + } + n(f, i), + (f.prototype.init = function () { + return ( + (this._ah = 1779033703), + (this._bh = 3144134277), + (this._ch = 1013904242), + (this._dh = 2773480762), + (this._eh = 1359893119), + (this._fh = 2600822924), + (this._gh = 528734635), + (this._hh = 1541459225), + (this._al = 4089235720), + (this._bl = 2227873595), + (this._cl = 4271175723), + (this._dl = 1595750129), + (this._el = 2917565137), + (this._fl = 725511199), + (this._gl = 4215389547), + (this._hl = 327033209), + this + ); + }), + (f.prototype._update = function (e) { + for ( + var t = this._w, + r = 0 | this._ah, + n = 0 | this._bh, + i = 0 | this._ch, + o = 0 | this._dh, + s = 0 | this._eh, + f = 0 | this._fh, + v = 0 | this._gh, + g = 0 | this._hh, + w = 0 | this._al, + _ = 0 | this._bl, + S = 0 | this._cl, + E = 0 | this._dl, + M = 0 | this._el, + k = 0 | this._fl, + x = 0 | this._gl, + A = 0 | this._hl, + j = 0; + j < 32; + j += 2 + ) + (t[j] = e.readInt32BE(4 * j)), + (t[j + 1] = e.readInt32BE(4 * j + 4)); + for (; j < 160; j += 2) { + var B = t[j - 30], + I = t[j - 30 + 1], + R = l(B, I), + T = p(I, B), + C = b((B = t[j - 4]), (I = t[j - 4 + 1])), + P = y(I, B), + O = t[j - 14], + D = t[j - 14 + 1], + N = t[j - 32], + L = t[j - 32 + 1], + U = (T + D) | 0, + q = (R + O + m(U, T)) | 0; + (q = + ((q = (q + C + m((U = (U + P) | 0), P)) | 0) + + N + + m((U = (U + L) | 0), L)) | + 0), + (t[j] = q), + (t[j + 1] = U); + } + for (var z = 0; z < 160; z += 2) { + (q = t[z]), (U = t[z + 1]); + var K = u(r, n, i), + F = u(w, _, S), + H = h(r, w), + V = h(w, r), + W = d(s, M), + J = d(M, s), + X = a[z], + $ = a[z + 1], + G = c(s, f, v), + Z = c(M, k, x), + Y = (A + J) | 0, + Q = (g + W + m(Y, A)) | 0; + Q = + ((Q = + ((Q = (Q + G + m((Y = (Y + Z) | 0), Z)) | 0) + + X + + m((Y = (Y + $) | 0), $)) | + 0) + + q + + m((Y = (Y + U) | 0), U)) | + 0; + var ee = (V + F) | 0, + te = (H + K + m(ee, V)) | 0; + (g = v), + (A = x), + (v = f), + (x = k), + (f = s), + (k = M), + (s = (o + Q + m((M = (E + Y) | 0), E)) | 0), + (o = i), + (E = S), + (i = n), + (S = _), + (n = r), + (_ = w), + (r = (Q + te + m((w = (Y + ee) | 0), Y)) | 0); + } + (this._al = (this._al + w) | 0), + (this._bl = (this._bl + _) | 0), + (this._cl = (this._cl + S) | 0), + (this._dl = (this._dl + E) | 0), + (this._el = (this._el + M) | 0), + (this._fl = (this._fl + k) | 0), + (this._gl = (this._gl + x) | 0), + (this._hl = (this._hl + A) | 0), + (this._ah = (this._ah + r + m(this._al, w)) | 0), + (this._bh = (this._bh + n + m(this._bl, _)) | 0), + (this._ch = (this._ch + i + m(this._cl, S)) | 0), + (this._dh = (this._dh + o + m(this._dl, E)) | 0), + (this._eh = (this._eh + s + m(this._el, M)) | 0), + (this._fh = (this._fh + f + m(this._fl, k)) | 0), + (this._gh = (this._gh + v + m(this._gl, x)) | 0), + (this._hh = (this._hh + g + m(this._hl, A)) | 0); + }), + (f.prototype._hash = function () { + var e = o.allocUnsafe(64); + function t(t, r, n) { + e.writeInt32BE(t, n), e.writeInt32BE(r, n + 4); + } + return ( + t(this._ah, this._al, 0), + t(this._bh, this._bl, 8), + t(this._ch, this._cl, 16), + t(this._dh, this._dl, 24), + t(this._eh, this._el, 32), + t(this._fh, this._fl, 40), + t(this._gh, this._gl, 48), + t(this._hh, this._hl, 56), + e + ); + }), + (t.exports = f); + }, + { "./hash": 171, inherits: 127, "safe-buffer": 170 }, + ], + 179: [ + function (e, t, r) { + t.exports = i; + var n = e("events").EventEmitter; + function i() { + n.call(this); + } + e("inherits")(i, n), + (i.Readable = e("readable-stream/readable.js")), + (i.Writable = e("readable-stream/writable.js")), + (i.Duplex = e("readable-stream/duplex.js")), + (i.Transform = e("readable-stream/transform.js")), + (i.PassThrough = e("readable-stream/passthrough.js")), + (i.Stream = i), + (i.prototype.pipe = function (e, t) { + var r = this; + function i(t) { + e.writable && !1 === e.write(t) && r.pause && r.pause(); + } + function o() { + r.readable && r.resume && r.resume(); + } + r.on("data", i), + e.on("drain", o), + e._isStdio || + (t && !1 === t.end) || + (r.on("end", s), r.on("close", f)); + var a = !1; + function s() { + a || ((a = !0), e.end()); + } + function f() { + a || ((a = !0), "function" == typeof e.destroy && e.destroy()); + } + function c(e) { + if ((u(), 0 === n.listenerCount(this, "error"))) throw e; + } + function u() { + r.removeListener("data", i), + e.removeListener("drain", o), + r.removeListener("end", s), + r.removeListener("close", f), + r.removeListener("error", c), + e.removeListener("error", c), + r.removeListener("end", u), + r.removeListener("close", u), + e.removeListener("close", u); + } + return ( + r.on("error", c), + e.on("error", c), + r.on("end", u), + r.on("close", u), + e.on("close", u), + e.emit("pipe", r), + e + ); + }); + }, + { + events: 110, + inherits: 127, + "readable-stream/duplex.js": 154, + "readable-stream/passthrough.js": 165, + "readable-stream/readable.js": 166, + "readable-stream/transform.js": 167, + "readable-stream/writable.js": 168, + }, + ], + 180: [ + function (e, t, r) { + arguments[4][164][0].apply(r, arguments); + }, + { dup: 164, "safe-buffer": 170 }, + ], + 181: [ + function (e, t, r) { + (function (t, n) { + var i = e("process/browser.js").nextTick, + o = Function.prototype.apply, + a = Array.prototype.slice, + s = {}, + f = 0; + function c(e, t) { + (this._id = e), (this._clearFn = t); + } + (r.setTimeout = function () { + return new c(o.call(setTimeout, window, arguments), clearTimeout); + }), + (r.setInterval = function () { + return new c( + o.call(setInterval, window, arguments), + clearInterval, + ); + }), + (r.clearTimeout = r.clearInterval = + function (e) { + e.close(); + }), + (c.prototype.unref = c.prototype.ref = function () {}), + (c.prototype.close = function () { + this._clearFn.call(window, this._id); + }), + (r.enroll = function (e, t) { + clearTimeout(e._idleTimeoutId), (e._idleTimeout = t); + }), + (r.unenroll = function (e) { + clearTimeout(e._idleTimeoutId), (e._idleTimeout = -1); + }), + (r._unrefActive = r.active = + function (e) { + clearTimeout(e._idleTimeoutId); + var t = e._idleTimeout; + t >= 0 && + (e._idleTimeoutId = setTimeout(function () { + e._onTimeout && e._onTimeout(); + }, t)); + }), + (r.setImmediate = + "function" == typeof t + ? t + : function (e) { + var t = f++, + n = !(arguments.length < 2) && a.call(arguments, 1); + return ( + (s[t] = !0), + i(function () { + s[t] && + (n ? e.apply(null, n) : e.call(null), + r.clearImmediate(t)); + }), + t + ); + }), + (r.clearImmediate = + "function" == typeof n + ? n + : function (e) { + delete s[e]; + }); + }).call(this, e("timers").setImmediate, e("timers").clearImmediate); + }, + { "process/browser.js": 145, timers: 181 }, + ], + 182: [ + function (e, t, r) { + (function (e) { + function r(t) { + try { + if (!e.localStorage) return !1; + } catch (e) { + return !1; + } + var r = e.localStorage[t]; + return null != r && "true" === String(r).toLowerCase(); + } + t.exports = function (e, t) { + if (r("noDeprecation")) return e; + var n = !1; + return function () { + if (!n) { + if (r("throwDeprecation")) throw new Error(t); + r("traceDeprecation") ? console.trace(t) : console.warn(t), + (n = !0); + } + return e.apply(this, arguments); + }; + }; + }).call( + this, + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + {}, + ], + 183: [ + function (e, t, r) { + "function" == typeof Object.create + ? (t.exports = function (e, t) { + (e.super_ = t), + (e.prototype = Object.create(t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0, + }, + })); + }) + : (t.exports = function (e, t) { + e.super_ = t; + var r = function () {}; + (r.prototype = t.prototype), + (e.prototype = new r()), + (e.prototype.constructor = e); + }); + }, + {}, + ], + 184: [ + function (e, t, r) { + t.exports = function (e) { + return ( + e && + "object" == typeof e && + "function" == typeof e.copy && + "function" == typeof e.fill && + "function" == typeof e.readUInt8 + ); + }; + }, + {}, + ], + 185: [ + function (e, t, r) { + (function (t, n) { + var i = /%[sdj%]/g; + (r.format = function (e) { + if (!m(e)) { + for (var t = [], r = 0; r < arguments.length; r++) + t.push(s(arguments[r])); + return t.join(" "); + } + r = 1; + for ( + var n = arguments, + o = n.length, + a = String(e).replace(i, function (e) { + if ("%%" === e) return "%"; + if (r >= o) return e; + switch (e) { + case "%s": + return String(n[r++]); + case "%d": + return Number(n[r++]); + case "%j": + try { + return JSON.stringify(n[r++]); + } catch (e) { + return "[Circular]"; + } + default: + return e; + } + }), + f = n[r]; + r < o; + f = n[++r] + ) + b(f) || !w(f) ? (a += " " + f) : (a += " " + s(f)); + return a; + }), + (r.deprecate = function (e, i) { + if (v(n.process)) + return function () { + return r.deprecate(e, i).apply(this, arguments); + }; + if (!0 === t.noDeprecation) return e; + var o = !1; + return function () { + if (!o) { + if (t.throwDeprecation) throw new Error(i); + t.traceDeprecation ? console.trace(i) : console.error(i), + (o = !0); + } + return e.apply(this, arguments); + }; + }); + var o, + a = {}; + function s(e, t) { + var n = { seen: [], stylize: c }; + return ( + arguments.length >= 3 && (n.depth = arguments[2]), + arguments.length >= 4 && (n.colors = arguments[3]), + p(t) ? (n.showHidden = t) : t && r._extend(n, t), + v(n.showHidden) && (n.showHidden = !1), + v(n.depth) && (n.depth = 2), + v(n.colors) && (n.colors = !1), + v(n.customInspect) && (n.customInspect = !0), + n.colors && (n.stylize = f), + u(n, e, n.depth) + ); + } + function f(e, t) { + var r = s.styles[t]; + return r + ? "[" + s.colors[r][0] + "m" + e + "[" + s.colors[r][1] + "m" + : e; + } + function c(e, t) { + return e; + } + function u(e, t, n) { + if ( + e.customInspect && + t && + E(t.inspect) && + t.inspect !== r.inspect && + (!t.constructor || t.constructor.prototype !== t) + ) { + var i = t.inspect(n, e); + return m(i) || (i = u(e, i, n)), i; + } + var o = (function (e, t) { + if (v(t)) return e.stylize("undefined", "undefined"); + if (m(t)) { + var r = + "'" + + JSON.stringify(t) + .replace(/^"|"$/g, "") + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + + "'"; + return e.stylize(r, "string"); + } + if (y(t)) return e.stylize("" + t, "number"); + if (p(t)) return e.stylize("" + t, "boolean"); + if (b(t)) return e.stylize("null", "null"); + })(e, t); + if (o) return o; + var a = Object.keys(t), + s = (function (e) { + var t = {}; + return ( + e.forEach(function (e, r) { + t[e] = !0; + }), + t + ); + })(a); + if ( + (e.showHidden && (a = Object.getOwnPropertyNames(t)), + S(t) && + (a.indexOf("message") >= 0 || a.indexOf("description") >= 0)) + ) + return h(t); + if (0 === a.length) { + if (E(t)) { + var f = t.name ? ": " + t.name : ""; + return e.stylize("[Function" + f + "]", "special"); + } + if (g(t)) + return e.stylize(RegExp.prototype.toString.call(t), "regexp"); + if (_(t)) + return e.stylize(Date.prototype.toString.call(t), "date"); + if (S(t)) return h(t); + } + var c, + w = "", + M = !1, + k = ["{", "}"]; + (l(t) && ((M = !0), (k = ["[", "]"])), E(t)) && + (w = " [Function" + (t.name ? ": " + t.name : "") + "]"); + return ( + g(t) && (w = " " + RegExp.prototype.toString.call(t)), + _(t) && (w = " " + Date.prototype.toUTCString.call(t)), + S(t) && (w = " " + h(t)), + 0 !== a.length || (M && 0 != t.length) + ? n < 0 + ? g(t) + ? e.stylize(RegExp.prototype.toString.call(t), "regexp") + : e.stylize("[Object]", "special") + : (e.seen.push(t), + (c = M + ? (function (e, t, r, n, i) { + for (var o = [], a = 0, s = t.length; a < s; ++a) + A(t, String(a)) + ? o.push(d(e, t, r, n, String(a), !0)) + : o.push(""); + return ( + i.forEach(function (i) { + i.match(/^\d+$/) || + o.push(d(e, t, r, n, i, !0)); + }), + o + ); + })(e, t, n, s, a) + : a.map(function (r) { + return d(e, t, n, s, r, M); + })), + e.seen.pop(), + (function (e, t, r) { + if ( + e.reduce(function (e, t) { + return ( + 0, + t.indexOf("\n") >= 0 && 0, + e + t.replace(/\u001b\[\d\d?m/g, "").length + 1 + ); + }, 0) > 60 + ) + return ( + r[0] + + ("" === t ? "" : t + "\n ") + + " " + + e.join(",\n ") + + " " + + r[1] + ); + return r[0] + t + " " + e.join(", ") + " " + r[1]; + })(c, w, k)) + : k[0] + w + k[1] + ); + } + function h(e) { + return "[" + Error.prototype.toString.call(e) + "]"; + } + function d(e, t, r, n, i, o) { + var a, s, f; + if ( + ((f = Object.getOwnPropertyDescriptor(t, i) || { value: t[i] }) + .get + ? (s = f.set + ? e.stylize("[Getter/Setter]", "special") + : e.stylize("[Getter]", "special")) + : f.set && (s = e.stylize("[Setter]", "special")), + A(n, i) || (a = "[" + i + "]"), + s || + (e.seen.indexOf(f.value) < 0 + ? (s = b(r) + ? u(e, f.value, null) + : u(e, f.value, r - 1)).indexOf("\n") > -1 && + (s = o + ? s + .split("\n") + .map(function (e) { + return " " + e; + }) + .join("\n") + .substr(2) + : "\n" + + s + .split("\n") + .map(function (e) { + return " " + e; + }) + .join("\n")) + : (s = e.stylize("[Circular]", "special"))), + v(a)) + ) { + if (o && i.match(/^\d+$/)) return s; + (a = JSON.stringify("" + i)).match( + /^"([a-zA-Z_][a-zA-Z_0-9]*)"$/, + ) + ? ((a = a.substr(1, a.length - 2)), + (a = e.stylize(a, "name"))) + : ((a = a + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'")), + (a = e.stylize(a, "string"))); + } + return a + ": " + s; + } + function l(e) { + return Array.isArray(e); + } + function p(e) { + return "boolean" == typeof e; + } + function b(e) { + return null === e; + } + function y(e) { + return "number" == typeof e; + } + function m(e) { + return "string" == typeof e; + } + function v(e) { + return void 0 === e; + } + function g(e) { + return w(e) && "[object RegExp]" === M(e); + } + function w(e) { + return "object" == typeof e && null !== e; + } + function _(e) { + return w(e) && "[object Date]" === M(e); + } + function S(e) { + return w(e) && ("[object Error]" === M(e) || e instanceof Error); + } + function E(e) { + return "function" == typeof e; + } + function M(e) { + return Object.prototype.toString.call(e); + } + function k(e) { + return e < 10 ? "0" + e.toString(10) : e.toString(10); + } + (r.debuglog = function (e) { + if ( + (v(o) && (o = t.env.NODE_DEBUG || ""), + (e = e.toUpperCase()), + !a[e]) + ) + if (new RegExp("\\b" + e + "\\b", "i").test(o)) { + var n = t.pid; + a[e] = function () { + var t = r.format.apply(r, arguments); + console.error("%s %d: %s", e, n, t); + }; + } else a[e] = function () {}; + return a[e]; + }), + (r.inspect = s), + (s.colors = { + bold: [1, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + white: [37, 39], + grey: [90, 39], + black: [30, 39], + blue: [34, 39], + cyan: [36, 39], + green: [32, 39], + magenta: [35, 39], + red: [31, 39], + yellow: [33, 39], + }), + (s.styles = { + special: "cyan", + number: "yellow", + boolean: "yellow", + undefined: "grey", + null: "bold", + string: "green", + date: "magenta", + regexp: "red", + }), + (r.isArray = l), + (r.isBoolean = p), + (r.isNull = b), + (r.isNullOrUndefined = function (e) { + return null == e; + }), + (r.isNumber = y), + (r.isString = m), + (r.isSymbol = function (e) { + return "symbol" == typeof e; + }), + (r.isUndefined = v), + (r.isRegExp = g), + (r.isObject = w), + (r.isDate = _), + (r.isError = S), + (r.isFunction = E), + (r.isPrimitive = function (e) { + return ( + null === e || + "boolean" == typeof e || + "number" == typeof e || + "string" == typeof e || + "symbol" == typeof e || + void 0 === e + ); + }), + (r.isBuffer = e("./support/isBuffer")); + var x = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec", + ]; + function A(e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + } + (r.log = function () { + var e, t; + console.log( + "%s - %s", + ((e = new Date()), + (t = [ + k(e.getHours()), + k(e.getMinutes()), + k(e.getSeconds()), + ].join(":")), + [e.getDate(), x[e.getMonth()], t].join(" ")), + r.format.apply(r, arguments), + ); + }), + (r.inherits = e("inherits")), + (r._extend = function (e, t) { + if (!t || !w(t)) return e; + for (var r = Object.keys(t), n = r.length; n--; ) + e[r[n]] = t[r[n]]; + return e; + }); + }).call( + this, + e("_process"), + "undefined" != typeof global + ? global + : "undefined" != typeof self + ? self + : "undefined" != typeof window + ? window + : {}, + ); + }, + { "./support/isBuffer": 184, _process: 145, inherits: 183 }, + ], + 186: [ + function (require, module, exports) { + var indexOf = function (e, t) { + if (e.indexOf) return e.indexOf(t); + for (var r = 0; r < e.length; r++) if (e[r] === t) return r; + return -1; + }, + Object_keys = function (e) { + if (Object.keys) return Object.keys(e); + var t = []; + for (var r in e) t.push(r); + return t; + }, + forEach = function (e, t) { + if (e.forEach) return e.forEach(t); + for (var r = 0; r < e.length; r++) t(e[r], r, e); + }, + defineProp = (function () { + try { + return ( + Object.defineProperty({}, "_", {}), + function (e, t, r) { + Object.defineProperty(e, t, { + writable: !0, + enumerable: !1, + configurable: !0, + value: r, + }); + } + ); + } catch (e) { + return function (e, t, r) { + e[t] = r; + }; + } + })(), + globals = [ + "Array", + "Boolean", + "Date", + "Error", + "EvalError", + "Function", + "Infinity", + "JSON", + "Math", + "NaN", + "Number", + "Object", + "RangeError", + "ReferenceError", + "RegExp", + "String", + "SyntaxError", + "TypeError", + "URIError", + "decodeURI", + "decodeURIComponent", + "encodeURI", + "encodeURIComponent", + "escape", + "eval", + "isFinite", + "isNaN", + "parseFloat", + "parseInt", + "undefined", + "unescape", + ]; + function Context() {} + Context.prototype = {}; + var Script = (exports.Script = function (e) { + if (!(this instanceof Script)) return new Script(e); + this.code = e; + }); + (Script.prototype.runInContext = function (e) { + if (!(e instanceof Context)) + throw new TypeError("needs a 'context' argument."); + var t = document.createElement("iframe"); + t.style || (t.style = {}), + (t.style.display = "none"), + document.body.appendChild(t); + var r = t.contentWindow, + n = r.eval, + i = r.execScript; + !n && i && (i.call(r, "null"), (n = r.eval)), + forEach(Object_keys(e), function (t) { + r[t] = e[t]; + }), + forEach(globals, function (t) { + e[t] && (r[t] = e[t]); + }); + var o = Object_keys(r), + a = n.call(r, this.code); + return ( + forEach(Object_keys(r), function (t) { + (t in e || -1 === indexOf(o, t)) && (e[t] = r[t]); + }), + forEach(globals, function (t) { + t in e || defineProp(e, t, r[t]); + }), + document.body.removeChild(t), + a + ); + }), + (Script.prototype.runInThisContext = function () { + return eval(this.code); + }), + (Script.prototype.runInNewContext = function (e) { + var t = Script.createContext(e), + r = this.runInContext(t); + return ( + e && + forEach(Object_keys(t), function (r) { + e[r] = t[r]; + }), + r + ); + }), + forEach(Object_keys(Script.prototype), function (e) { + exports[e] = Script[e] = function (t) { + var r = Script(t); + return r[e].apply(r, [].slice.call(arguments, 1)); + }; + }), + (exports.isContext = function (e) { + return e instanceof Context; + }), + (exports.createScript = function (e) { + return exports.Script(e); + }), + (exports.createContext = Script.createContext = + function (e) { + var t = new Context(); + return ( + "object" == typeof e && + forEach(Object_keys(e), function (r) { + t[r] = e[r]; + }), + t + ); + }); + }, + {}, + ], + }, + {}, + [2], + )(2); +}); diff --git a/app/client/public/page.min.js b/app/client/public/page.min.js index c47d6e5a51..3ce166c722 100644 --- a/app/client/public/page.min.js +++ b/app/client/public/page.min.js @@ -1,2 +1,844 @@ /*! pace 1.0.0 */ -(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X=[].slice,Y={}.hasOwnProperty,Z=function(a,b){function c(){this.constructor=a}for(var d in b)Y.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},$=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};for(u={catchupTime:100,initialRate:.03,minTime:250,ghostTime:100,maxProgressPerFrame:20,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!0,ignoreURLs:[]}},C=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?a:+new Date},E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,t=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==E&&(E=function(a){return setTimeout(a,50)},t=function(a){return clearTimeout(a)}),G=function(a){var b,c;return b=C(),(c=function(){var d;return d=C()-b,d>=33?(b=C(),a(d,function(){return E(c)})):setTimeout(c,33-d)})()},F=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?X.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},v=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?X.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)Y.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?v(b[a],e):b[a]=e);return b},q=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=Math.abs(d),b++;return c/b},x=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.querySelector("[data-pace-"+a+"]")){if(c=e.getAttribute("data-pace-"+a),!b)return c;try{return JSON.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];cQ;Q++)K=U[Q],D[K]===!0&&(D[K]=u[K]);i=function(a){function b(){return V=b.__super__.constructor.apply(this,arguments)}return Z(b,a),b}(Error),b=function(){function a(){this.progress=0}return a.prototype.getElement=function(){var a;if(null==this.el){if(a=document.querySelector(D.target),!a)throw new i;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace(/pace-done/g,""),document.body.className+=" pace-running",this.el.innerHTML='
\n
\n
\n
',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b,c,d,e,f,g;if(null==document.querySelector(D.target))return!1;for(a=this.getElement(),d="translate3d("+this.progress+"%, 0, 0)",g=["webkitTransform","msTransform","transform"],e=0,f=g.length;f>e;e++)b=g[e],a.children[0].style[b]=d;return(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?c="99":(c=this.progress<10?"0":"",c+=0|this.progress),a.children[0].setAttribute("data-progress",""+c)),this.lastRenderedProgress=this.progress},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),P=window.XMLHttpRequest,O=window.XDomainRequest,N=window.WebSocket,w=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],f.push(null==a[d]&&"function"!=typeof e?a[d]=e:void 0)}catch(g){c=g}return f},A=[],j.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("ignore"),c=b.apply(null,a),A.shift(),c},j.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("track"),c=b.apply(null,a),A.shift(),c},J=function(a){var b;if(null==a&&(a="GET"),"track"===A[0])return"force";if(!A.length&&D.ajax){if("socket"===a&&D.ajax.trackWebSockets)return!0;if(b=a.toUpperCase(),$.call(D.ajax.trackMethods,b)>=0)return!0}return!1},k=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return J(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new P(b),a(c),c};try{w(window.XMLHttpRequest,P)}catch(d){}if(null!=O){window.XDomainRequest=function(){var b;return b=new O,a(b),b};try{w(window.XDomainRequest,O)}catch(d){}}if(null!=N&&D.ajax.trackWebSockets){window.WebSocket=function(a,b){var d;return d=null!=b?new N(a,b):new N(a),J("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d};try{w(window.WebSocket,N)}catch(d){}}}return Z(b,a),b}(h),R=null,y=function(){return null==R&&(R=new k),R},I=function(a){var b,c,d,e;for(e=D.ajax.ignoreURLs,c=0,d=e.length;d>c;c++)if(b=e[c],"string"==typeof b){if(-1!==a.indexOf(b))return!0}else if(b.test(a))return!0;return!1},y().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,I(g)?void 0:j.running||D.restartOnRequestAfter===!1&&"force"!==J(f)?void 0:(d=arguments,c=D.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,k;if(b="socket"===f?e.readyState<2:0<(h=e.readyState)&&4>h){for(j.restart(),i=j.sources,k=[],c=0,g=i.length;g>c;c++){if(K=i[c],K instanceof a){K.watch.apply(K,d);break}k.push(void 0)}return k}},c))}),a=function(){function a(){var a=this;this.elements=[],y().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d,e;return d=a.type,b=a.request,e=a.url,I(e)?void 0:(c="socket"===d?new n(b):new o(b),this.elements.push(c))},a}(),o=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return h.progress=a.lengthComputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2},!1),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100},!1);else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),n=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100},!1)}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},D.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=C(),b=setInterval(function(){var g;return g=C()-c-50,c=C(),e.push(g),e.length>D.eventLag.sampleCount&&e.shift(),a=q(e),++d>=D.eventLag.minSamples&&a=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/D.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,D.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+D.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),L=null,H=null,r=null,M=null,p=null,s=null,j.running=!1,z=function(){return D.restartOnPushState?j.restart():void 0},null!=window.history.pushState&&(T=window.history.pushState,window.history.pushState=function(){return z(),T.apply(window.history,arguments)}),null!=window.history.replaceState&&(W=window.history.replaceState,window.history.replaceState=function(){return z(),W.apply(window.history,arguments)}),l={ajax:a,elements:d,document:c,eventLag:f},(B=function(){var a,c,d,e,f,g,h,i;for(j.sources=L=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],D[a]!==!1&&L.push(new l[a](D[a]));for(i=null!=(h=D.extraSources)?h:[],d=0,f=i.length;f>d;d++)K=i[d],L.push(new K(D));return j.bar=r=new b,H=[],M=new m})(),j.stop=function(){return j.trigger("stop"),j.running=!1,r.destroy(),s=!0,null!=p&&("function"==typeof t&&t(p),p=null),B()},j.restart=function(){return j.trigger("restart"),j.stop(),j.start()},j.go=function(){var a;return j.running=!0,r.render(),a=C(),s=!1,p=G(function(b,c){var d,e,f,g,h,i,k,l,n,o,p,q,t,u,v,w;for(l=100-r.progress,e=p=0,f=!0,i=q=0,u=L.length;u>q;i=++q)for(K=L[i],o=null!=H[i]?H[i]:H[i]=[],h=null!=(w=K.elements)?w:[K],k=t=0,v=h.length;v>t;k=++t)g=h[k],n=null!=o[k]?o[k]:o[k]=new m(g),f&=n.done,n.done||(e++,p+=n.tick(b));return d=p/e,r.update(M.tick(b,d)),r.done()||f||s?(r.update(100),j.trigger("done"),setTimeout(function(){return r.finish(),j.running=!1,j.trigger("hide")},Math.max(D.ghostTime,Math.max(D.minTime-(C()-a),0)))):c()})},j.start=function(a){v(D,a),j.running=!0;try{r.render()}catch(b){i=b}return document.querySelector(".pace")?(j.trigger("start"),j.go()):setTimeout(j.start,50)},"function"==typeof define&&define.amd?define(function(){return j}):"object"==typeof exports?module.exports=j:D.startOnPageLoad&&j.start()}).call(this); \ No newline at end of file +(function () { + var a, + b, + c, + d, + e, + f, + g, + h, + i, + j, + k, + l, + m, + n, + o, + p, + q, + r, + s, + t, + u, + v, + w, + x, + y, + z, + A, + B, + C, + D, + E, + F, + G, + H, + I, + J, + K, + L, + M, + N, + O, + P, + Q, + R, + S, + T, + U, + V, + W, + X = [].slice, + Y = {}.hasOwnProperty, + Z = function (a, b) { + function c() { + this.constructor = a; + } + for (var d in b) Y.call(b, d) && (a[d] = b[d]); + return ( + (c.prototype = b.prototype), + (a.prototype = new c()), + (a.__super__ = b.prototype), + a + ); + }, + $ = + [].indexOf || + function (a) { + for (var b = 0, c = this.length; c > b; b++) + if (b in this && this[b] === a) return b; + return -1; + }; + for ( + u = { + catchupTime: 100, + initialRate: 0.03, + minTime: 250, + ghostTime: 100, + maxProgressPerFrame: 20, + easeFactor: 1.25, + startOnPageLoad: !0, + restartOnPushState: !0, + restartOnRequestAfter: 500, + target: "body", + elements: { checkInterval: 100, selectors: ["body"] }, + eventLag: { minSamples: 10, sampleCount: 3, lagThreshold: 3 }, + ajax: { trackMethods: ["GET"], trackWebSockets: !0, ignoreURLs: [] }, + }, + C = function () { + var a; + return null != + (a = + "undefined" != typeof performance && + null !== performance && + "function" == typeof performance.now + ? performance.now() + : void 0) + ? a + : +new Date(); + }, + E = + window.requestAnimationFrame || + window.mozRequestAnimationFrame || + window.webkitRequestAnimationFrame || + window.msRequestAnimationFrame, + t = window.cancelAnimationFrame || window.mozCancelAnimationFrame, + null == E && + ((E = function (a) { + return setTimeout(a, 50); + }), + (t = function (a) { + return clearTimeout(a); + })), + G = function (a) { + var b, c; + return ( + (b = C()), + (c = function () { + var d; + return ( + (d = C() - b), + d >= 33 + ? ((b = C()), + a(d, function () { + return E(c); + })) + : setTimeout(c, 33 - d) + ); + })() + ); + }, + F = function () { + var a, b, c; + return ( + (c = arguments[0]), + (b = arguments[1]), + (a = 3 <= arguments.length ? X.call(arguments, 2) : []), + "function" == typeof c[b] ? c[b].apply(c, a) : c[b] + ); + }, + v = function () { + var a, b, c, d, e, f, g; + for ( + b = arguments[0], + d = 2 <= arguments.length ? X.call(arguments, 1) : [], + f = 0, + g = d.length; + g > f; + f++ + ) + if ((c = d[f])) + for (a in c) + Y.call(c, a) && + ((e = c[a]), + null != b[a] && + "object" == typeof b[a] && + null != e && + "object" == typeof e + ? v(b[a], e) + : (b[a] = e)); + return b; + }, + q = function (a) { + var b, c, d, e, f; + for (c = b = 0, e = 0, f = a.length; f > e; e++) + (d = a[e]), (c += Math.abs(d)), b++; + return c / b; + }, + x = function (a, b) { + var c, d, e; + if ( + (null == a && (a = "options"), + null == b && (b = !0), + (e = document.querySelector("[data-pace-" + a + "]"))) + ) { + if (((c = e.getAttribute("data-pace-" + a)), !b)) return c; + try { + return JSON.parse(c); + } catch (f) { + return ( + (d = f), + "undefined" != typeof console && null !== console + ? console.error("Error parsing inline pace options", d) + : void 0 + ); + } + } + }, + g = (function () { + function a() {} + return ( + (a.prototype.on = function (a, b, c, d) { + var e; + return ( + null == d && (d = !1), + null == this.bindings && (this.bindings = {}), + null == (e = this.bindings)[a] && (e[a] = []), + this.bindings[a].push({ handler: b, ctx: c, once: d }) + ); + }), + (a.prototype.once = function (a, b, c) { + return this.on(a, b, c, !0); + }), + (a.prototype.off = function (a, b) { + var c, d, e; + if (null != (null != (d = this.bindings) ? d[a] : void 0)) { + if (null == b) return delete this.bindings[a]; + for (c = 0, e = []; c < this.bindings[a].length; ) + e.push( + this.bindings[a][c].handler === b + ? this.bindings[a].splice(c, 1) + : c++, + ); + return e; + } + }), + (a.prototype.trigger = function () { + var a, b, c, d, e, f, g, h, i; + if ( + ((c = arguments[0]), + (a = 2 <= arguments.length ? X.call(arguments, 1) : []), + null != (g = this.bindings) ? g[c] : void 0) + ) { + for (e = 0, i = []; e < this.bindings[c].length; ) + (h = this.bindings[c][e]), + (d = h.handler), + (b = h.ctx), + (f = h.once), + d.apply(null != b ? b : this, a), + i.push(f ? this.bindings[c].splice(e, 1) : e++); + return i; + } + }), + a + ); + })(), + j = window.Pace || {}, + window.Pace = j, + v(j, g.prototype), + D = j.options = v({}, u, window.paceOptions, x()), + U = ["ajax", "document", "eventLag", "elements"], + Q = 0, + S = U.length; + S > Q; + Q++ + ) + (K = U[Q]), D[K] === !0 && (D[K] = u[K]); + (i = (function (a) { + function b() { + return (V = b.__super__.constructor.apply(this, arguments)); + } + return Z(b, a), b; + })(Error)), + (b = (function () { + function a() { + this.progress = 0; + } + return ( + (a.prototype.getElement = function () { + var a; + if (null == this.el) { + if (((a = document.querySelector(D.target)), !a)) throw new i(); + (this.el = document.createElement("div")), + (this.el.className = "pace pace-active"), + (document.body.className = document.body.className.replace( + /pace-done/g, + "", + )), + (document.body.className += " pace-running"), + (this.el.innerHTML = + '
\n
\n
\n
'), + null != a.firstChild + ? a.insertBefore(this.el, a.firstChild) + : a.appendChild(this.el); + } + return this.el; + }), + (a.prototype.finish = function () { + var a; + return ( + (a = this.getElement()), + (a.className = a.className.replace("pace-active", "")), + (a.className += " pace-inactive"), + (document.body.className = document.body.className.replace( + "pace-running", + "", + )), + (document.body.className += " pace-done") + ); + }), + (a.prototype.update = function (a) { + return (this.progress = a), this.render(); + }), + (a.prototype.destroy = function () { + try { + this.getElement().parentNode.removeChild(this.getElement()); + } catch (a) { + i = a; + } + return (this.el = void 0); + }), + (a.prototype.render = function () { + var a, b, c, d, e, f, g; + if (null == document.querySelector(D.target)) return !1; + for ( + a = this.getElement(), + d = "translate3d(" + this.progress + "%, 0, 0)", + g = ["webkitTransform", "msTransform", "transform"], + e = 0, + f = g.length; + f > e; + e++ + ) + (b = g[e]), (a.children[0].style[b] = d); + return ( + (!this.lastRenderedProgress || + this.lastRenderedProgress | (0 !== this.progress) | 0) && + (a.children[0].setAttribute( + "data-progress-text", + "" + (0 | this.progress) + "%", + ), + this.progress >= 100 + ? (c = "99") + : ((c = this.progress < 10 ? "0" : ""), + (c += 0 | this.progress)), + a.children[0].setAttribute("data-progress", "" + c)), + (this.lastRenderedProgress = this.progress) + ); + }), + (a.prototype.done = function () { + return this.progress >= 100; + }), + a + ); + })()), + (h = (function () { + function a() { + this.bindings = {}; + } + return ( + (a.prototype.trigger = function (a, b) { + var c, d, e, f, g; + if (null != this.bindings[a]) { + for (f = this.bindings[a], g = [], d = 0, e = f.length; e > d; d++) + (c = f[d]), g.push(c.call(this, b)); + return g; + } + }), + (a.prototype.on = function (a, b) { + var c; + return ( + null == (c = this.bindings)[a] && (c[a] = []), + this.bindings[a].push(b) + ); + }), + a + ); + })()), + (P = window.XMLHttpRequest), + (O = window.XDomainRequest), + (N = window.WebSocket), + (w = function (a, b) { + var c, d, e, f; + f = []; + for (d in b.prototype) + try { + (e = b.prototype[d]), + f.push( + null == a[d] && "function" != typeof e ? (a[d] = e) : void 0, + ); + } catch (g) { + c = g; + } + return f; + }), + (A = []), + (j.ignore = function () { + var a, b, c; + return ( + (b = arguments[0]), + (a = 2 <= arguments.length ? X.call(arguments, 1) : []), + A.unshift("ignore"), + (c = b.apply(null, a)), + A.shift(), + c + ); + }), + (j.track = function () { + var a, b, c; + return ( + (b = arguments[0]), + (a = 2 <= arguments.length ? X.call(arguments, 1) : []), + A.unshift("track"), + (c = b.apply(null, a)), + A.shift(), + c + ); + }), + (J = function (a) { + var b; + if ((null == a && (a = "GET"), "track" === A[0])) return "force"; + if (!A.length && D.ajax) { + if ("socket" === a && D.ajax.trackWebSockets) return !0; + if (((b = a.toUpperCase()), $.call(D.ajax.trackMethods, b) >= 0)) + return !0; + } + return !1; + }), + (k = (function (a) { + function b() { + var a, + c = this; + b.__super__.constructor.apply(this, arguments), + (a = function (a) { + var b; + return ( + (b = a.open), + (a.open = function (d, e) { + return ( + J(d) && c.trigger("request", { type: d, url: e, request: a }), + b.apply(a, arguments) + ); + }) + ); + }), + (window.XMLHttpRequest = function (b) { + var c; + return (c = new P(b)), a(c), c; + }); + try { + w(window.XMLHttpRequest, P); + } catch (d) {} + if (null != O) { + window.XDomainRequest = function () { + var b; + return (b = new O()), a(b), b; + }; + try { + w(window.XDomainRequest, O); + } catch (d) {} + } + if (null != N && D.ajax.trackWebSockets) { + window.WebSocket = function (a, b) { + var d; + return ( + (d = null != b ? new N(a, b) : new N(a)), + J("socket") && + c.trigger("request", { + type: "socket", + url: a, + protocols: b, + request: d, + }), + d + ); + }; + try { + w(window.WebSocket, N); + } catch (d) {} + } + } + return Z(b, a), b; + })(h)), + (R = null), + (y = function () { + return null == R && (R = new k()), R; + }), + (I = function (a) { + var b, c, d, e; + for (e = D.ajax.ignoreURLs, c = 0, d = e.length; d > c; c++) + if (((b = e[c]), "string" == typeof b)) { + if (-1 !== a.indexOf(b)) return !0; + } else if (b.test(a)) return !0; + return !1; + }), + y().on("request", function (b) { + var c, d, e, f, g; + return ( + (f = b.type), + (e = b.request), + (g = b.url), + I(g) + ? void 0 + : j.running || (D.restartOnRequestAfter === !1 && "force" !== J(f)) + ? void 0 + : ((d = arguments), + (c = D.restartOnRequestAfter || 0), + "boolean" == typeof c && (c = 0), + setTimeout(function () { + var b, c, g, h, i, k; + if ( + (b = + "socket" === f + ? e.readyState < 2 + : 0 < (h = e.readyState) && 4 > h) + ) { + for ( + j.restart(), i = j.sources, k = [], c = 0, g = i.length; + g > c; + c++ + ) { + if (((K = i[c]), K instanceof a)) { + K.watch.apply(K, d); + break; + } + k.push(void 0); + } + return k; + } + }, c)) + ); + }), + (a = (function () { + function a() { + var a = this; + (this.elements = []), + y().on("request", function () { + return a.watch.apply(a, arguments); + }); + } + return ( + (a.prototype.watch = function (a) { + var b, c, d, e; + return ( + (d = a.type), + (b = a.request), + (e = a.url), + I(e) + ? void 0 + : ((c = "socket" === d ? new n(b) : new o(b)), + this.elements.push(c)) + ); + }), + a + ); + })()), + (o = (function () { + function a(a) { + var b, + c, + d, + e, + f, + g, + h = this; + if (((this.progress = 0), null != window.ProgressEvent)) + for ( + c = null, + a.addEventListener( + "progress", + function (a) { + return (h.progress = a.lengthComputable + ? (100 * a.loaded) / a.total + : h.progress + (100 - h.progress) / 2); + }, + !1, + ), + g = ["load", "abort", "timeout", "error"], + d = 0, + e = g.length; + e > d; + d++ + ) + (b = g[d]), + a.addEventListener( + b, + function () { + return (h.progress = 100); + }, + !1, + ); + else + (f = a.onreadystatechange), + (a.onreadystatechange = function () { + var b; + return ( + 0 === (b = a.readyState) || 4 === b + ? (h.progress = 100) + : 3 === a.readyState && (h.progress = 50), + "function" == typeof f ? f.apply(null, arguments) : void 0 + ); + }); + } + return a; + })()), + (n = (function () { + function a(a) { + var b, + c, + d, + e, + f = this; + for ( + this.progress = 0, e = ["error", "open"], c = 0, d = e.length; + d > c; + c++ + ) + (b = e[c]), + a.addEventListener( + b, + function () { + return (f.progress = 100); + }, + !1, + ); + } + return a; + })()), + (d = (function () { + function a(a) { + var b, c, d, f; + for ( + null == a && (a = {}), + this.elements = [], + null == a.selectors && (a.selectors = []), + f = a.selectors, + c = 0, + d = f.length; + d > c; + c++ + ) + (b = f[c]), this.elements.push(new e(b)); + } + return a; + })()), + (e = (function () { + function a(a) { + (this.selector = a), (this.progress = 0), this.check(); + } + return ( + (a.prototype.check = function () { + var a = this; + return document.querySelector(this.selector) + ? this.done() + : setTimeout(function () { + return a.check(); + }, D.elements.checkInterval); + }), + (a.prototype.done = function () { + return (this.progress = 100); + }), + a + ); + })()), + (c = (function () { + function a() { + var a, + b, + c = this; + (this.progress = + null != (b = this.states[document.readyState]) ? b : 100), + (a = document.onreadystatechange), + (document.onreadystatechange = function () { + return ( + null != c.states[document.readyState] && + (c.progress = c.states[document.readyState]), + "function" == typeof a ? a.apply(null, arguments) : void 0 + ); + }); + } + return ( + (a.prototype.states = { loading: 0, interactive: 50, complete: 100 }), a + ); + })()), + (f = (function () { + function a() { + var a, + b, + c, + d, + e, + f = this; + (this.progress = 0), + (a = 0), + (e = []), + (d = 0), + (c = C()), + (b = setInterval(function () { + var g; + return ( + (g = C() - c - 50), + (c = C()), + e.push(g), + e.length > D.eventLag.sampleCount && e.shift(), + (a = q(e)), + ++d >= D.eventLag.minSamples && a < D.eventLag.lagThreshold + ? ((f.progress = 100), clearInterval(b)) + : (f.progress = 100 * (3 / (a + 3))) + ); + }, 50)); + } + return a; + })()), + (m = (function () { + function a(a) { + (this.source = a), + (this.last = this.sinceLastUpdate = 0), + (this.rate = D.initialRate), + (this.catchup = 0), + (this.progress = this.lastProgress = 0), + null != this.source && (this.progress = F(this.source, "progress")); + } + return ( + (a.prototype.tick = function (a, b) { + var c; + return ( + null == b && (b = F(this.source, "progress")), + b >= 100 && (this.done = !0), + b === this.last + ? (this.sinceLastUpdate += a) + : (this.sinceLastUpdate && + (this.rate = (b - this.last) / this.sinceLastUpdate), + (this.catchup = (b - this.progress) / D.catchupTime), + (this.sinceLastUpdate = 0), + (this.last = b)), + b > this.progress && (this.progress += this.catchup * a), + (c = 1 - Math.pow(this.progress / 100, D.easeFactor)), + (this.progress += c * this.rate * a), + (this.progress = Math.min( + this.lastProgress + D.maxProgressPerFrame, + this.progress, + )), + (this.progress = Math.max(0, this.progress)), + (this.progress = Math.min(100, this.progress)), + (this.lastProgress = this.progress), + this.progress + ); + }), + a + ); + })()), + (L = null), + (H = null), + (r = null), + (M = null), + (p = null), + (s = null), + (j.running = !1), + (z = function () { + return D.restartOnPushState ? j.restart() : void 0; + }), + null != window.history.pushState && + ((T = window.history.pushState), + (window.history.pushState = function () { + return z(), T.apply(window.history, arguments); + })), + null != window.history.replaceState && + ((W = window.history.replaceState), + (window.history.replaceState = function () { + return z(), W.apply(window.history, arguments); + })), + (l = { ajax: a, elements: d, document: c, eventLag: f }), + (B = function () { + var a, c, d, e, f, g, h, i; + for ( + j.sources = L = [], + g = ["ajax", "elements", "document", "eventLag"], + c = 0, + e = g.length; + e > c; + c++ + ) + (a = g[c]), D[a] !== !1 && L.push(new l[a](D[a])); + for ( + i = null != (h = D.extraSources) ? h : [], d = 0, f = i.length; + f > d; + d++ + ) + (K = i[d]), L.push(new K(D)); + return (j.bar = r = new b()), (H = []), (M = new m()); + })(), + (j.stop = function () { + return ( + j.trigger("stop"), + (j.running = !1), + r.destroy(), + (s = !0), + null != p && ("function" == typeof t && t(p), (p = null)), + B() + ); + }), + (j.restart = function () { + return j.trigger("restart"), j.stop(), j.start(); + }), + (j.go = function () { + var a; + return ( + (j.running = !0), + r.render(), + (a = C()), + (s = !1), + (p = G(function (b, c) { + var d, e, f, g, h, i, k, l, n, o, p, q, t, u, v, w; + for ( + l = 100 - r.progress, e = p = 0, f = !0, i = q = 0, u = L.length; + u > q; + i = ++q + ) + for ( + K = L[i], + o = null != H[i] ? H[i] : (H[i] = []), + h = null != (w = K.elements) ? w : [K], + k = t = 0, + v = h.length; + v > t; + k = ++t + ) + (g = h[k]), + (n = null != o[k] ? o[k] : (o[k] = new m(g))), + (f &= n.done), + n.done || (e++, (p += n.tick(b))); + return ( + (d = p / e), + r.update(M.tick(b, d)), + r.done() || f || s + ? (r.update(100), + j.trigger("done"), + setTimeout(function () { + return r.finish(), (j.running = !1), j.trigger("hide"); + }, Math.max(D.ghostTime, Math.max(D.minTime - (C() - a), 0)))) + : c() + ); + })) + ); + }), + (j.start = function (a) { + v(D, a), (j.running = !0); + try { + r.render(); + } catch (b) { + i = b; + } + return document.querySelector(".pace") + ? (j.trigger("start"), j.go()) + : setTimeout(j.start, 50); + }), + "function" == typeof define && define.amd + ? define(function () { + return j; + }) + : "object" == typeof exports + ? (module.exports = j) + : D.startOnPageLoad && j.start(); +}).call(this); diff --git a/app/client/public/tinymce/tinymce.min.js b/app/client/public/tinymce/tinymce.min.js index 6e8172eb04..750e5cacd8 100644 --- a/app/client/public/tinymce/tinymce.min.js +++ b/app/client/public/tinymce/tinymce.min.js @@ -6,7 +6,23580 @@ * * Version: 5.1.6 (2020-01-28) */ -!function(j){"use strict";function i(){}var q=function(n,r){return function(){for(var e=[],t=0;t=i.length&&n(r)}}(t))})})}var Ut,jt,qt,$t=Vt.exports.boltExport,Wt=function(e){var n=k.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){j.setTimeout(function(){t(e)},0)})};return e(function(e){n=k.some(e),i(t),t=[]}),{get:r,map:function(n){return Wt(function(t){r(function(e){t(n(e))})})},isReady:o}},Kt={nu:Wt,pure:function(t){return Wt(function(e){e(t)})}},Xt=function(n){function e(e){n().then(e,It)}return{map:function(e){return Xt(function(){return n().then(e)})},bind:function(t){return Xt(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return Xt(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return Kt.nu(e)},toCached:function(){var e=null;return Xt(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},Yt={nu:function(e){return Xt(function(){return new $t(e)})},pure:function(e){return Xt(function(){return $t.resolve(e)})}},Gt=function(e){return Ft(e,Yt.nu)},Jt=function(n){return{is:function(e){return n===e},isValue:a,isError:c,getOr:$(n),getOrThunk:$(n),getOrDie:$(n),or:function(e){return Jt(n)},orThunk:function(e){return Jt(n)},fold:function(e,t){return t(n)},map:function(e){return Jt(e(n))},mapError:function(e){return Jt(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return k.some(n)}}},Qt=function(n){return{is:c,isValue:c,isError:a,getOr:W,getOrThunk:function(e){return e()},getOrDie:function(){return function(e){return function(){throw new Error(e)}}(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Qt(n)},mapError:function(e){return Qt(e(n))},each:i,bind:function(e){return Qt(n)},exists:c,forall:a,toOption:k.none}},Zt={value:Jt,error:Qt,fromOption:function(e,t){return e.fold(function(){return Qt(t)},Jt)}},en=window.Promise?window.Promise:(Ut=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},jt=nn.immediateFn||"function"==typeof j.setImmediate&&j.setImmediate||function(e){j.setTimeout(e,1)},nn.prototype["catch"]=function(e){return this.then(null,e)},nn.prototype.then=function(n,r){var o=this;return new nn(function(e,t){rn.call(o,new sn(n,r,e,t))})},nn.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&Ut(arguments[0])?arguments[0]:arguments);return new nn(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qn=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Zn=/[<>&\"\']/g,er=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,tr={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};Pn={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Ln={"<":"<",">":">","&":"&",""":'"',"'":"'"};function nr(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):tr[t]||String.fromCharCode(t):Ln[e]||Hn[e]||function(e){var t;return(t=bt.fromTag("div").dom()).innerHTML=e,t.textContent||t.innerText||e}(e)})}},ur={},sr={},cr=Rn.makeMap,lr=Rn.each,fr=Rn.extend,dr=Rn.explode,hr=Rn.inArray,mr=function(e,t){return(e=Rn.trim(e))?e.split(t||" "):[]},gr=function(e){function t(e,t,n){function r(e,t){var n,r,o={};for(n=0,r=e.length;n
");return wi(n.element,r),Zp(r,function(){return Oi(r)})}function tv(e){return Zp(bt.fromDom(e),i)}function nv(n,r,o,i){jv(n,function(e,t){return Uv(n,r,o,i)},o)}function rv(e,t,n,r){var o=bt.fromDom(e.getDoc());n(o,Ti(o).top(),t,r)}function ov(e,t,n,r){var o=e.pos;if(n)Ai(o.left(),o.top(),r);else{var i=o.top()-t+(e.bottom-o.top());Ai(o.left(),i,r)}}function iv(e,t,n,r,o){r.pos.top()n+t&&ov(r,n,!0===o,e)}function av(e,t,n,r){var o=e.dom().defaultView.innerHeight;iv(e,t,o,n,r)}function uv(e,t,n,r,o){var i=t.dom().defaultView.innerHeight;iv(t,n,i,r,o);var a=Jp(r.element),u=Vi(j.window);a.top()u.bottom()&&Mi(r.element,!0===o)}function sv(e,t,n){return nv(e,d(av),t,n)}function cv(e,t,n){return rv(e,tv(t),d(av),n)}function lv(e,t,n){return nv(e,d(uv,e),t,n)}function fv(e,t,n){return rv(e,tv(t),d(uv,e),n)}function dv(e){return Ge.isContentEditableTrue(e)||Ge.isContentEditableFalse(e)}function hv(e,t){var n=(t||j.document).createDocumentFragment();return z(e,function(e){n.appendChild(e.dom())}),bt.fromDom(n)}function mv(e,t){var n=parseInt(ge(e,t),10);return isNaN(n)?1:n}function gv(e){return b(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)}function pv(e,t){for(var n=e.rows(),r=0;ro.childNodes.length-1&&(s=!1),Ge.isDocument(o)&&(o=f,i=0),o===f){if(s&&(a=o.childNodes[0t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return qv(c,e,t)},placeCaretAt:function(e,t){return m(Wv(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=h();return e.collapsed?_s.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,o.destroy()}};return n=Xp(g),o=Kp(g,c),g.bookmarkManager=n,g.controlSelection=o,g}function dy(e){return jy(e)&&e.data[0]===lu}function hy(e){return jy(e)&&e.data[e.data.length-1]===lu}function my(e){return e.ownerDocument.createTextNode(lu)}function gy(e,t){return e?function(e){if(jy(e.previousSibling))return hy(e.previousSibling)||e.previousSibling.appendData(lu),e.previousSibling;if(jy(e))return dy(e)||e.insertData(0,lu),e;var t=my(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(jy(e.nextSibling))return dy(e.nextSibling)||e.nextSibling.insertData(0,lu),e.nextSibling;if(jy(e))return hy(e)||e.appendData(lu),e;var t=my(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)}function py(e,t){return Ge.isText(e.container())?gy(t,e.container()):gy(t,e.getNode())}function vy(e,t){var n=t.get();return n&&e.container()===n&&Da(n)}function yy(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Da(n)?Ge.isText(n.nextSibling)?_s(n.nextSibling,0):_s.after(n):Ba(t)?_s(n,r+1):t:Da(n)?Ge.isText(n.previousSibling)?_s(n.previousSibling,n.previousSibling.data.length):_s.before(n):Ha(t)?_s(n,r-1):t}function by(e,t){var n=Cs(t,e);return n||e}function Cy(e,t,n){var r=Xy.normalizeForwards(n),o=by(t,r.container());return Xy.findRootInline(e,o,r).fold(function(){return Lc.nextPosition(o,r).bind(d(Xy.findRootInline,e,o)).map(function(e){return Gy.before(e)})},k.none)}function wy(e,t){return null===is(e,t)}function xy(e,t,n){return Xy.findRootInline(e,t,n).filter(d(wy,t))}function zy(e,t,n){var r=Xy.normalizeBackwards(n);return xy(e,t,r).bind(function(e){return Lc.prevPosition(e,r).isNone()?k.some(Gy.start(e)):k.none()})}function Ey(e,t,n){var r=Xy.normalizeForwards(n);return xy(e,t,r).bind(function(e){return Lc.nextPosition(e,r).isNone()?k.some(Gy.end(e)):k.none()})}function Ny(e,t,n){var r=Xy.normalizeBackwards(n),o=by(t,r.container());return Xy.findRootInline(e,o,r).fold(function(){return Lc.prevPosition(o,r).bind(d(Xy.findRootInline,e,o)).map(function(e){return Gy.after(e)})},k.none)}function Sy(e){return!1===Xy.isRtl(Jy(e))}function ky(e,t,n){return Yy([Cy,zy,Ey,Ny],[e,t,n]).filter(Sy)}function Ty(e){return e.fold($("before"),$("start"),$("end"),$("after"))}function Ay(e){return e.fold(Gy.before,Gy.before,Gy.after,Gy.after)}function My(n,e,r,t,o,i){return Ga(Xy.findRootInline(e,r,t),Xy.findRootInline(e,r,o),function(e,t){return e!==t&&Xy.hasSameParentBlock(r,e,t)?Gy.after(n?e:t):i}).getOr(i)}function Ry(e,t){return e.fold($(!0),function(e){return!function(e,t){return Ty(e)===Ty(t)&&Jy(e)===Jy(t)}(e,t)})}function Dy(e,t){return e?t.fold(q(k.some,Gy.start),k.none,q(k.some,Gy.after),k.none):t.fold(k.none,q(k.some,Gy.before),k.none,q(k.some,Gy.end))}function _y(e,t,n,r){var o=Xy.normalizePosition(e,r),i=ky(t,n,o);return ky(t,n,o).bind(d(Dy,e)).orThunk(function(){return function(t,n,r,o,e){var i=Xy.normalizePosition(t,e);return Lc.fromPosition(t,r,i).map(d(Xy.normalizePosition,t)).fold(function(){return o.map(Ay)},function(e){return ky(n,r,e).map(d(My,t,n,r,i,e)).filter(d(Ry,o))}).filter(Sy)}(e,t,n,i,r)})}function Oy(e){return D(e.selection.getSel().modify)}function By(e,t,n){var r=e?1:-1;return t.setRng(_s(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0}function Hy(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)}function Py(e){return!1!==e.settings.inline_boundaries}function Ly(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")}function Vy(t,e,n){return Wy(e,n).map(function(e){return Hy(t,e),n})}function Iy(e,t,n){return function(){return!!Py(t)&&nb(e,t)}}var Fy,Uy,jy=Ge.isText,qy=d(gy,!0),$y=d(gy,!1),Wy=function(n,e){return e.fold(function(e){$s.remove(n.get());var t=qy(e);return n.set(t),k.some(_s(t,t.length-1))},function(e){return Lc.firstPositionIn(e).map(function(e){if(vy(e,n))return _s(n.get(),1);$s.remove(n.get());var t=py(e,!0);return n.set(t),_s(t,1)})},function(e){return Lc.lastPositionIn(e).map(function(e){if(vy(e,n))return _s(n.get(),n.get().length-1);$s.remove(n.get());var t=py(e,!1);return n.set(t),_s(t,t.length-1)})},function(e){$s.remove(n.get());var t=$y(e);return n.set(t),k.some(_s(t,1))})},Ky=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Xy={isInlineTarget:function(e,t){return we(bt.fromDom(t),Ff(e))},findRootInline:function(e,t,n){var r=function(e,t,n){return y(Yi.DOM.getParents(n.container(),"*",t),e)}(e,t,n);return k.from(r[r.length-1])},isRtl:function(e){return"rtl"===Yi.DOM.getStyle(e,"direction",!0)||function(e){return Ky.test(e)}(e.textContent)},isAtZwsp:function(e){return Ba(e)||Ha(e)},normalizePosition:yy,normalizeForwards:d(yy,!0),normalizeBackwards:d(yy,!1),hasSameParentBlock:function(e,t,n){var r=Cs(t,e),o=Cs(n,e);return r&&r===o}},Yy=function(e,t){for(var n=0;n'),t}(e),1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}}function db(t,n){return function(){var e=function(e,t){var n,r=oc(e.getBody()),o=d(As,r.next),i=d(As,r.prev),a=t?Rs.Forwards:Rs.Backwards,u=t?o:i,s=e.selection.getRng();return(n=cb(a,e,u,s))?n:(n=fb(e,a,s))||null}(t,n);return!!e&&(t.selection.setRng(e),!0)}}function hb(t,n){return function(){var e=function(e,t){var n,r=t?1:-1,o=t?Ym:Xm,i=e.selection.getRng();return(n=lb(r,e,o,i))?n:(n=fb(e,r,i))||null}(t,n);return!!e&&(t.selection.setRng(e),!0)}}function mb(n,r){return function(){var e=r?_s.fromRangeEnd(n.selection.getRng()):_s.fromRangeStart(n.selection.getRng()),t=r?lx(n.getBody(),e):cx(n.getBody(),e);return(r?N(t.positions):E(t.positions)).filter(function(t){return function(e){return t?Vh(e):Lh(e)}}(r)).fold($(!1),function(e){return n.selection.setRng(e.toRange()),!0})}}function gb(e,t,n,r,o){var i=ga(bt.fromDom(n),"td,th,caption").map(function(e){return e.dom()});return function(e,o,i){return b(e,function(e,r){return e.fold(function(){return k.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-o)+Math.abs(e.y-i)),n=Math.sqrt(Math.abs(r.x-o)+Math.abs(r.y-i));return k.some(ns.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",h=!(!t||!t.ctrlKey);"LI"!==d||h||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&!function(e,t,n){for(var r,o=new bi(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0",lf(e)!==e.documentBaseUrl&&(r+=''),r+='',t=ff(e),n=df(e),hf(e)&&(r+=''),r+='
'}(e),wz.add(t.iframeContainer,r),o}function Iw(e){e.contentCSS=e.contentCSS.concat(function(t){var e=Vf(t),n=t.editorManager.baseURL+"/skins/content",r="content"+t.editorManager.suffix+".css",o=!0===t.inline;return X(e,function(e){return function(e){return/^[a-z0-9\-]+$/i.test(e)}(e)&&!o?n+"/"+e+"/"+r:t.documentBaseURI.toAbsolute(e)})}(e))}function Fw(e){return e.replace(/^\-/,"")}function Uw(e){return{editorContainer:e,iframeContainer:e}}function jw(e){var t=e.getElement();return e.inline?Uw(null):function(e){var t=zz.create("div");return zz.insertAfter(t,e),Uw(t)}(t)}function qw(e){return"-"===e.charAt(0)}function $w(t,e){(function(e){return k.from(Ef(e)).filter(function(e){return 0|)$/," "):o("nextSibling")||(t=t.replace(/( | )(
|)$/," "))),t}(m.getRng(),t)),r=e.parser,h=n.merge,o=vl({validate:e.settings.validate},e.schema),d='​',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var p=(l=m.getRng()).startContainer||(l.parentElement?l.parentElement():null),v=e.getBody();p===v&&m.isCollapsed()&&g.isBlock(v.firstChild)&&function(e,t){return t&&!e.schema.getShortEndedElements()[t.nodeName]}(e,v.firstChild)&&g.isEmpty(v.firstChild)&&((l=g.createRng()).setStart(v.firstChild,0),l.setEnd(v.firstChild,0),m.setRng(l)),m.isCollapsed()||(e.selection.setRng(dp(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),t=function(e,t){var n,r;return n=e.startContainer,r=e.startOffset,3===n.nodeType&&e.collapsed&&("\xa0"===n.data[r]?(n.deleteData(r,1),/[\u00a0| ]$/.test(t)||(t+=" ")):"\xa0"===n.data[r-1]&&(n.deleteData(r-1,1),/[\u00a0| ]$/.test(t)||(t=" "+t))),t}(e.selection.getRng(),t));var y={context:(i=m.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,y),!0===n.paste&&Tz(e.schema,u)&&Mz(g,i))return l=Az(o,g,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!g.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),y.invalid){for(Zw(e,d),i=m.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:g.getOuterHTML(i),t=o.serialize(r.parse(t.replace(//i,function(){return o.serialize(u)}))),i===a?g.setHTML(a,t):g.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):Zw(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new Bg(r);Rn.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,h),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),Sn.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e));r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),Rz(r)||function(e){return!!e.getAttribute("data-mce-fragment")}(r)||!(o=function(e){var t=_s.fromRangeStart(e);if(t=oc(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,g.get("mce_marker")),function(e){Rn.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})}(e.getBody()),function(e,t){k.from(e.getParent(t,"td,th")).map(bt.fromDom).each(wg)}(e.dom,e.selection.getStart()),e.fire("SetContent",s),e.addVisual()}}function tx(e,t){e.getDoc().execCommand(t,!1,null)}function nx(e,t,n){return t(e).orThunk(function(){return n(e)?k.none():function(e,t,n){for(var r=e.dom(),o=D(n)?n:$(!1);r.parentNode;){r=r.parentNode;var i=bt.fromDom(r),a=t(i);if(a.isSome())return a;if(o(i))break}return k.none()}(e,t,n)})}function rx(e,t,n){function r(t){return ye(t,e).orThunk(function(){return"font"===ie(t)?le(Bz,e).bind(function(e){return function(e,t){return k.from(ge(e,t))}(t,e)}):k.none()})}return nx(bt.fromDom(n),function(e){return r(e)},function(e){return ze(bt.fromDom(t),e)})}function ox(n){return function(t,e){return k.from(e).map(bt.fromDom).filter(zt).bind(function(e){return rx(n,t,e.dom()).or(function(e,t){return k.from(Yi.DOM.getStyle(t,e,!0))}(n,e.dom()))}).getOr("")}}function ix(e){return Lc.firstPositionIn(e.getBody()).map(function(e){var t=e.container();return Ge.isText(t)?t.parentNode:t})}function ax(t){return k.from(t.selection.getRng()).bind(function(e){return function(e,t){return e.startContainer===t&&0===e.startOffset}(e,t.getBody())?k.none():k.from(t.selection.getStart(!0))})}function ux(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=wf(e),o=xf(e);return o?o[n-1]||t:r[n-1]||t}return t}return t}function sx(e,t){var n=ux(e,t);e.formatter.toggle("fontname",{value:function(e){var t=e.split(/\s*,\s*/);return X(t,function(e){return-1===e.indexOf(" ")||ee(e,'"')||ee(e,"'")?e:"'"+e+"'"}).join(",")}(n)}),e.nodeChanged()}var cx=d(ib,ju.isAbove,-1),lx=d(ib,ju.isBelow,1),fx=d(ab,-1,cx),dx=d(ab,1,lx),hx=Ge.isContentEditableFalse,mx=Ka,gx=d(gb,function(e){return e.bottom},function(e,t){return e.yt}),vx=d(bb,cx),yx=d(bb,lx),bx=function(e){for(var t=[],n=1;ns.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=v&&Ge.isText(s)?s.nodeValue.length:0),(u=XC(y,s))&&((p&&!l||!p&&l)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f=t||"P",d=e.dom,h=XC(d,r);if(!(a=d.getParent(r,d.isBlock))||!WC(d,a)){if(l=(a=a||h)===e.getBody()||function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=d.create(f),YC(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!d.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,f.toLowerCase())){for(i=d.create(f),YC(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!d.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,p,w,s,i)),c=y.getParent(s,y.isBlock),h=c?y.getParent(c.parentNode,y.isBlock):null,m=c?c.nodeName.toUpperCase():"","LI"!==(g=h?h.nodeName.toUpperCase():"")||x||(h=(c=h).parentNode,m=g),/^(LI|DT|DD)$/.test(m)&&y.isEmpty(c)?nz(a,t,h,c,p):p&&c===a.getBody()||(p=p||"P",Ra(c)?(f=La(c),y.isEmpty(c)&&qC(c),Jx(a,f)):n()?r():n(!0)?(f=c.parentNode.insertBefore(t(),c),Jx(a,$C(c,"HR")?f:c)):((o=function(e){var t=e.cloneRange();return t.setStart(e.startContainer,KC(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,KC(!1,e.endContainer,e.endOffset)),t}(w).cloneRange()).setEndAfter(c),function(e){z(va(bt.fromDom(e),Et),function(e){var t=e.dom();t.nodeValue=fu(t.nodeValue)})}(d=o.extractContents()),function(e){for(;Ge.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(d),f=d.firstChild,y.insertAfter(d,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;Ge.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(y,C,f),function(e,t){var n;t.normalize(),(n=t.lastChild)&&!/^(left|right)$/gi.test(e.getStyle(n,"float",!0))||e.add(t,"br")}(y,c),y.isEmpty(c)&&qC(c),f.normalize(),y.isEmpty(f)?(y.remove(f),r()):Jx(a,f)),y.setAttrib(f,"id",""),a.fire("NewBlock",{newBlock:f})))},oz=function(e,t){return!!function(e){return Ge.isBr(e.getNode())}(_s.after(t))||Lc.nextPosition(e,_s.after(t)).map(function(e){return Ge.isBr(e.getNode())}).getOr(!1)},iz=function(e,t){var n=function(e){var t=d(Xy.isInlineTarget,e),n=_s.fromRangeStart(e.selection.getRng());return Qy(t,e.getBody(),n).filter(nw)}(e);n.isSome()?n.each(d(rw,e)):QC(e,t)},az=function(e){return ow(e,vf(e))},uz=function(e){return ow(e,yf(e))},sz=qf([{br:[]},{block:[]},{none:[]}]),cz=function(e,t){return Yy([mw([iw],sz.none()),mw([sw("summary",!0)],sz.br()),mw([cw(!0),lw(!1),dw],sz.br()),mw([cw(!0),lw(!1)],sz.block()),mw([cw(!0),lw(!0),dw],sz.block()),mw([cw(!0),lw(!0)],sz.br()),mw([uw(!0),dw],sz.br()),mw([uw(!0)],sz.block()),mw([aw(!0),dw,hw],sz.block()),mw([aw(!0)],sz.br()),mw([fw],sz.br()),mw([aw(!1),dw],sz.br()),mw([hw],sz.block())],[e,!(!t||!t.shiftKey)]).getOr(sz.none())},lz=function(e,t){cz(e,t).fold(function(){iz(e,t)},function(){rz(e,t)},i)},fz=function(t){t.on("keydown",function(e){e.keyCode===Mh.ENTER&&function(e,t){t.isDefaultPrevented()||(t.preventDefault(),function(e){e.typing&&(e.typing=!1,e.add())}(e.undoManager),e.undoManager.transact(function(){!1===e.selection.isCollapsed()&&e.execCommand("Delete"),lz(e,t)}))}(t,e)})},dz=d(gw,"\xa0"),hz=d(gw," "),mz=function(t){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t){Cx([{keyCode:Mh.SPACEBAR,action:bx(Mw,e)}],t).each(function(e){t.preventDefault()})}(t,e)})},gz=function(e){e.on("keyup compositionstart",d(Dw,e))},pz=oe().browser,vz=function(t){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(e,t){Cx([{keyCode:Mh.END,action:mb(e,!0)},{keyCode:Mh.HOME,action:mb(e,!1)}],t).each(function(e){t.preventDefault()})}(t,e)})},yz=function(e){var t=rb.setupSelectedState(e);gz(e),wx(e,t),Gx(e,t),fz(e),mz(e),_w(e),vz(e)},bz=Yi.DOM,Cz=function(t,e){var n,r,o=t.settings,i=t.getElement(),a=t.getDoc();o.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(a.open(),a.write(t.iframeHTML),a.close()),t.inline&&(t.on("remove",function(){var e=this.getBody();bz.removeClass(e,"mce-content-body"),bz.removeClass(e,"mce-edit-focus"),bz.setAttrib(e,"contentEditable",null)}),bz.addClass(i,"mce-content-body"),t.contentDocument=a=j.document,t.contentWindow=j.window,t.bodyElement=i,t.contentAreaContainer=i,o.root_name=i.nodeName.toLowerCase()),(n=t.getBody()).disabled=!0,t.readonly=o.readonly,t.readonly||(t.inline&&"static"===bz.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=t.getParam("content_editable_state",!0)),n.disabled=!1,t.editorUpload=eh(t),t.schema=vr(o),t.dom=Yi(a,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:o.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:_f(t),referrerPolicy:Of(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=function(u){var e=Sp(u.settings,u.schema);return e.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,o,i=e.length,a=u.dom;i--;)if(r=(n=e[i]).attr(t),o="data-mce-"+t,!n.attr(o)){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=a.serializeStyle(a.parseStyle(r),n.name)).length||(r=null),n.attr(o,r),n.attr(t,r)):"tabindex"===t?(n.attr(o,r),n.attr(t,null)):n.attr(o,u.convertURL(r,t,n.name))}}),e.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),e.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=u.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new sl("br",1)).shortEnded=!0)}),e}(t),t.serializer=Mp(o,t),t.selection=fy(t.dom,t.getWin(),t.serializer,t),t.annotator=rl(t),t.formatter=wp(t),t.undoManager=gm(t),t._nodeChangeDispatcher=new vh(t),t._selectionOverrides=im(t),Pw(t),Hw(t),yz(t),hh(t),t.fire("PreInit"),o.browser_spellcheck||o.gecko_spellcheck||(a.body.spellcheck=!1,bz.setAttrib(n,"spellcheck","false")),t.quirks=Ow(t),t.fire("PostRender");var u=If(t);u!==undefined&&(n.dir=u),o.protect&&t.on("BeforeSetContent",function(t){Rn.each(o.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.on("compositionstart compositionend",function(e){t.composing="compositionstart"===e.type}),0',"action-next":'',"action-prev":'',"align-center":'',"align-justify":'',"align-left":'',"align-none":'',"align-right":'',"arrow-left":'',"arrow-right":'',bold:'',bookmark:'',"border-width":'',brightness:'',browse:'',cancel:'',"change-case":'',"character-count":'',"checklist-rtl":'',checklist:'',checkmark:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',close:'',"code-sample":'',"color-levels":'',"color-picker":'',"color-swatch-remove-color":'',"color-swatch":'',"comment-add":'',comment:'',contrast:'',copy:'',crop:'',cut:'',"document-properties":'',drag:'',duplicate:'',"edit-block":'',"edit-image":'',"embed-page":'',embed:'',emoji:'',fill:'',"flip-horizontally":'',"flip-vertically":'',"format-painter":'',fullscreen:'',gallery:'',gamma:'',help:'',"highlight-bg-color":'',home:'',"horizontal-rule":'',"image-options":'',image:'',indent:'',info:'',"insert-character":'',"insert-time":'',invert:'',italic:'',line:'',link:'',"list-bull-circle":'',"list-bull-default":'',"list-bull-square":'',"list-num-default-rtl":'',"list-num-default":'',"list-num-lower-alpha-rtl":'',"list-num-lower-alpha":'',"list-num-lower-greek-rtl":'',"list-num-lower-greek":'',"list-num-lower-roman-rtl":'',"list-num-lower-roman":'',"list-num-upper-alpha-rtl":'',"list-num-upper-alpha":'',"list-num-upper-roman-rtl":'',"list-num-upper-roman":'',lock:'',ltr:'',"more-drawer":'',"new-document":'',"new-tab":'',"non-breaking":'',notice:'',"ordered-list-rtl":'',"ordered-list":'',orientation:'',outdent:'',"page-break":'',"paste-text":'',paste:'',"permanent-pen":'',plus:'',preferences:'',preview:'',print:'',quote:'',redo:'',reload:'',"remove-formatting":'',remove:'',"resize-handle":'',resize:'',"restore-draft":'',"rotate-left":'',"rotate-right":'',rtl:'',save:'',search:'',"select-all":'',selected:'',settings:'',sharpen:'',sourcecode:'',"spell-check":'',"strike-through":'',subscript:'',superscript:'',"table-cell-properties":'',"table-cell-select-all":'',"table-cell-select-inner":'',"table-delete-column":'',"table-delete-row":'',"table-delete-table":'',"table-insert-column-after":'',"table-insert-column-before":'',"table-insert-row-above":'',"table-insert-row-after":'',"table-left-header":'',"table-merge-cells":'',"table-row-properties":'',"table-split-cells":'',"table-top-header":'',table:'',template:'',"temporary-placeholder":'',"text-color":'',toc:'',translate:'',underline:'',undo:'',unlink:'',unlock:'',"unordered-list":'',unselected:'',upload:'',user:'',visualblocks:'',visualchars:'',warning:'',"zoom-in":'',"zoom-out":''}),$d.get(e).icons);ue(t,function(e,t){Tt(r,t)||n.ui.registry.addIcon(t,e)})}(e),function(e){var t=e.settings.theme;if(K(t)){e.settings.theme=Fw(t);var n=Kd.get(t);e.theme=new n(e,Kd.urls[t]),e.theme.init&&e.theme.init(e,Kd.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}}(e),function(t){var n=[];Rn.each(t.settings.plugins.split(/[ ,]/),function(e){Ez(t,n,Fw(e))})}(e);var t=function(e){var t=e.getElement();return e.orgDisplay=t.style.display,K(e.settings.theme)?function(e){return e.theme.renderUI()}(e):D(e.settings.theme)?function(e){var t=e.getElement(),n=(0,e.settings.theme)(e,t);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||e.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||e.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:t.offsetHeight,n}(e):jw(e)}(e);return e.editorContainer=t.editorContainer?t.editorContainer:null,Iw(e),e.inline?Cz(e):xz(e,t)},Sz=Yi.DOM,kz=function(t){var e=t.settings,n=t.id;oa.setCode(Bf(t));var r=function(){Sz.unbind(j.window,"ready",r),t.render()};if(Tr.Event.domLoaded){if(t.getElement()&&Sn.contentEditable){e.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||Sz.getParent(n,"form");o&&(t.formElement=o,e.hidden_input&&!Ge.isTextareaOrInput(t.getElement())&&(Sz.insertAfter(Sz.create("input",{type:"hidden",name:n}),n),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},Sz.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.resetContent()}),!e.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=Bd(t),t.notificationManager=Od(t),"xml"===e.encoding&&t.on("GetContent",function(e){e.save&&(e.content=Sz.encode(e.content))}),e.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),e.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),Ww(t,t.suffix)}}else Sz.bind(j.window,"ready",r)},Tz=function(e,t){var n=t.firstChild,r=t.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),function(e,t){var n=e.getNonEmptyElements();return t&&(t.isEmpty(n)||function(e,t){return e.getBlockElements()[t.name]&&function(e){return e.firstChild&&e.firstChild===e.lastChild}(t)&&function(e){return"br"===e.name||"\xa0"===e.value}(t.firstChild)}(e,t))}(e,r)&&(r=r.prev),!(!n||n!==r)&&("ul"===n.name||"ol"===n.name)},Az=function(e,o,i,t){function n(e){var t=_s.fromRangeStart(i),n=oc(o.getRoot()),r=1===e?n.prev(t):n.next(t);return!r||Gw(o,r.getNode())!==a}var r=function(e,t,n){var r=t.serialize(n);return function(e){var t=e.firstChild,n=e.lastChild;return t&&"META"===t.nodeName&&t.parentNode.removeChild(t),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),e}(e.createFragment(r))}(o,e,t),a=Gw(o,i.startContainer),u=Yw(Kw(r.firstChild)),s=o.getRoot();return n(1)?Qw(a,u,s):n(2)?function(e,t,n,r){return r.insertAfter(t.reverse(),e),Jw(t[0],n)}(a,u,s,o):function(t,e,n,r){var o=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]}(t,r),i=t.parentNode;return i.insertBefore(o[0],t),Rn.each(e,function(e){i.insertBefore(e,t)}),i.insertBefore(o[1],t),i.removeChild(t),Jw(e[e.length-1],n)}(a,u,s,i)},Mz=function(e,t){return!!Gw(e,t)},Rz=Ge.matchNodeNames(["td","th"]),Dz=function(e,t){var n=function(e){var t;return"string"!=typeof e?(t=Rn.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:t}):{content:e,details:{}}}(t);ex(e,n.content,n.details)},_z=function(e){Yx(e,!1)||_x(e,!1)||Bx(e,!1)||Hx(e,!1)||kx(e,!1)||Ux(e)||Tx(e,!1)||Px(e,!1)||(tx(e,"Delete"),zx(e))},Oz=function(e){_x(e,!0)||Bx(e,!0)||Hx(e,!0)||kx(e,!0)||Ux(e)||Tx(e,!0)||Px(e,!0)||tx(e,"ForwardDelete")},Bz={"font-size":"size","font-family":"face"},Hz={getFontSize:ox("font-size"),getFontFamily:q(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},ox("font-family")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?function(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}(72*parseInt(e,10)/96,t||0)+"pt":e}},Pz=Rn.each,Lz=Rn.map,Vz=Rn.inArray,Iz=(Fz.prototype.execCommand=function(t,n,r,e){var o,i,a=!1,u=this;if(!u.editor.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus?Qf(u.editor):u.editor.focus(),(e=u.editor.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=u.commands.exec[i])return o(i,n,r),u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(Pz(this.editor.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!(a=!0)}),a)return a;if(u.editor.theme&&u.editor.theme.execCommand&&u.editor.theme.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{a=u.editor.getDoc().execCommand(t,n,r)}catch(s){}return!!a&&(u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},Fz.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(n){}return!1}},Fz.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(n){}}},Fz.prototype.addCommands=function(e,n){var r=this;n=n||"exec",Pz(e,function(t,e){Pz(e.toLowerCase().split(","),function(e){r.commands[n][e]=t})})},Fz.prototype.addCommand=function(e,o,i){var a=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,t,n,r){return o.call(i||a.editor,t,n,r)}},Fz.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(t){}return!1},Fz.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},Fz.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},Fz.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},Fz.prototype.execNativeCommand=function(e,t,n){return t===undefined&&(t=!1),n===undefined&&(n=null),this.editor.getDoc().execCommand(e,t,n)},Fz.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},Fz.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t?{value:t}:undefined),this.editor.nodeChanged()},Fz.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},Fz.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},Fz.prototype.setupCommands=function(i){var a=this;function e(n){return function(){var e=i.selection.isCollapsed()?[i.dom.getParent(i.selection.getNode(),i.dom.isBlock)]:i.selection.getSelectedBlocks(),t=Lz(e,function(e){return!!i.formatter.matchNode(e,n)});return-1!==Vz(t,!0)}}this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){i.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=i.getDoc();try{a.execNativeCommand(e)}catch(o){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var r=i.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");Sn.mac&&(r=r.replace(/Ctrl\+/g,"\u2318+")),i.notificationManager.open({text:r,type:"error"})}},unlink:function(){if(i.selection.isCollapsed()){var e=i.dom.getParent(i.selection.getStart(),"a");e&&i.dom.remove(e,!0)}else i.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),Pz("left,center,right,justify".split(","),function(e){t!==e&&i.formatter.remove("align"+e)}),"none"!==t&&a.toggleFormat("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;a.execNativeCommand(e),(t=i.dom.getParent(i.selection.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(a.storeSelection(),i.dom.split(n,t),a.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){a.toggleFormat(e)},"ForeColor,HiliteColor":function(e,t,n){a.toggleFormat(e,n)},FontName:function(e,t,n){sx(i,n)},FontSize:function(e,t,n){!function(e,t){e.formatter.toggle("fontsize",{value:ux(e,t)}),e.nodeChanged()}(i,n)},RemoveFormat:function(e){i.formatter.remove(e)},mceBlockQuote:function(){a.toggleFormat("blockquote")},FormatBlock:function(e,t,n){return a.toggleFormat(n||"p")},mceCleanup:function(){var e=i.selection.getBookmark();i.setContent(i.getContent()),i.selection.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||i.selection.getNode();r!==i.getBody()&&(a.storeSelection(),i.dom.remove(r,!0),a.restoreSelection())},mceSelectNodeDepth:function(e,t,n){var r=0;i.dom.getParent(i.selection.getNode(),function(e){if(1===e.nodeType&&r++===n)return i.selection.select(e),!1},i.getBody())},mceSelectNode:function(e,t,n){i.selection.select(n)},mceInsertContent:function(e,t,n){Dz(i,n)},mceInsertRawHTML:function(e,t,n){i.selection.setContent("tiny_mce_marker");var r=i.getContent();i.setContent(r.replace(/tiny_mce_marker/g,function(){return n}))},mceInsertNewLine:function(e,t,n){lz(i,n)},mceToggleFormat:function(e,t,n){a.toggleFormat(n)},mceSetContent:function(e,t,n){i.setContent(n)},"Indent,Outdent":function(e){OC(i,e)},mceRepaint:function(){},InsertHorizontalRule:function(){i.execCommand("mceInsertContent",!1,"
")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual,i.addVisual()},mceReplaceContent:function(e,t,n){i.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.selection.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=i.dom.getParent(i.selection.getNode(),"a"),n.href=n.href.replace(/ /g,"%20"),r&&n.href||i.formatter.remove("link"),n.href&&i.formatter.apply("link",n,r)},selectAll:function(){var e=i.dom.getParent(i.selection.getStart(),Ge.isContentEditableTrue);if(e){var t=i.dom.createRng();t.selectNodeContents(e),i.selection.setRng(t)}},"delete":function(){_z(i)},forwardDelete:function(){Oz(i)},mceNewDocument:function(){i.setContent("")},InsertLineBreak:function(e,t,n){return iz(i,n),!0}}),a.addCommands({JustifyLeft:e("alignleft"),JustifyCenter:e("aligncenter"),JustifyRight:e("alignright"),JustifyFull:e("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return a.isFormatMatch(e)},mceBlockQuote:function(){return a.isFormatMatch("blockquote")},Outdent:function(){return DC(i)},"InsertUnorderedList,InsertOrderedList":function(e){var t=i.dom.getParent(i.selection.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),a.addCommands({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}}),a.addQueryValueHandler("FontName",function(){return function(t){return ax(t).fold(function(){return ix(t).map(function(e){return Hz.getFontFamily(t.getBody(),e)}).getOr("")},function(e){return Hz.getFontFamily(t.getBody(),e)})}(i)},this),a.addQueryValueHandler("FontSize",function(){return function(t){return ax(t).fold(function(){return ix(t).map(function(e){return Hz.getFontSize(t.getBody(),e)}).getOr("")},function(e){return Hz.getFontSize(t.getBody(),e)})}(i)},this)},Fz);function Fz(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}var Uz=Rn.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),jz=(qz.isNative=function(e){return!!Uz[e.toLowerCase()]},qz.prototype.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=this.scope),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=a},t.stopPropagation=function(){t.isPropagationStopped=a},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=a},t.isDefaultPrevented=c,t.isPropagationStopped=c,t.isImmediatePropagationStopped=c),this.settings.beforeFire&&this.settings.beforeFire(t),n=this.bindings[e])for(r=0,o=n.length;r"),this.parseShortcut))[o.length-1]=Rn.extend(o[o.length-1],{func:n,scope:r||this.editor}),Rn.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},mE.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},mE.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},mE.prototype.matchShortcut=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},mE.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},mE);function mE(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var n=this;e.on("keyup keypress keydown",function(t){!n.hasModifier(t)&&!n.isFunctionKey(t)||t.isDefaultPrevented()||(cE(n.shortcuts,function(e){if(n.matchShortcut(t,e))return n.pendingPatterns=e.subpatterns.slice(0),"keydown"===t.type&&n.executeShortcutAction(e),!0}),n.matchShortcut(t,n.pendingPatterns[0])&&(1===n.pendingPatterns.length&&"keydown"===t.type&&n.executeShortcutAction(n.pendingPatterns[0]),n.pendingPatterns.shift()))})}function gE(){var e=function(){function e(n,r){return function(e,t){return n[e.toLowerCase()]=G(G({},t),{type:r})}}var t={},n={},r={},o={},i={},a={},u={};return{addButton:e(t,"button"),addToggleButton:e(t,"togglebutton"),addMenuButton:e(t,"menubutton"),addSplitButton:e(t,"splitbutton"),addMenuItem:e(n,"menuitem"),addNestedMenuItem:e(n,"nestedmenuitem"),addToggleMenuItem:e(n,"togglemenuitem"),addAutocompleter:e(r,"autocompleter"),addContextMenu:e(i,"contextmenu"),addContextToolbar:e(a,"contexttoolbar"),addContextForm:e(a,"contextform"),addSidebar:e(u,"sidebar"),addIcon:function(e,t){return o[e.toLowerCase()]=t},getAll:function(){return{buttons:t,menuItems:n,icons:o,popups:r,contextMenus:i,contextToolbars:a,sidebars:u}}}}();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addToggleMenuItem:e.addToggleMenuItem,getAll:e.getAll}}var pE=Rn.each,vE=Rn.trim,yE="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),bE={ftp:21,http:80,https:443,mailto:25},CE=(wE.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},wE.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},wE.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},wE.prototype.toRelative=function(e){var t;if("./"===e)return e;var n=new wE(e,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(t=this.toRelPath(this.path,n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),t)},wE.prototype.toAbsolute=function(e,t){var n=new wE(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))},wE.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=bE[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},wE.prototype.toRelPath=function(e,t){var n,r,o,i=0,a="",u=e.substring(0,e.lastIndexOf("/")).split("/");if(n=t.split("/"),u.length>=n.length)for(r=0,o=u.length;r=n.length||u[r]!==n[r]){i=r+1;break}if(u.length=u.length||u[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=u.length-(i-1);r=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=eN(e.x,t.x),r=eN(e.y,t.y),o=ZE(e.x+e.w,t.x+t.w),i=ZE(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:nN(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=eN(0,t.x-u),o=eN(0,t.y-s),i=eN(0,c-f),a=eN(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),nN(u,s,(c-=i)-u,(l-=a)-s)},create:nN,fromClientRect:function(e){return nN(e.left,e.top,e.width,e.height)}},oN=Rn.each,iN=Rn.extend;WE.extend=YE=function(n){function r(){var e,t,n;if(!GE&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)}function t(){return this}function e(n,r){return function(){var e,t=this._super;return this._super=u[n],e=r.apply(this,arguments),this._super=t,e}}var o,i,a,u=this.prototype;for(i in GE=!0,o=new this,GE=!1,n.Mixins&&(oN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),u.Mixins&&(n.Mixins=u.Mixins.concat(n.Mixins))),n.Methods&&oN(n.Methods.split(","),function(e){n[e]=t}),n.Properties&&oN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&oN(n.Statics,function(e,t){r[t]=e}),n.Defaults&&u.Defaults&&(n.Defaults=iN({},u.Defaults,n.Defaults)),n)"function"==typeof(a=n[i])&&u[i]?o[i]=e(i,a):o[i]=a;return r.prototype=o,(r.constructor=r).extend=YE,r};var aN=Math.min,uN=Math.max,sN=Math.round,cN={serialize:function(e){var t=JSON.stringify(e);return K(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(e){try{return JSON.parse(e)}catch(t){}}},lN={callbacks:{},count:0,send:function(t){var n=this,r=Yi.DOM,o=t.count!==undefined?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},fN=G(G({},oE),{send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4= i.length && n(r); + }; + })(t), + ); + }); + }); + } + var Ut, + jt, + qt, + $t = Vt.exports.boltExport, + Wt = function (e) { + var n = k.none(), + t = [], + r = function (e) { + o() ? a(e) : t.push(e); + }, + o = function () { + return n.isSome(); + }, + i = function (e) { + z(e, a); + }, + a = function (t) { + n.each(function (e) { + j.setTimeout(function () { + t(e); + }, 0); + }); + }; + return ( + e(function (e) { + (n = k.some(e)), i(t), (t = []); + }), + { + get: r, + map: function (n) { + return Wt(function (t) { + r(function (e) { + t(n(e)); + }); + }); + }, + isReady: o, + } + ); + }, + Kt = { + nu: Wt, + pure: function (t) { + return Wt(function (e) { + e(t); + }); + }, + }, + Xt = function (n) { + function e(e) { + n().then(e, It); + } + return { + map: function (e) { + return Xt(function () { + return n().then(e); + }); + }, + bind: function (t) { + return Xt(function () { + return n().then(function (e) { + return t(e).toPromise(); + }); + }); + }, + anonBind: function (e) { + return Xt(function () { + return n().then(function () { + return e.toPromise(); + }); + }); + }, + toLazy: function () { + return Kt.nu(e); + }, + toCached: function () { + var e = null; + return Xt(function () { + return null === e && (e = n()), e; + }); + }, + toPromise: n, + get: e, + }; + }, + Yt = { + nu: function (e) { + return Xt(function () { + return new $t(e); + }); + }, + pure: function (e) { + return Xt(function () { + return $t.resolve(e); + }); + }, + }, + Gt = function (e) { + return Ft(e, Yt.nu); + }, + Jt = function (n) { + return { + is: function (e) { + return n === e; + }, + isValue: a, + isError: c, + getOr: $(n), + getOrThunk: $(n), + getOrDie: $(n), + or: function (e) { + return Jt(n); + }, + orThunk: function (e) { + return Jt(n); + }, + fold: function (e, t) { + return t(n); + }, + map: function (e) { + return Jt(e(n)); + }, + mapError: function (e) { + return Jt(n); + }, + each: function (e) { + e(n); + }, + bind: function (e) { + return e(n); + }, + exists: function (e) { + return e(n); + }, + forall: function (e) { + return e(n); + }, + toOption: function () { + return k.some(n); + }, + }; + }, + Qt = function (n) { + return { + is: c, + isValue: c, + isError: a, + getOr: W, + getOrThunk: function (e) { + return e(); + }, + getOrDie: function () { + return (function (e) { + return function () { + throw new Error(e); + }; + })(String(n))(); + }, + or: function (e) { + return e; + }, + orThunk: function (e) { + return e(); + }, + fold: function (e, t) { + return e(n); + }, + map: function (e) { + return Qt(n); + }, + mapError: function (e) { + return Qt(e(n)); + }, + each: i, + bind: function (e) { + return Qt(n); + }, + exists: c, + forall: a, + toOption: k.none, + }; + }, + Zt = { + value: Jt, + error: Qt, + fromOption: function (e, t) { + return e.fold(function () { + return Qt(t); + }, Jt); + }, + }, + en = window.Promise + ? window.Promise + : ((Ut = + Array.isArray || + function (e) { + return "[object Array]" === Object.prototype.toString.call(e); + }), + (jt = + nn.immediateFn || + ("function" == typeof j.setImmediate && j.setImmediate) || + function (e) { + j.setTimeout(e, 1); + }), + (nn.prototype["catch"] = function (e) { + return this.then(null, e); + }), + (nn.prototype.then = function (n, r) { + var o = this; + return new nn(function (e, t) { + rn.call(o, new sn(n, r, e, t)); + }); + }), + (nn.all = function () { + var s = Array.prototype.slice.call( + 1 === arguments.length && Ut(arguments[0]) + ? arguments[0] + : arguments, + ); + return new nn(function (o, i) { + if (0 === s.length) return o([]); + var a = s.length; + function u(t, e) { + try { + if (e && ("object" == typeof e || "function" == typeof e)) { + var n = e.then; + if ("function" == typeof n) + return void n.call( + e, + function (e) { + u(t, e); + }, + i, + ); + } + (s[t] = e), 0 == --a && o(s); + } catch (r) { + i(r); + } + } + for (var e = 0; e < s.length; e++) u(e, s[e]); + }); + }), + (nn.resolve = function (t) { + return t && "object" == typeof t && t.constructor === nn + ? t + : new nn(function (e) { + e(t); + }); + }), + (nn.reject = function (n) { + return new nn(function (e, t) { + t(n); + }); + }), + (nn.race = function (o) { + return new nn(function (e, t) { + for (var n = 0, r = o.length; n < r; n++) o[n].then(e, t); + }); + }), + nn); + function tn(e, t) { + return function () { + e.apply(t, arguments); + }; + } + function nn(e) { + if ("object" != typeof this) + throw new TypeError("Promises must be constructed via new"); + if ("function" != typeof e) throw new TypeError("not a function"); + (this._state = null), + (this._value = null), + (this._deferreds = []), + cn(e, tn(on, this), tn(an, this)); + } + function rn(r) { + var o = this; + null !== this._state + ? jt(function () { + var e = o._state ? r.onFulfilled : r.onRejected; + if (null !== e) { + var t; + try { + t = e(o._value); + } catch (n) { + return void r.reject(n); + } + r.resolve(t); + } else (o._state ? r.resolve : r.reject)(o._value); + }) + : this._deferreds.push(r); + } + function on(e) { + try { + if (e === this) + throw new TypeError("A promise cannot be resolved with itself."); + if (e && ("object" == typeof e || "function" == typeof e)) { + var t = e.then; + if ("function" == typeof t) + return void cn(tn(t, e), tn(on, this), tn(an, this)); + } + (this._state = !0), (this._value = e), un.call(this); + } catch (n) { + an.call(this, n); + } + } + function an(e) { + (this._state = !1), (this._value = e), un.call(this); + } + function un() { + for (var e = 0, t = this._deferreds.length; e < t; e++) + rn.call(this, this._deferreds[e]); + this._deferreds = null; + } + function sn(e, t, n, r) { + (this.onFulfilled = "function" == typeof e ? e : null), + (this.onRejected = "function" == typeof t ? t : null), + (this.resolve = n), + (this.reject = r); + } + function cn(e, t, n) { + var r = !1; + try { + e( + function (e) { + r || ((r = !0), t(e)); + }, + function (e) { + r || ((r = !0), n(e)); + }, + ); + } catch (o) { + if (r) return; + (r = !0), n(o); + } + } + function ln(e, t) { + return "number" != typeof t && (t = 0), j.setTimeout(e, t); + } + function fn(e, t) { + return "number" != typeof t && (t = 1), j.setInterval(e, t); + } + function dn(n, r) { + var o, e; + return ( + ((e = function () { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; + j.clearTimeout(o), + (o = ln(function () { + n.apply(this, e); + }, r)); + }).stop = function () { + j.clearTimeout(o); + }), + e + ); + } + function hn(e, t, n) { + var r, o; + if (!e) return 0; + if (((n = n || e), e.length !== undefined)) { + for (r = 0, o = e.length; r < o; r++) + if (!1 === t.call(n, e[r], r, e)) return 0; + } else + for (r in e) + if (e.hasOwnProperty(r) && !1 === t.call(n, e[r], r, e)) return 0; + return 1; + } + function mn(e, t, n) { + var r, o; + for (r = 0, o = e.length; r < o; r++) if (t.call(n, e[r], r, e)) return r; + return -1; + } + function gn(e) { + return null === e || e === undefined ? "" : ("" + e).replace(An, ""); + } + function pn(e, t) { + return t + ? !("array" !== t || !Tn.isArray(e)) || typeof e === t + : e !== undefined; + } + var vn = { + requestAnimationFrame: function (e, t) { + qt + ? qt.then(e) + : (qt = new en(function (e) { + !(function (e, t) { + var n, + r = j.window.requestAnimationFrame, + o = ["ms", "moz", "webkit"]; + for (n = 0; n < o.length && !r; n++) + r = j.window[o[n] + "RequestAnimationFrame"]; + (r = + r || + function (e) { + j.window.setTimeout(e, 0); + })(e, t); + })(e, (t = t || j.document.body)); + }).then(e)); + }, + setTimeout: ln, + setInterval: fn, + setEditorTimeout: function (e, t, n) { + return ln(function () { + e.removed || t(); + }, n); + }, + setEditorInterval: function (e, t, n) { + var r; + return (r = fn(function () { + e.removed ? j.clearInterval(r) : t(); + }, n)); + }, + debounce: dn, + throttle: dn, + clearInterval: function (e) { + return j.clearInterval(e); + }, + clearTimeout: function (e) { + return j.clearTimeout(e); + }, + }, + yn = j.navigator.userAgent, + bn = oe(), + Cn = bn.browser, + wn = bn.os, + xn = bn.deviceType, + zn = /WebKit/.test(yn) && !Cn.isEdge(), + En = + "FormData" in j.window && + "FileReader" in j.window && + "URL" in j.window && + !!j.URL.createObjectURL, + Nn = -1 !== yn.indexOf("Windows Phone"), + Sn = { + opera: Cn.isOpera(), + webkit: zn, + ie: !(!Cn.isIE() && !Cn.isEdge()) && Cn.version.major, + gecko: Cn.isFirefox(), + mac: wn.isOSX() || wn.isiOS(), + iOS: xn.isiPad() || xn.isiPhone(), + android: wn.isAndroid(), + contentEditable: !0, + transparentSrc: + "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", + caretAfter: !0, + range: j.window.getSelection && "Range" in j.window, + documentMode: Cn.isIE() ? j.document.documentMode || 7 : 10, + fileApi: En, + ceFalse: !0, + cacheSuffix: null, + container: null, + experimentalShadowDom: !1, + canHaveCSP: !Cn.isIE(), + desktop: xn.isDesktop(), + windowsPhone: Nn, + browser: { + current: Cn.current, + version: Cn.version, + isChrome: Cn.isChrome, + isEdge: Cn.isEdge, + isFirefox: Cn.isFirefox, + isIE: Cn.isIE, + isOpera: Cn.isOpera, + isSafari: Cn.isSafari, + }, + os: { + current: wn.current, + version: wn.version, + isAndroid: wn.isAndroid, + isChromeOS: wn.isChromeOS, + isFreeBSD: wn.isFreeBSD, + isiOS: wn.isiOS, + isLinux: wn.isLinux, + isOSX: wn.isOSX, + isSolaris: wn.isSolaris, + isWindows: wn.isWindows, + }, + deviceType: { + isDesktop: xn.isDesktop, + isiPad: xn.isiPad, + isiPhone: xn.isiPhone, + isPhone: xn.isPhone, + isTablet: xn.isTablet, + isTouch: xn.isTouch, + isWebView: xn.isWebView, + }, + }, + kn = Array.isArray, + Tn = { + isArray: kn, + toArray: function (e) { + var t, + n, + r = e; + if (!kn(e)) for (r = [], t = 0, n = e.length; t < n; t++) r[t] = e[t]; + return r; + }, + each: hn, + map: function (n, r) { + var o = []; + return ( + hn(n, function (e, t) { + o.push(r(e, t, n)); + }), + o + ); + }, + filter: function (n, r) { + var o = []; + return ( + hn(n, function (e, t) { + (r && !r(e, t, n)) || o.push(e); + }), + o + ); + }, + indexOf: function (e, t) { + var n, r; + if (e) for (n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; + return -1; + }, + reduce: function (e, t, n, r) { + var o = 0; + for (arguments.length < 3 && (n = e[0]); o < e.length; o++) + n = t.call(r, n, e[o], o); + return n; + }, + findIndex: mn, + find: function (e, t, n) { + var r = mn(e, t, n); + return -1 !== r ? e[r] : undefined; + }, + last: function (e) { + return e[e.length - 1]; + }, + }, + An = /^\s*|\s*$/g, + Mn = function (e, n, r, o) { + (o = o || this), + e && + (r && (e = e[r]), + Tn.each(e, function (e, t) { + if (!1 === n.call(o, e, t, r)) return !1; + Mn(e, n, r, o); + })); + }, + Rn = { + trim: gn, + isArray: Tn.isArray, + is: pn, + toArray: Tn.toArray, + makeMap: function (e, t, n) { + var r; + for ( + t = t || ",", + "string" == typeof (e = e || []) && (e = e.split(t)), + n = n || {}, + r = e.length; + r--; + + ) + n[e[r]] = {}; + return n; + }, + each: Tn.each, + map: Tn.map, + grep: Tn.filter, + inArray: Tn.indexOf, + hasOwn: function (e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + }, + extend: function (e, t) { + for (var n, r, o, i = [], a = 2; a < arguments.length; a++) + i[a - 2] = arguments[a]; + var u, + s = arguments; + for (n = 1, r = s.length; n < r; n++) + for (o in (t = s[n])) + t.hasOwnProperty(o) && (u = t[o]) !== undefined && (e[o] = u); + return e; + }, + create: function (e, t, n) { + var r, + o, + i, + a, + u, + s = this, + c = 0; + if ( + ((e = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(e)), + (i = e[3].match(/(^|\.)(\w+)$/i)[2]), + !(o = s.createNS(e[3].replace(/\.\w+$/, ""), n))[i]) + ) { + if ("static" === e[2]) + return ( + (o[i] = t), + void (this.onCreate && this.onCreate(e[2], e[3], o[i])) + ); + t[i] || ((t[i] = function () {}), (c = 1)), + (o[i] = t[i]), + s.extend(o[i].prototype, t), + e[5] && + ((r = s.resolve(e[5]).prototype), + (a = e[5].match(/\.(\w+)$/i)[1]), + (u = o[i]), + (o[i] = c + ? function () { + return r[a].apply(this, arguments); + } + : function () { + return (this.parent = r[a]), u.apply(this, arguments); + }), + (o[i].prototype[i] = o[i]), + s.each(r, function (e, t) { + o[i].prototype[t] = r[t]; + }), + s.each(t, function (e, t) { + r[t] + ? (o[i].prototype[t] = function () { + return (this.parent = r[t]), e.apply(this, arguments); + }) + : t !== i && (o[i].prototype[t] = e); + })), + s.each(t["static"], function (e, t) { + o[i][t] = e; + }); + } + }, + walk: Mn, + createNS: function (e, t) { + var n, r; + for (t = t || j.window, e = e.split("."), n = 0; n < e.length; n++) + t[(r = e[n])] || (t[r] = {}), (t = t[r]); + return t; + }, + resolve: function (e, t) { + var n, r; + for ( + t = t || j.window, n = 0, r = (e = e.split(".")).length; + n < r && (t = t[e[n]]); + n++ + ); + return t; + }, + explode: function (e, t) { + return !e || pn(e, "array") ? e : Tn.map(e.split(t || ","), gn); + }, + _addCacheSuffix: function (e) { + var t = Sn.cacheSuffix; + return t && (e += (-1 === e.indexOf("?") ? "?" : "&") + t), e; + }, + }; + function Dn(t) { + var n; + return function (e) { + return (n = + n || + (function (e, t) { + for (var n = {}, r = 0, o = e.length; r < o; r++) { + var i = e[r]; + n[String(i)] = t(i, r); + } + return n; + })(t, $(!0))).hasOwnProperty(ie(e)); + }; + } + function _n(e) { + return zt(e) && !In(e); + } + function On(e) { + return zt(e) && "br" === ie(e); + } + function Bn(e) { + return ( + e && + "SPAN" === e.tagName && + "bookmark" === e.getAttribute("data-mce-type") + ); + } + var Hn, + Pn, + Ln, + Vn = Dn(["h1", "h2", "h3", "h4", "h5", "h6"]), + In = Dn([ + "article", + "aside", + "details", + "div", + "dt", + "figcaption", + "footer", + "form", + "fieldset", + "header", + "hgroup", + "html", + "main", + "nav", + "section", + "summary", + "body", + "p", + "dl", + "multicol", + "dd", + "figure", + "address", + "center", + "blockquote", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "listing", + "xmp", + "pre", + "plaintext", + "menu", + "dir", + "ul", + "ol", + "li", + "hr", + "table", + "tbody", + "thead", + "tfoot", + "th", + "tr", + "td", + "caption", + ]), + Fn = Dn([ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "p", + "div", + "address", + "pre", + "form", + "blockquote", + "center", + "dir", + "fieldset", + "header", + "footer", + "article", + "section", + "hgroup", + "aside", + "nav", + "figure", + ]), + Un = Dn(["ul", "ol", "dl"]), + jn = Dn(["li", "dd", "dt"]), + qn = Dn([ + "area", + "base", + "basefont", + "br", + "col", + "frame", + "hr", + "img", + "input", + "isindex", + "link", + "meta", + "param", + "embed", + "source", + "wbr", + "track", + ]), + $n = Dn(["thead", "tbody", "tfoot"]), + Wn = Dn(["td", "th"]), + Kn = Dn(["pre", "script", "textarea", "style"]), + Xn = function (e, t) { + var n, + r = t.childNodes; + if (!Ge.isElement(t) || !Bn(t)) { + for (n = r.length - 1; 0 <= n; n--) Xn(e, r[n]); + if (!1 === Ge.isDocument(t)) { + if (Ge.isText(t) && 0 < t.nodeValue.length) { + var o = Rn.trim(t.nodeValue).length; + if (e.isBlock(t.parentNode) || 0 < o) return; + if ( + 0 === o && + (function (e) { + var t = + e.previousSibling && "SPAN" === e.previousSibling.nodeName, + n = e.nextSibling && "SPAN" === e.nextSibling.nodeName; + return t && n; + })(t) + ) + return; + } else if ( + Ge.isElement(t) && + (1 === (r = t.childNodes).length && + Bn(r[0]) && + t.parentNode.insertBefore(r[0], t), + r.length || qn(bt.fromDom(t))) + ) + return; + e.remove(t); + } + return t; + } + }, + Yn = { trimNode: Xn }, + Gn = Rn.makeMap, + Jn = + /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + Qn = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + Zn = /[<>&\"\']/g, + er = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi, + tr = { + 128: "\u20ac", + 130: "\u201a", + 131: "\u0192", + 132: "\u201e", + 133: "\u2026", + 134: "\u2020", + 135: "\u2021", + 136: "\u02c6", + 137: "\u2030", + 138: "\u0160", + 139: "\u2039", + 140: "\u0152", + 142: "\u017d", + 145: "\u2018", + 146: "\u2019", + 147: "\u201c", + 148: "\u201d", + 149: "\u2022", + 150: "\u2013", + 151: "\u2014", + 152: "\u02dc", + 153: "\u2122", + 154: "\u0161", + 155: "\u203a", + 156: "\u0153", + 158: "\u017e", + 159: "\u0178", + }; + (Pn = { + '"': """, + "'": "'", + "<": "<", + ">": ">", + "&": "&", + "`": "`", + }), + (Ln = { + "<": "<", + ">": ">", + "&": "&", + """: '"', + "'": "'", + }); + function nr(e, t) { + var n, + r, + o, + i = {}; + if (e) { + for (e = e.split(","), t = t || 10, n = 0; n < e.length; n += 2) + (r = String.fromCharCode(parseInt(e[n], t))), + Pn[r] || ((o = "&" + e[n + 1] + ";"), (i[r] = o), (i[o] = r)); + return i; + } + } + Hn = nr( + "50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro", + 32, + ); + function rr(e, t) { + return e.replace(t ? Jn : Qn, function (e) { + return Pn[e] || e; + }); + } + function or(e, t) { + return e.replace(t ? Jn : Qn, function (e) { + return 1 < e.length + ? "&#" + + (1024 * (e.charCodeAt(0) - 55296) + + (e.charCodeAt(1) - 56320) + + 65536) + + ";" + : Pn[e] || "&#" + e.charCodeAt(0) + ";"; + }); + } + function ir(e, t, n) { + return ( + (n = n || Hn), + e.replace(t ? Jn : Qn, function (e) { + return Pn[e] || n[e] || e; + }) + ); + } + var ar = { + encodeRaw: rr, + encodeAllRaw: function (e) { + return ("" + e).replace(Zn, function (e) { + return Pn[e] || e; + }); + }, + encodeNumeric: or, + encodeNamed: ir, + getEncodeFunc: function (e, t) { + var n = nr(t) || Hn, + r = Gn(e.replace(/\+/g, ",")); + return r.named && r.numeric + ? function (e, t) { + return e.replace(t ? Jn : Qn, function (e) { + return Pn[e] !== undefined + ? Pn[e] + : n[e] !== undefined + ? n[e] + : 1 < e.length + ? "&#" + + (1024 * (e.charCodeAt(0) - 55296) + + (e.charCodeAt(1) - 56320) + + 65536) + + ";" + : "&#" + e.charCodeAt(0) + ";"; + }); + } + : r.named + ? t + ? function (e, t) { + return ir(e, t, n); + } + : ir + : r.numeric + ? or + : rr; + }, + decode: function (e) { + return e.replace(er, function (e, t) { + return t + ? 65535 < + (t = + "x" === t.charAt(0).toLowerCase() + ? parseInt(t.substr(1), 16) + : parseInt(t, 10)) + ? ((t -= 65536), + String.fromCharCode(55296 + (t >> 10), 56320 + (1023 & t))) + : tr[t] || String.fromCharCode(t) + : Ln[e] || + Hn[e] || + (function (e) { + var t; + return ( + ((t = bt.fromTag("div").dom()).innerHTML = e), + t.textContent || t.innerText || e + ); + })(e); + }); + }, + }, + ur = {}, + sr = {}, + cr = Rn.makeMap, + lr = Rn.each, + fr = Rn.extend, + dr = Rn.explode, + hr = Rn.inArray, + mr = function (e, t) { + return (e = Rn.trim(e)) ? e.split(t || " ") : []; + }, + gr = function (e) { + function t(e, t, n) { + function r(e, t) { + var n, + r, + o = {}; + for (n = 0, r = e.length; n < r; n++) o[e[n]] = t || {}; + return o; + } + var o, i, a; + for ( + t = t || "", + "string" == typeof (n = n || []) && (n = mr(n)), + o = (e = mr(e)).length; + o--; + + ) + (a = { + attributes: r((i = mr([u, t].join(" ")))), + attributesOrder: i, + children: r(n, sr), + }), + (c[e[o]] = a); + } + function n(e, t) { + var n, r, o, i; + for (n = (e = mr(e)).length, t = mr(t); n--; ) + for (r = c[e[n]], o = 0, i = t.length; o < i; o++) + (r.attributes[t[o]] = {}), r.attributesOrder.push(t[o]); + } + var u, + r, + o, + i, + a, + s, + c = {}; + return ur[e] + ? ur[e] + : ((u = "id accesskey class dir lang style tabindex title role"), + (r = + "address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"), + (o = + "a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"), + "html4" !== e && + ((u += + " contenteditable contextmenu draggable dropzone hidden spellcheck translate"), + (r += + " article aside details dialog figure main header footer hgroup section nav"), + (o += + " audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen")), + "html5-strict" !== e && + ((u += " xml:lang"), + (o = [o, (s = "acronym applet basefont big font strike tt")].join( + " ", + )), + lr(mr(s), function (e) { + t(e, "", o); + }), + (r = [r, (a = "center dir isindex noframes")].join(" ")), + (i = [r, o].join(" ")), + lr(mr(a), function (e) { + t(e, "", i); + })), + (i = i || [r, o].join(" ")), + t("html", "manifest", "head body"), + t("head", "", "base command link meta noscript script style title"), + t("title hr noscript br"), + t("base", "href target"), + t("link", "href rel media hreflang type sizes hreflang"), + t("meta", "name http-equiv content charset"), + t("style", "media type scoped"), + t("script", "src async defer type charset"), + t( + "body", + "onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload", + i, + ), + t("address dt dd div caption", "", i), + t( + "h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn", + "", + o, + ), + t("blockquote", "cite", i), + t("ol", "reversed start type", "li"), + t("ul", "", "li"), + t("li", "value", i), + t("dl", "", "dt dd"), + t("a", "href target rel media hreflang type", o), + t("q", "cite", o), + t("ins del", "cite datetime", i), + t("img", "src sizes srcset alt usemap ismap width height"), + t("iframe", "src name width height", i), + t("embed", "src type width height"), + t( + "object", + "data type typemustmatch name usemap form width height", + [i, "param"].join(" "), + ), + t("param", "name value"), + t("map", "name", [i, "area"].join(" ")), + t("area", "alt coords shape href target rel media hreflang type"), + t( + "table", + "border", + "caption colgroup thead tfoot tbody tr" + + ("html4" === e ? " col" : ""), + ), + t("colgroup", "span", "col"), + t("col", "span"), + t("tbody thead tfoot", "", "tr"), + t("tr", "", "td th"), + t("td", "colspan rowspan headers", i), + t("th", "colspan rowspan headers scope abbr", i), + t( + "form", + "accept-charset action autocomplete enctype method name novalidate target", + i, + ), + t("fieldset", "disabled form name", [i, "legend"].join(" ")), + t("label", "form for", o), + t( + "input", + "accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width", + ), + t( + "button", + "disabled form formaction formenctype formmethod formnovalidate formtarget name type value", + "html4" === e ? i : o, + ), + t( + "select", + "disabled form multiple name required size", + "option optgroup", + ), + t("optgroup", "disabled label", "option"), + t("option", "disabled label selected value"), + t( + "textarea", + "cols dirname disabled form maxlength name readonly required rows wrap", + ), + t("menu", "type label", [i, "li"].join(" ")), + t("noscript", "", i), + "html4" !== e && + (t("wbr"), + t("ruby", "", [o, "rt rp"].join(" ")), + t("figcaption", "", i), + t("mark rt rp summary bdi", "", o), + t("canvas", "width height", i), + t( + "video", + "src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered", + [i, "track source"].join(" "), + ), + t( + "audio", + "src crossorigin preload autoplay mediagroup loop muted controls buffered volume", + [i, "track source"].join(" "), + ), + t("picture", "", "img source"), + t("source", "src srcset type media sizes"), + t("track", "kind src srclang label default"), + t("datalist", "", [o, "option"].join(" ")), + t("article section nav aside main header footer", "", i), + t("hgroup", "", "h1 h2 h3 h4 h5 h6"), + t("figure", "", [i, "figcaption"].join(" ")), + t("time", "datetime", o), + t("dialog", "open", i), + t("command", "type label icon disabled checked radiogroup command"), + t("output", "for form name", o), + t("progress", "value max", o), + t("meter", "value min max low high optimum", o), + t("details", "open", [i, "summary"].join(" ")), + t("keygen", "autofocus challenge disabled form keytype name")), + "html5-strict" !== e && + (n("script", "language xml:space"), + n("style", "xml:space"), + n( + "object", + "declare classid code codebase codetype archive standby align border hspace vspace", + ), + n("embed", "align name hspace vspace"), + n("param", "valuetype type"), + n("a", "charset name rev shape coords"), + n("br", "clear"), + n( + "applet", + "codebase archive code object alt name width height align hspace vspace", + ), + n("img", "name longdesc align border hspace vspace"), + n( + "iframe", + "longdesc frameborder marginwidth marginheight scrolling align", + ), + n("font basefont", "size color face"), + n("input", "usemap align"), + n("select", "onchange"), + n("textarea"), + n("h1 h2 h3 h4 h5 h6 div p legend caption", "align"), + n("ul", "type compact"), + n("li", "type"), + n("ol dl menu dir", "compact"), + n("pre", "width xml:space"), + n("hr", "align noshade size width"), + n("isindex", "prompt"), + n( + "table", + "summary width frame rules cellspacing cellpadding align bgcolor", + ), + n("col", "width align char charoff valign"), + n("colgroup", "width align char charoff valign"), + n("thead", "align char charoff valign"), + n("tr", "align char charoff valign bgcolor"), + n( + "th", + "axis align char charoff valign nowrap bgcolor width height", + ), + n("form", "accept"), + n( + "td", + "abbr axis scope align char charoff valign nowrap bgcolor width height", + ), + n("tfoot", "align char charoff valign"), + n("tbody", "align char charoff valign"), + n("area", "nohref"), + n("body", "background bgcolor text link vlink alink")), + "html4" !== e && + (n("input button select textarea", "autofocus"), + n("input textarea", "placeholder"), + n("a", "download"), + n("link script img", "crossorigin"), + n("iframe", "sandbox seamless allowfullscreen")), + lr(mr("a form meter progress dfn"), function (e) { + c[e] && delete c[e].children[e]; + }), + delete c.caption.children.table, + delete c.script, + (ur[e] = c)); + }, + pr = function (e, n) { + var r; + return ( + e && + ((r = {}), + "string" == typeof e && (e = { "*": e }), + lr(e, function (e, t) { + r[t] = r[t.toUpperCase()] = + "map" === n ? cr(e, /[, ]/) : dr(e, /[, ]/); + })), + r + ); + }; + function vr(i) { + function e(e, t, n) { + var r = i[e]; + return ( + r + ? (r = cr(r, /[, ]/, cr(r.toUpperCase(), /[, ]/))) + : (r = ur[e]) || + ((r = cr(t, " ", cr(t.toUpperCase(), " "))), + (r = fr(r, n)), + (ur[e] = r)), + r + ); + } + var t, + n, + r, + o, + a, + u, + s, + c, + l, + f, + d, + h, + m, + z = {}, + g = {}, + E = [], + p = {}, + v = {}; + (r = gr((i = i || {}).schema)), + !1 === i.verify_html && (i.valid_elements = "*[*]"), + (t = pr(i.valid_styles)), + (n = pr(i.invalid_styles, "map")), + (c = pr(i.valid_classes, "map")), + (o = e( + "whitespace_elements", + "pre script noscript style textarea video audio iframe object code", + )), + (a = e( + "self_closing_elements", + "colgroup dd dt li option p td tfoot th thead tr", + )), + (u = e( + "short_ended_elements", + "area base basefont br col frame hr img input isindex link meta param embed source wbr track", + )), + (s = e( + "boolean_attributes", + "checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls", + )), + (f = e( + "non_empty_elements", + "td th iframe video audio object script pre code", + u, + )), + (d = e("move_caret_before_on_enter_elements", "table", f)), + (h = e( + "text_block_elements", + "h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure", + )), + (l = e( + "block_elements", + "hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary", + h, + )), + (m = e( + "text_inline_elements", + "span strong b em i font strike u var cite dfn code mark q sup sub samp", + )), + lr( + ( + i.special || + "script noscript noframes noembed title style textarea xmp" + ).split(" "), + function (e) { + v[e] = new RegExp("]*>", "gi"); + }, + ); + function N(e) { + return new RegExp("^" + e.replace(/([?+*])/g, ".$1") + "$"); + } + function y(e) { + var t, + n, + r, + o, + i, + a, + u, + s, + c, + l, + f, + d, + h, + m, + g, + p, + v, + y, + b, + C = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/, + w = /^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/, + x = /[*?+]/; + if (e) + for ( + e = mr(e, ","), + z["@"] && ((p = z["@"].attributes), (v = z["@"].attributesOrder)), + t = 0, + n = e.length; + t < n; + t++ + ) + if ((i = C.exec(e[t]))) { + if ( + ((m = i[1]), + (c = i[2]), + (g = i[3]), + (s = i[5]), + (a = { attributes: (d = {}), attributesOrder: (h = []) }), + "#" === m && (a.paddEmpty = !0), + "-" === m && (a.removeEmpty = !0), + "!" === i[4] && (a.removeEmptyAttrs = !0), + p) + ) { + for (y in p) d[y] = p[y]; + h.push.apply(h, v); + } + if (s) + for (r = 0, o = (s = mr(s, "|")).length; r < o; r++) + if ((i = w.exec(s[r]))) { + if ( + ((u = {}), + (f = i[1]), + (l = i[2].replace(/[\\:]:/g, ":")), + (m = i[3]), + (b = i[4]), + "!" === f && + ((a.attributesRequired = a.attributesRequired || []), + a.attributesRequired.push(l), + (u.required = !0)), + "-" === f) + ) { + delete d[l], h.splice(hr(h, l), 1); + continue; + } + m && + ("=" === m && + ((a.attributesDefault = a.attributesDefault || []), + a.attributesDefault.push({ name: l, value: b }), + (u.defaultValue = b)), + ":" === m && + ((a.attributesForced = a.attributesForced || []), + a.attributesForced.push({ name: l, value: b }), + (u.forcedValue = b)), + "<" === m && (u.validValues = cr(b, "?"))), + x.test(l) + ? ((a.attributePatterns = a.attributePatterns || []), + (u.pattern = N(l)), + a.attributePatterns.push(u)) + : (d[l] || h.push(l), (d[l] = u)); + } + p || "@" !== c || ((p = d), (v = h)), + g && ((a.outputName = c), (z[g] = a)), + x.test(c) ? ((a.pattern = N(c)), E.push(a)) : (z[c] = a); + } + } + function b(e) { + (z = {}), + (E = []), + y(e), + lr(r, function (e, t) { + g[t] = e.children; + }); + } + function C(e) { + var a = /^(~)?(.+)$/; + e && + ((ur.text_block_elements = ur.block_elements = null), + lr(mr(e, ","), function (e) { + var t = a.exec(e), + n = "~" === t[1], + r = n ? "span" : "div", + o = t[2]; + if ( + ((g[o] = g[r]), + (p[o] = r), + n || ((l[o.toUpperCase()] = {}), (l[o] = {})), + !z[o]) + ) { + var i = z[r]; + delete (i = fr({}, i)).removeEmptyAttrs, + delete i.removeEmpty, + (z[o] = i); + } + lr(g, function (e, t) { + e[r] && ((g[t] = e = fr({}, g[t])), (e[o] = e[r])); + }); + })); + } + function w(e) { + var o = /^([+\-]?)(\w+)\[([^\]]+)\]$/; + (ur[i.schema] = null), + e && + lr(mr(e, ","), function (e) { + var t, + n, + r = o.exec(e); + r && + ((n = r[1]), + (t = n ? g[r[2]] : (g[r[2]] = { "#comment": {} })), + (t = g[r[2]]), + lr(mr(r[3], "|"), function (e) { + "-" === n ? delete t[e] : (t[e] = {}); + })); + }); + } + function x(e) { + var t, + n = z[e]; + if (n) return n; + for (t = E.length; t--; ) if ((n = E[t]).pattern.test(e)) return n; + } + i.valid_elements + ? b(i.valid_elements) + : (lr(r, function (e, t) { + (z[t] = { + attributes: e.attributes, + attributesOrder: e.attributesOrder, + }), + (g[t] = e.children); + }), + "html5" !== i.schema && + lr(mr("strong/b em/i"), function (e) { + (e = mr(e, "/")), (z[e[1]].outputName = e[0]); + }), + lr( + mr( + "ol ul sub sup blockquote span font a table tbody tr strong em b i", + ), + function (e) { + z[e] && (z[e].removeEmpty = !0); + }, + ), + lr( + mr("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"), + function (e) { + z[e].paddEmpty = !0; + }, + ), + lr(mr("span"), function (e) { + z[e].removeEmptyAttrs = !0; + })), + C(i.custom_elements), + w(i.valid_children), + y(i.extended_valid_elements), + w("+ol[ul|ol],+ul[ul|ol]"), + lr( + { + dd: "dl", + dt: "dl", + li: "ul ol", + td: "tr", + th: "tr", + tr: "tbody thead tfoot", + tbody: "table", + thead: "table", + tfoot: "table", + legend: "fieldset", + area: "map", + param: "video audio object", + }, + function (e, t) { + z[t] && (z[t].parentsRequired = mr(e)); + }, + ), + i.invalid_elements && + lr(dr(i.invalid_elements), function (e) { + z[e] && delete z[e]; + }), + x("span") || y("span[!data-mce-type|*]"); + return { + children: g, + elements: z, + getValidStyles: function () { + return t; + }, + getValidClasses: function () { + return c; + }, + getBlockElements: function () { + return l; + }, + getInvalidStyles: function () { + return n; + }, + getShortEndedElements: function () { + return u; + }, + getTextBlockElements: function () { + return h; + }, + getTextInlineElements: function () { + return m; + }, + getBoolAttrs: function () { + return s; + }, + getElementRule: x, + getSelfClosingElements: function () { + return a; + }, + getNonEmptyElements: function () { + return f; + }, + getMoveCaretBeforeOnEnterElements: function () { + return d; + }, + getWhiteSpaceElements: function () { + return o; + }, + getSpecialElements: function () { + return v; + }, + isValidChild: function (e, t) { + var n = g[e.toLowerCase()]; + return !(!n || !n[t.toLowerCase()]); + }, + isValid: function (e, t) { + var n, + r, + o = x(e); + if (o) { + if (!t) return !0; + if (o.attributes[t]) return !0; + if ((n = o.attributePatterns)) + for (r = n.length; r--; ) if (n[r].pattern.test(e)) return !0; + } + return !1; + }, + getCustomElements: function () { + return p; + }, + addValidElements: y, + setValidElements: b, + addCustomElements: C, + addValidChildren: w, + }; + } + function yr(e, t, n, r) { + function o(e) { + return 1 < (e = parseInt(e, 10).toString(16)).length ? e : "0" + e; + } + return "#" + o(t) + o(n) + o(r); + } + function br(e, t, n, r) { + e.addEventListener + ? e.addEventListener(t, n, r || !1) + : e.attachEvent && e.attachEvent("on" + t, n); + } + function Cr(e, t, n, r) { + e.removeEventListener + ? e.removeEventListener(t, n, r || !1) + : e.detachEvent && e.detachEvent("on" + t, n); + } + function wr(e, t) { + var n, + r = t || {}; + for (n in e) Nr[n] || (r[n] = e[n]); + if ( + (r.target || (r.target = r.srcElement || j.document), + Sn.experimentalShadowDom && + (r.target = (function (e, t) { + if (e.composedPath) { + var n = e.composedPath(); + if (n && 0 < n.length) return n[0]; + } + return t; + })(e, r.target)), + e && Er.test(e.type) && e.pageX === undefined && e.clientX !== undefined) + ) { + var o = r.target.ownerDocument || j.document, + i = o.documentElement, + a = o.body; + (r.pageX = + e.clientX + + ((i && i.scrollLeft) || (a && a.scrollLeft) || 0) - + ((i && i.clientLeft) || (a && a.clientLeft) || 0)), + (r.pageY = + e.clientY + + ((i && i.scrollTop) || (a && a.scrollTop) || 0) - + ((i && i.clientTop) || (a && a.clientTop) || 0)); + } + return ( + (r.preventDefault = function () { + (r.isDefaultPrevented = kr), + e && (e.preventDefault ? e.preventDefault() : (e.returnValue = !1)); + }), + (r.stopPropagation = function () { + (r.isPropagationStopped = kr), + e && + (e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = !0)); + }), + !(r.stopImmediatePropagation = function () { + (r.isImmediatePropagationStopped = kr), r.stopPropagation(); + }) === + (function (e) { + return e.isDefaultPrevented === kr || e.isDefaultPrevented === Sr; + })(r) && + ((r.isDefaultPrevented = Sr), + (r.isPropagationStopped = Sr), + (r.isImmediatePropagationStopped = Sr)), + "undefined" == typeof r.metaKey && (r.metaKey = !1), + r + ); + } + function xr(e, t, n) { + var r = e.document, + o = { type: "ready" }; + if (n.domLoaded) t(o); + else { + var i = function () { + Cr(e, "DOMContentLoaded", i), + Cr(e, "load", i), + n.domLoaded || ((n.domLoaded = !0), t(o)); + }; + "complete" === r.readyState || ("interactive" === r.readyState && r.body) + ? i() + : br(e, "DOMContentLoaded", i), + br(e, "load", i); + } + } + var zr = function (b, e) { + var C, + t, + c, + l, + w = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi, + x = + /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi, + z = /\s*([^:]+):\s*([^;]+);?/g, + E = /\s+$/, + N = {}, + S = "\ufeff"; + for ( + b = b || {}, + e && ((c = e.getValidStyles()), (l = e.getInvalidStyles())), + t = ("\\\" \\' \\; \\: ; : " + S).split(" "), + C = 0; + C < t.length; + C++ + ) + (N[t[C]] = S + C), (N[S + C] = t[C]); + return { + toHex: function (e) { + return e.replace(w, yr); + }, + parse: function (e) { + function t(e, t, n) { + var r, o, i, a; + if ( + (r = p[e + "-top" + t]) && + (o = p[e + "-right" + t]) && + (i = p[e + "-bottom" + t]) && + (a = p[e + "-left" + t]) + ) { + var u = [r, o, i, a]; + for (C = u.length - 1; C-- && u[C] === u[C + 1]; ); + (-1 < C && n) || + ((p[e + t] = -1 === C ? u[0] : u.join(" ")), + delete p[e + "-top" + t], + delete p[e + "-right" + t], + delete p[e + "-bottom" + t], + delete p[e + "-left" + t]); + } + } + function n(e) { + var t, + n = p[e]; + if (n) { + for (t = (n = n.split(" ")).length; t--; ) + if (n[t] !== n[0]) return !1; + return (p[e] = n[0]), !0; + } + } + function r(e) { + return (f = !0), N[e]; + } + function u(e, t) { + return ( + f && + (e = e.replace(/\uFEFF[0-9]/g, function (e) { + return N[e]; + })), + t || (e = e.replace(/\\([\'\";:])/g, "$1")), + e + ); + } + function o(e) { + return String.fromCharCode(parseInt(e.slice(1), 16)); + } + function i(e) { + return e.replace(/\\[0-9a-f]+/gi, o); + } + function a(e, t, n, r, o, i) { + if ((o = o || i)) + return "'" + (o = u(o)).replace(/\'/g, "\\'") + "'"; + if (((t = u(t || n || r)), !b.allow_script_urls)) { + var a = t.replace(/[\s\r\n]+/g, ""); + if (/(java|vb)script:/i.test(a)) return ""; + if (!b.allow_svg_data_urls && /^data:image\/svg/i.test(a)) + return ""; + } + return ( + v && (t = v.call(y, t, "style")), + "url('" + t.replace(/\'/g, "\\'") + "')" + ); + } + var s, + c, + l, + f, + d, + h, + m, + g, + p = {}, + v = b.url_converter, + y = b.url_converter_scope || this; + if (e) { + for ( + e = (e = e.replace(/[\u0000-\u001F]/g, "")) + .replace(/\\[\"\';:\uFEFF]/g, r) + .replace(/\"[^\"]+\"|\'[^\']+\'/g, function (e) { + return e.replace(/[;:]/g, r); + }); + (s = z.exec(e)); + + ) + if ( + ((z.lastIndex = s.index + s[0].length), + (c = s[1].replace(E, "").toLowerCase()), + (l = s[2].replace(E, "")), + c && l) + ) { + if ( + ((c = i(c)), + (l = i(l)), + -1 !== c.indexOf(S) || -1 !== c.indexOf('"')) + ) + continue; + if ( + !b.allow_script_urls && + ("behavior" === c || /expression\s*\(|\/\*|\*\//.test(l)) + ) + continue; + "font-weight" === c && "700" === l + ? (l = "bold") + : ("color" !== c && "background-color" !== c) || + (l = l.toLowerCase()), + (l = (l = l.replace(w, yr)).replace(x, a)), + (p[c] = f ? u(l, !0) : l); + } + t("border", "", !0), + t("border", "-width"), + t("border", "-color"), + t("border", "-style"), + t("padding", ""), + t("margin", ""), + (d = "border"), + (m = "border-style"), + (g = "border-color"), + n((h = "border-width")) && + n(m) && + n(g) && + ((p[d] = p[h] + " " + p[m] + " " + p[g]), + delete p[h], + delete p[m], + delete p[g]), + "medium none" === p.border && delete p.border, + "none" === p["border-image"] && delete p["border-image"]; + } + return p; + }, + serialize: function (i, e) { + function t(e) { + var t, n, r, o; + if ((t = c[e])) + for (n = 0, r = t.length; n < r; n++) + (e = t[n]), + (o = i[e]) && + (s += (0 < s.length ? " " : "") + e + ": " + o + ";"); + } + var n, + r, + o, + a, + u, + s = ""; + if (e && c) t("*"), t(e); + else + for (n in i) + !(r = i[n]) || + (l && + ((o = n), + (a = e), + (u = void 0), + ((u = l["*"]) && u[o]) || ((u = l[a]) && u[o]))) || + (s += (0 < s.length ? " " : "") + n + ": " + r + ";"); + return s; + }, + }; + }, + Er = /^(?:mouse|contextmenu)|click/, + Nr = { + keyLocation: 1, + layerX: 1, + layerY: 1, + returnValue: 1, + webkitMovementX: 1, + webkitMovementY: 1, + keyIdentifier: 1, + mozPressure: 1, + }, + Sr = function () { + return !1; + }, + kr = function () { + return !0; + }, + Tr = + ((Ar.prototype.bind = function (e, t, n, r) { + function o(e) { + d.executeHandlers(wr(e || h.event), i); + } + var i, + a, + u, + s, + c, + l, + f, + d = this, + h = j.window; + if (e && 3 !== e.nodeType && 8 !== e.nodeType) { + e[d.expando] + ? (i = e[d.expando]) + : ((i = d.count++), (e[d.expando] = i), (d.events[i] = {})), + (r = r || e); + var m = t.split(" "); + for (u = m.length; u--; ) + (l = o), + (c = f = !1), + "DOMContentLoaded" === (s = m[u]) && (s = "ready"), + d.domLoaded && "ready" === s && "complete" === e.readyState + ? n.call(r, wr({ type: s })) + : (d.hasMouseEnterLeave || + ((c = d.mouseEnterLeave[s]) && + (l = function (e) { + var t, n; + if ( + ((t = e.currentTarget), + (n = e.relatedTarget) && t.contains) + ) + n = t.contains(n); + else for (; n && n !== t; ) n = n.parentNode; + n || + (((e = wr(e || h.event)).type = + "mouseout" === e.type + ? "mouseleave" + : "mouseenter"), + (e.target = t), + d.executeHandlers(e, i)); + })), + d.hasFocusIn || + ("focusin" !== s && "focusout" !== s) || + ((f = !0), + (c = "focusin" === s ? "focus" : "blur"), + (l = function (e) { + ((e = wr(e || h.event)).type = + "focus" === e.type ? "focusin" : "focusout"), + d.executeHandlers(e, i); + })), + (a = d.events[i][s]) + ? "ready" === s && d.domLoaded + ? n(wr({ type: s })) + : a.push({ func: n, scope: r }) + : ((d.events[i][s] = a = [{ func: n, scope: r }]), + (a.fakeName = c), + (a.capture = f), + (a.nativeHandler = l), + "ready" === s ? xr(e, l, d) : br(e, c || s, l, f))); + return (e = a = 0), n; + } + }), + (Ar.prototype.unbind = function (e, t, n) { + var r, o, i, a, u, s; + if (!e || 3 === e.nodeType || 8 === e.nodeType) return this; + if ((r = e[this.expando])) { + if (((s = this.events[r]), t)) { + var c = t.split(" "); + for (i = c.length; i--; ) + if ((o = s[(u = c[i])])) { + if (n) + for (a = o.length; a--; ) + if (o[a].func === n) { + var l = o.nativeHandler, + f = o.fakeName, + d = o.capture; + ((o = o + .slice(0, a) + .concat(o.slice(a + 1))).nativeHandler = l), + (o.fakeName = f), + (o.capture = d), + (s[u] = o); + } + (n && 0 !== o.length) || + (delete s[u], + Cr(e, o.fakeName || u, o.nativeHandler, o.capture)); + } + } else { + for (u in s) + (o = s[u]), Cr(e, o.fakeName || u, o.nativeHandler, o.capture); + s = {}; + } + for (u in s) return this; + delete this.events[r]; + try { + delete e[this.expando]; + } catch (h) { + e[this.expando] = null; + } + } + return this; + }), + (Ar.prototype.fire = function (e, t, n) { + var r; + if (!e || 3 === e.nodeType || 8 === e.nodeType) return this; + var o = wr(null, n); + for ( + o.type = t, o.target = e; + (r = e[this.expando]) && this.executeHandlers(o, r), + (e = + e.parentNode || + e.ownerDocument || + e.defaultView || + e.parentWindow) && !o.isPropagationStopped(); + + ); + return this; + }), + (Ar.prototype.clean = function (e) { + var t, n; + if (!e || 3 === e.nodeType || 8 === e.nodeType) return this; + if ( + (e[this.expando] && this.unbind(e), + e.getElementsByTagName || (e = e.document), + e && e.getElementsByTagName) + ) + for ( + this.unbind(e), t = (n = e.getElementsByTagName("*")).length; + t--; + + ) + (e = n[t])[this.expando] && this.unbind(e); + return this; + }), + (Ar.prototype.destroy = function () { + this.events = {}; + }), + (Ar.prototype.cancel = function (e) { + return e && (e.preventDefault(), e.stopImmediatePropagation()), !1; + }), + (Ar.prototype.executeHandlers = function (e, t) { + var n, + r, + o, + i, + a = this.events[t]; + if ((n = a && a[e.type])) + for (r = 0, o = n.length; r < o; r++) + if ( + ((i = n[r]) && + !1 === i.func.call(i.scope, e) && + e.preventDefault(), + e.isImmediatePropagationStopped()) + ) + return; + }), + (Ar.Event = new Ar()), + Ar); + function Ar() { + (this.domLoaded = !1), + (this.events = {}), + (this.count = 1), + (this.expando = "mce-data-" + (+new Date()).toString(32)), + (this.hasMouseEnterLeave = "onmouseenter" in j.document.documentElement), + (this.hasFocusIn = "onfocusin" in j.document.documentElement), + (this.count = 1); + } + function Mr(e, t, n) { + var r = "0x" + t - 65536; + return r != r || n + ? t + : r < 0 + ? String.fromCharCode(65536 + r) + : String.fromCharCode((r >> 10) | 55296, (1023 & r) | 56320); + } + var Rr, + Dr, + _r, + Or, + Br, + Hr, + Pr, + Lr, + Vr, + Ir, + Fr, + Ur, + jr, + qr, + $r, + Wr, + Kr, + Xr, + Yr = "sizzle" + -new Date(), + Gr = j.window.document, + Jr = 0, + Qr = 0, + Zr = Ro(), + eo = Ro(), + to = Ro(), + no = function (e, t) { + return e === t && (Fr = !0), 0; + }, + ro = typeof undefined, + oo = {}.hasOwnProperty, + io = [], + ao = io.pop, + uo = io.push, + so = io.push, + co = io.slice, + lo = + io.indexOf || + function (e) { + for (var t = 0, n = this.length; t < n; t++) + if (this[t] === e) return t; + return -1; + }, + fo = "[\\x20\\t\\r\\n\\f]", + ho = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + mo = + "\\[" + + fo + + "*(" + + ho + + ")(?:" + + fo + + "*([*^$|!~]?=)" + + fo + + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + + ho + + "))|)" + + fo + + "*\\]", + go = + ":(" + + ho + + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + + mo + + ")*)|.*)\\)|)", + po = new RegExp("^" + fo + "+|((?:^|[^\\\\])(?:\\\\.)*)" + fo + "+$", "g"), + vo = new RegExp("^" + fo + "*," + fo + "*"), + yo = new RegExp("^" + fo + "*([>+~]|" + fo + ")" + fo + "*"), + bo = new RegExp("=" + fo + "*([^\\]'\"]*?)" + fo + "*\\]", "g"), + Co = new RegExp(go), + wo = new RegExp("^" + ho + "$"), + xo = { + ID: new RegExp("^#(" + ho + ")"), + CLASS: new RegExp("^\\.(" + ho + ")"), + TAG: new RegExp("^(" + ho + "|[*])"), + ATTR: new RegExp("^" + mo), + PSEUDO: new RegExp("^" + go), + CHILD: new RegExp( + "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + fo + + "*(even|odd|(([+-]|)(\\d*)n|)" + + fo + + "*(?:([+-]|)" + + fo + + "*(\\d+)|))" + + fo + + "*\\)|)", + "i", + ), + bool: new RegExp( + "^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$", + "i", + ), + needsContext: new RegExp( + "^" + + fo + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + fo + + "*((?:-\\d)?\\d*)" + + fo + + "*\\)|)(?=[^-]|$)", + "i", + ), + }, + zo = /^(?:input|select|textarea|button)$/i, + Eo = /^h\d$/i, + No = /^[^{]+\{\s*\[native \w/, + So = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + ko = /[+~]/, + To = /'|\\/g, + Ao = new RegExp("\\\\([\\da-f]{1,6}" + fo + "?|(" + fo + ")|.)", "ig"); + try { + so.apply((io = co.call(Gr.childNodes)), Gr.childNodes), + io[Gr.childNodes.length].nodeType; + } catch (xN) { + so = { + apply: io.length + ? function (e, t) { + uo.apply(e, co.call(t)); + } + : function (e, t) { + for (var n = e.length, r = 0; (e[n++] = t[r++]); ); + e.length = n - 1; + }, + }; + } + var Mo = function (e, t, n, r) { + var o, i, a, u, s, c, l, f, d, h; + if ( + ((t ? t.ownerDocument || t : Gr) !== jr && Ur(t), + (n = n || []), + !e || "string" != typeof e) + ) + return n; + if (1 !== (u = (t = t || jr).nodeType) && 9 !== u) return []; + if ($r && !r) { + if ((o = So.exec(e))) + if ((a = o[1])) { + if (9 === u) { + if (!(i = t.getElementById(a)) || !i.parentNode) return n; + if (i.id === a) return n.push(i), n; + } else if ( + t.ownerDocument && + (i = t.ownerDocument.getElementById(a)) && + Xr(t, i) && + i.id === a + ) + return n.push(i), n; + } else { + if (o[2]) return so.apply(n, t.getElementsByTagName(e)), n; + if ((a = o[3]) && Dr.getElementsByClassName) + return so.apply(n, t.getElementsByClassName(a)), n; + } + if (Dr.qsa && (!Wr || !Wr.test(e))) { + if ( + ((f = l = Yr), + (d = t), + (h = 9 === u && e), + 1 === u && "object" !== t.nodeName.toLowerCase()) + ) { + for ( + c = Hr(e), + (l = t.getAttribute("id")) + ? (f = l.replace(To, "\\$&")) + : t.setAttribute("id", f), + f = "[id='" + f + "'] ", + s = c.length; + s--; + + ) + c[s] = f + Vo(c[s]); + (d = (ko.test(e) && Po(t.parentNode)) || t), (h = c.join(",")); + } + if (h) + try { + return so.apply(n, d.querySelectorAll(h)), n; + } catch (m) { + } finally { + l || t.removeAttribute("id"); + } + } + } + return Lr(e.replace(po, "$1"), t, n, r); + }; + function Ro() { + var n = []; + return function r(e, t) { + return ( + n.push(e + " ") > _r.cacheLength && delete r[n.shift()], + (r[e + " "] = t) + ); + }; + } + function Do(e) { + return (e[Yr] = !0), e; + } + function _o(e, t) { + var n = t && e, + r = + n && + 1 === e.nodeType && + 1 === t.nodeType && + (~t.sourceIndex || 1 << 31) - (~e.sourceIndex || 1 << 31); + if (r) return r; + if (n) for (; (n = n.nextSibling); ) if (n === t) return -1; + return e ? 1 : -1; + } + function Oo(t) { + return function (e) { + return "input" === e.nodeName.toLowerCase() && e.type === t; + }; + } + function Bo(n) { + return function (e) { + var t = e.nodeName.toLowerCase(); + return ("input" === t || "button" === t) && e.type === n; + }; + } + function Ho(a) { + return Do(function (i) { + return ( + (i = +i), + Do(function (e, t) { + for (var n, r = a([], e.length, i), o = r.length; o--; ) + e[(n = r[o])] && (e[n] = !(t[n] = e[n])); + }) + ); + }); + } + function Po(e) { + return e && typeof e.getElementsByTagName != ro && e; + } + for (Rr in ((Dr = Mo.support = {}), + (Br = Mo.isXML = + function (e) { + var t = e && (e.ownerDocument || e).documentElement; + return !!t && "HTML" !== t.nodeName; + }), + (Ur = Mo.setDocument = + function (e) { + var t, + s = e ? e.ownerDocument || e : Gr, + n = s.defaultView; + return s !== jr && 9 === s.nodeType && s.documentElement + ? ((qr = (jr = s).documentElement), + ($r = !Br(s)), + n && + n !== + (function r(e) { + try { + return e.top; + } catch (t) {} + return null; + })(n) && + (n.addEventListener + ? n.addEventListener( + "unload", + function () { + Ur(); + }, + !1, + ) + : n.attachEvent && + n.attachEvent("onunload", function () { + Ur(); + })), + (Dr.attributes = !0), + (Dr.getElementsByTagName = !0), + (Dr.getElementsByClassName = No.test(s.getElementsByClassName)), + (Dr.getById = !0), + (_r.find.ID = function (e, t) { + if (typeof t.getElementById != ro && $r) { + var n = t.getElementById(e); + return n && n.parentNode ? [n] : []; + } + }), + (_r.filter.ID = function (e) { + var t = e.replace(Ao, Mr); + return function (e) { + return e.getAttribute("id") === t; + }; + }), + (_r.find.TAG = Dr.getElementsByTagName + ? function (e, t) { + if (typeof t.getElementsByTagName != ro) + return t.getElementsByTagName(e); + } + : function (e, t) { + var n, + r = [], + o = 0, + i = t.getElementsByTagName(e); + if ("*" !== e) return i; + for (; (n = i[o++]); ) 1 === n.nodeType && r.push(n); + return r; + }), + (_r.find.CLASS = + Dr.getElementsByClassName && + function (e, t) { + if ($r) return t.getElementsByClassName(e); + }), + (Kr = []), + (Wr = []), + (Dr.disconnectedMatch = !0), + (Wr = Wr.length && new RegExp(Wr.join("|"))), + (Kr = Kr.length && new RegExp(Kr.join("|"))), + (t = No.test(qr.compareDocumentPosition)), + (Xr = + t || No.test(qr.contains) + ? function (e, t) { + var n = 9 === e.nodeType ? e.documentElement : e, + r = t && t.parentNode; + return ( + e === r || + !( + !r || + 1 !== r.nodeType || + !(n.contains + ? n.contains(r) + : e.compareDocumentPosition && + 16 & e.compareDocumentPosition(r)) + ) + ); + } + : function (e, t) { + if (t) for (; (t = t.parentNode); ) if (t === e) return !0; + return !1; + }), + (no = t + ? function (e, t) { + if (e === t) return (Fr = !0), 0; + var n = !e.compareDocumentPosition - !t.compareDocumentPosition; + return ( + n || + (1 & + (n = + (e.ownerDocument || e) === (t.ownerDocument || t) + ? e.compareDocumentPosition(t) + : 1) || + (!Dr.sortDetached && t.compareDocumentPosition(e) === n) + ? e === s || (e.ownerDocument === Gr && Xr(Gr, e)) + ? -1 + : t === s || (t.ownerDocument === Gr && Xr(Gr, t)) + ? 1 + : Ir + ? lo.call(Ir, e) - lo.call(Ir, t) + : 0 + : 4 & n + ? -1 + : 1) + ); + } + : function (e, t) { + if (e === t) return (Fr = !0), 0; + var n, + r = 0, + o = e.parentNode, + i = t.parentNode, + a = [e], + u = [t]; + if (!o || !i) + return e === s + ? -1 + : t === s + ? 1 + : o + ? -1 + : i + ? 1 + : Ir + ? lo.call(Ir, e) - lo.call(Ir, t) + : 0; + if (o === i) return _o(e, t); + for (n = e; (n = n.parentNode); ) a.unshift(n); + for (n = t; (n = n.parentNode); ) u.unshift(n); + for (; a[r] === u[r]; ) r++; + return r + ? _o(a[r], u[r]) + : a[r] === Gr + ? -1 + : u[r] === Gr + ? 1 + : 0; + }), + s) + : jr; + }), + (Mo.matches = function (e, t) { + return Mo(e, null, null, t); + }), + (Mo.matchesSelector = function (e, t) { + if ( + ((e.ownerDocument || e) !== jr && Ur(e), + (t = t.replace(bo, "='$1']")), + Dr.matchesSelector && $r && (!Kr || !Kr.test(t)) && (!Wr || !Wr.test(t))) + ) + try { + var n = (void 0).call(e, t); + if ( + n || + Dr.disconnectedMatch || + (e.document && 11 !== e.document.nodeType) + ) + return n; + } catch (xN) {} + return 0 < Mo(t, jr, null, [e]).length; + }), + (Mo.contains = function (e, t) { + return (e.ownerDocument || e) !== jr && Ur(e), Xr(e, t); + }), + (Mo.attr = function (e, t) { + (e.ownerDocument || e) !== jr && Ur(e); + var n = _r.attrHandle[t.toLowerCase()], + r = + n && oo.call(_r.attrHandle, t.toLowerCase()) ? n(e, t, !$r) : undefined; + return r !== undefined + ? r + : Dr.attributes || !$r + ? e.getAttribute(t) + : (r = e.getAttributeNode(t)) && r.specified + ? r.value + : null; + }), + (Mo.error = function (e) { + throw new Error("Syntax error, unrecognized expression: " + e); + }), + (Mo.uniqueSort = function (e) { + var t, + n = [], + r = 0, + o = 0; + if ( + ((Fr = !Dr.detectDuplicates), + (Ir = !Dr.sortStable && e.slice(0)), + e.sort(no), + Fr) + ) { + for (; (t = e[o++]); ) t === e[o] && (r = n.push(o)); + for (; r--; ) e.splice(n[r], 1); + } + return (Ir = null), e; + }), + (Or = Mo.getText = + function (e) { + var t, + n = "", + r = 0, + o = e.nodeType; + if (o) { + if (1 === o || 9 === o || 11 === o) { + if ("string" == typeof e.textContent) return e.textContent; + for (e = e.firstChild; e; e = e.nextSibling) n += Or(e); + } else if (3 === o || 4 === o) return e.nodeValue; + } else for (; (t = e[r++]); ) n += Or(t); + return n; + }), + ((_r = Mo.selectors = + { + cacheLength: 50, + createPseudo: Do, + match: xo, + attrHandle: {}, + find: {}, + relative: { + ">": { dir: "parentNode", first: !0 }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: !0 }, + "~": { dir: "previousSibling" }, + }, + preFilter: { + ATTR: function (e) { + return ( + (e[1] = e[1].replace(Ao, Mr)), + (e[3] = (e[3] || e[4] || e[5] || "").replace(Ao, Mr)), + "~=" === e[2] && (e[3] = " " + e[3] + " "), + e.slice(0, 4) + ); + }, + CHILD: function (e) { + return ( + (e[1] = e[1].toLowerCase()), + "nth" === e[1].slice(0, 3) + ? (e[3] || Mo.error(e[0]), + (e[4] = +(e[4] + ? e[5] + (e[6] || 1) + : 2 * ("even" === e[3] || "odd" === e[3]))), + (e[5] = +(e[7] + e[8] || "odd" === e[3]))) + : e[3] && Mo.error(e[0]), + e + ); + }, + PSEUDO: function (e) { + var t, + n = !e[6] && e[2]; + return xo.CHILD.test(e[0]) + ? null + : (e[3] + ? (e[2] = e[4] || e[5] || "") + : n && + Co.test(n) && + (t = Hr(n, !0)) && + (t = n.indexOf(")", n.length - t) - n.length) && + ((e[0] = e[0].slice(0, t)), (e[2] = n.slice(0, t))), + e.slice(0, 3)); + }, + }, + filter: { + TAG: function (e) { + var t = e.replace(Ao, Mr).toLowerCase(); + return "*" === e + ? function () { + return !0; + } + : function (e) { + return e.nodeName && e.nodeName.toLowerCase() === t; + }; + }, + CLASS: function (e) { + var t = Zr[e + " "]; + return ( + t || + ((t = new RegExp("(^|" + fo + ")" + e + "(" + fo + "|$)")) && + Zr(e, function (e) { + return t.test( + ("string" == typeof e.className && e.className) || + (typeof e.getAttribute != ro && e.getAttribute("class")) || + "", + ); + })) + ); + }, + ATTR: function (n, r, o) { + return function (e) { + var t = Mo.attr(e, n); + return null == t + ? "!=" === r + : !r || + ((t += ""), + "=" === r + ? t === o + : "!=" === r + ? t !== o + : "^=" === r + ? o && 0 === t.indexOf(o) + : "*=" === r + ? o && -1 < t.indexOf(o) + : "$=" === r + ? o && t.slice(-o.length) === o + : "~=" === r + ? -1 < (" " + t + " ").indexOf(o) + : "|=" === r && + (t === o || t.slice(0, o.length + 1) === o + "-")); + }; + }, + CHILD: function (h, e, t, m, g) { + var p = "nth" !== h.slice(0, 3), + v = "last" !== h.slice(-4), + y = "of-type" === e; + return 1 === m && 0 === g + ? function (e) { + return !!e.parentNode; + } + : function (e, t, n) { + var r, + o, + i, + a, + u, + s, + c = p != v ? "nextSibling" : "previousSibling", + l = e.parentNode, + f = y && e.nodeName.toLowerCase(), + d = !n && !y; + if (l) { + if (p) { + for (; c; ) { + for (i = e; (i = i[c]); ) + if ( + y ? i.nodeName.toLowerCase() === f : 1 === i.nodeType + ) + return !1; + s = c = "only" === h && !s && "nextSibling"; + } + return !0; + } + if (((s = [v ? l.firstChild : l.lastChild]), v && d)) { + for ( + u = + (r = (o = l[Yr] || (l[Yr] = {}))[h] || [])[0] === Jr && + r[1], + a = r[0] === Jr && r[2], + i = u && l.childNodes[u]; + (i = (++u && i && i[c]) || (a = u = 0) || s.pop()); + + ) + if (1 === i.nodeType && ++a && i === e) { + o[h] = [Jr, u, a]; + break; + } + } else if ( + d && + (r = (e[Yr] || (e[Yr] = {}))[h]) && + r[0] === Jr + ) + a = r[1]; + else + for ( + ; + (i = (++u && i && i[c]) || (a = u = 0) || s.pop()) && + ((y + ? i.nodeName.toLowerCase() !== f + : 1 !== i.nodeType) || + !++a || + (d && ((i[Yr] || (i[Yr] = {}))[h] = [Jr, a]), i !== e)); + + ); + return (a -= g) === m || (a % m == 0 && 0 <= a / m); + } + }; + }, + PSEUDO: function (e, i) { + var t, + a = + _r.pseudos[e] || + _r.setFilters[e.toLowerCase()] || + Mo.error("unsupported pseudo: " + e); + return a[Yr] + ? a(i) + : 1 < a.length + ? ((t = [e, e, "", i]), + _r.setFilters.hasOwnProperty(e.toLowerCase()) + ? Do(function (e, t) { + for (var n, r = a(e, i), o = r.length; o--; ) + e[(n = lo.call(e, r[o]))] = !(t[n] = r[o]); + }) + : function (e) { + return a(e, 0, t); + }) + : a; + }, + }, + pseudos: { + not: Do(function (e) { + var r = [], + o = [], + u = Pr(e.replace(po, "$1")); + return u[Yr] + ? Do(function (e, t, n, r) { + for (var o, i = u(e, null, r, []), a = e.length; a--; ) + (o = i[a]) && (e[a] = !(t[a] = o)); + }) + : function (e, t, n) { + return (r[0] = e), u(r, null, n, o), !o.pop(); + }; + }), + has: Do(function (t) { + return function (e) { + return 0 < Mo(t, e).length; + }; + }), + contains: Do(function (t) { + return ( + (t = t.replace(Ao, Mr)), + function (e) { + return -1 < (e.textContent || e.innerText || Or(e)).indexOf(t); + } + ); + }), + lang: Do(function (n) { + return ( + wo.test(n || "") || Mo.error("unsupported lang: " + n), + (n = n.replace(Ao, Mr).toLowerCase()), + function (e) { + var t; + do { + if ( + (t = $r + ? e.lang + : e.getAttribute("xml:lang") || e.getAttribute("lang")) + ) + return ( + (t = t.toLowerCase()) === n || 0 === t.indexOf(n + "-") + ); + } while ((e = e.parentNode) && 1 === e.nodeType); + return !1; + } + ); + }), + target: function (e) { + var t = j.window.location && j.window.location.hash; + return t && t.slice(1) === e.id; + }, + root: function (e) { + return e === qr; + }, + focus: function (e) { + return ( + e === jr.activeElement && + (!jr.hasFocus || jr.hasFocus()) && + !!(e.type || e.href || ~e.tabIndex) + ); + }, + enabled: function (e) { + return !1 === e.disabled; + }, + disabled: function (e) { + return !0 === e.disabled; + }, + checked: function (e) { + var t = e.nodeName.toLowerCase(); + return ( + ("input" === t && !!e.checked) || ("option" === t && !!e.selected) + ); + }, + selected: function (e) { + return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected; + }, + empty: function (e) { + for (e = e.firstChild; e; e = e.nextSibling) + if (e.nodeType < 6) return !1; + return !0; + }, + parent: function (e) { + return !_r.pseudos.empty(e); + }, + header: function (e) { + return Eo.test(e.nodeName); + }, + input: function (e) { + return zo.test(e.nodeName); + }, + button: function (e) { + var t = e.nodeName.toLowerCase(); + return ("input" === t && "button" === e.type) || "button" === t; + }, + text: function (e) { + var t; + return ( + "input" === e.nodeName.toLowerCase() && + "text" === e.type && + (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) + ); + }, + first: Ho(function () { + return [0]; + }), + last: Ho(function (e, t) { + return [t - 1]; + }), + eq: Ho(function (e, t, n) { + return [n < 0 ? n + t : n]; + }), + even: Ho(function (e, t) { + for (var n = 0; n < t; n += 2) e.push(n); + return e; + }), + odd: Ho(function (e, t) { + for (var n = 1; n < t; n += 2) e.push(n); + return e; + }), + lt: Ho(function (e, t, n) { + for (var r = n < 0 ? n + t : n; 0 <= --r; ) e.push(r); + return e; + }), + gt: Ho(function (e, t, n) { + for (var r = n < 0 ? n + t : n; ++r < t; ) e.push(r); + return e; + }), + }, + }).pseudos.nth = _r.pseudos.eq), + { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 })) + _r.pseudos[Rr] = Oo(Rr); + for (Rr in { submit: !0, reset: !0 }) _r.pseudos[Rr] = Bo(Rr); + function Lo() {} + function Vo(e) { + for (var t = 0, n = e.length, r = ""; t < n; t++) r += e[t].value; + return r; + } + function Io(a, e, t) { + var u = e.dir, + s = t && "parentNode" === u, + c = Qr++; + return e.first + ? function (e, t, n) { + for (; (e = e[u]); ) if (1 === e.nodeType || s) return a(e, t, n); + } + : function (e, t, n) { + var r, + o, + i = [Jr, c]; + if (n) { + for (; (e = e[u]); ) + if ((1 === e.nodeType || s) && a(e, t, n)) return !0; + } else + for (; (e = e[u]); ) + if (1 === e.nodeType || s) { + if ( + (r = (o = e[Yr] || (e[Yr] = {}))[u]) && + r[0] === Jr && + r[1] === c + ) + return (i[2] = r[2]); + if (((o[u] = i)[2] = a(e, t, n))) return !0; + } + }; + } + function Fo(o) { + return 1 < o.length + ? function (e, t, n) { + for (var r = o.length; r--; ) if (!o[r](e, t, n)) return !1; + return !0; + } + : o[0]; + } + function Uo(e, t, n, r, o) { + for (var i, a = [], u = 0, s = e.length, c = null != t; u < s; u++) + (i = e[u]) && ((n && !n(i, r, o)) || (a.push(i), c && t.push(u))); + return a; + } + function jo(m, g, p, v, y, e) { + return ( + v && !v[Yr] && (v = jo(v)), + y && !y[Yr] && (y = jo(y, e)), + Do(function (e, t, n, r) { + var o, + i, + a, + u = [], + s = [], + c = t.length, + l = + e || + (function h(e, t, n) { + for (var r = 0, o = t.length; r < o; r++) Mo(e, t[r], n); + return n; + })(g || "*", n.nodeType ? [n] : n, []), + f = !m || (!e && g) ? l : Uo(l, u, m, n, r), + d = p ? (y || (e ? m : c || v) ? [] : t) : f; + if ((p && p(f, d, n, r), v)) + for (o = Uo(d, s), v(o, [], n, r), i = o.length; i--; ) + (a = o[i]) && (d[s[i]] = !(f[s[i]] = a)); + if (e) { + if (y || m) { + if (y) { + for (o = [], i = d.length; i--; ) + (a = d[i]) && o.push((f[i] = a)); + y(null, (d = []), o, r); + } + for (i = d.length; i--; ) + (a = d[i]) && + -1 < (o = y ? lo.call(e, a) : u[i]) && + (e[o] = !(t[o] = a)); + } + } else (d = Uo(d === t ? d.splice(c, d.length) : d)), y ? y(null, t, d, r) : so.apply(t, d); + }) + ); + } + function qo(e) { + for ( + var r, + t, + n, + o = e.length, + i = _r.relative[e[0].type], + a = i || _r.relative[" "], + u = i ? 1 : 0, + s = Io( + function (e) { + return e === r; + }, + a, + !0, + ), + c = Io( + function (e) { + return -1 < lo.call(r, e); + }, + a, + !0, + ), + l = [ + function (e, t, n) { + return ( + (!i && (n || t !== Vr)) || + ((r = t).nodeType ? s(e, t, n) : c(e, t, n)) + ); + }, + ]; + u < o; + u++ + ) + if ((t = _r.relative[e[u].type])) l = [Io(Fo(l), t)]; + else { + if ((t = _r.filter[e[u].type].apply(null, e[u].matches))[Yr]) { + for (n = ++u; n < o && !_r.relative[e[n].type]; n++); + return jo( + 1 < u && Fo(l), + 1 < u && + Vo( + e + .slice(0, u - 1) + .concat({ value: " " === e[u - 2].type ? "*" : "" }), + ).replace(po, "$1"), + t, + u < n && qo(e.slice(u, n)), + n < o && qo((e = e.slice(n))), + n < o && Vo(e), + ); + } + l.push(t); + } + return Fo(l); + } + (Lo.prototype = _r.filters = _r.pseudos), + (_r.setFilters = new Lo()), + (Hr = Mo.tokenize = + function (e, t) { + var n, + r, + o, + i, + a, + u, + s, + c = eo[e + " "]; + if (c) return t ? 0 : c.slice(0); + for (a = e, u = [], s = _r.preFilter; a; ) { + for (i in ((n && !(r = vo.exec(a))) || + (r && (a = a.slice(r[0].length) || a), u.push((o = []))), + (n = !1), + (r = yo.exec(a)) && + ((n = r.shift()), + o.push({ value: n, type: r[0].replace(po, " ") }), + (a = a.slice(n.length))), + _r.filter)) + _r.filter.hasOwnProperty(i) && + (!(r = xo[i].exec(a)) || + (s[i] && !(r = s[i](r))) || + ((n = r.shift()), + o.push({ value: n, type: i, matches: r }), + (a = a.slice(n.length)))); + if (!n) break; + } + return t ? a.length : a ? Mo.error(e) : eo(e, u).slice(0); + }), + (Pr = Mo.compile = + function (e, t) { + var n, + r = [], + o = [], + i = to[e + " "]; + if (!i) { + for (n = (t = t || Hr(e)).length; n--; ) + (i = qo(t[n]))[Yr] ? r.push(i) : o.push(i); + (i = to( + e, + (function a(p, v) { + function e(e, t, n, r, o) { + var i, + a, + u, + s = 0, + c = "0", + l = e && [], + f = [], + d = Vr, + h = e || (b && _r.find.TAG("*", o)), + m = (Jr += null == d ? 1 : Math.random() || 0.1), + g = h.length; + for ( + o && (Vr = t !== jr && t); + c !== g && null != (i = h[c]); + c++ + ) { + if (b && i) { + for (a = 0; (u = p[a++]); ) + if (u(i, t, n)) { + r.push(i); + break; + } + o && (Jr = m); + } + y && ((i = !u && i) && s--, e && l.push(i)); + } + if (((s += c), y && c !== s)) { + for (a = 0; (u = v[a++]); ) u(l, f, t, n); + if (e) { + if (0 < s) + for (; c--; ) l[c] || f[c] || (f[c] = ao.call(r)); + f = Uo(f); + } + so.apply(r, f), + o && + !e && + 0 < f.length && + 1 < s + v.length && + Mo.uniqueSort(r); + } + return o && ((Jr = m), (Vr = d)), l; + } + var y = 0 < v.length, + b = 0 < p.length; + return y ? Do(e) : e; + })(o, r), + )).selector = e; + } + return i; + }), + (Lr = Mo.select = + function (e, t, n, r) { + var o, + i, + a, + u, + s, + c = "function" == typeof e && e, + l = !r && Hr((e = c.selector || e)); + if (((n = n || []), 1 === l.length)) { + if ( + 2 < (i = l[0] = l[0].slice(0)).length && + "ID" === (a = i[0]).type && + Dr.getById && + 9 === t.nodeType && + $r && + _r.relative[i[1].type] + ) { + if (!(t = (_r.find.ID(a.matches[0].replace(Ao, Mr), t) || [])[0])) + return n; + c && (t = t.parentNode), (e = e.slice(i.shift().value.length)); + } + for ( + o = xo.needsContext.test(e) ? 0 : i.length; + o-- && ((a = i[o]), !_r.relative[(u = a.type)]); + + ) + if ( + (s = _r.find[u]) && + (r = s( + a.matches[0].replace(Ao, Mr), + (ko.test(i[0].type) && Po(t.parentNode)) || t, + )) + ) { + if ((i.splice(o, 1), !(e = r.length && Vo(i)))) + return so.apply(n, r), n; + break; + } + } + return ( + (c || Pr(e, l))(r, t, !$r, n, (ko.test(e) && Po(t.parentNode)) || t), + n + ); + }), + (Dr.sortStable = Yr.split("").sort(no).join("") === Yr), + (Dr.detectDuplicates = !!Fr), + Ur(), + (Dr.sortDetached = !0); + function $o(e) { + return void 0 !== e; + } + function Wo(e) { + return "string" == typeof e; + } + function Ko(e, t) { + var n, r, o; + for ( + o = (t = t || ei).createElement("div"), + n = t.createDocumentFragment(), + o.innerHTML = e; + (r = o.firstChild); + + ) + n.appendChild(r); + return n; + } + function Xo(e, t) { + return e && t && -1 !== (" " + e.className + " ").indexOf(" " + t + " "); + } + function Yo(e, t, n) { + var r, o; + return ( + (t = yi(t)[0]), + e.each(function () { + (n && r === this.parentNode) || + ((r = this.parentNode), + (o = t.cloneNode(!1)), + this.parentNode.insertBefore(o, this)), + o.appendChild(this); + }), + e + ); + } + function Go(e, t) { + return new yi.fn.init(e, t); + } + function Jo(e) { + return null === e || e === undefined ? "" : ("" + e).replace(hi, ""); + } + function Qo(e, t) { + var n, r, o, i; + if (e) + if ((n = e.length) === undefined) { + for (r in e) + if (e.hasOwnProperty(r) && ((i = e[r]), !1 === t.call(i, r, i))) + break; + } else for (o = 0; o < n && ((i = e[o]), !1 !== t.call(i, o, i)); o++); + return e; + } + function Zo(e, n) { + var r = []; + return ( + Qo(e, function (e, t) { + n(t, e) && r.push(t); + }), + r + ); + } + var ei = j.document, + ti = Array.prototype.push, + ni = Array.prototype.slice, + ri = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + oi = Tr.Event, + ii = Rn.makeMap("children,contents,next,prev"), + ai = function (e, t, n, r) { + var o; + if (Wo(t)) t = Ko(t, mi(e[0])); + else if (t.length && !t.nodeType) { + if (((t = yi.makeArray(t)), r)) + for (o = t.length - 1; 0 <= o; o--) ai(e, t[o], n, r); + else for (o = 0; o < t.length; o++) ai(e, t[o], n, r); + return e; + } + if (t.nodeType) for (o = e.length; o--; ) n.call(e[o], t); + return e; + }, + ui = Rn.makeMap( + "fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom", + " ", + ), + si = Rn.makeMap( + "checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected", + " ", + ), + ci = { for: "htmlFor", class: "className", readonly: "readOnly" }, + li = { float: "cssFloat" }, + fi = {}, + di = {}, + hi = /^\s*|\s*$/g, + mi = function (e) { + return e ? (9 === e.nodeType ? e : e.ownerDocument) : ei; + }; + (Go.fn = Go.prototype = + { + constructor: Go, + selector: "", + context: null, + length: 0, + init: function (e, t) { + var n, + r, + o = this; + if (!e) return o; + if (e.nodeType) return (o.context = o[0] = e), (o.length = 1), o; + if (t && t.nodeType) o.context = t; + else { + if (t) return yi(e).attr(t); + o.context = t = j.document; + } + if (Wo(e)) { + if ( + !(n = + "<" === (o.selector = e).charAt(0) && + ">" === e.charAt(e.length - 1) && + 3 <= e.length + ? [null, e, null] + : ri.exec(e)) + ) + return yi(t).find(e); + if (n[1]) + for (r = Ko(e, mi(t)).firstChild; r; ) + ti.call(o, r), (r = r.nextSibling); + else { + if (!(r = mi(t).getElementById(n[2]))) return o; + if (r.id !== n[2]) return o.find(e); + (o.length = 1), (o[0] = r); + } + } else this.add(e, !1); + return o; + }, + toArray: function () { + return Rn.toArray(this); + }, + add: function (e, t) { + var n, r; + if (Wo(e)) return this.add(yi(e)); + if (!1 !== t) + for ( + n = yi.unique(this.toArray().concat(yi.makeArray(e))), + this.length = n.length, + r = 0; + r < n.length; + r++ + ) + this[r] = n[r]; + else ti.apply(this, yi.makeArray(e)); + return this; + }, + attr: function (t, n) { + var e, + r = this; + if ("object" == typeof t) + Qo(t, function (e, t) { + r.attr(e, t); + }); + else { + if (!$o(n)) { + if (r[0] && 1 === r[0].nodeType) { + if ((e = fi[t]) && e.get) return e.get(r[0], t); + if (si[t]) return r.prop(t) ? t : undefined; + null === (n = r[0].getAttribute(t, 2)) && (n = undefined); + } + return n; + } + this.each(function () { + var e; + if (1 === this.nodeType) { + if ((e = fi[t]) && e.set) return void e.set(this, n); + null === n + ? this.removeAttribute(t, 2) + : this.setAttribute(t, n, 2); + } + }); + } + return r; + }, + removeAttr: function (e) { + return this.attr(e, null); + }, + prop: function (e, t) { + var n = this; + if ("object" == typeof (e = ci[e] || e)) + Qo(e, function (e, t) { + n.prop(e, t); + }); + else { + if (!$o(t)) return n[0] && n[0].nodeType && e in n[0] ? n[0][e] : t; + this.each(function () { + 1 === this.nodeType && (this[e] = t); + }); + } + return n; + }, + css: function (n, r) { + function e(e) { + return e.replace(/-(\D)/g, function (e, t) { + return t.toUpperCase(); + }); + } + function o(e) { + return e.replace(/[A-Z]/g, function (e) { + return "-" + e; + }); + } + var t, + i, + a = this; + if ("object" == typeof n) + Qo(n, function (e, t) { + a.css(e, t); + }); + else if ($o(r)) + (n = e(n)), + "number" != typeof r || ui[n] || (r = r.toString() + "px"), + a.each(function () { + var e = this.style; + if ((i = di[n]) && i.set) i.set(this, r); + else { + try { + this.style[li[n] || n] = r; + } catch (t) {} + (null !== r && "" !== r) || + (e.removeProperty + ? e.removeProperty(o(n)) + : e.removeAttribute(n)); + } + }); + else { + if (((t = a[0]), (i = di[n]) && i.get)) return i.get(t); + if (!t.ownerDocument.defaultView) + return t.currentStyle ? t.currentStyle[e(n)] : ""; + try { + return t.ownerDocument.defaultView + .getComputedStyle(t, null) + .getPropertyValue(o(n)); + } catch (u) { + return undefined; + } + } + return a; + }, + remove: function () { + for (var e, t = this.length; t--; ) + (e = this[t]), + oi.clean(e), + e.parentNode && e.parentNode.removeChild(e); + return this; + }, + empty: function () { + for (var e, t = this.length; t--; ) + for (e = this[t]; e.firstChild; ) e.removeChild(e.firstChild); + return this; + }, + html: function (e) { + var t, + n = this; + if ($o(e)) { + t = n.length; + try { + for (; t--; ) n[t].innerHTML = e; + } catch (r) { + yi(n[t]).empty().append(e); + } + return n; + } + return n[0] ? n[0].innerHTML : ""; + }, + text: function (e) { + var t; + if ($o(e)) { + for (t = this.length; t--; ) + "innerText" in this[t] + ? (this[t].innerText = e) + : (this[0].textContent = e); + return this; + } + return this[0] ? this[0].innerText || this[0].textContent : ""; + }, + append: function () { + return ai(this, arguments, function (e) { + (1 === this.nodeType || (this.host && 1 === this.host.nodeType)) && + this.appendChild(e); + }); + }, + prepend: function () { + return ai( + this, + arguments, + function (e) { + (1 === this.nodeType || (this.host && 1 === this.host.nodeType)) && + this.insertBefore(e, this.firstChild); + }, + !0, + ); + }, + before: function () { + return this[0] && this[0].parentNode + ? ai(this, arguments, function (e) { + this.parentNode.insertBefore(e, this); + }) + : this; + }, + after: function () { + return this[0] && this[0].parentNode + ? ai( + this, + arguments, + function (e) { + this.parentNode.insertBefore(e, this.nextSibling); + }, + !0, + ) + : this; + }, + appendTo: function (e) { + return yi(e).append(this), this; + }, + prependTo: function (e) { + return yi(e).prepend(this), this; + }, + replaceWith: function (e) { + return this.before(e).remove(); + }, + wrap: function (e) { + return Yo(this, e); + }, + wrapAll: function (e) { + return Yo(this, e, !0); + }, + wrapInner: function (e) { + return ( + this.each(function () { + yi(this).contents().wrapAll(e); + }), + this + ); + }, + unwrap: function () { + return this.parent().each(function () { + yi(this).replaceWith(this.childNodes); + }); + }, + clone: function () { + var e = []; + return ( + this.each(function () { + e.push(this.cloneNode(!0)); + }), + yi(e) + ); + }, + addClass: function (e) { + return this.toggleClass(e, !0); + }, + removeClass: function (e) { + return this.toggleClass(e, !1); + }, + toggleClass: function (o, i) { + var e = this; + return ( + "string" != typeof o || + (-1 !== o.indexOf(" ") + ? Qo(o.split(" "), function () { + e.toggleClass(this, i); + }) + : e.each(function (e, t) { + var n, r; + (r = Xo(t, o)) !== i && + ((n = t.className), + r + ? (t.className = Jo( + (" " + n + " ").replace(" " + o + " ", " "), + )) + : (t.className += n ? " " + o : o)); + })), + e + ); + }, + hasClass: function (e) { + return Xo(this[0], e); + }, + each: function (e) { + return Qo(this, e); + }, + on: function (e, t) { + return this.each(function () { + oi.bind(this, e, t); + }); + }, + off: function (e, t) { + return this.each(function () { + oi.unbind(this, e, t); + }); + }, + trigger: function (e) { + return this.each(function () { + "object" == typeof e ? oi.fire(this, e.type, e) : oi.fire(this, e); + }); + }, + show: function () { + return this.css("display", ""); + }, + hide: function () { + return this.css("display", "none"); + }, + slice: function () { + return new yi(ni.apply(this, arguments)); + }, + eq: function (e) { + return -1 === e ? this.slice(e) : this.slice(e, +e + 1); + }, + first: function () { + return this.eq(0); + }, + last: function () { + return this.eq(-1); + }, + find: function (e) { + var t, + n, + r = []; + for (t = 0, n = this.length; t < n; t++) yi.find(e, this[t], r); + return yi(r); + }, + filter: function (n) { + return yi( + "function" == typeof n + ? Zo(this.toArray(), function (e, t) { + return n(t, e); + }) + : yi.filter(n, this.toArray()), + ); + }, + closest: function (n) { + var r = []; + return ( + n instanceof yi && (n = n[0]), + this.each(function (e, t) { + for (; t; ) { + if ("string" == typeof n && yi(t).is(n)) { + r.push(t); + break; + } + if (t === n) { + r.push(t); + break; + } + t = t.parentNode; + } + }), + yi(r) + ); + }, + offset: function (e) { + var t, + n, + r, + o, + i = 0, + a = 0; + return e + ? this.css(e) + : ((t = this[0]) && + ((r = (n = t.ownerDocument).documentElement), + t.getBoundingClientRect && + ((i = + (o = t.getBoundingClientRect()).left + + (r.scrollLeft || n.body.scrollLeft) - + r.clientLeft), + (a = o.top + (r.scrollTop || n.body.scrollTop) - r.clientTop))), + { left: i, top: a }); + }, + push: ti, + sort: Array.prototype.sort, + splice: Array.prototype.splice, + }), + Rn.extend(Go, { + extend: Rn.extend, + makeArray: function (e) { + return (function (e) { + return e && e === e.window; + })(e) || e.nodeType + ? [e] + : Rn.toArray(e); + }, + inArray: function (e, t) { + var n; + if (t.indexOf) return t.indexOf(e); + for (n = t.length; n--; ) if (t[n] === e) return n; + return -1; + }, + isArray: Rn.isArray, + each: Qo, + trim: Jo, + grep: Zo, + find: Mo, + expr: Mo.selectors, + unique: Mo.uniqueSort, + text: Mo.getText, + contains: Mo.contains, + filter: function (e, t, n) { + var r = t.length; + for (n && (e = ":not(" + e + ")"); r--; ) + 1 !== t[r].nodeType && t.splice(r, 1); + return (t = + 1 === t.length + ? yi.find.matchesSelector(t[0], e) + ? [t[0]] + : [] + : yi.find.matches(e, t)); + }, + }); + function gi(e, t, n) { + var r = [], + o = e[t]; + for ( + "string" != typeof n && n instanceof yi && (n = n[0]); + o && 9 !== o.nodeType; + + ) { + if (n !== undefined) { + if (o === n) break; + if ("string" == typeof n && yi(o).is(n)) break; + } + 1 === o.nodeType && r.push(o), (o = o[t]); + } + return r; + } + function pi(e, t, n, r) { + var o = []; + for (r instanceof yi && (r = r[0]); e; e = e[t]) + if (!n || e.nodeType === n) { + if (r !== undefined) { + if (e === r) break; + if ("string" == typeof r && yi(e).is(r)) break; + } + o.push(e); + } + return o; + } + function vi(e, t, n) { + for (e = e[t]; e; e = e[t]) if (e.nodeType === n) return e; + return null; + } + Qo( + { + parent: function (e) { + var t = e.parentNode; + return t && 11 !== t.nodeType ? t : null; + }, + parents: function (e) { + return gi(e, "parentNode"); + }, + next: function (e) { + return vi(e, "nextSibling", 1); + }, + prev: function (e) { + return vi(e, "previousSibling", 1); + }, + children: function (e) { + return pi(e.firstChild, "nextSibling", 1); + }, + contents: function (e) { + return Rn.toArray( + ("iframe" === e.nodeName + ? e.contentDocument || e.contentWindow.document + : e + ).childNodes, + ); + }, + }, + function (r, o) { + Go.fn[r] = function (t) { + var n = []; + this.each(function () { + var e = o.call(n, this, t, n); + e && (yi.isArray(e) ? n.push.apply(n, e) : n.push(e)); + }), + 1 < this.length && + (ii[r] || (n = yi.unique(n)), + 0 === r.indexOf("parents") && (n = n.reverse())); + var e = yi(n); + return t ? e.filter(t) : e; + }; + }, + ), + Qo( + { + parentsUntil: function (e, t) { + return gi(e, "parentNode", t); + }, + nextUntil: function (e, t) { + return pi(e, "nextSibling", 1, t).slice(1); + }, + prevUntil: function (e, t) { + return pi(e, "previousSibling", 1, t).slice(1); + }, + }, + function (o, i) { + Go.fn[o] = function (t, e) { + var n = []; + this.each(function () { + var e = i.call(n, this, t, n); + e && (yi.isArray(e) ? n.push.apply(n, e) : n.push(e)); + }), + 1 < this.length && + ((n = yi.unique(n)), + (0 !== o.indexOf("parents") && "prevUntil" !== o) || + (n = n.reverse())); + var r = yi(n); + return e ? r.filter(e) : r; + }; + }, + ), + (Go.fn.is = function (e) { + return !!e && 0 < this.filter(e).length; + }), + (Go.fn.init.prototype = Go.fn), + (Go.overrideDefaults = function (n) { + var r, + o = function (e, t) { + return ( + (r = r || n()), + 0 === arguments.length && (e = r.element), + (t = t || r.context), + new o.fn.init(e, t) + ); + }; + return yi.extend(o, this), o; + }), + (Go.attrHooks = fi), + (Go.cssHooks = di); + var yi = Go, + bi = + ((Ci.prototype.current = function () { + return this.node; + }), + (Ci.prototype.next = function (e) { + return ( + (this.node = this.findSibling( + this.node, + "firstChild", + "nextSibling", + e, + )), + this.node + ); + }), + (Ci.prototype.prev = function (e) { + return ( + (this.node = this.findSibling( + this.node, + "lastChild", + "previousSibling", + e, + )), + this.node + ); + }), + (Ci.prototype.prev2 = function (e) { + return ( + (this.node = this.findPreviousNode( + this.node, + "lastChild", + "previousSibling", + e, + )), + this.node + ); + }), + (Ci.prototype.findSibling = function (e, t, n, r) { + var o, i; + if (e) { + if (!r && e[t]) return e[t]; + if (e !== this.rootNode) { + if ((o = e[n])) return o; + for (i = e.parentNode; i && i !== this.rootNode; i = i.parentNode) + if ((o = i[n])) return o; + } + } + }), + (Ci.prototype.findPreviousNode = function (e, t, n, r) { + var o, i, a; + if (e) { + if (((o = e[n]), this.rootNode && o === this.rootNode)) return; + if (o) { + if (!r) for (a = o[t]; a; a = a[t]) if (!a[t]) return a; + return o; + } + if ((i = e.parentNode) && i !== this.rootNode) return i; + } + }), + Ci); + function Ci(e, t) { + (this.node = e), + (this.rootNode = t), + (this.current = this.current.bind(this)), + (this.next = this.next.bind(this)), + (this.prev = this.prev.bind(this)), + (this.prev2 = this.prev2.bind(this)); + } + function wi(t, n) { + Se(t).each(function (e) { + e.dom().insertBefore(n.dom(), t.dom()); + }); + } + function xi(e, t) { + Te(e).fold( + function () { + Se(e).each(function (e) { + _i(e, t); + }); + }, + function (e) { + wi(e, t); + }, + ); + } + function zi(t, n) { + _e(t).fold( + function () { + _i(t, n); + }, + function (e) { + t.dom().insertBefore(n.dom(), e.dom()); + }, + ); + } + function Ei(t, e) { + z(e, function (e) { + _i(t, e); + }); + } + function Ni(e) { + (e.dom().textContent = ""), + z(Re(e), function (e) { + Oi(e); + }); + } + function Si(e) { + var t = Re(e); + 0 < t.length && + (function (t, e) { + z(e, function (e) { + wi(t, e); + }); + })(e, t), + Oi(e); + } + function ki(e, t) { + return e !== undefined ? e : t !== undefined ? t : 0; + } + function Ti(e) { + var t = e !== undefined ? e.dom() : j.document, + n = t.body.scrollLeft || t.documentElement.scrollLeft, + r = t.body.scrollTop || t.documentElement.scrollTop; + return Hi(n, r); + } + function Ai(e, t, n) { + (n !== undefined ? n.dom() : j.document).defaultView.scrollTo(e, t); + } + function Mi(e, t) { + Li && D(e.dom().scrollIntoViewIfNeeded) + ? e.dom().scrollIntoViewIfNeeded(!1) + : e.dom().scrollIntoView(t); + } + function Ri(e, t, n, r) { + return { + x: $(e), + y: $(t), + width: $(n), + height: $(r), + right: $(e + n), + bottom: $(t + r), + }; + } + var Di, + _i = function (e, t) { + e.dom().appendChild(t.dom()); + }, + Oi = function (e) { + var t = e.dom(); + null !== t.parentNode && t.parentNode.removeChild(t); + }, + Bi = function (n, r) { + return { + left: $(n), + top: $(r), + translate: function (e, t) { + return Bi(n + e, r + t); + }, + }; + }, + Hi = Bi, + Pi = function (e) { + var t = e.dom(), + n = t.ownerDocument.body; + return n === t + ? Hi(n.offsetLeft, n.offsetTop) + : de(e) + ? (function (e) { + var t = e.getBoundingClientRect(); + return Hi(t.left, t.top); + })(t) + : Hi(0, 0); + }, + Li = oe().browser.isSafari(), + Vi = function (e) { + var t = e === undefined ? j.window : e, + n = t.document, + r = Ti(bt.fromDom(n)), + o = t.visualViewport; + if (o !== undefined) + return Ri( + Math.max(o.pageLeft, r.left()), + Math.max(o.pageTop, r.top()), + o.width, + o.height, + ); + var i = n.documentElement, + a = i.clientWidth, + u = i.clientHeight; + return Ri(r.left(), r.top(), a, u); + }, + Ii = Rn.each, + Fi = Rn.grep, + Ui = Sn.ie, + ji = /^([a-z0-9],?)+$/i, + qi = /^[ \t\r\n]*$/, + $i = function (n, r, o) { + var i = r.keep_values, + e = { + set: function (e, t, n) { + r.url_converter && + (t = r.url_converter.call( + r.url_converter_scope || o(), + t, + n, + e[0], + )), + e.attr("data-mce-" + n, t).attr(n, t); + }, + get: function (e, t) { + return e.attr("data-mce-" + t) || e.attr(t); + }, + }, + t = { + style: { + set: function (e, t) { + null === t || "object" != typeof t + ? (i && e.attr("data-mce-style", t), e.attr("style", t)) + : e.css(t); + }, + get: function (e) { + var t = e.attr("data-mce-style") || e.attr("style"); + return (t = n.serialize(n.parse(t), e[0].nodeName)); + }, + }, + }; + return i && (t.href = t.src = e), t; + }, + Wi = function (e, t) { + var n = t.attr("style"), + r = e.serialize(e.parse(n), t[0].nodeName); + (r = r || null), t.attr("data-mce-style", r); + }, + Ki = function (e, t) { + var n, + r, + o = 0; + if (e) + for (n = e.nodeType, e = e.previousSibling; e; e = e.previousSibling) + (r = e.nodeType), + (!t || 3 !== r || (r !== n && e.nodeValue.length)) && + (o++, (n = r)); + return o; + }; + function Xi(a, u) { + var s, + c = this; + void 0 === u && (u = {}); + function l(e) { + if (e && a && "string" == typeof e) { + var t = a.getElementById(e); + return t && t.id !== e ? a.getElementsByName(e)[1] : t; + } + return e; + } + function f(e) { + return "string" == typeof e && (e = l(e)), H(e); + } + function r(e, t, n) { + var r, + o, + i = f(e); + return ( + i.length && (o = (r = s[t]) && r.get ? r.get(i, t) : i.attr(t)), + void 0 === o && (o = n || ""), + o + ); + } + function d(e) { + var t = l(e); + return t ? t.attributes : []; + } + function o(e, t, n) { + var r, o; + "" === n && (n = null); + var i = f(e); + (r = i.attr(t)), + i.length && + ((o = s[t]) && o.set ? o.set(i, n, t) : i.attr(t, n), + r !== n && + u.onSetAttrib && + u.onSetAttrib({ attrElm: i, attrName: t, attrValue: n })); + } + function h() { + return u.root_element || a.body; + } + function i(e, t) { + return Pt.getPos(a.body, l(e), t); + } + function m(e, t, n) { + var r = f(e); + return n + ? r.css(t) + : ("float" === + (t = t.replace(/-(\D)/g, function (e, t) { + return t.toUpperCase(); + })) && (t = Sn.browser.isIE() ? "styleFloat" : "cssFloat"), + r[0] && r[0].style ? r[0].style[t] : undefined); + } + function g(e) { + var t, n; + return ( + (e = l(e)), + (t = m(e, "width")), + (n = m(e, "height")), + -1 === t.indexOf("px") && (t = 0), + -1 === n.indexOf("px") && (n = 0), + { + w: parseInt(t, 10) || e.offsetWidth || e.clientWidth, + h: parseInt(n, 10) || e.offsetHeight || e.clientHeight, + } + ); + } + function p(e, t) { + var n; + if (!e) return !1; + if (!Array.isArray(e)) { + if ("*" === t) return 1 === e.nodeType; + if (ji.test(t)) { + var r = t.toLowerCase().split(/,/), + o = e.nodeName.toLowerCase(); + for (n = r.length - 1; 0 <= n; n--) if (r[n] === o) return !0; + return !1; + } + if (e.nodeType && 1 !== e.nodeType) return !1; + } + var i = Array.isArray(e) ? e : [e]; + return 0 < Mo(t, i[0].ownerDocument || i[0], null, i).length; + } + function v(e, t, n, r) { + var o, + i = [], + a = l(e); + for ( + r = r === undefined, + n = n || ("BODY" !== h().nodeName ? h().parentNode : null), + Rn.is(t, "string") && + (t = + "*" === (o = t) + ? function (e) { + return 1 === e.nodeType; + } + : function (e) { + return p(e, o); + }); + a && a !== n && a.nodeType && 9 !== a.nodeType; + + ) { + if (!t || ("function" == typeof t && t(a))) { + if (!r) return [a]; + i.push(a); + } + a = a.parentNode; + } + return r ? i : null; + } + function n(e, t, n) { + var r = t; + if (e) + for ( + "string" == typeof t && + (r = function (e) { + return p(e, t); + }), + e = e[n]; + e; + e = e[n] + ) + if ("function" == typeof r && r(e)) return e; + return null; + } + function y(e, n, r) { + var o, + t = "string" == typeof e ? l(e) : e; + if (!t) return !1; + if (Rn.isArray(t) && (t.length || 0 === t.length)) + return ( + (o = []), + Ii(t, function (e, t) { + e && ("string" == typeof e && (e = l(e)), o.push(n.call(r, e, t))); + }), + o + ); + var i = r || c; + return n.call(i, t); + } + function b(e, t) { + f(e).each(function (e, n) { + Ii(t, function (e, t) { + o(n, t, e); + }); + }); + } + function C(e, r) { + var t = f(e); + Ui + ? t.each(function (e, t) { + if (!1 !== t.canHaveHTML) { + for (; t.firstChild; ) t.removeChild(t.firstChild); + try { + (t.innerHTML = "
" + r), t.removeChild(t.firstChild); + } catch (n) { + yi("
") + .html("
" + r) + .contents() + .slice(1) + .appendTo(t); + } + return r; + } + }) + : t.html(r); + } + function w(e, n, r, o, i) { + return y(e, function (e) { + var t = "string" == typeof n ? a.createElement(n) : n; + return ( + b(t, r), + o && + ("string" != typeof o && o.nodeType + ? t.appendChild(o) + : "string" == typeof o && C(t, o)), + i ? t : e.appendChild(t) + ); + }); + } + function x(e, t, n) { + return w(a.createElement(e), e, t, n, !0); + } + function z(e, t) { + var n = f(e); + return ( + t + ? n + .each(function () { + for (var e; (e = this.firstChild); ) + 3 === e.nodeType && 0 === e.data.length + ? this.removeChild(e) + : this.parentNode.insertBefore(e, this); + }) + .remove() + : n.remove(), + 1 < n.length ? n.toArray() : n[0] + ); + } + function E(e, t, n) { + f(e) + .toggleClass(t, n) + .each(function () { + "" === this.className && yi(this).attr("class", null); + }); + } + function N(t, e, n) { + return y(e, function (e) { + return ( + Rn.is(e, "array") && (t = t.cloneNode(!0)), + n && + Ii(Fi(e.childNodes), function (e) { + t.appendChild(e); + }), + e.parentNode.replaceChild(t, e) + ); + }); + } + function S() { + return a.createRange(); + } + function k(e) { + if (e && Ge.isElement(e)) { + var t = e.getAttribute("data-mce-contenteditable"); + return t && "inherit" !== t + ? t + : "inherit" !== e.contentEditable + ? e.contentEditable + : null; + } + return null; + } + var T = {}, + A = j.window, + M = {}, + t = 0, + e = (function U(m, g) { + void 0 === g && (g = {}); + var p, + v = 0, + y = {}; + function b(e) { + m.getElementsByTagName("head")[0].appendChild(e); + } + function n(e, t, n) { + function r(e) { + (l.status = e), + (l.passed = []), + (l.failed = []), + u && ((u.onload = null), (u.onerror = null), (u = null)); + } + function o() { + for (var e = l.passed, t = e.length; t--; ) e[t](); + r(2); + } + function i() { + for (var e = l.failed, t = e.length; t--; ) e[t](); + r(3); + } + function a(e, t) { + e() || (new Date().getTime() - c < p ? vn.setTimeout(t) : i()); + } + var u, + s, + c, + l, + f = function () { + a(function () { + for (var e, t, n = m.styleSheets, r = n.length; r--; ) + if ( + (t = (e = n[r]).ownerNode + ? e.ownerNode + : e.owningElement) && + t.id === u.id + ) + return o(), !0; + }, f); + }, + d = function () { + a(function () { + try { + var e = s.sheet.cssRules; + return o(), !!e; + } catch (t) {} + }, d); + }; + if ( + ((e = Rn._addCacheSuffix(e)), + y[e] ? (l = y[e]) : ((l = { passed: [], failed: [] }), (y[e] = l)), + t && l.passed.push(t), + n && l.failed.push(n), + 1 !== l.status) + ) + if (2 !== l.status) + if (3 !== l.status) { + if ( + ((l.status = 1), + ((u = m.createElement("link")).rel = "stylesheet"), + (u.type = "text/css"), + (u.id = "u" + v++), + (u.async = !1), + (u.defer = !1), + (c = new Date().getTime()), + g.contentCssCors && (u.crossOrigin = "anonymous"), + g.referrerPolicy && + At(bt.fromDom(u), "referrerpolicy", g.referrerPolicy), + "onload" in u && + !( + (h = j.navigator.userAgent.match(/WebKit\/(\d*)/)) && + parseInt(h[1], 10) < 536 + )) + ) + (u.onload = f), (u.onerror = i); + else { + if (0 < j.navigator.userAgent.indexOf("Firefox")) + return ( + ((s = m.createElement("style")).textContent = + '@import "' + e + '"'), + d(), + void b(s) + ); + f(); + } + var h; + b(u), (u.href = e); + } else i(); + else o(); + } + function t(t) { + return Yt.nu(function (e) { + n(t, q(e, $(Zt.value(t))), q(e, $(Zt.error(t)))); + }); + } + function o(e) { + return e.fold(W, W); + } + return ( + (p = g.maxLoadTime || 5e3), + { + load: n, + loadAll: function (e, n, r) { + Gt(X(e, t)).get(function (e) { + var t = Y(e, function (e) { + return e.isValue(); + }); + 0 < t.fail.length ? r(t.fail.map(o)) : n(t.pass.map(o)); + }); + }, + _setReferrerPolicy: function (e) { + g.referrerPolicy = e; + }, + } + ); + })(a, { + contentCssCors: u.contentCssCors, + referrerPolicy: u.referrerPolicy, + }), + R = [], + D = u.schema ? u.schema : vr({}), + _ = zr( + { + url_converter: u.url_converter, + url_converter_scope: u.url_converter_scope, + }, + u.schema, + ), + O = u.ownEvents ? new Tr() : Tr.Event, + B = D.getBlockElements(), + H = yi.overrideDefaults(function () { + return { context: a, element: F.getRoot() }; + }), + P = ar.decode, + L = ar.encodeAllRaw, + V = function (e, t, n, r) { + if (Rn.isArray(e)) { + for (var o = e.length, i = []; o--; ) i[o] = V(e[o], t, n, r); + return i; + } + return ( + !u.collect || (e !== a && e !== A) || R.push([e, t, n, r]), + O.bind(e, t, n, r || F) + ); + }, + I = function (e, t, n) { + var r; + if (Rn.isArray(e)) { + r = e.length; + for (var o = []; r--; ) o[r] = I(e[r], t, n); + return o; + } + if (R && (e === a || e === A)) + for (r = R.length; r--; ) { + var i = R[r]; + e !== i[0] || + (t && t !== i[1]) || + (n && n !== i[2]) || + O.unbind(i[0], i[1], i[2]); + } + return O.unbind(e, t, n); + }, + F = { + doc: a, + settings: u, + win: A, + files: M, + stdMode: !0, + boxModel: !0, + styleSheetLoader: e, + boundEvents: R, + styles: _, + schema: D, + events: O, + isBlock: function (e) { + if ("string" == typeof e) return !!B[e]; + if (e) { + var t = e.nodeType; + if (t) return !(1 !== t || !B[e.nodeName]); + } + return !1; + }, + $: H, + $$: f, + root: null, + clone: function (t, e) { + if (!Ui || 1 !== t.nodeType || e) return t.cloneNode(e); + if (e) return null; + var n = a.createElement(t.nodeName); + return ( + Ii(d(t), function (e) { + o(n, e.nodeName, r(t, e.nodeName)); + }), + n + ); + }, + getRoot: h, + getViewPort: function (e) { + var t = Vi(e); + return { x: t.x(), y: t.y(), w: t.width(), h: t.height() }; + }, + getRect: function (e) { + var t, n; + return ( + (e = l(e)), + (t = i(e)), + (n = g(e)), + { x: t.x, y: t.y, w: n.w, h: n.h } + ); + }, + getSize: g, + getParent: function (e, t, n) { + var r = v(e, t, n, !1); + return r && 0 < r.length ? r[0] : null; + }, + getParents: v, + get: l, + getNext: function (e, t) { + return n(e, t, "nextSibling"); + }, + getPrev: function (e, t) { + return n(e, t, "previousSibling"); + }, + select: function (e, t) { + return Mo(e, l(t) || u.root_element || a, []); + }, + is: p, + add: w, + create: x, + createHTML: function (e, t, n) { + var r, + o = ""; + for (r in ((o += "<" + e), t)) + t.hasOwnProperty(r) && + null !== t[r] && + "undefined" != typeof t[r] && + (o += " " + r + '="' + L(t[r]) + '"'); + return void 0 !== n ? o + ">" + n + "" : o + " />"; + }, + createFragment: function (e) { + var t, + n = a.createElement("div"), + r = a.createDocumentFragment(); + for (e && (n.innerHTML = e); (t = n.firstChild); ) r.appendChild(t); + return r; + }, + remove: z, + setStyle: function (e, t, n) { + var r = K(t) ? f(e).css(t, n) : f(e).css(t); + u.update_styles && Wi(_, r); + }, + getStyle: m, + setStyles: function (e, t) { + var n = f(e).css(t); + u.update_styles && Wi(_, n); + }, + removeAllAttribs: function (e) { + return y(e, function (e) { + var t, + n = e.attributes; + for (t = n.length - 1; 0 <= t; t--) + e.removeAttributeNode(n.item(t)); + }); + }, + setAttrib: o, + setAttribs: b, + getAttrib: r, + getPos: i, + parseStyle: function (e) { + return _.parse(e); + }, + serializeStyle: function (e, t) { + return _.serialize(e, t); + }, + addStyle: function (e) { + var t, n; + if (F !== Xi.DOM && a === j.document) { + if (T[e]) return; + T[e] = !0; + } + (n = a.getElementById("mceDefaultStyles")) || + (((n = a.createElement("style")).id = "mceDefaultStyles"), + (n.type = "text/css"), + (t = a.getElementsByTagName("head")[0]).firstChild + ? t.insertBefore(n, t.firstChild) + : t.appendChild(n)), + n.styleSheet + ? (n.styleSheet.cssText += e) + : n.appendChild(a.createTextNode(e)); + }, + loadCSS: function (e) { + var n; + F === Xi.DOM || a !== j.document + ? ((e = e || ""), + (n = a.getElementsByTagName("head")[0]), + Ii(e.split(","), function (e) { + var t; + (e = Rn._addCacheSuffix(e)), + M[e] || + ((M[e] = !0), + (t = x( + "link", + G( + G( + { rel: "stylesheet", type: "text/css", href: e }, + u.contentCssCors ? { crossOrigin: "anonymous" } : {}, + ), + u.referrerPolicy + ? { referrerPolicy: u.referrerPolicy } + : {}, + ), + )), + n.appendChild(t)); + })) + : Xi.DOM.loadCSS(e); + }, + addClass: function (e, t) { + f(e).addClass(t); + }, + removeClass: function (e, t) { + E(e, t, !1); + }, + hasClass: function (e, t) { + return f(e).hasClass(t); + }, + toggleClass: E, + show: function (e) { + f(e).show(); + }, + hide: function (e) { + f(e).hide(); + }, + isHidden: function (e) { + return "none" === f(e).css("display"); + }, + uniqueId: function (e) { + return (e || "mce_") + t++; + }, + setHTML: C, + getOuterHTML: function (e) { + var t = "string" == typeof e ? l(e) : e; + return Ge.isElement(t) + ? t.outerHTML + : yi("
").append(yi(t).clone()).html(); + }, + setOuterHTML: function (e, t) { + f(e).each(function () { + try { + if ("outerHTML" in this) return void (this.outerHTML = t); + } catch (e) {} + z(yi(this).html(t), !0); + }); + }, + decode: P, + encode: L, + insertAfter: function (e, t) { + var r = l(t); + return y(e, function (e) { + var t, n; + return ( + (t = r.parentNode), + (n = r.nextSibling) ? t.insertBefore(e, n) : t.appendChild(e), + e + ); + }); + }, + replace: N, + rename: function (t, e) { + var n; + return ( + t.nodeName !== e.toUpperCase() && + ((n = x(e)), + Ii(d(t), function (e) { + o(n, e.nodeName, r(t, e.nodeName)); + }), + N(n, t, !0)), + n || t + ); + }, + findCommonAncestor: function (e, t) { + for (var n, r = e; r; ) { + for (n = t; n && r !== n; ) n = n.parentNode; + if (r === n) break; + r = r.parentNode; + } + return !r && e.ownerDocument ? e.ownerDocument.documentElement : r; + }, + toHex: function (e) { + return _.toHex(Rn.trim(e)); + }, + run: y, + getAttribs: d, + isEmpty: function (e, t) { + var n, + r, + o, + i, + a = 0; + if ((e = e.firstChild)) { + var u = new bi(e, e.parentNode), + s = D ? D.getWhiteSpaceElements() : {}; + t = t || (D ? D.getNonEmptyElements() : null); + do { + if (((o = e.nodeType), Ge.isElement(e))) { + var c = e.getAttribute("data-mce-bogus"); + if (c) { + e = u.next("all" === c); + continue; + } + if (((i = e.nodeName.toLowerCase()), t && t[i])) { + if ("br" !== i) return !1; + a++, (e = u.next()); + continue; + } + for (n = (r = d(e)).length; n--; ) + if ( + "name" === (i = r[n].nodeName) || + "data-mce-bookmark" === i + ) + return !1; + } + if (8 === o) return !1; + if (3 === o && !qi.test(e.nodeValue)) return !1; + if ( + 3 === o && + e.parentNode && + s[e.parentNode.nodeName] && + qi.test(e.nodeValue) + ) + return !1; + e = u.next(); + } while (e); + } + return a <= 1; + }, + createRng: S, + nodeIndex: Ki, + split: function (e, t, n) { + var r, + o, + i, + a = S(); + if (e && t) + return ( + a.setStart(e.parentNode, Ki(e)), + a.setEnd(t.parentNode, Ki(t)), + (r = a.extractContents()), + (a = S()).setStart(t.parentNode, Ki(t) + 1), + a.setEnd(e.parentNode, Ki(e) + 1), + (o = a.extractContents()), + (i = e.parentNode).insertBefore(Yn.trimNode(F, r), e), + n ? i.insertBefore(n, e) : i.insertBefore(t, e), + i.insertBefore(Yn.trimNode(F, o), e), + z(e), + n || t + ); + }, + bind: V, + unbind: I, + fire: function (e, t, n) { + return O.fire(e, t, n); + }, + getContentEditable: k, + getContentEditableParent: function (e) { + for ( + var t = h(), n = null; + e && e !== t && null === (n = k(e)); + e = e.parentNode + ); + return n; + }, + destroy: function () { + if (R) + for (var e = R.length; e--; ) { + var t = R[e]; + O.unbind(t[0], t[1], t[2]); + } + Mo.setDocument && Mo.setDocument(); + }, + isChildOf: function (e, t) { + for (; e; ) { + if (t === e) return !0; + e = e.parentNode; + } + return !1; + }, + dumpRng: function (e) { + return ( + "startContainer: " + + e.startContainer.nodeName + + ", startOffset: " + + e.startOffset + + ", endContainer: " + + e.endContainer.nodeName + + ", endOffset: " + + e.endOffset + ); + }, + }; + return ( + (s = $i(_, u, function () { + return F; + })), + F + ); + } + ((Di = Xi = Xi || {}).DOM = Di(j.document)), (Di.nodeIndex = Ki); + var Yi = Xi, + Gi = Yi.DOM, + Ji = Rn.each, + Qi = Rn.grep, + Zi = + ((ea.prototype._setReferrerPolicy = function (e) { + this.settings.referrerPolicy = e; + }), + (ea.prototype.loadScript = function (e, t, n) { + var r, + o, + i = Gi; + (o = i.uniqueId()), + ((r = j.document.createElement("script")).id = o), + (r.type = "text/javascript"), + (r.src = Rn._addCacheSuffix(e)), + this.settings.referrerPolicy && + i.setAttrib(r, "referrerpolicy", this.settings.referrerPolicy), + (r.onload = function () { + i.remove(o), r && (r.onreadystatechange = r.onload = r = null), t(); + }), + (r.onerror = function () { + D(n) + ? n() + : "undefined" != typeof j.console && + j.console.log && + j.console.log("Failed to load script: " + e); + }), + ( + j.document.getElementsByTagName("head")[0] || j.document.body + ).appendChild(r); + }), + (ea.prototype.isDone = function (e) { + return 2 === this.states[e]; + }), + (ea.prototype.markDone = function (e) { + this.states[e] = 2; + }), + (ea.prototype.add = function (e, t, n, r) { + this.states[e] === undefined && + (this.queue.push(e), (this.states[e] = 0)), + t && + (this.scriptLoadedCallbacks[e] || + (this.scriptLoadedCallbacks[e] = []), + this.scriptLoadedCallbacks[e].push({ + success: t, + failure: r, + scope: n || this, + })); + }), + (ea.prototype.load = function (e, t, n, r) { + return this.add(e, t, n, r); + }), + (ea.prototype.remove = function (e) { + delete this.states[e], delete this.scriptLoadedCallbacks[e]; + }), + (ea.prototype.loadQueue = function (e, t, n) { + this.loadScripts(this.queue, e, t, n); + }), + (ea.prototype.loadScripts = function (n, e, t, r) { + function o(t, e) { + Ji(a.scriptLoadedCallbacks[e], function (e) { + D(e[t]) && e[t].call(e.scope); + }), + (a.scriptLoadedCallbacks[e] = undefined); + } + var i, + a = this, + u = []; + a.queueLoadedCallbacks.push({ + success: e, + failure: r, + scope: t || this, + }), + (i = function () { + var e = Qi(n); + if ( + ((n.length = 0), + Ji(e, function (e) { + 2 !== a.states[e] + ? 3 !== a.states[e] + ? 1 !== a.states[e] && + ((a.states[e] = 1), + a.loading++, + a.loadScript( + e, + function () { + (a.states[e] = 2), a.loading--, o("success", e), i(); + }, + function () { + (a.states[e] = 3), + a.loading--, + u.push(e), + o("failure", e), + i(); + }, + )) + : o("failure", e) + : o("success", e); + }), + !a.loading) + ) { + var t = a.queueLoadedCallbacks.slice(0); + (a.queueLoadedCallbacks.length = 0), + Ji(t, function (e) { + 0 === u.length + ? D(e.success) && e.success.call(e.scope) + : D(e.failure) && e.failure.call(e.scope, u); + }); + } + })(); + }), + (ea.ScriptLoader = new ea()), + ea); + function ea(e) { + void 0 === e && (e = {}), + (this.states = {}), + (this.queue = []), + (this.scriptLoadedCallbacks = {}), + (this.queueLoadedCallbacks = []), + (this.loading = 0), + (this.settings = e); + } + var ta, + na = {}, + ra = Je("en"), + oa = { + getData: function () { + return se(na, function (e) { + return G({}, e); + }); + }, + setCode: function (e) { + e && ra.set(e); + }, + getCode: function () { + return ra.get(); + }, + add: function (e, t) { + var n = na[e]; + for (var r in (n || (na[e] = n = {}), t)) n[r.toLowerCase()] = t[r]; + }, + translate: function (e) { + function r(e) { + return D(e) ? Object.prototype.toString.call(e) : a(e) ? "" : "" + e; + } + function t(e) { + var t = r(e), + n = t.toLowerCase(); + return Tt(i, n) ? r(i[n]) : t; + } + function n(e) { + return e.replace(/{context:\w+}$/, ""); + } + function o(e) { + return e; + } + var i = na[ra.get()] || {}, + a = function (e) { + return "" === e || null === e || e === undefined; + }; + if (a(e)) return o(""); + if ( + (function (e) { + return T(e) && Tt(e, "raw"); + })(e) + ) + return o(r(e.raw)); + if ( + (function (e) { + return A(e) && 1 < e.length; + })(e) + ) { + var u = e.slice(1); + return o( + n( + t(e[0]).replace(/\{([0-9]+)\}/g, function (e, t) { + return Tt(u, t) ? r(u[t]) : e; + }), + ), + ); + } + return o(n(t(e))); + }, + isRtl: function () { + return le(na, ra.get()) + .bind(function (e) { + return le(e, "_dir"); + }) + .exists(function (e) { + return "rtl" === e; + }); + }, + hasCode: function (e) { + return Tt(na, e); + }, + }, + ia = Rn.each; + function aa() { + function i(e) { + var t; + return c[e] && (t = c[e].dependencies), t || []; + } + function a(e, t) { + return "object" == typeof t + ? t + : "string" == typeof e + ? { prefix: "", resource: t, suffix: "" } + : { prefix: e.prefix, resource: t, suffix: e.suffix }; + } + function u(e, n, t, r) { + var o = i(e); + ia(o, function (e) { + var t = a(n, e); + f(t.resource, t, undefined, undefined); + }), + t && (r ? t.call(r) : t.call(Zi)); + } + var r = this, + o = [], + s = {}, + c = {}, + l = [], + f = function (e, t, n, r, o) { + if (!s[e]) { + var i = "string" == typeof t ? t : t.prefix + t.resource + t.suffix; + 0 !== i.indexOf("/") && + -1 === i.indexOf("://") && + (i = aa.baseURL + "/" + i), + (s[e] = i.substring(0, i.lastIndexOf("/"))), + c[e] + ? u(e, t, n, r) + : Zi.ScriptLoader.add( + i, + function () { + return u(e, t, n, r); + }, + r, + o, + ); + } + }; + return { + items: o, + urls: s, + lookup: c, + _listeners: l, + get: function (e) { + return c[e] ? c[e].instance : undefined; + }, + dependencies: i, + requireLangPack: function (e, t) { + var n = oa.getCode(); + if (n && !1 !== aa.languageLoad) { + if (t) + if (-1 !== (t = "," + t + ",").indexOf("," + n.substr(0, 2) + ",")) + n = n.substr(0, 2); + else if (-1 === t.indexOf("," + n + ",")) return; + Zi.ScriptLoader.add(s[e] + "/langs/" + n + ".js"); + } + }, + add: function (t, e, n) { + o.push(e), (c[t] = { instance: e, dependencies: n }); + var r = Y(l, function (e) { + return e.name === t; + }); + return ( + (l = r.fail), + ia(r.pass, function (e) { + e.callback(); + }), + e + ); + }, + remove: function (e) { + delete s[e], delete c[e]; + }, + createUrl: a, + addComponents: function (e, t) { + var n = r.urls[e]; + ia(t, function (e) { + Zi.ScriptLoader.add(n + "/" + e); + }); + }, + load: f, + waitFor: function (e, t) { + c.hasOwnProperty(e) ? t() : l.push({ name: e, callback: t }); + }, + }; + } + ((ta = aa = aa || {}).PluginManager = ta()), (ta.ThemeManager = ta()); + function ua(n, r) { + var o = null; + return { + cancel: function () { + null !== o && (j.clearTimeout(o), (o = null)); + }, + throttle: function () { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; + null === o && + (o = j.setTimeout(function () { + n.apply(null, e), (o = null); + }, r)); + }, + }; + } + function sa(e, t) { + var n = ge(e, t); + return n === undefined || "" === n ? [] : n.split(" "); + } + function ca(e) { + return e.dom().classList !== undefined; + } + function la(e, t) { + return (function (e, t, n) { + var r = sa(e, t).concat([n]); + return At(e, t, r.join(" ")), !0; + })(e, "class", t); + } + function fa(e, t) { + return (function (e, t, n) { + var r = y(sa(e, t), function (e) { + return e !== n; + }); + return 0 < r.length ? At(e, t, r.join(" ")) : pe(e, t), !1; + })(e, "class", t); + } + function da(e, t) { + ca(e) ? e.dom().classList.add(t) : la(e, t); + } + function ha(e) { + 0 === + (ca(e) + ? e.dom().classList + : (function (e) { + return sa(e, "class"); + })(e) + ).length && pe(e, "class"); + } + function ma(e, t) { + return ca(e) && e.dom().classList.contains(t); + } + function ga(e, t) { + return (function (e, t) { + var n = t === undefined ? j.document : t.dom(); + return xe(n) ? [] : X(n.querySelectorAll(e), bt.fromDom); + })(t, e); + } + var pa = aa, + va = function (e, t) { + var n = []; + return ( + z(Re(e), function (e) { + t(e) && (n = n.concat([e])), (n = n.concat(va(e, t))); + }), + n + ); + }; + function ya(e, t, n, r, o) { + return e(n, r) ? k.some(n) : D(o) && o(n) ? k.none() : t(n, r, o); + } + function ba(e, t, n) { + for (var r = e.dom(), o = D(n) ? n : $(!1); r.parentNode; ) { + r = r.parentNode; + var i = bt.fromDom(r); + if (t(i)) return k.some(i); + if (o(i)) break; + } + return k.none(); + } + function Ca(e, t, n) { + return ya( + function (e, t) { + return t(e); + }, + ba, + e, + t, + n, + ); + } + function wa(e, t, n) { + return ba( + e, + function (e) { + return we(e, t); + }, + n, + ); + } + function xa(e, t) { + return (function (e, t) { + var n = t === undefined ? j.document : t.dom(); + return xe(n) ? k.none() : k.from(n.querySelector(e)).map(bt.fromDom); + })(t, e); + } + function za(e, t, n) { + return ya(we, wa, e, t, n); + } + function Ea(r, e) { + function t(e, t) { + return (function (e, t) { + var n = e.dom(); + return !(!n || !n.hasAttribute) && n.hasAttribute(t); + })(e, t) + ? k.some(ge(e, t)) + : k.none(); + } + var n = r.selection.getRng(), + o = bt.fromDom(n.startContainer), + i = bt.fromDom(r.getBody()), + a = e.fold( + function () { + return "." + ru(); + }, + function (e) { + return "[" + ou() + '="' + e + '"]'; + }, + ), + u = De(o, n.startOffset).getOr(o); + return za(u, a, function (e) { + return ze(e, i); + }).bind(function (e) { + return t(e, "" + iu()).bind(function (n) { + return t(e, "" + ou()).map(function (e) { + var t = au(r, n); + return { uid: n, name: e, elements: t }; + }); + }); + }); + } + function Na(n, e) { + function a(e, t) { + r(e, function (e) { + return t(e), e; + }); + } + var o = Je({}), + r = function (e, t) { + var n = o.get(), + r = t( + n.hasOwnProperty(e) + ? n[e] + : { listeners: [], previous: Je(k.none()) }, + ); + (n[e] = r), o.set(n); + }, + t = (function (n, r) { + var o = null; + return { + cancel: function () { + null !== o && (j.clearTimeout(o), (o = null)); + }, + throttle: function () { + for (var e = [], t = 0; t < arguments.length; t++) + e[t] = arguments[t]; + null !== o && j.clearTimeout(o), + (o = j.setTimeout(function () { + n.apply(null, e), (o = null); + }, r)); + }, + }; + })(function () { + var e = o.get(), + t = (function (e, t) { + var n = O.call(e, 0); + return n.sort(t), n; + })(Nt(e)); + z(t, function (e) { + r(e, function (o) { + var i = o.previous.get(); + return ( + Ea(n, k.some(e)).fold( + function () { + i.isSome() && + ((function (t) { + a(t, function (e) { + z(e.listeners, function (e) { + return e(!1, t); + }); + }); + })(e), + o.previous.set(k.none())); + }, + function (e) { + var t = e.uid, + n = e.name, + r = e.elements; + i.is(t) || + ((function (t, n, r) { + a(t, function (e) { + z(e.listeners, function (e) { + return e(!0, t, { + uid: n, + nodes: X(r, function (e) { + return e.dom(); + }), + }); + }); + }); + })(n, t, r), + o.previous.set(k.some(t))); + }, + ), + { previous: o.previous, listeners: o.listeners } + ); + }); + }); + }, 30); + return ( + n.on("remove", function () { + t.cancel(); + }), + n.on("NodeChange", function () { + t.throttle(); + }), + { + addListener: function (e, t) { + r(e, function (e) { + return { previous: e.previous, listeners: e.listeners.concat([t]) }; + }); + }, + } + ); + } + function Sa(e, n) { + e.on("init", function () { + e.serializer.addNodeFilter("span", function (e) { + z(e, function (t) { + (function (e) { + return k.from(e.attr(ou())).bind(n.lookup); + })(t).each(function (e) { + !1 === e.persistent && t.unwrap(); + }); + }); + }); + }); + } + function ka(e, t) { + return bt.fromDom(e.dom().cloneNode(t)); + } + function Ta(e) { + return ka(e, !1); + } + function Aa(e) { + return ka(e, !0); + } + function Ma(e, t) { + var n = Ee(e).dom(), + r = bt.fromDom(n.createDocumentFragment()), + o = (function (e, t) { + var n = (t || j.document).createElement("div"); + return (n.innerHTML = e), Re(bt.fromDom(n)); + })(t, n); + Ei(r, o), Ni(e), _i(e, r); + } + function Ra(e) { + return ( + hu(e) && (e = e.parentNode), du(e) && e.hasAttribute("data-mce-caret") + ); + } + function Da(e) { + return hu(e) && cu(e.data); + } + function _a(e) { + return Ra(e) || Da(e); + } + function Oa(e) { + return e.firstChild !== e.lastChild || !Ge.isBr(e.firstChild); + } + function Ba(e) { + var t = e.container(); + return ( + !(!e || !Ge.isText(t)) && + (t.data.charAt(e.offset()) === lu || + (e.isAtStart() && Da(t.previousSibling))) + ); + } + function Ha(e) { + var t = e.container(); + return ( + !(!e || !Ge.isText(t)) && + (t.data.charAt(e.offset() - 1) === lu || + (e.isAtEnd() && Da(t.nextSibling))) + ); + } + function Pa(e, t, n) { + var r, o; + return ( + (r = t.ownerDocument.createElement(e)).setAttribute( + "data-mce-caret", + n ? "before" : "after", + ), + r.setAttribute("data-mce-bogus", "all"), + r.appendChild( + (function () { + var e = j.document.createElement("br"); + return e.setAttribute("data-mce-bogus", "1"), e; + })(), + ), + (o = t.parentNode), + n + ? o.insertBefore(r, t) + : t.nextSibling + ? o.insertBefore(r, t.nextSibling) + : o.appendChild(r), + r + ); + } + function La(e) { + return e && e.hasAttribute("data-mce-caret") + ? ((function (e) { + var t = e.getElementsByTagName("br"), + n = t[t.length - 1]; + Ge.isBogus(n) && n.parentNode.removeChild(n); + })(e), + e.removeAttribute("data-mce-caret"), + e.removeAttribute("data-mce-bogus"), + e.removeAttribute("style"), + e.removeAttribute("_moz_abspos"), + e) + : null; + } + function Va(e) { + return ( + !zu(e) && (bu(e) ? !Cu(e.parentNode) : wu(e) || yu(e) || xu(e) || Eu(e)) + ); + } + function Ia(e, t) { + return ( + Va(e) && + (function (e, t) { + for (e = e.parentNode; e && e !== t; e = e.parentNode) { + if (Eu(e)) return !1; + if (pu(e)) return !0; + } + return !0; + })(e, t) + ); + } + function Fa(e) { + return e + ? { + left: Nu(e.left), + top: Nu(e.top), + bottom: Nu(e.bottom), + right: Nu(e.right), + width: Nu(e.width), + height: Nu(e.height), + } + : { left: 0, top: 0, bottom: 0, right: 0, width: 0, height: 0 }; + } + function Ua(e, t) { + return ( + (e = Fa(e)), + t || (e.left = e.left + e.width), + (e.right = e.left), + (e.width = 0), + e + ); + } + function ja(e, t, n) { + return 0 <= e && e <= Math.min(t.height, n.height) / 2; + } + function qa(e, t) { + return ( + e.bottom - e.height / 2 < t.top || + (!(e.top > t.bottom) && ja(t.top - e.bottom, e, t)) + ); + } + function $a(e, t) { + return ( + e.top > t.bottom || (!(e.bottom < t.top) && ja(t.bottom - e.top, e, t)) + ); + } + function Wa(e, t, n) { + return t >= e.left && t <= e.right && n >= e.top && n <= e.bottom; + } + function Ka(e) { + var t = e.startContainer, + n = e.startOffset; + return t.hasChildNodes() && e.endOffset === n + 1 ? t.childNodes[n] : null; + } + function Xa(e, t) { + return ( + 1 === e.nodeType && + e.hasChildNodes() && + (t >= e.childNodes.length && (t = e.childNodes.length - 1), + (e = e.childNodes[t])), + e + ); + } + function Ya(e) { + return "string" == typeof e && 768 <= e.charCodeAt(0) && Su.test(e); + } + function Ga(e, t, n) { + return e.isSome() && t.isSome() + ? k.some(n(e.getOrDie(), t.getOrDie())) + : k.none(); + } + function Ja(e) { + return e && /[\r\n\t ]/.test(e); + } + function Qa(e) { + return !!e.setStart && !!e.setEnd; + } + function Za(e) { + var t, + n = e.startContainer, + r = e.startOffset; + return !!( + Ja(e.toString()) && + Bu(n.parentNode) && + Ge.isText(n) && + ((t = n.data), Ja(t[r - 1]) || Ja(t[r + 1])) + ); + } + function eu(e) { + return 0 === e.left && 0 === e.right && 0 === e.top && 0 === e.bottom; + } + function tu(e, t) { + var n = Ua(e, t); + return (n.width = 1), (n.right = n.left + 1), n; + } + var nu, + ru = $("mce-annotation"), + ou = $("data-mce-annotation"), + iu = $("data-mce-annotation-uid"), + au = function (e, t) { + var n = bt.fromDom(e.getBody()); + return ga(n, "[" + iu() + '="' + t + '"]'); + }, + uu = 0, + su = "\ufeff", + cu = function (e) { + return e === su; + }, + lu = su, + fu = function (e) { + return e.replace(new RegExp(su, "g"), ""); + }, + du = Ge.isElement, + hu = Ge.isText, + mu = function (e) { + return hu(e) && e.data[0] === lu; + }, + gu = function (e) { + return hu(e) && e.data[e.data.length - 1] === lu; + }, + pu = Ge.isContentEditableTrue, + vu = Ge.isContentEditableFalse, + yu = Ge.isBr, + bu = Ge.isText, + Cu = Ge.matchNodeNames(["script", "style", "textarea"]), + wu = Ge.matchNodeNames([ + "img", + "input", + "textarea", + "hr", + "iframe", + "video", + "audio", + "object", + ]), + xu = Ge.matchNodeNames(["table"]), + zu = _a, + Eu = function (e) { + return ( + !1 === + (function (e) { + return Ge.isElement(e) && "true" === e.getAttribute("unselectable"); + })(e) && vu(e) + ); + }, + Nu = Math.round, + Su = new RegExp( + "[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]", + ), + ku = [].slice, + Tu = function () { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; + var n = ku.call(arguments); + return function (e) { + for (var t = 0; t < n.length; t++) if (!n[t](e)) return !1; + return !0; + }; + }, + Au = function () { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; + var n = ku.call(arguments); + return function (e) { + for (var t = 0; t < n.length; t++) if (n[t](e)) return !0; + return !1; + }; + }, + Mu = Ge.isElement, + Ru = Va, + Du = Ge.matchStyleValues("display", "block table"), + _u = Ge.matchStyleValues("float", "left right"), + Ou = Tu(Mu, Ru, s(_u)), + Bu = s(Ge.matchStyleValues("white-space", "pre pre-line pre-wrap")), + Hu = Ge.isText, + Pu = Ge.isBr, + Lu = Yi.nodeIndex, + Vu = Xa, + Iu = function (e) { + return "createRange" in e ? e.createRange() : Yi.DOM.createRng(); + }, + Fu = function (e) { + var t, n; + return ( + (t = + 0 < (n = e.getClientRects()).length + ? Fa(n[0]) + : Fa(e.getBoundingClientRect())), + !Qa(e) && Pu(e) && eu(t) + ? (function (e) { + var t, + n = e.ownerDocument, + r = Iu(n), + o = n.createTextNode("\xa0"), + i = e.parentNode; + return ( + i.insertBefore(o, e), + r.setStart(o, 0), + r.setEnd(o, 1), + (t = Fa(r.getBoundingClientRect())), + i.removeChild(o), + t + ); + })(e) + : eu(t) && Qa(e) + ? (function (e) { + var t = e.startContainer, + n = e.endContainer, + r = e.startOffset, + o = e.endOffset; + if (t === n && Ge.isText(n) && 0 === r && 1 === o) { + var i = e.cloneRange(); + return i.setEndAfter(n), Fu(i); + } + return null; + })(e) + : t + ); + }, + Uu = function (e) { + function r(e) { + 0 !== e.height && + ((0 < i.length && + (function (e, t) { + return ( + e.left === t.left && + e.top === t.top && + e.bottom === t.bottom && + e.right === t.right + ); + })(e, i[i.length - 1])) || + i.push(e)); + } + function t(e, t) { + var n = Iu(e.ownerDocument); + if (t < e.data.length) { + if (Ya(e.data[t])) return i; + if ( + Ya(e.data[t - 1]) && + (n.setStart(e, t), n.setEnd(e, t + 1), !Za(n)) + ) + return r(tu(Fu(n), !1)), i; + } + 0 < t && + (n.setStart(e, t - 1), n.setEnd(e, t), Za(n) || r(tu(Fu(n), !1))), + t < e.data.length && + (n.setStart(e, t), n.setEnd(e, t + 1), Za(n) || r(tu(Fu(n), !0))); + } + var n, + o, + i = []; + if (Hu(e.container())) return t(e.container(), e.offset()), i; + if (Mu(e.container())) + if (e.isAtEnd()) + (o = Vu(e.container(), e.offset())), + Hu(o) && t(o, o.data.length), + Ou(o) && !Pu(o) && r(tu(Fu(o), !1)); + else { + if ( + ((o = Vu(e.container(), e.offset())), + Hu(o) && t(o, 0), + Ou(o) && e.isAtEnd()) + ) + return r(tu(Fu(o), !1)), i; + (n = Vu(e.container(), e.offset() - 1)), + Ou(n) && + !Pu(n) && + ((!Du(n) && !Du(o) && Ou(o)) || r(tu(Fu(n), !1))), + Ou(o) && r(tu(Fu(o), !0)); + } + return i; + }; + function ju(t, n, e) { + function r() { + return (e = e || Uu(ju(t, n))); + } + return { + container: $(t), + offset: $(n), + toRange: function () { + var e; + return (e = Iu(t.ownerDocument)).setStart(t, n), e.setEnd(t, n), e; + }, + getClientRects: r, + isVisible: function () { + return 0 < r().length; + }, + isAtStart: function () { + return Hu(t), 0 === n; + }, + isAtEnd: function () { + return Hu(t) ? n >= t.data.length : n >= t.childNodes.length; + }, + isEqual: function (e) { + return e && t === e.container() && n === e.offset(); + }, + getNode: function (e) { + return Vu(t, e ? n - 1 : n); + }, + }; + } + ((nu = ju = ju || {}).fromRangeStart = function (e) { + return nu(e.startContainer, e.startOffset); + }), + (nu.fromRangeEnd = function (e) { + return nu(e.endContainer, e.endOffset); + }), + (nu.after = function (e) { + return nu(e.parentNode, Lu(e) + 1); + }), + (nu.before = function (e) { + return nu(e.parentNode, Lu(e)); + }), + (nu.isAbove = function (e, t) { + return Ga(E(t.getClientRects()), N(e.getClientRects()), qa).getOr(!1); + }), + (nu.isBelow = function (e, t) { + return Ga(N(t.getClientRects()), E(e.getClientRects()), $a).getOr(!1); + }), + (nu.isAtStart = function (e) { + return !!e && e.isAtStart(); + }), + (nu.isAtEnd = function (e) { + return !!e && e.isAtEnd(); + }), + (nu.isTextPosition = function (e) { + return !!e && Ge.isText(e.container()); + }), + (nu.isElementPosition = function (e) { + return !1 === nu.isTextPosition(e); + }); + function qu(t) { + return function (e) { + return t === e; + }; + } + function $u(e) { + return ( + (Os(e) ? "text()" : e.nodeName.toLowerCase()) + + "[" + + (function (e) { + var r, t, n; + return ( + (r = Ls(Ps(e))), + (t = Tn.findIndex(r, qu(e), e)), + (r = r.slice(0, t + 1)), + (n = Tn.reduce( + r, + function (e, t, n) { + return Os(t) && Os(r[n - 1]) && e++, e; + }, + 0, + )), + (r = Tn.filter(r, Ge.matchNodeNames([e.nodeName]))), + (t = Tn.findIndex(r, qu(e), e)) - n + ); + })(e) + + "]" + ); + } + function Wu(e, t) { + var n, + r, + o, + i, + a, + u = []; + return ( + (n = t.container()), + (r = t.offset()), + Os(n) + ? (o = (function (e, t) { + for (; (e = e.previousSibling) && Os(e); ) t += e.data.length; + return t; + })(n, r)) + : (r >= (i = n.childNodes).length + ? ((o = "after"), (r = i.length - 1)) + : (o = "before"), + (n = i[r])), + u.push($u(n)), + (a = (function (e, t, n) { + var r = []; + for (t = t.parentNode; t !== e && (!n || !n(t)); t = t.parentNode) + r.push(t); + return r; + })(e, n)), + (a = Tn.filter(a, s(Ge.isBogus))), + (u = u.concat( + Tn.map(a, function (e) { + return $u(e); + }), + )) + .reverse() + .join("/") + + "," + + o + ); + } + function Ku(e, t) { + var n, r, o; + return t + ? ((t = (n = t.split(","))[0].split("/")), + (o = 1 < n.length ? n[1] : "before"), + (r = Tn.reduce( + t, + function (e, t) { + return (t = /([\w\-\(\)]+)\[([0-9]+)\]/.exec(t)) + ? ("text()" === t[1] && (t[1] = "#text"), + (function (e, t, n) { + var r = Ls(e); + return ( + (r = Tn.filter(r, function (e, t) { + return !Os(e) || !Os(r[t - 1]); + })), + (r = Tn.filter(r, Ge.matchNodeNames([t])))[n] + ); + })(e, t[1], parseInt(t[2], 10))) + : null; + }, + e, + )) + ? Os(r) + ? (function (e, t) { + for (var n, r = e, o = 0; Os(r); ) { + if (((n = r.data.length), o <= t && t <= o + n)) { + (e = r), (t -= o); + break; + } + if (!Os(r.nextSibling)) { + (e = r), (t = n); + break; + } + (o += n), (r = r.nextSibling); + } + return ( + Os(e) && t > e.data.length && (t = e.data.length), _s(e, t) + ); + })(r, parseInt(o, 10)) + : ((o = "after" === o ? Hs(r) + 1 : Hs(r)), _s(r.parentNode, o)) + : null) + : null; + } + function Xu(e, t) { + Ge.isText(t) && 0 === t.data.length && e.remove(t); + } + function Yu(e, t, n) { + Ge.isDocumentFragment(n) + ? (function (t, e, n) { + var r = k.from(n.firstChild), + o = k.from(n.lastChild); + e.insertNode(n), + r.each(function (e) { + return Xu(t, e.previousSibling); + }), + o.each(function (e) { + return Xu(t, e.nextSibling); + }); + })(e, t, n) + : (function (e, t, n) { + t.insertNode(n), Xu(e, n.previousSibling), Xu(e, n.nextSibling); + })(e, t, n); + } + function Gu(e, t, n, r, o) { + var i, + a = r[o ? "startContainer" : "endContainer"], + u = r[o ? "startOffset" : "endOffset"], + s = [], + c = 0, + l = e.getRoot(); + for ( + Ge.isText(a) + ? s.push( + n + ? (function (e, t, n) { + var r, o; + for ( + o = e(t.data.slice(0, n)).length, r = t.previousSibling; + r && Ge.isText(r); + r = r.previousSibling + ) + o += e(r.data).length; + return o; + })(t, a, u) + : u, + ) + : (u >= (i = a.childNodes).length && + i.length && + ((c = 1), (u = Math.max(0, i.length - 1))), + s.push(e.nodeIndex(i[u], n) + c)); + a && a !== l; + a = a.parentNode + ) + s.push(e.nodeIndex(a, n)); + return s; + } + function Ju(e, t, n) { + var r = 0; + return ( + Rn.each(e.select(t), function (e) { + if ("all" !== e.getAttribute("data-mce-bogus")) + return e !== n && void r++; + }), + r + ); + } + function Qu(e, t) { + var n, + r, + o, + i = t ? "start" : "end"; + (n = e[i + "Container"]), + (r = e[i + "Offset"]), + Ge.isElement(n) && + "TR" === n.nodeName && + (n = (o = n.childNodes)[Math.min(t ? r : r - 1, o.length - 1)]) && + ((r = t ? 0 : n.childNodes.length), + e["set" + (t ? "Start" : "End")](n, r)); + } + function Zu(e) { + return Qu(e, !0), Qu(e, !1), e; + } + function es(e, t) { + var n; + if (Ge.isElement(e) && ((e = Xa(e, t)), Vs(e))) return e; + if (_a(e)) { + if ( + (Ge.isText(e) && Ra(e) && (e = e.parentNode), + (n = e.previousSibling), + Vs(n)) + ) + return n; + if (((n = e.nextSibling), Vs(n))) return n; + } + } + function ts(e, t, n) { + var r = n.getNode(), + o = r ? r.nodeName : null, + i = n.getRng(); + if (Vs(r) || "IMG" === o) return { name: o, index: Ju(n.dom, o, r) }; + var a = (function (e) { + return ( + es(e.startContainer, e.startOffset) || es(e.endContainer, e.endOffset) + ); + })(i); + return a + ? { name: (o = a.tagName), index: Ju(n.dom, o, a) } + : (function (e, t, n, r) { + var o = t.dom, + i = {}; + return ( + (i.start = Gu(o, e, n, r, !0)), + t.isCollapsed() || (i.end = Gu(o, e, n, r, !1)), + i + ); + })(e, n, t, i); + } + function ns(e, t, n) { + var r = { + "data-mce-type": "bookmark", + id: t, + style: "overflow:hidden;line-height:0px", + }; + return n ? e.create("span", r, "") : e.create("span", r); + } + function rs(e, t) { + var n = e.dom, + r = e.getRng(), + o = n.uniqueId(), + i = e.isCollapsed(), + a = e.getNode(), + u = a.nodeName; + if ("IMG" === u) return { name: u, index: Ju(n, u, a) }; + var s = Zu(r.cloneRange()); + if (!i) { + s.collapse(!1); + var c = ns(n, o + "_end", t); + Yu(n, s, c); + } + (r = Zu(r)).collapse(!0); + var l = ns(n, o + "_start", t); + return Yu(n, r, l), e.moveToBookmark({ id: o, keep: 1 }), { id: o }; + } + function os(e) { + return Ge.isElement(e) && e.id === Fs; + } + function is(e, t) { + for (; t && t !== e; ) { + if (t.id === Fs) return t; + t = t.parentNode; + } + return null; + } + function as(e) { + var t = e.parentNode; + t && t.removeChild(e); + } + function us(e, t) { + 0 === t.length ? as(e) : (e.nodeValue = t); + } + function ss(e) { + var t = fu(e); + return { count: e.length - t.length, text: t }; + } + function cs(e, t) { + return qs(e), t; + } + function ls(e, t) { + var n = t.container(), + r = (function (e, t) { + var n = f(e, t); + return -1 === n ? k.none() : k.some(n); + })(P(n.childNodes), e) + .map(function (e) { + return e < t.offset() ? _s(n, t.offset() - 1) : t; + }) + .getOr(t); + return qs(e), r; + } + function fs(e, t) { + return js(e) && t.container() === e + ? (function (e, t) { + var n = ss(e.data.substr(0, t.offset())), + r = ss(e.data.substr(t.offset())), + o = n.text + r.text; + return 0 < o.length ? (us(e, o), _s(e, t.offset() - n.count)) : t; + })(e, t) + : cs(e, t); + } + function ds(e, t, n) { + var r, + o, + i, + a, + u, + s = Ua(t.getBoundingClientRect(), n); + return ( + (i = + "BODY" === e.tagName + ? ((r = e.ownerDocument.documentElement), + (o = e.scrollLeft || r.scrollLeft), + e.scrollTop || r.scrollTop) + : ((u = e.getBoundingClientRect()), + (o = e.scrollLeft - u.left), + e.scrollTop - u.top)), + (s.left += o), + (s.right += o), + (s.top += i), + (s.bottom += i), + (s.width = 1), + 0 < (a = t.offsetWidth - t.clientWidth) && + (n && (a *= -1), (s.left += a), (s.right += a)), + s + ); + } + function hs(i, a, e) { + var t, + u, + s = Je(k.none()), + c = function () { + !(function (e) { + var t, n, r, o, i; + for (t = yi("*[contentEditable=false]", e), o = 0; o < t.length; o++) + (r = (n = t[o]).previousSibling), + gu(r) && + (1 === (i = r.data).length + ? r.parentNode.removeChild(r) + : r.deleteData(i.length - 1, 1)), + (r = n.nextSibling), + mu(r) && + (1 === (i = r.data).length + ? r.parentNode.removeChild(r) + : r.deleteData(0, 1)); + })(i), + u && ($s.remove(u), (u = null)), + s.get().each(function (e) { + yi(e.caret).remove(), s.set(k.none()); + }), + vn.clearInterval(t); + }, + l = function () { + t = vn.setInterval(function () { + e() + ? yi("div.mce-visual-caret", i).toggleClass( + "mce-visual-caret-hidden", + ) + : yi("div.mce-visual-caret", i).addClass("mce-visual-caret-hidden"); + }, 500); + }; + return { + show: function (t, e) { + var n, r; + if ( + (c(), + (function (e) { + return Ge.isElement(e) && /^(TD|TH)$/i.test(e.tagName); + })(e)) + ) + return null; + if (!a(e)) + return ( + (u = (function (e, t) { + var n, r, o; + if ( + ((r = e.ownerDocument.createTextNode(lu)), + (o = e.parentNode), + t) + ) { + if (((n = e.previousSibling), hu(n))) { + if (_a(n)) return n; + if (gu(n)) return n.splitText(n.data.length - 1); + } + o.insertBefore(r, e); + } else { + if (((n = e.nextSibling), hu(n))) { + if (_a(n)) return n; + if (mu(n)) return n.splitText(1), n; + } + e.nextSibling + ? o.insertBefore(r, e.nextSibling) + : o.appendChild(r); + } + return r; + })(e, t)), + (r = e.ownerDocument.createRange()), + Ks(u.nextSibling) + ? (r.setStart(u, 0), r.setEnd(u, 0)) + : (r.setStart(u, 1), r.setEnd(u, 1)), + r + ); + (u = Pa("p", e, t)), (n = ds(i, e, t)), yi(u).css("top", n.top); + var o = yi('
') + .css(n) + .appendTo(i)[0]; + return ( + s.set(k.some({ caret: o, element: e, before: t })), + s.get().each(function (e) { + t && yi(e.caret).addClass("mce-visual-caret-before"); + }), + l(), + (r = e.ownerDocument.createRange()).setStart(u, 0), + r.setEnd(u, 0), + r + ); + }, + hide: c, + getCss: function () { + return ".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"; + }, + reposition: function () { + s.get().each(function (e) { + var t = ds(i, e.element, e.before); + yi(e.caret).css(G({}, t)); + }); + }, + destroy: function () { + return vn.clearInterval(t); + }, + }; + } + function ms() { + return Ws.isIE() || Ws.isEdge() || Ws.isFirefox(); + } + function gs(e) { + return Ks(e) || (Ge.isTable(e) && ms()); + } + function ps(e) { + return 0 < e; + } + function vs(e) { + return e < 0; + } + function ys(e, t) { + for (var n; (n = e(t)); ) if (!Js(n)) return n; + return null; + } + function bs(e, t, n, r, o) { + var i = new bi(e, r); + if (vs(t)) { + if ((Xs(e) || Js(e)) && n((e = ys(i.prev, !0)))) return e; + for (; (e = ys(i.prev, o)); ) if (n(e)) return e; + } + if (ps(t)) { + if ((Xs(e) || Js(e)) && n((e = ys(i.next, !0)))) return e; + for (; (e = ys(i.next, o)); ) if (n(e)) return e; + } + return null; + } + function Cs(e, t) { + for (; e && e !== t; ) { + if (Ys(e)) return e; + e = e.parentNode; + } + return null; + } + function ws(e, t, n) { + return Cs(e.container(), n) === Cs(t.container(), n); + } + function xs(e, t) { + var n, r; + return t + ? ((n = t.container()), + (r = t.offset()), + Qs(n) ? n.childNodes[r + e] : null) + : null; + } + function zs(e, t) { + var n = t.ownerDocument.createRange(); + return ( + e + ? (n.setStartBefore(t), n.setEndBefore(t)) + : (n.setStartAfter(t), n.setEndAfter(t)), + n + ); + } + function Es(e, t, n) { + var r, o, i, a; + for (o = e ? "previousSibling" : "nextSibling"; n && n !== t; ) { + if (((r = n[o]), Gs(r) && (r = r[o]), Xs(r))) { + if (((a = n), Cs(r, (i = t)) === Cs(a, i))) return r; + break; + } + if (Zs(r)) break; + n = n.parentNode; + } + return null; + } + function Ns(e, t, n) { + var r, + o, + i, + a, + u = d(Es, !0, t), + s = d(Es, !1, t); + if (((o = n.startContainer), (i = n.startOffset), Ra(o))) { + if ( + (Qs(o) || (o = o.parentNode), + "before" === (a = o.getAttribute("data-mce-caret")) && + ((r = o.nextSibling), gs(r))) + ) + return ec(r); + if ("after" === a && ((r = o.previousSibling), gs(r))) return tc(r); + } + if (!n.collapsed) return n; + if (Ge.isText(o)) { + if (Gs(o)) { + if (1 === e) { + if ((r = s(o))) return ec(r); + if ((r = u(o))) return tc(r); + } + if (-1 === e) { + if ((r = u(o))) return tc(r); + if ((r = s(o))) return ec(r); + } + return n; + } + if (gu(o) && i >= o.data.length - 1) + return 1 === e && (r = s(o)) ? ec(r) : n; + if (mu(o) && i <= 1) return -1 === e && (r = u(o)) ? tc(r) : n; + if (i === o.data.length) return (r = s(o)) ? ec(r) : n; + if (0 === i) return (r = u(o)) ? tc(r) : n; + } + return n; + } + function Ss(e, t) { + return k.from(xs(e ? 0 : -1, t)).filter(Xs); + } + function ks(e, t, n) { + var r = Ns(e, t, n); + return -1 === e ? ju.fromRangeStart(r) : ju.fromRangeEnd(r); + } + function Ts(e) { + return k.from(e.getNode()).map(bt.fromDom); + } + function As(e, t) { + for (; (t = e(t)); ) if (t.isVisible()) return t; + return t; + } + function Ms(e, t) { + var n = ws(e, t); + return !(n || !Ge.isBr(e.getNode())) || n; + } + var Rs, + Ds, + _s = ju, + Os = Ge.isText, + Bs = Ge.isBogus, + Hs = Yi.nodeIndex, + Ps = function (e) { + var t = e.parentNode; + return Bs(t) ? Ps(t) : t; + }, + Ls = function (e) { + return e + ? Tn.reduce( + e.childNodes, + function (e, t) { + return ( + Bs(t) && "BR" !== t.nodeName + ? (e = e.concat(Ls(t))) + : e.push(t), + e + ); + }, + [], + ) + : []; + }, + Vs = Ge.isContentEditableFalse, + Is = { + getBookmark: function (e, t, n) { + return 2 === t + ? ts(fu, n, e) + : 3 === t + ? (function (e) { + var t = e.getRng(); + return { + start: Wu(e.dom.getRoot(), _s.fromRangeStart(t)), + end: Wu(e.dom.getRoot(), _s.fromRangeEnd(t)), + }; + })(e) + : t + ? (function (e) { + return { rng: e.getRng() }; + })(e) + : rs(e, !1); + }, + getUndoBookmark: d(ts, W, !0), + getPersistentBookmark: rs, + }, + Fs = "_mce_caret", + Us = Ge.isElement, + js = Ge.isText, + qs = function (e) { + if ( + (Us(e) && + _a(e) && + (Oa(e) ? e.removeAttribute("data-mce-caret") : as(e)), + js(e)) + ) { + var t = fu( + (function (e) { + try { + return e.nodeValue; + } catch (t) { + return ""; + } + })(e), + ); + us(e, t); + } + }, + $s = { + removeAndReposition: function (e, t) { + return _s.isTextPosition(t) + ? fs(e, t) + : (function (e, t) { + return t.container() === e.parentNode ? ls(e, t) : cs(e, t); + })(e, t); + }, + remove: qs, + }, + Ws = oe().browser, + Ks = Ge.isContentEditableFalse, + Xs = Ge.isContentEditableFalse, + Ys = Ge.matchStyleValues( + "display", + "block table table-cell table-caption list-item", + ), + Gs = _a, + Js = Ra, + Qs = Ge.isElement, + Zs = Va, + ec = d(zs, !0), + tc = d(zs, !1); + ((Ds = Rs = Rs || {})[(Ds.Backwards = -1)] = "Backwards"), + (Ds[(Ds.Forwards = 1)] = "Forwards"); + function nc(e, t) { + return e.hasChildNodes() && t < e.childNodes.length + ? e.childNodes[t] + : null; + } + function rc(e, t) { + if (ps(e)) { + if (Mc(t.previousSibling) && !kc(t.previousSibling)) return _s.before(t); + if (kc(t)) return _s(t, 0); + } + if (vs(e)) { + if (Mc(t.nextSibling) && !kc(t.nextSibling)) return _s.after(t); + if (kc(t)) return _s(t, t.data.length); + } + return vs(e) ? (Ac(t) ? _s.before(t) : _s.after(t)) : _s.before(t); + } + function oc(t) { + return { + next: function (e) { + return _c(Rs.Forwards, e, t); + }, + prev: function (e) { + return _c(Rs.Backwards, e, t); + }, + }; + } + function ic(e) { + return _s.isTextPosition(e) ? 0 === e.offset() : Va(e.getNode()); + } + function ac(e) { + if (_s.isTextPosition(e)) { + var t = e.container(); + return e.offset() === t.data.length; + } + return Va(e.getNode(!0)); + } + function uc(e, t) { + return ( + !_s.isTextPosition(e) && + !_s.isTextPosition(t) && + e.getNode() === t.getNode(!0) + ); + } + function sc(e, t, n) { + return e + ? !uc(t, n) && + !(function (e) { + return !_s.isTextPosition(e) && Ge.isBr(e.getNode()); + })(t) && + ac(t) && + ic(n) + : !uc(n, t) && ic(t) && ac(n); + } + function cc(t, n, r) { + return Oc(t, n, r).bind(function (e) { + return ws(r, e, n) && sc(t, r, e) ? Oc(t, n, e) : k.some(e); + }); + } + function lc(e, t) { + var n = e ? t.firstChild : t.lastChild; + return Ge.isText(n) + ? k.some(_s(n, e ? 0 : n.data.length)) + : n + ? Va(n) + ? k.some( + e + ? _s.before(n) + : (function (e) { + return Ge.isBr(e) ? _s.before(e) : _s.after(e); + })(n), + ) + : (function (e, t, n) { + var r = e ? _s.before(n) : _s.after(n); + return Oc(e, t, r); + })(e, t, n) + : k.none(); + } + function fc(e, t) { + return ( + Ge.isElement(t) && + e.isBlock(t) && + !t.innerHTML && + !Sn.ie && + (t.innerHTML = '
'), + t + ); + } + function dc(e, t) { + return Lc.lastPositionIn(e).fold( + function () { + return !1; + }, + function (e) { + return ( + t.setStart(e.container(), e.offset()), + t.setEnd(e.container(), e.offset()), + !0 + ); + }, + ); + } + function hc(e, t, n) { + return ( + !( + !(function (e) { + return !1 === e.hasChildNodes(); + })(t) || !is(e, t) + ) && + ((function (e, t) { + var n = e.ownerDocument.createTextNode(lu); + e.appendChild(n), t.setStart(n, 0), t.setEnd(n, 0); + })(t, n), + !0) + ); + } + function mc(e, t, n, r) { + var o, + i, + a, + u, + s = n[t ? "start" : "end"], + c = e.getRoot(); + if (s) { + for (a = s[0], i = c, o = s.length - 1; 1 <= o; o--) { + if (((u = i.childNodes), hc(c, i, r))) return !0; + if (s[o] > u.length - 1) return !!hc(c, i, r) || dc(i, r); + i = u[s[o]]; + } + 3 === i.nodeType && (a = Math.min(s[0], i.nodeValue.length)), + 1 === i.nodeType && (a = Math.min(s[0], i.childNodes.length)), + t ? r.setStart(i, a) : r.setEnd(i, a); + } + return !0; + } + function gc(e) { + return Ge.isText(e) && 0 < e.data.length; + } + function pc(e, t, n) { + var r, + o, + i, + a, + u, + s, + c = e.get(n.id + "_" + t), + l = n.keep; + if (c) { + if ( + ((r = c.parentNode), + (s = + ((u = + ((o = + "start" === t + ? l + ? c.hasChildNodes() + ? ((r = c.firstChild), 1) + : gc(c.nextSibling) + ? ((r = c.nextSibling), 0) + : gc(c.previousSibling) + ? ((r = c.previousSibling), c.previousSibling.data.length) + : ((r = c.parentNode), e.nodeIndex(c) + 1) + : e.nodeIndex(c) + : l + ? c.hasChildNodes() + ? ((r = c.firstChild), 1) + : gc(c.previousSibling) + ? ((r = c.previousSibling), c.previousSibling.data.length) + : ((r = c.parentNode), e.nodeIndex(c)) + : e.nodeIndex(c)), + r)), + o)), + !l) + ) { + for ( + a = c.previousSibling, + i = c.nextSibling, + Rn.each(Rn.grep(c.childNodes), function (e) { + Ge.isText(e) && + (e.nodeValue = e.nodeValue.replace(/\uFEFF/g, "")); + }); + (c = e.get(n.id + "_" + t)); + + ) + e.remove(c, !0); + a && + i && + a.nodeType === i.nodeType && + Ge.isText(a) && + !Sn.opera && + ((o = a.nodeValue.length), + a.appendData(i.nodeValue), + e.remove(i), + (s = ((u = a), o))); + } + return k.some(_s(u, s)); + } + return k.none(); + } + function vc(e) { + return e && /^(IMG)$/.test(e.nodeName); + } + function yc(e, t, n) { + return ( + ("color" !== n && "backgroundColor" !== n) || (t = e.toHex(t)), + "fontWeight" === n && 700 === t && (t = "bold"), + "fontFamily" === n && + (t = t.replace(/[\'\"]/g, "").replace(/,\s+/g, ",")), + "" + t + ); + } + function bc(e, t) { + for ( + void 0 === t && (t = 3 === e.nodeType ? e.length : e.childNodes.length); + e && e.hasChildNodes(); + + ) + (e = e.childNodes[t]) && + (t = 3 === e.nodeType ? e.length : e.childNodes.length); + return { node: e, offset: t }; + } + function Cc(e, t) { + for (var n = t; n; ) { + if (1 === n.nodeType && e.getContentEditable(n)) + return "false" === e.getContentEditable(n) ? n : t; + n = n.parentNode; + } + return t; + } + function wc(e, t, n, r) { + var o, + i, + a = n.nodeValue; + return ( + void 0 === r && (r = e ? a.length : 0), + e + ? ((o = a.lastIndexOf(" ", r)), + -1 !== (o = (i = a.lastIndexOf("\xa0", r)) < o ? o : i) && + !t && + (o < r || !e) && + o <= a.length && + o++) + : ((o = a.indexOf(" ", r)), + (i = a.indexOf("\xa0", r)), + (o = -1 !== o && (-1 === i || o < i) ? o : i)), + o + ); + } + function xc(e, t, n, r, o, i) { + var a, u, s; + if (3 === n.nodeType) { + if (-1 !== (u = wc(o, i, n, r))) return { container: n, offset: u }; + s = n; + } + for ( + var c = new bi(n, e.getParent(n, e.isBlock) || t); + (a = c[o ? "prev" : "next"]()); + + ) + if (3 !== a.nodeType || $c(a.parentNode)) { + if (e.isBlock(a) || qc.isEq(a, "BR")) break; + } else if (-1 !== (u = wc(o, i, (s = a)))) + return { container: a, offset: u }; + if (s) return { container: s, offset: (r = o ? 0 : s.length) }; + } + function zc(e, t, n, r, o) { + var i, a, u, s; + for ( + 3 === r.nodeType && 0 === r.nodeValue.length && r[o] && (r = r[o]), + i = Wc(e, r), + a = 0; + a < i.length; + a++ + ) + for (u = 0; u < t.length; u++) + if ( + !("collapsed" in (s = t[u]) && s.collapsed !== n.collapsed) && + e.is(i[a], s.selector) + ) + return i[a]; + return r; + } + function Ec(t, e, n, r) { + var o, + i = t.dom, + a = i.getRoot(); + if ((e[0].wrapper || (o = i.getParent(n, e[0].block, a)), !o)) { + var u = i.getParent(n, "LI,TD,TH"); + o = i.getParent( + 3 === n.nodeType ? n.parentNode : n, + function (e) { + return e !== a && Xc(t, e); + }, + u, + ); + } + if ((o && e[0].wrapper && (o = Wc(i, o, "ul,ol").reverse()[0] || o), !o)) + for ( + o = n; + o[r] && !i.isBlock(o[r]) && ((o = o[r]), !qc.isEq(o, "br")); + + ); + return o || n; + } + function Nc(e, t, n, r, o, i, a) { + var u, s, c, l, f, d; + if ( + ((u = s = a ? n : o), + (l = a ? "previousSibling" : "nextSibling"), + (f = e.getRoot()), + 3 === u.nodeType && !Kc(u) && (a ? 0 < r : i < u.nodeValue.length)) + ) + return u; + for (;;) { + if (!t[0].block_expand && e.isBlock(s)) return s; + for (c = s[l]; c; c = c[l]) + if ( + !$c(c) && + !Kc(c) && + ("BR" !== (d = c).nodeName || + !d.getAttribute("data-mce-bogus") || + d.nextSibling) + ) + return s; + if (s === f || s.parentNode === f) { + u = s; + break; + } + s = s.parentNode; + } + return u; + } + var Sc = Ge.isContentEditableFalse, + kc = Ge.isText, + Tc = Ge.isElement, + Ac = Ge.isBr, + Mc = Va, + Rc = function (e) { + return ( + wu(e) || + (function (e) { + return ( + !!Eu(e) && + !0 !== + b( + P(e.getElementsByTagName("*")), + function (e, t) { + return e || pu(t); + }, + !1, + ) + ); + })(e) + ); + }, + Dc = Ia, + _c = function (e, t, n) { + var r, o, i, a, u; + if (!Tc(n) || !t) return null; + if (t.isEqual(_s.after(n)) && n.lastChild) { + if ( + ((u = _s.after(n.lastChild)), + vs(e) && Mc(n.lastChild) && Tc(n.lastChild)) + ) + return Ac(n.lastChild) ? _s.before(n.lastChild) : u; + } else u = t; + var s = u.container(), + c = u.offset(); + if (kc(s)) { + if (vs(e) && 0 < c) return _s(s, --c); + if (ps(e) && c < s.length) return _s(s, ++c); + r = s; + } else { + if (vs(e) && 0 < c && ((o = nc(s, c - 1)), Mc(o))) + return !Rc(o) && (i = bs(o, e, Dc, o)) + ? kc(i) + ? _s(i, i.data.length) + : _s.after(i) + : kc(o) + ? _s(o, o.data.length) + : _s.before(o); + if (ps(e) && c < s.childNodes.length && ((o = nc(s, c)), Mc(o))) + return Ac(o) + ? (function (e, t) { + var n = t.nextSibling; + return n && Mc(n) + ? kc(n) + ? _s(n, 0) + : _s.before(n) + : _c(Rs.Forwards, _s.after(t), e); + })(n, o) + : !Rc(o) && (i = bs(o, e, Dc, o)) + ? kc(i) + ? _s(i, 0) + : _s.before(i) + : kc(o) + ? _s(o, 0) + : _s.after(o); + r = o || u.getNode(); + } + return ((ps(e) && u.isAtEnd()) || (vs(e) && u.isAtStart())) && + ((r = bs(r, e, $(!0), n, !0)), Dc(r, n)) + ? rc(e, r) + : ((o = bs(r, e, Dc, n)), + !(a = Tn.last( + y( + (function (e, t) { + for (var n = []; e && e !== t; ) n.push(e), (e = e.parentNode); + return n; + })(s, n), + Sc, + ), + )) || + (o && a.contains(o)) + ? o + ? rc(e, o) + : null + : (u = ps(e) ? _s.after(a) : _s.before(a))); + }, + Oc = function (e, t, n) { + var r = oc(t); + return k.from(e ? r.next(n) : r.prev(n)); + }, + Bc = function (t, n, e, r) { + return cc(t, n, e).bind(function (e) { + return r(e) ? Bc(t, n, e, r) : k.some(e); + }); + }, + Hc = d(Oc, !0), + Pc = d(Oc, !1), + Lc = { + fromPosition: Oc, + nextPosition: Hc, + prevPosition: Pc, + navigate: cc, + navigateIgnore: Bc, + positionIn: lc, + firstPositionIn: d(lc, !0), + lastPositionIn: d(lc, !1), + }, + Vc = function (e, t) { + var n = e.dom; + if (t) { + if ( + (function (e) { + return Rn.isArray(e.start); + })(t) + ) + return (function (e, t) { + var n = e.createRng(); + return mc(e, !0, t, n) && mc(e, !1, t, n) ? k.some(n) : k.none(); + })(n, t); + if ( + (function (e) { + return "string" == typeof e.start; + })(t) + ) + return k.some( + (function (e, t) { + var n, r; + return ( + (n = e.createRng()), + (r = Ku(e.getRoot(), t.start)), + n.setStart(r.container(), r.offset()), + (r = Ku(e.getRoot(), t.end)), + n.setEnd(r.container(), r.offset()), + n + ); + })(n, t), + ); + if ( + (function (e) { + return e.hasOwnProperty("id"); + })(t) + ) + return (function (r, e) { + var t = pc(r, "start", e), + n = pc(r, "end", e); + return Ga(t, n.or(t), function (e, t) { + var n = r.createRng(); + return ( + n.setStart(fc(r, e.container()), e.offset()), + n.setEnd(fc(r, t.container()), t.offset()), + n + ); + }); + })(n, t); + if ( + (function (e) { + return e.hasOwnProperty("name"); + })(t) + ) + return (function (n, e) { + return k.from(n.select(e.name)[e.index]).map(function (e) { + var t = n.createRng(); + return t.selectNode(e), t; + }); + })(n, t); + if ( + (function (e) { + return e.hasOwnProperty("rng"); + })(t) + ) + return k.some(t.rng); + } + return k.none(); + }, + Ic = function (e, t, n) { + return Is.getBookmark(e, t, n); + }, + Fc = function (t, e) { + Vc(t, e).each(function (e) { + t.setRng(e); + }); + }, + Uc = function (e) { + return ( + Ge.isElement(e) && + "SPAN" === e.tagName && + "bookmark" === e.getAttribute("data-mce-type") + ); + }, + jc = function (e) { + return e && 3 === e.nodeType && /^([\t \r\n]+|)$/.test(e.nodeValue); + }, + qc = { + isInlineBlock: vc, + moveStart: function (e, t, n) { + var r, + o, + i, + a = n.startOffset, + u = n.startContainer; + if ( + (n.startContainer !== n.endContainer || + !vc(n.startContainer.childNodes[n.startOffset])) && + 1 === u.nodeType + ) + for ( + a < (i = u.childNodes).length + ? ((u = i[a]), (r = new bi(u, e.getParent(u, e.isBlock)))) + : ((u = i[i.length - 1]), + (r = new bi(u, e.getParent(u, e.isBlock))).next(!0)), + o = r.current(); + o; + o = r.next() + ) + if (3 === o.nodeType && !jc(o)) + return n.setStart(o, 0), void t.setRng(n); + }, + getNonWhiteSpaceSibling: function (e, t, n) { + if (e) + for ( + t = t ? "nextSibling" : "previousSibling", e = n ? e : e[t]; + e; + e = e[t] + ) + if (1 === e.nodeType || !jc(e)) return e; + }, + isTextBlock: function (e, t) { + return ( + t.nodeType && (t = t.nodeName), + !!e.schema.getTextBlockElements()[t.toLowerCase()] + ); + }, + isValid: function (e, t, n) { + return e.schema.isValidChild(t, n); + }, + isWhiteSpaceNode: jc, + replaceVars: function (e, n) { + return ( + "string" != typeof e + ? (e = e(n)) + : n && + (e = e.replace(/%(\w+)/g, function (e, t) { + return n[t] || e; + })), + e + ); + }, + isEq: function (e, t) { + return ( + (e = "" + ((e = e || "").nodeName || e)), + (t = "" + ((t = t || "").nodeName || t)), + e.toLowerCase() === t.toLowerCase() + ); + }, + normalizeStyleValue: yc, + getStyle: function (e, t, n) { + return yc(e, e.getStyle(t, n), n); + }, + getTextDecoration: function (t, e) { + var n; + return ( + t.getParent(e, function (e) { + return (n = t.getStyle(e, "text-decoration")) && "none" !== n; + }), + n + ); + }, + getParents: function (e, t, n) { + return e.getParents(t, n, e.getRoot()); + }, + }, + $c = Uc, + Wc = qc.getParents, + Kc = qc.isWhiteSpaceNode, + Xc = qc.isTextBlock, + Yc = function (e, t, n, r) { + var o, + i = t.startContainer, + a = t.startOffset, + u = t.endContainer, + s = t.endOffset, + c = e.dom; + return ( + 1 === i.nodeType && + i.hasChildNodes() && + 3 === (i = Xa(i, a)).nodeType && + (a = 0), + 1 === u.nodeType && + u.hasChildNodes() && + 3 === (u = Xa(u, t.collapsed ? s : s - 1)).nodeType && + (s = u.nodeValue.length), + (i = Cc(c, i)), + (u = Cc(c, u)), + ($c(i.parentNode) || $c(i)) && + ((i = $c(i) ? i : i.parentNode), + 3 === + (i = t.collapsed ? i.previousSibling || i : i.nextSibling || i) + .nodeType && (a = t.collapsed ? i.length : 0)), + ($c(u.parentNode) || $c(u)) && + ((u = $c(u) ? u : u.parentNode), + 3 === + (u = t.collapsed ? u.nextSibling || u : u.previousSibling || u) + .nodeType && (s = t.collapsed ? 0 : u.length)), + t.collapsed && + ((o = xc(c, e.getBody(), i, a, !0, r)) && + ((i = o.container), (a = o.offset)), + (o = xc(c, e.getBody(), u, s, !1, r)) && + ((u = o.container), (s = o.offset))), + n[0].inline && + (u = r + ? u + : (function (e, t) { + var n = bc(e, t); + if (n.node) { + for (; n.node && 0 === n.offset && n.node.previousSibling; ) + n = bc(n.node.previousSibling); + n.node && + 0 < n.offset && + 3 === n.node.nodeType && + " " === n.node.nodeValue.charAt(n.offset - 1) && + 1 < n.offset && + (e = n.node).splitText(n.offset - 1); + } + return e; + })(u, s)), + (n[0].inline || n[0].block_expand) && + ((n[0].inline && 3 === i.nodeType && 0 !== a) || + (i = Nc(c, n, i, a, u, s, !0)), + (n[0].inline && 3 === u.nodeType && s !== u.nodeValue.length) || + (u = Nc(c, n, i, a, u, s, !1))), + n[0].selector && + !1 !== n[0].expand && + !n[0].inline && + ((i = zc(c, n, t, i, "previousSibling")), + (u = zc(c, n, t, u, "nextSibling"))), + (n[0].block || n[0].selector) && + ((i = Ec(e, n, i, "previousSibling")), + (u = Ec(e, n, u, "nextSibling")), + n[0].block && + (c.isBlock(i) || (i = Nc(c, n, i, a, u, s, !0)), + c.isBlock(u) || (u = Nc(c, n, i, a, u, s, !1)))), + 1 === i.nodeType && ((a = c.nodeIndex(i)), (i = i.parentNode)), + 1 === u.nodeType && ((s = c.nodeIndex(u) + 1), (u = u.parentNode)), + { startContainer: i, startOffset: a, endContainer: u, endOffset: s } + ); + }, + Gc = Rn.each, + Jc = function (e, t, o) { + var n, + r, + i, + a, + u, + s, + c, + l = t.startContainer, + f = t.startOffset, + d = t.endContainer, + h = t.endOffset; + if ( + 0 < (c = e.select("td[data-mce-selected],th[data-mce-selected]")).length + ) + Gc(c, function (e) { + o([e]); + }); + else { + var m = function (e) { + var t; + return ( + 3 === (t = e[0]).nodeType && + t === l && + f >= t.nodeValue.length && + e.splice(0, 1), + (t = e[e.length - 1]), + 0 === h && + 0 < e.length && + t === d && + 3 === t.nodeType && + e.splice(e.length - 1, 1), + e + ); + }, + g = function (e, t, n) { + for (var r = []; e && e !== n; e = e[t]) r.push(e); + return r; + }, + p = function (e, t) { + do { + if (e.parentNode === t) return e; + e = e.parentNode; + } while (e); + }, + v = function (e, t, n) { + var r = n ? "nextSibling" : "previousSibling"; + for (u = (a = e).parentNode; a && a !== t; a = u) + (u = a.parentNode), + (s = g(a === e ? a : a[r], r)).length && + (n || s.reverse(), o(m(s))); + }; + if ( + (1 === l.nodeType && l.hasChildNodes() && (l = l.childNodes[f]), + 1 === d.nodeType && + d.hasChildNodes() && + (d = (function (e, t) { + var n = e.childNodes; + return ( + --t > n.length - 1 ? (t = n.length - 1) : t < 0 && (t = 0), + n[t] || e + ); + })(d, h)), + l === d) + ) + return o(m([l])); + for (n = e.findCommonAncestor(l, d), a = l; a; a = a.parentNode) { + if (a === d) return v(l, n, !0); + if (a === n) break; + } + for (a = d; a; a = a.parentNode) { + if (a === l) return v(d, n); + if (a === n) break; + } + (r = p(l, n) || l), + (i = p(d, n) || d), + v(l, r, !0), + (s = g( + r === l ? r : r.nextSibling, + "nextSibling", + i === d ? i.nextSibling : i, + )).length && o(m(s)), + v(d, i); + } + }; + function Qc(e) { + return il.get(e); + } + function Zc(t, n, r, o) { + return Se(n).fold( + function () { + return "skipping"; + }, + function (e) { + return "br" === o || + (function (e) { + return Et(e) && "\ufeff" === Qc(e); + })(n) + ? "valid" + : (function (e) { + return zt(e) && ma(e, ru()); + })(n) + ? "existing" + : os(n) + ? "caret" + : qc.isValid(t, r, o) && qc.isValid(t, ie(e), r) + ? "valid" + : "invalid-child"; + }, + ); + } + function el(e, t, n, r) { + var o = t.uid, + i = + void 0 === o + ? (function (e) { + var t = new Date().getTime(); + return ( + e + "_" + Math.floor(1e9 * Math.random()) + ++uu + String(t) + ); + })("mce-annotation") + : o, + a = (function h(e, t) { + var n = {}; + for (var r in e) + Object.prototype.hasOwnProperty.call(e, r) && + t.indexOf(r) < 0 && + (n[r] = e[r]); + if (null != e && "function" == typeof Object.getOwnPropertySymbols) { + var o = 0; + for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) + t.indexOf(r[o]) < 0 && + Object.prototype.propertyIsEnumerable.call(e, r[o]) && + (n[r[o]] = e[r[o]]); + } + return n; + })(t, ["uid"]), + u = bt.fromTag("span", e); + da(u, ru()), At(u, "" + iu(), i), At(u, "" + ou(), n); + var s = r(i, a), + c = s.attributes, + l = void 0 === c ? {} : c, + f = s.classes, + d = void 0 === f ? [] : f; + return ( + me(u, l), + (function (t, e) { + z(e, function (e) { + da(t, e); + }); + })(u, d), + u + ); + } + function tl(n, e, t, r, o) { + function i() { + c.set(k.none()); + } + function a(e) { + z(e, l); + } + var u = [], + s = el(n.getDoc(), o, t, r), + c = Je(k.none()), + l = function (e) { + switch (Zc(n, e, "span", ie(e))) { + case "invalid-child": + i(); + var t = Re(e); + a(t), i(); + break; + case "valid": + !(function (e, t) { + wi(e, t), _i(t, e); + })( + e, + c.get().getOrThunk(function () { + var e = Ta(s); + return u.push(e), c.set(k.some(e)), e; + }), + ); + } + }; + return ( + Jc(n.dom, e, function (e) { + i(), + (function (e) { + var t = X(e, bt.fromDom); + a(t); + })(e); + }), + u + ); + } + function nl(o, i, a, u) { + o.undoManager.transact(function () { + var e = o.selection.getRng(); + if ( + (e.collapsed && + (function (e, t) { + var n = Yc( + e, + t, + [{ inline: !0 }], + (function (e) { + return ( + 3 === e.startContainer.nodeType && + e.startContainer.nodeValue.length >= e.startOffset && + "\xa0" === e.startContainer.nodeValue[e.startOffset] + ); + })(t), + ); + t.setStart(n.startContainer, n.startOffset), + t.setEnd(n.endContainer, n.endOffset), + e.selection.setRng(t); + })(o, e), + o.selection.getRng().collapsed) + ) { + var t = el(o.getDoc(), u, i, a.decorate); + Ma(t, "\xa0"), + o.selection.getRng().insertNode(t.dom()), + o.selection.select(t.dom()); + } else { + var n = Is.getPersistentBookmark(o.selection, !1), + r = o.selection.getRng(); + tl(o, r, i, a.decorate, u), o.selection.moveToBookmark(n); + } + }); + } + function rl(r) { + var o = (function () { + var n = {}; + return { + register: function (e, t) { + n[e] = { name: e, settings: t }; + }, + lookup: function (e) { + return n.hasOwnProperty(e) + ? k.from(n[e]).map(function (e) { + return e.settings; + }) + : k.none(); + }, + }; + })(); + Sa(r, o); + var n = Na(r); + return { + register: function (e, t) { + o.register(e, t); + }, + annotate: function (t, n) { + o.lookup(t).each(function (e) { + nl(r, t, e, n); + }); + }, + annotationChanged: function (e, t) { + n.addListener(e, t); + }, + remove: function (e) { + Ea(r, k.some(e)).each(function (e) { + var t = e.elements; + z(t, Si); + }); + }, + getAll: function (e) { + var t = (function (e, t) { + var n = bt.fromDom(e.getBody()), + r = ga(n, "[" + ou() + '="' + t + '"]'), + o = {}; + return ( + z(r, function (e) { + var t = ge(e, iu()), + n = o.hasOwnProperty(t) ? o[t] : []; + o[t] = n.concat([e]); + }), + o + ); + })(r, e); + return se(t, function (e) { + return X(e, function (e) { + return e.dom(); + }); + }); + }, + }; + } + function ol(e, t, n) { + var r = n ? "lastChild" : "firstChild", + o = n ? "prev" : "next"; + if (e[r]) return e[r]; + if (e !== t) { + var i = e[o]; + if (i) return i; + for (var a = e.parent; a && a !== t; a = a.parent) + if ((i = a[o])) return i; + } + } + var il = (function zN(n, r) { + var t = function (e) { + return n(e) ? k.from(e.dom().nodeValue) : k.none(); + }; + return { + get: function (e) { + if (!n(e)) + throw new Error("Can only get " + r + " value of a " + r + " node"); + return t(e).getOr(""); + }, + getOption: t, + set: function (e, t) { + if (!n(e)) + throw new Error( + "Can only set raw " + r + " value of a " + r + " node", + ); + e.dom().nodeValue = t; + }, + }; + })(Et, "text"), + al = /^[ \t\r\n]*$/, + ul = { + "#text": 3, + "#comment": 8, + "#cdata": 4, + "#pi": 7, + "#doctype": 10, + "#document-fragment": 11, + }, + sl = + ((cl.create = function (e, t) { + var n = new cl(e, ul[e] || 1); + if (t) for (var r in t) n.attr(r, t[r]); + return n; + }), + (cl.prototype.replace = function (e) { + return ( + e.parent && e.remove(), this.insert(e, this), this.remove(), this + ); + }), + (cl.prototype.attr = function (e, t) { + var n; + if ("string" != typeof e) { + for (var r in e) this.attr(r, e[r]); + return this; + } + if ((n = this.attributes)) { + if (t === undefined) return n.map[e]; + if (null === t) { + if (e in n.map) { + delete n.map[e]; + for (var o = n.length; o--; ) + if (n[o].name === e) return n.splice(o, 1), this; + } + return this; + } + if (e in n.map) { + for (o = n.length; o--; ) + if (n[o].name === e) { + n[o].value = t; + break; + } + } else n.push({ name: e, value: t }); + return (n.map[e] = t), this; + } + }), + (cl.prototype.clone = function () { + var e, + t = new cl(this.name, this.type); + if ((e = this.attributes)) { + var n = []; + n.map = {}; + for (var r = 0, o = e.length; r < o; r++) { + var i = e[r]; + "id" !== i.name && + ((n[n.length] = { name: i.name, value: i.value }), + (n.map[i.name] = i.value)); + } + t.attributes = n; + } + return (t.value = this.value), (t.shortEnded = this.shortEnded), t; + }), + (cl.prototype.wrap = function (e) { + return this.parent.insert(e, this), e.append(this), this; + }), + (cl.prototype.unwrap = function () { + for (var e = this.firstChild; e; ) { + var t = e.next; + this.insert(e, this, !0), (e = t); + } + this.remove(); + }), + (cl.prototype.remove = function () { + var e = this.parent, + t = this.next, + n = this.prev; + return ( + e && + (e.firstChild === this + ? (e.firstChild = t) && (t.prev = null) + : (n.next = t), + e.lastChild === this + ? (e.lastChild = n) && (n.next = null) + : (t.prev = n), + (this.parent = this.next = this.prev = null)), + this + ); + }), + (cl.prototype.append = function (e) { + e.parent && e.remove(); + var t = this.lastChild; + return ( + t + ? (((t.next = e).prev = t), (this.lastChild = e)) + : (this.lastChild = this.firstChild = e), + (e.parent = this), + e + ); + }), + (cl.prototype.insert = function (e, t, n) { + e.parent && e.remove(); + var r = t.parent || this; + return ( + n + ? (t === r.firstChild ? (r.firstChild = e) : (t.prev.next = e), + (e.prev = t.prev), + ((e.next = t).prev = e)) + : (t === r.lastChild ? (r.lastChild = e) : (t.next.prev = e), + (e.next = t.next), + ((e.prev = t).next = e)), + (e.parent = r), + e + ); + }), + (cl.prototype.getAll = function (e) { + for (var t = [], n = this.firstChild; n; n = ol(n, this)) + n.name === e && t.push(n); + return t; + }), + (cl.prototype.empty = function () { + if (this.firstChild) { + for (var e = [], t = this.firstChild; t; t = ol(t, this)) e.push(t); + for (var n = e.length; n--; ) + (t = e[n]).parent = + t.firstChild = + t.lastChild = + t.next = + t.prev = + null; + } + return (this.firstChild = this.lastChild = null), this; + }), + (cl.prototype.isEmpty = function (e, t, n) { + void 0 === t && (t = {}); + var r = this.firstChild; + if (r) + do { + if (1 === r.type) { + if (r.attr("data-mce-bogus")) continue; + if (e[r.name]) return !1; + for (var o = r.attributes.length; o--; ) { + var i = r.attributes[o].name; + if ("name" === i || 0 === i.indexOf("data-mce-bookmark")) + return !1; + } + } + if (8 === r.type) return !1; + if (3 === r.type && !al.test(r.value)) return !1; + if ( + 3 === r.type && + r.parent && + t[r.parent.name] && + al.test(r.value) + ) + return !1; + if (n && n(r)) return !1; + } while ((r = ol(r, this))); + return !0; + }), + (cl.prototype.walk = function (e) { + return ol(this, null, e); + }), + cl); + function cl(e, t) { + (this.name = e), + 1 === (this.type = t) && + ((this.attributes = []), (this.attributes.map = {})); + } + function ll(e, t, n) { + var r, + o, + i, + a, + u = 1; + for ( + a = e.getShortEndedElements(), + (i = + /<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex = + r = + n; + (o = i.exec(t)); + + ) { + if (((r = i.lastIndex), "/" === o[1])) u--; + else if (!o[1]) { + if (o[2] in a) continue; + u++; + } + if (0 === u) break; + } + return r; + } + function fl(e, t) { + var n = e.exec(t); + if (n) { + var r = n[1], + o = n[2]; + return "string" == typeof r && "data-mce-bogus" === r.toLowerCase() + ? o + : null; + } + return null; + } + function dl(V, I) { + void 0 === I && (I = vr()); + function e() {} + !1 !== (V = V || {}).fix_self_closing && (V.fix_self_closing = !0); + var F = V.comment ? V.comment : e, + U = V.cdata ? V.cdata : e, + j = V.text ? V.text : e, + q = V.start ? V.start : e, + $ = V.end ? V.end : e, + W = V.pi ? V.pi : e, + K = V.doctype ? V.doctype : e; + return { + parse: function (e) { + function t(e) { + var t, n; + for (t = _.length; t-- && _[t].name !== e; ); + if (0 <= t) { + for (n = _.length - 1; t <= n; n--) (e = _[n]).valid && $(e.name); + _.length = t; + } + } + function n(e, t, n, r, o) { + var i, a; + if ( + ((n = (t = t.toLowerCase()) in h ? t : B(n || r || o || "")), + g && + !l && + !1 === + (function (e) { + return 0 === e.indexOf("data-") || 0 === e.indexOf("aria-"); + })(t)) + ) { + if (!(i = C[t]) && w) { + for (a = w.length; a-- && !(i = w[a]).pattern.test(t); ); + -1 === a && (i = null); + } + if (!i) return; + if (i.validValues && !(n in i.validValues)) return; + } + if (H[t] && !V.allow_script_urls) { + var u = n.replace(/[\s\u0000-\u001F]+/g, ""); + try { + u = decodeURIComponent(u); + } catch (s) { + u = unescape(u); + } + if (P.test(u)) return; + if ( + (function (e, t) { + return ( + !e.allow_html_data_urls && + (/^data:image\//i.test(t) + ? !1 === e.allow_svg_data_urls && + /^data:image\/svg\+xml/i.test(t) + : /^data:/i.test(t)) + ); + })(V, u) + ) + return; + } + (l && (t in H || 0 === t.indexOf("on"))) || + ((c.map[t] = n), c.push({ name: t, value: n })); + } + var r, + o, + i, + c, + a, + u, + s, + l, + f, + d, + h, + m, + g, + p, + v, + y, + b, + C, + w, + x, + z, + E, + N, + S, + k, + T, + A, + M, + R, + D = 0, + _ = [], + O = 0, + B = ar.decode, + H = Rn.makeMap( + "src,href,data,background,formaction,poster,xlink:href", + ), + P = /((java|vb)script|mhtml):/i; + for ( + k = new RegExp( + "<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))", + "g", + ), + T = + /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g, + d = I.getShortEndedElements(), + S = V.self_closing_elements || I.getSelfClosingElements(), + h = I.getBoolAttrs(), + g = V.validate, + f = V.remove_internals, + R = V.fix_self_closing, + A = I.getSpecialElements(), + N = e + ">"; + (r = k.exec(N)); + + ) { + if ((D < r.index && j(B(e.substr(D, r.index - D))), (o = r[6]))) + ":" === (o = o.toLowerCase()).charAt(0) && (o = o.substr(1)), t(o); + else if ((o = r[7])) { + if (r.index + r[0].length > e.length) { + j(B(e.substr(r.index))), (D = r.index + r[0].length); + continue; + } + ":" === (o = o.toLowerCase()).charAt(0) && (o = o.substr(1)), + (m = o in d), + R && S[o] && 0 < _.length && _[_.length - 1].name === o && t(o); + var L = fl(T, r[8]); + if (null !== L) { + if ("all" === L) { + (D = ll(I, e, k.lastIndex)), (k.lastIndex = D); + continue; + } + v = !1; + } + if (!g || (p = I.getElementRule(o))) { + if ( + ((v = !0), + g && ((C = p.attributes), (w = p.attributePatterns)), + (b = r[8]) + ? ((l = -1 !== b.indexOf("data-mce-type")) && f && (v = !1), + ((c = []).map = {}), + b.replace(T, n)) + : ((c = []).map = {}), + g && !l) + ) { + if ( + ((x = p.attributesRequired), + (z = p.attributesDefault), + (E = p.attributesForced), + p.removeEmptyAttrs && !c.length && (v = !1), + E) + ) + for (a = E.length; a--; ) + (s = (y = E[a]).name), + "{$uid}" === (M = y.value) && (M = "mce_" + O++), + (c.map[s] = M), + c.push({ name: s, value: M }); + if (z) + for (a = z.length; a--; ) + (s = (y = z[a]).name) in c.map || + ("{$uid}" === (M = y.value) && (M = "mce_" + O++), + (c.map[s] = M), + c.push({ name: s, value: M })); + if (x) { + for (a = x.length; a-- && !(x[a] in c.map); ); + -1 === a && (v = !1); + } + if ((y = c.map["data-mce-bogus"])) { + if ("all" === y) { + (D = ll(I, e, k.lastIndex)), (k.lastIndex = D); + continue; + } + v = !1; + } + } + v && q(o, c, m); + } else v = !1; + if ((i = A[o])) { + (i.lastIndex = D = r.index + r[0].length), + (D = (r = i.exec(e)) + ? (v && (u = e.substr(D, r.index - D)), r.index + r[0].length) + : ((u = e.substr(D)), e.length)), + v && (0 < u.length && j(u, !0), $(o)), + (k.lastIndex = D); + continue; + } + m || + (b && b.indexOf("/") === b.length - 1 + ? v && $(o) + : _.push({ name: o, valid: v })); + } else + (o = r[1]) + ? (">" === o.charAt(0) && (o = " " + o), + V.allow_conditional_comments || + "[if" !== o.substr(0, 3).toLowerCase() || + (o = " " + o), + F(o)) + : (o = r[2]) + ? U(o.replace(/)/g, "\n") + .replace(/^[\r\n]*|[\r\n]*$/g, "") + .replace( + /^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g, + "", + ); + }; + i--; + + ) + (r = (n = e[i]).firstChild ? n.firstChild.value : ""), + "script" === t + ? ((o = n.attr("type")) && + n.attr( + "type", + "mce-no/type" === o ? null : o.replace(/^mce\-/, ""), + ), + "xhtml" === s.element_format && + 0 < r.length && + (n.firstChild.value = "// ")) + : "xhtml" === s.element_format && + 0 < r.length && + (n.firstChild.value = "\x3c!--\n" + a(r) + "\n--\x3e"); + }), + t.addNodeFilter("#comment", function (e) { + for (var t, n = e.length; n--; ) + 0 === (t = e[n]).value.indexOf("[CDATA[") + ? ((t.name = "#cdata"), + (t.type = 4), + (t.value = t.value.replace(/^\[CDATA\[|\]\]$/g, ""))) + : 0 === t.value.indexOf("mce:protected ") && + ((t.name = "#text"), + (t.type = 3), + (t.raw = !0), + (t.value = unescape(t.value).substr(14))); + }), + t.addNodeFilter("xml:namespace,input", function (e, t) { + for (var n, r = e.length; r--; ) + 7 === (n = e[r]).type + ? n.remove() + : 1 === n.type && + ("input" !== t || n.attr("type") || n.attr("type", "text")); + }), + t.addAttributeFilter("data-mce-type", function (e) { + z(e, function (e) { + "format-caret" === e.attr("data-mce-type") && + (e.isEmpty(t.schema.getNonEmptyElements()) + ? e.remove() + : e.unwrap()); + }); + }), + t.addAttributeFilter( + "data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize", + function (e, t) { + for (var n = e.length; n--; ) e[n].attr(t, null); + }, + ); + }, + Lp = function (e) { + function t(e) { + return e && "br" === e.name; + } + var n, r; + t((n = e.lastChild)) && t((r = n.prev)) && (n.remove(), r.remove()); + }, + Vp = function (e, t, n) { + return (function (e, t) { + return e && e.hasEventListeners("PreProcess") && !t.no_events; + })(e, n) + ? (function (e, t, n) { + var r, + o, + i, + a = e.dom; + return ( + (t = t.cloneNode(!0)), + (r = j.document.implementation).createHTMLDocument && + ((o = r.createHTMLDocument("")), + Rn.each( + "BODY" === t.nodeName ? t.childNodes : [t], + function (e) { + o.body.appendChild(o.importNode(e, !0)); + }, + ), + (t = "BODY" !== t.nodeName ? o.body.firstChild : o.body), + (i = a.doc), + (a.doc = o)), + ld(e, Cd(n, { node: t })), + i && (a.doc = i), + t + ); + })(e, t, n) + : t; + }, + Ip = function (e, t) { + t.inline_styles && zp(e, t); + }, + Fp = function (e, t) { + return ( + e && + e.firstChild && + e.firstChild === e.lastChild && + e.firstChild.name === t + ); + }, + Up = Rn.makeMap, + jp = Rn.each, + qp = Rn.explode, + $p = Rn.extend; + function Wp(e) { + return { getBookmark: d(Ic, e), moveToBookmark: d(Fc, e) }; + } + (Wp = Wp || {}).isBookmarkNode = Uc; + function Kp(r, a) { + var u, + s, + c, + l, + f, + d, + h, + m, + g, + p, + v, + y, + i, + b, + C, + w, + x, + z = a.dom, + E = Rn.each, + N = a.getDoc(), + S = j.document, + k = Math.abs, + T = Math.round, + A = a.getBody(); + function M(e) { + return e && ("IMG" === e.nodeName || a.dom.is(e, "figure.image")); + } + function e(e) { + var t = e.target; + !(function (e, t) { + if ("longpress" !== e.type && 0 !== e.type.indexOf("touch")) + return M(e.target) && !Qm(e.clientX, e.clientY, t); + var n = e.touches[0]; + return M(e.target) && !Qm(n.clientX, n.clientY, t); + })(e, a.selection.getRng()) || + e.isDefaultPrevented() || + a.selection.select(t); + } + function R(e) { + return a.dom.is(e, "figure.image") ? e.querySelector("img") : e; + } + function D(e) { + var t = a.settings.object_resizing; + return ( + !1 !== t && + !Sn.iOS && + ("string" != typeof t && (t = "table,img,figure.image,div"), + "false" !== e.getAttribute("data-mce-resize") && + e !== a.getBody() && + we(bt.fromDom(e), t)) + ); + } + function _(e) { + var t, n, r, o; + (t = e.screenX - d), + (n = e.screenY - h), + (b = t * f[2] + p), + (C = n * f[3] + v), + (b = b < 5 ? 5 : b), + (C = C < 5 ? 5 : C), + (M(u) && !1 !== a.settings.resize_img_proportional + ? !Mh.modifierPressed(e) + : Mh.modifierPressed(e) || (M(u) && f[2] * f[3] != 0)) && + (k(t) > k(n) + ? ((C = T(b * y)), (b = T(C / y))) + : ((b = T(C / y)), (C = T(b * y)))), + z.setStyles(R(s), { width: b, height: C }), + (r = 0 < (r = f.startPos.x + t) ? r : 0), + (o = 0 < (o = f.startPos.y + n) ? o : 0), + z.setStyles(c, { left: r, top: o, display: "block" }), + (c.innerHTML = b + " × " + C), + f[2] < 0 && s.clientWidth <= b && z.setStyle(s, "left", m + (p - b)), + f[3] < 0 && s.clientHeight <= C && z.setStyle(s, "top", g + (v - C)), + (t = A.scrollWidth - w) + (n = A.scrollHeight - x) !== 0 && + z.setStyles(c, { left: r - t, top: o - n }), + i || (gd(a, u, p, v), (i = !0)); + } + function n(e) { + function t(e, t) { + if (e) + do { + if (e === t) return !0; + } while ((e = e.parentNode)); + } + var n; + i || + a.removed || + (E( + z.select("img[data-mce-selected],hr[data-mce-selected]"), + function (e) { + e.removeAttribute("data-mce-selected"); + }, + ), + (n = "mousedown" === e.type ? e.target : r.getNode()), + t((n = z.$(n).closest("table,img,figure.image,hr")[0]), A) && + (L(), t(r.getStart(!0), n) && t(r.getEnd(!0), n)) + ? B(n) + : H()); + } + function o(e) { + return Yp( + (function (e, t) { + for (; t && t !== e; ) { + if (Gp(t) || Yp(t)) return t; + t = t.parentNode; + } + return null; + })(a.getBody(), e), + ); + } + l = { + nw: [0, 0, -1, -1], + ne: [1, 0, 1, -1], + se: [1, 1, 1, 1], + sw: [0, 1, -1, 1], + }; + var O = function () { + i = !1; + function e(e, t) { + t && + (u.style[e] || !a.schema.isValid(u.nodeName.toLowerCase(), e) + ? z.setStyle(R(u), e, t) + : z.setAttrib(R(u), e, t)); + } + e("width", b), + e("height", C), + z.unbind(N, "mousemove", _), + z.unbind(N, "mouseup", O), + S !== N && (z.unbind(S, "mousemove", _), z.unbind(S, "mouseup", O)), + z.remove(s), + z.remove(c), + B(u), + pd(a, u, b, C), + z.setAttrib(u, "style", z.getAttrib(u, "style")), + a.nodeChanged(); + }, + B = function (e) { + var t, r, o, n, i; + H(), + P(), + (t = z.getPos(e, A)), + (m = t.x), + (g = t.y), + (i = e.getBoundingClientRect()), + (r = i.width || i.right - i.left), + (o = i.height || i.bottom - i.top), + u !== e && ((u = e), (b = C = 0)), + (n = a.fire("ObjectSelected", { target: e })), + D(e) && !n.isDefaultPrevented() + ? E(l, function (t, e) { + var n; + (n = z.get("mceResizeHandle" + e)) && z.remove(n), + (n = z.add(A, "div", { + id: "mceResizeHandle" + e, + "data-mce-bogus": "all", + class: "mce-resizehandle", + unselectable: !0, + style: "cursor:" + e + "-resize; margin:0; padding:0", + })), + 11 === Sn.ie && (n.contentEditable = !1), + z.bind(n, "mousedown", function (e) { + e.stopImmediatePropagation(), + e.preventDefault(), + (function (e) { + (d = e.screenX), + (h = e.screenY), + (p = R(u).clientWidth), + (v = R(u).clientHeight), + (y = v / p), + ((f = t).startPos = { + x: r * t[0] + m, + y: o * t[1] + g, + }), + (w = A.scrollWidth), + (x = A.scrollHeight), + (s = u.cloneNode(!0)), + z.addClass(s, "mce-clonedresizable"), + z.setAttrib(s, "data-mce-bogus", "all"), + (s.contentEditable = !1), + (s.unSelectabe = !0), + z.setStyles(s, { left: m, top: g, margin: 0 }), + s.removeAttribute("data-mce-selected"), + A.appendChild(s), + z.bind(N, "mousemove", _), + z.bind(N, "mouseup", O), + S !== N && + (z.bind(S, "mousemove", _), + z.bind(S, "mouseup", O)), + (c = z.add( + A, + "div", + { + class: "mce-resize-helper", + "data-mce-bogus": "all", + }, + p + " × " + v, + )); + })(e); + }), + (t.elm = n), + z.setStyles(n, { + left: r * t[0] + m - n.offsetWidth / 2, + top: o * t[1] + g - n.offsetHeight / 2, + }); + }) + : H(), + u.setAttribute("data-mce-selected", "1"); + }, + H = function () { + var e, t; + for (e in (P(), u && u.removeAttribute("data-mce-selected"), l)) + (t = z.get("mceResizeHandle" + e)) && (z.unbind(t), z.remove(t)); + }, + P = function () { + for (var e in l) { + var t = l[e]; + t.elm && (z.unbind(t.elm), delete t.elm); + } + }, + L = function () { + try { + a.getDoc().execCommand("enableObjectResizing", !1, !1); + } catch (e) {} + }; + return ( + a.on("init", function () { + L(), + (Sn.browser.isIE() || Sn.browser.isEdge()) && + (a.on("mousedown click", function (e) { + var t = e.target, + n = t.nodeName; + i || + !/^(TABLE|IMG|HR)$/.test(n) || + o(t) || + (2 !== e.button && a.selection.select(t, "TABLE" === n), + "mousedown" === e.type && a.nodeChanged()); + }), + a.dom.bind(A, "mscontrolselect", function (e) { + function t(e) { + vn.setEditorTimeout(a, function () { + a.selection.select(e); + }); + } + if (o(e.target)) return e.preventDefault(), void t(e.target); + /^(TABLE|IMG|HR)$/.test(e.target.nodeName) && + (e.preventDefault(), "IMG" === e.target.tagName && t(e.target)); + })); + var t = vn.throttle(function (e) { + a.composing || n(e); + }); + a.on( + "nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged", + t, + ), + a.on("keyup compositionend", function (e) { + u && "TABLE" === u.nodeName && t(e); + }), + a.on("hide blur", H), + a.on("contextmenu longpress", e, !0); + }), + a.on("remove", P), + { + isResizable: D, + showResizeRect: B, + hideResizeRect: H, + updateResizeRect: n, + destroy: function () { + u = s = null; + }, + } + ); + } + var Xp = Wp, + Yp = Ge.isContentEditableFalse, + Gp = Ge.isContentEditableTrue; + function Jp(e) { + var t = bt.fromDom(j.document), + n = Ti(t), + r = (function (e, t) { + var n = t.owner(e); + return Iv(t, n); + })(e, Fv), + o = Pi(e), + i = m( + r, + function (e, t) { + var n = Pi(t); + return { left: e.left + n.left(), top: e.top + n.top() }; + }, + { left: 0, top: 0 }, + ); + return Hi(i.left + o.left() + n.left(), i.top + o.top() + n.top()); + } + function Qp(e) { + return "textarea" === ie(e); + } + function Zp(e, t) { + var n = (function (e) { + var t = e.dom().ownerDocument, + n = t.body, + r = t.defaultView, + o = t.documentElement; + if (n === e.dom()) return Hi(n.offsetLeft, n.offsetTop); + var i = ki(r.pageYOffset, o.scrollTop), + a = ki(r.pageXOffset, o.scrollLeft), + u = ki(o.clientTop, n.clientTop), + s = ki(o.clientLeft, n.clientLeft); + return Pi(e).translate(a - s, i - u); + })(e), + r = (function (e) { + return Vv.get(e); + })(e); + return { element: e, bottom: n.top() + r, pos: n, cleanup: t }; + } + function ev(e, t) { + var n = (function (e, t) { + var n = Re(e); + if (0 === n.length || Qp(e)) return { element: e, offset: t }; + if (t < n.length && !Qp(n[t])) return { element: n[t], offset: 0 }; + var r = n[n.length - 1]; + return Qp(r) + ? { element: e, offset: t } + : "img" === ie(r) + ? { element: r, offset: 1 } + : Et(r) + ? { element: r, offset: Qc(r).length } + : { element: r, offset: Re(r).length }; + })(e, t), + r = bt.fromHtml('' + lu + ""); + return ( + wi(n.element, r), + Zp(r, function () { + return Oi(r); + }) + ); + } + function tv(e) { + return Zp(bt.fromDom(e), i); + } + function nv(n, r, o, i) { + jv( + n, + function (e, t) { + return Uv(n, r, o, i); + }, + o, + ); + } + function rv(e, t, n, r) { + var o = bt.fromDom(e.getDoc()); + n(o, Ti(o).top(), t, r); + } + function ov(e, t, n, r) { + var o = e.pos; + if (n) Ai(o.left(), o.top(), r); + else { + var i = o.top() - t + (e.bottom - o.top()); + Ai(o.left(), i, r); + } + } + function iv(e, t, n, r, o) { + r.pos.top() < t + ? ov(r, n, !1 !== o, e) + : r.bottom > n + t && ov(r, n, !0 === o, e); + } + function av(e, t, n, r) { + var o = e.dom().defaultView.innerHeight; + iv(e, t, o, n, r); + } + function uv(e, t, n, r, o) { + var i = t.dom().defaultView.innerHeight; + iv(t, n, i, r, o); + var a = Jp(r.element), + u = Vi(j.window); + a.top() < u.y() + ? Mi(r.element, !1 !== o) + : a.top() > u.bottom() && Mi(r.element, !0 === o); + } + function sv(e, t, n) { + return nv(e, d(av), t, n); + } + function cv(e, t, n) { + return rv(e, tv(t), d(av), n); + } + function lv(e, t, n) { + return nv(e, d(uv, e), t, n); + } + function fv(e, t, n) { + return rv(e, tv(t), d(uv, e), n); + } + function dv(e) { + return Ge.isContentEditableTrue(e) || Ge.isContentEditableFalse(e); + } + function hv(e, t) { + var n = (t || j.document).createDocumentFragment(); + return ( + z(e, function (e) { + n.appendChild(e.dom()); + }), + bt.fromDom(n) + ); + } + function mv(e, t) { + var n = parseInt(ge(e, t), 10); + return isNaN(n) ? 1 : n; + } + function gv(e) { + return b( + e, + function (e, t) { + return t.cells().length > e ? t.cells().length : e; + }, + 0, + ); + } + function pv(e, t) { + for (var n = e.rows(), r = 0; r < n.length; r++) + for (var o = n[r].cells(), i = 0; i < o.length; i++) + if (ze(o[i], t)) return k.some(Gv(i, r)); + return k.none(); + } + function vv(e, t, n, r, o) { + for (var i = [], a = e.rows(), u = n; u <= o; u++) { + var s = a[u].cells(), + c = t < r ? s.slice(t, r + 1) : s.slice(r, t + 1); + i.push(Yv(a[u].element(), c)); + } + return i; + } + function yv(e) { + var t = []; + if (e) for (var n = 0; n < e.rangeCount; n++) t.push(e.getRangeAt(n)); + return t; + } + function bv(e) { + return y(ty(e), Wn); + } + function Cv(e) { + return ga(e, "td[data-mce-selected],th[data-mce-selected]"); + } + function wv(e, t) { + var n = Cv(t), + r = bv(e); + return 0 < n.length ? n : r; + } + function xv(t, n) { + return g(t, function (e) { + return "li" === ie(e) && ah(e, n); + }).fold($([]), function (e) { + return (function (e) { + return g(e, function (e) { + return "ul" === ie(e) || "ol" === ie(e); + }); + })(t) + .map(function (e) { + return [bt.fromTag("li"), bt.fromTag(ie(e))]; + }) + .getOr([]); + }); + } + function zv(e, t) { + var n = bt.fromDom(t.commonAncestorContainer), + r = dh(n, e), + o = y(r, function (e) { + return _n(e) || Vn(e); + }), + i = xv(r, t), + a = o.concat( + i.length + ? i + : (function (t) { + return jn(t) + ? Se(t) + .filter(Un) + .fold($([]), function (e) { + return [t, e]; + }) + : Un(t) + ? [t] + : []; + })(n), + ); + return X(a, Ta); + } + function Ev() { + return hv([]); + } + function Nv(e, t) { + return (function (e, t) { + var n = b( + t, + function (e, t) { + return _i(t, e), t; + }, + e, + ); + return 0 < t.length ? hv([n]) : n; + })(bt.fromDom(t.cloneContents()), zv(e, t)); + } + function Sv(e, o) { + return (function (e, t) { + return wa(t, "table", d(ze, e)); + })(e, o[0]) + .bind(function (e) { + var t = o[0], + n = o[o.length - 1], + r = Jv(e); + return Zv(r, t, n).map(function (e) { + return hv([Qv(e)]); + }); + }) + .getOrThunk(Ev); + } + function kv(e, t, n) { + return ( + null !== + (function (e, t, n) { + for (; e && e !== t; ) { + if (n(e)) return e; + e = e.parentNode; + } + return null; + })(e, t, n) + ); + } + function Tv(e, t, n) { + return kv(e, t, function (e) { + return e.nodeName === n; + }); + } + function Av(e) { + return e && "TABLE" === e.nodeName; + } + function Mv(e, t, n) { + for ( + var r = new bi(t, e.getParent(t.parentNode, e.isBlock) || e.getRoot()); + (t = r[n ? "prev" : "next"]()); + + ) + if (Ge.isBr(t)) return !0; + } + function Rv(e, t, n, r, o) { + var i, + a, + u = e.getRoot(), + s = e.schema.getNonEmptyElements(), + c = e.getParent(o.parentNode, e.isBlock) || u; + if (r && Ge.isBr(o) && t && e.isEmpty(c)) + return k.some(ju(o.parentNode, e.nodeIndex(o))); + for (var l, f, d = new bi(o, c); (a = d[r ? "prev" : "next"]()); ) { + if ( + "false" === e.getContentEditableParent(a) || + ((f = u), _a((l = a)) && !1 === kv(l, f, os)) + ) + return k.none(); + if (Ge.isText(a) && 0 < a.nodeValue.length) + return !1 === Tv(a, u, "A") + ? k.some(ju(a, r ? a.nodeValue.length : 0)) + : k.none(); + if (e.isBlock(a) || s[a.nodeName.toLowerCase()]) return k.none(); + i = a; + } + return n && i ? k.some(ju(i, 0)) : k.none(); + } + function Dv(e, t, n, r) { + var o, + i, + a, + u, + s, + c, + l, + f = e.getRoot(), + d = !1; + if ( + ((o = r[(n ? "start" : "end") + "Container"]), + (i = r[(n ? "start" : "end") + "Offset"]), + (c = Ge.isElement(o) && i === o.childNodes.length), + (u = e.schema.getNonEmptyElements()), + (s = n), + _a(o)) + ) + return k.none(); + if ( + (Ge.isElement(o) && i > o.childNodes.length - 1 && (s = !1), + Ge.isDocument(o) && ((o = f), (i = 0)), + o === f) + ) { + if (s && (a = o.childNodes[0 < i ? i - 1 : 0])) { + if (_a(a)) return k.none(); + if (u[a.nodeName] || Av(a)) return k.none(); + } + if (o.hasChildNodes()) { + if ( + ((i = Math.min(!s && 0 < i ? i - 1 : i, o.childNodes.length - 1)), + (o = o.childNodes[i]), + (i = Ge.isText(o) && c ? o.data.length : 0), + !t && o === f.lastChild && Av(o)) + ) + return k.none(); + if ( + (function (e, t) { + for (; t && t !== e; ) { + if (Ge.isContentEditableFalse(t)) return !0; + t = t.parentNode; + } + return !1; + })(f, o) || + _a(o) + ) + return k.none(); + if (o.hasChildNodes() && !1 === Av(o)) { + var h = new bi((a = o), f); + do { + if (Ge.isContentEditableFalse(a) || _a(a)) { + d = !1; + break; + } + if (Ge.isText(a) && 0 < a.nodeValue.length) { + (i = s ? 0 : a.nodeValue.length), (o = a), (d = !0); + break; + } + if ( + u[a.nodeName.toLowerCase()] && + (!(l = a) || !/^(TD|TH|CAPTION)$/.test(l.nodeName)) + ) { + (i = e.nodeIndex(a)), (o = a.parentNode), s || i++, (d = !0); + break; + } + } while ((a = s ? h.next() : h.prev())); + } + } + } + return ( + t && + (Ge.isText(o) && + 0 === i && + Rv(e, c, t, !0, o).each(function (e) { + (o = e.container()), (i = e.offset()), (d = !0); + }), + Ge.isElement(o) && + (!(a = (a = o.childNodes[i]) || o.childNodes[i - 1]) || + !Ge.isBr(a) || + (function (e, t) { + return e.previousSibling && e.previousSibling.nodeName === t; + })(a, "A") || + Mv(e, a, !1) || + Mv(e, a, !0) || + Rv(e, c, t, !0, a).each(function (e) { + (o = e.container()), (i = e.offset()), (d = !0); + }))), + s && + !t && + Ge.isText(o) && + i === o.nodeValue.length && + Rv(e, c, t, !1, o).each(function (e) { + (o = e.container()), (i = e.offset()), (d = !0); + }), + d ? k.some(ju(o, i)) : k.none() + ); + } + function _v(e) { + return 0 === e.dom().length ? (Oi(e), k.none()) : k.some(e); + } + function Ov(e, t, n, r, o) { + var i = n ? t.startContainer : t.endContainer, + a = n ? t.startOffset : t.endOffset; + return k + .from(i) + .map(bt.fromDom) + .map(function (e) { + return r && t.collapsed ? e : De(e, o(e, a)).getOr(e); + }) + .bind(function (e) { + return zt(e) ? k.some(e) : Se(e); + }) + .map(function (e) { + return e.dom(); + }) + .getOr(e); + } + function Bv(e, t, n) { + return Ov(e, t, !0, n, function (e, t) { + return Math.min( + (function (e) { + return e.dom().childNodes.length; + })(e), + t, + ); + }); + } + function Hv(e, t, n) { + return Ov(e, t, !1, n, function (e, t) { + return 0 < t ? t - 1 : t; + }); + } + function Pv(e, t) { + for (var n = e; e && Ge.isText(e) && 0 === e.length; ) + e = t ? e.nextSibling : e.previousSibling; + return e || n; + } + function Lv(e, t, n) { + if (e && e.hasOwnProperty(t)) { + var r = y(e[t], function (e) { + return e !== n; + }); + 0 === r.length ? delete e[t] : (e[t] = r); + } + } + var Vv = (function EN(r, o) { + function e(e) { + var t = o(e); + if (t <= 0 || null === t) { + var n = ve(e, r); + return parseFloat(n) || 0; + } + return t; + } + function i(o, e) { + return b( + e, + function (e, t) { + var n = ve(o, t), + r = n === undefined ? 0 : parseInt(n, 10); + return isNaN(r) ? e : e + r; + }, + 0, + ); + } + return { + set: function (e, t) { + if (!_(t) && !t.match(/^[0-9]+$/)) + throw new Error( + r + ".set accepts only positive integer values. Value was " + t, + ); + var n = e.dom(); + fe(n) && (n.style[r] = t + "px"); + }, + get: e, + getOuter: e, + aggregate: i, + max: function (e, t, n) { + var r = i(e, n); + return r < t ? t - r : 0; + }, + }; + })("height", function (e) { + var t = e.dom(); + return de(e) ? t.getBoundingClientRect().height : t.offsetHeight; + }), + Iv = function (r, e) { + return r.view(e).fold($([]), function (e) { + var t = r.owner(e), + n = Iv(r, t); + return [e].concat(n); + }); + }, + Fv = /* */ Object.freeze({ + view: function (e) { + return ( + e.dom() === j.document + ? k.none() + : k.from(e.dom().defaultView.frameElement) + ).map(bt.fromDom); + }, + owner: function (e) { + return Ee(e); + }, + }), + Uv = function (e, t, n, r) { + var o = bt.fromDom(e.getBody()), + i = bt.fromDom(e.getDoc()); + !(function (e) { + e.dom().offsetWidth; + })(o); + var a = Ti(i).top(), + u = ev(bt.fromDom(n.startContainer), n.startOffset); + t(i, a, u, r), u.cleanup(); + }, + jv = function (e, t, n) { + var r = n.startContainer, + o = n.startOffset, + i = n.endContainer, + a = n.endOffset; + t(bt.fromDom(r), bt.fromDom(i)); + var u = e.dom.createRng(); + u.setStart(r, o), u.setEnd(i, a), e.selection.setRng(n); + }, + qv = function (e, t, n) { + !(function (e, t, n) { + return e + .fire("ScrollIntoView", { elm: t, alignToTop: n }) + .isDefaultPrevented(); + })(e, t, n) && (e.inline ? cv : fv)(e, t, n); + }, + $v = function (e, t, n) { + (e.inline ? sv : lv)(e, t, n); + }, + Wv = function (e, t, n) { + var r, + o, + i = n; + if (i.caretPositionFromPoint) + (o = i.caretPositionFromPoint(e, t)) && + ((r = n.createRange()).setStart(o.offsetNode, o.offset), + r.collapse(!0)); + else if (n.caretRangeFromPoint) r = n.caretRangeFromPoint(e, t); + else if (i.body.createTextRange) { + r = i.body.createTextRange(); + try { + r.moveToPoint(e, t), r.collapse(!0); + } catch (a) { + r = (function (e, n, t) { + var r, o, i; + if ( + ((r = t.elementFromPoint(e, n)), + (o = t.body.createTextRange()), + (r && "HTML" !== r.tagName) || (r = t.body), + o.moveToElementText(r), + 0 < + (i = (i = Rn.toArray(o.getClientRects())).sort(function (e, t) { + return ( + (e = Math.abs(Math.max(e.top - n, e.bottom - n))) - + (t = Math.abs(Math.max(t.top - n, t.bottom - n))) + ); + })).length) + ) { + n = (i[0].bottom + i[0].top) / 2; + try { + return o.moveToPoint(e, n), o.collapse(!0), o; + } catch (a) {} + } + return null; + })(e, t, n); + } + return (function (e, t) { + var n = e && e.parentElement ? e.parentElement() : null; + return Ge.isContentEditableFalse( + (function (e, t, n) { + for (; e && e !== t; ) { + if (n(e)) return e; + e = e.parentNode; + } + return null; + })(n, t, dv), + ) + ? null + : e; + })(r, n.body); + } + return r; + }, + Kv = function (n, e) { + return X(e, function (e) { + var t = n.fire("GetSelectionRange", { range: e }); + return t.range !== e ? t.range : e; + }); + }, + Xv = be("element", "width", "rows"), + Yv = be("element", "cells"), + Gv = be("x", "y"), + Jv = function (e) { + var o = Xv(Ta(e), 0, []); + return ( + z(ga(e, "tr"), function (n, r) { + z(ga(n, "td,th"), function (e, t) { + !(function (e, t, n, r, o) { + for ( + var i = mv(o, "rowspan"), + a = mv(o, "colspan"), + u = e.rows(), + s = n; + s < n + i; + s++ + ) { + u[s] || (u[s] = Yv(Aa(r), [])); + for (var c = t; c < t + a; c++) { + u[s].cells()[c] = s === n && c === t ? o : Ta(o); + } + } + })( + o, + (function (e, t, n) { + for ( + ; + (r = t), + (o = n), + (i = void 0), + ((i = e.rows())[o] ? i[o].cells() : [])[r]; + + ) + t++; + var r, o, i; + return t; + })(o, t, r), + r, + n, + e, + ); + }); + }), + Xv(o.element(), gv(o.rows()), o.rows()) + ); + }, + Qv = function (e) { + return (function (e, t) { + var n = Ta(e.element()), + r = bt.fromTag("tbody"); + return Ei(r, t), _i(n, r), n; + })( + e, + (function (e) { + return X(e.rows(), function (e) { + var t = X(e.cells(), function (e) { + var t = Aa(e); + return pe(t, "colspan"), pe(t, "rowspan"), t; + }), + n = Ta(e.element()); + return Ei(n, t), n; + }); + })(e), + ); + }, + Zv = function (n, e, r) { + return pv(n, e).bind(function (t) { + return pv(n, r).map(function (e) { + return (function (e, t, n) { + var r = t.x(), + o = t.y(), + i = n.x(), + a = n.y(), + u = o < a ? vv(e, r, o, i, a) : vv(e, r, a, i, o); + return Xv(e.element(), gv(u), u); + })(n, t, e); + }); + }); + }, + ey = yv, + ty = function (e) { + return v(e, function (e) { + var t = Ka(e); + return t ? [bt.fromDom(t)] : []; + }); + }, + ny = function (e) { + return 1 < yv(e).length; + }, + ry = wv, + oy = function (e) { + return wv(ey(e.selection.getSel()), bt.fromDom(e.getBody())); + }, + iy = function (e, t) { + var n = ry(t, e); + return 0 < n.length + ? Sv(e, n) + : (function (e, t) { + return 0 < t.length && t[0].collapsed ? Ev() : Nv(e, t[0]); + })(e, t); + }, + ay = function (e, t) { + if ( + (void 0 === t && (t = {}), + (t.get = !0), + (t.format = t.format || "html"), + (t.selection = !0), + (t = e.fire("BeforeGetContent", t)).isDefaultPrevented()) + ) + return e.fire("GetContent", t), t.content; + if ("text" === t.format) + return (function (r) { + return k + .from(r.selection.getRng()) + .map(function (e) { + var t = r.dom.add( + r.getBody(), + "div", + { + "data-mce-bogus": "all", + style: "overflow: hidden; opacity: 0;", + }, + e.cloneContents(), + ), + n = fu(t.innerText); + return r.dom.remove(t), n; + }) + .getOr(""); + })(e); + t.getInner = !0; + var n = (function (e, t) { + var n, + r = e.selection.getRng(), + o = e.dom.create("body"), + i = e.selection.getSel(), + a = Kv(e, ey(i)); + return ( + (n = t.contextual + ? iy(bt.fromDom(e.getBody()), a).dom() + : r.cloneContents()) && o.appendChild(n), + e.selection.serializer.serialize(o, t) + ); + })(e, t); + return "tree" === t.format + ? n + : ((t.content = e.selection.isCollapsed() ? "" : n), + e.fire("GetContent", t), + t.content); + }, + uy = function (e, t) { + var n = t.collapsed, + r = t.cloneRange(), + o = ju.fromRangeStart(t); + return ( + Dv(e, n, !0, r).each(function (e) { + (n && ju.isAbove(o, e)) || r.setStart(e.container(), e.offset()); + }), + n || + Dv(e, n, !1, r).each(function (e) { + r.setEnd(e.container(), e.offset()); + }), + n && r.collapse(!0), + mh(t, r) ? k.none() : k.some(r) + ); + }, + sy = function (e, t, n) { + if ( + (n = (function (e, t) { + return ( + ((e = e || { format: "html" }).set = !0), + (e.selection = !0), + (e.content = t), + e + ); + })(n, t)).no_events || + !(n = e.fire("BeforeSetContent", n)).isDefaultPrevented() + ) { + var r = e.selection.getRng(); + !(function (r, e) { + var t = k.from(e.firstChild).map(bt.fromDom), + n = k.from(e.lastChild).map(bt.fromDom); + r.deleteContents(), r.insertNode(e); + var o = t.bind(ke).filter(Et).bind(_v), + i = n.bind(Te).filter(Et).bind(_v); + Ga(o, t.filter(Et), function (e, t) { + !(function (e, t) { + e.insertData(0, t); + })(t.dom(), e.dom().data), + Oi(e); + }), + Ga(i, n.filter(Et), function (e, t) { + var n = t.dom().length; + t.dom().appendData(e.dom().data), r.setEnd(t.dom(), n), Oi(e); + }), + r.collapse(!1); + })(r, r.createContextualFragment(n.content)), + e.selection.setRng(r), + $v(e, r), + n.no_events || e.fire("SetContent", n); + } else e.fire("SetContent", n); + }; + function cy(e) { + return !!e.select; + } + function ly(e) { + return ( + !(!e || !e.ownerDocument) && + Bt(bt.fromDom(e.ownerDocument), bt.fromDom(e)) + ); + } + function fy(u, s, e, c) { + function t(e, t) { + return sy(c, e, t); + } + function r() { + var e, + t, + n = d(); + return ( + !(n && n.anchorNode && n.focusNode) || + ((e = u.createRng()).setStart(n.anchorNode, n.anchorOffset), + e.collapse(!0), + (t = u.createRng()).setStart(n.focusNode, n.focusOffset), + t.collapse(!0), + e.compareBoundaryPoints(e.START_TO_START, t) <= 0) + ); + } + var n, + o, + l, + f, + i = (function p(i, n) { + var a, u; + return { + selectorChangedWithUnbind: function (e, t) { + return ( + a || + ((a = {}), + (u = {}), + n.on("NodeChange", function (e) { + var n = e.element, + r = i.getParents(n, null, i.getRoot()), + o = {}; + Rn.each(a, function (e, n) { + Rn.each(r, function (t) { + if (i.is(t, n)) + return ( + u[n] || + (Rn.each(e, function (e) { + e(!0, { node: t, selector: n, parents: r }); + }), + (u[n] = e)), + (o[n] = e), + !1 + ); + }); + }), + Rn.each(u, function (e, t) { + o[t] || + (delete u[t], + Rn.each(e, function (e) { + e(!1, { node: n, selector: t, parents: r }); + })); + }); + })), + a[e] || (a[e] = []), + a[e].push(t), + { + unbind: function () { + Lv(a, e, t), Lv(u, e, t); + }, + } + ); + }, + }; + })(u, c).selectorChangedWithUnbind, + a = function (e) { + var t = h(); + t.collapse(!!e), m(t); + }, + d = function () { + return s.getSelection ? s.getSelection() : s.document.selection; + }, + h = function () { + function e(e, t, n) { + try { + return t.compareBoundaryPoints(e, n); + } catch (r) { + return -1; + } + } + var t, n, r, o; + if (!s) return null; + if (null == (o = s.document)) return null; + if (c.bookmark !== undefined && !1 === sd(c)) { + var i = Zf(c); + if (i.isSome()) + return i + .map(function (e) { + return Kv(c, [e])[0]; + }) + .getOr(o.createRange()); + } + try { + (t = d()) && + !Ge.isRestrictedNode(t.anchorNode) && + (n = + 0 < t.rangeCount + ? t.getRangeAt(0) + : t.createRange + ? t.createRange() + : o.createRange()); + } catch (a) {} + return ( + (n = + (n = Kv(c, [n])[0]) || + (o.createRange ? o.createRange() : o.body.createTextRange())) + .setStart && + 9 === n.startContainer.nodeType && + n.collapsed && + ((r = u.getRoot()), n.setStart(r, 0), n.setEnd(r, 0)), + l && + f && + (0 === e(n.START_TO_START, n, l) && 0 === e(n.END_TO_END, n, l) + ? (n = f) + : (f = l = null)), + n + ); + }, + m = function (e, t) { + var n, r; + if ( + (function (e) { + return ( + !!e && (!!cy(e) || (ly(e.startContainer) && ly(e.endContainer))) + ); + })(e) + ) { + var o = cy(e) ? e : null; + if (o) { + f = null; + try { + o.select(); + } catch (i) {} + } else { + if ( + ((n = d()), + (e = c.fire("SetSelectionRange", { range: e, forward: t }).range), + n) + ) { + f = e; + try { + n.removeAllRanges(), n.addRange(e); + } catch (i) {} + !1 === t && + n.extend && + (n.collapse(e.endContainer, e.endOffset), + n.extend(e.startContainer, e.startOffset)), + (l = 0 < n.rangeCount ? n.getRangeAt(0) : null); + } + e.collapsed || + e.startContainer !== e.endContainer || + !n.setBaseAndExtent || + Sn.ie || + (e.endOffset - e.startOffset < 2 && + e.startContainer.hasChildNodes() && + (r = e.startContainer.childNodes[e.startOffset]) && + "IMG" === r.tagName && + (n.setBaseAndExtent( + e.startContainer, + e.startOffset, + e.endContainer, + e.endOffset, + ), + (n.anchorNode === e.startContainer && + n.focusNode === e.endContainer) || + n.setBaseAndExtent(r, 0, r, 1))), + c.fire("AfterSetSelectionRange", { range: e, forward: t }); + } + } + }, + g = { + bookmarkManager: null, + controlSelection: null, + dom: u, + win: s, + serializer: e, + editor: c, + collapse: a, + setCursorLocation: function (e, t) { + var n = u.createRng(); + e + ? (n.setStart(e, t), n.setEnd(e, t), m(n), a(!1)) + : (uh(u, n, c.getBody(), !0), m(n)); + }, + getContent: function (e) { + return ay(c, e); + }, + setContent: t, + getBookmark: function (e, t) { + return n.getBookmark(e, t); + }, + moveToBookmark: function (e) { + return n.moveToBookmark(e); + }, + select: function (e, t) { + return ( + (function (r, e, o) { + return k.from(e).map(function (e) { + var t = r.nodeIndex(e), + n = r.createRng(); + return ( + n.setStart(e.parentNode, t), + n.setEnd(e.parentNode, t + 1), + o && (uh(r, n, e, !0), uh(r, n, e, !1)), + n + ); + }); + })(u, e, t).each(m), + e + ); + }, + isCollapsed: function () { + var e = h(), + t = d(); + return ( + !(!e || e.item) && + (e.compareEndPoints + ? 0 === e.compareEndPoints("StartToEnd", e) + : !t || e.collapsed) + ); + }, + isForward: r, + setNode: function (e) { + return t(u.getOuterHTML(e)), e; + }, + getNode: function () { + return (function (e, t) { + var n, r, o, i, a; + return t + ? ((r = t.startContainer), + (o = t.endContainer), + (i = t.startOffset), + (a = t.endOffset), + (n = t.commonAncestorContainer), + !t.collapsed && + (r === o && + a - i < 2 && + r.hasChildNodes() && + (n = r.childNodes[i]), + 3 === r.nodeType && + 3 === o.nodeType && + ((r = r.length === i ? Pv(r.nextSibling, !0) : r.parentNode), + (o = 0 === a ? Pv(o.previousSibling, !1) : o.parentNode), + r && r === o)) + ? r + : n && 3 === n.nodeType + ? n.parentNode + : n) + : e; + })(c.getBody(), h()); + }, + getSel: d, + setRng: m, + getRng: h, + getStart: function (e) { + return Bv(c.getBody(), h(), e); + }, + getEnd: function (e) { + return Hv(c.getBody(), h(), e); + }, + getSelectedBlocks: function (e, t) { + return (function (e, t, n, r) { + var o, + i, + a = []; + if ( + ((i = e.getRoot()), + (n = e.getParent(n || Bv(i, t, t.collapsed), e.isBlock)), + (r = e.getParent(r || Hv(i, t, t.collapsed), e.isBlock)), + n && n !== i && a.push(n), + n && r && n !== r) + ) + for (var u = new bi((o = n), i); (o = u.next()) && o !== r; ) + e.isBlock(o) && a.push(o); + return r && n !== r && r !== i && a.push(r), a; + })(u, h(), e, t); + }, + normalize: function () { + var e = h(), + t = d(); + if (ny(t) || !sh(c)) return e; + var n = uy(u, e); + return ( + n.each(function (e) { + m(e, r()); + }), + n.getOr(e) + ); + }, + selectorChanged: function (e, t) { + return i(e, t), g; + }, + selectorChangedWithUnbind: i, + getScrollContainer: function () { + for (var e, t = u.getRoot(); t && "BODY" !== t.nodeName; ) { + if (t.scrollHeight > t.clientHeight) { + e = t; + break; + } + t = t.parentNode; + } + return e; + }, + scrollIntoView: function (e, t) { + return qv(c, e, t); + }, + placeCaretAt: function (e, t) { + return m(Wv(e, t, c.getDoc())); + }, + getBoundingClientRect: function () { + var e = h(); + return e.collapsed + ? _s.fromRangeStart(e).getClientRects()[0] + : e.getBoundingClientRect(); + }, + destroy: function () { + (s = l = f = null), o.destroy(); + }, + }; + return ( + (n = Xp(g)), + (o = Kp(g, c)), + (g.bookmarkManager = n), + (g.controlSelection = o), + g + ); + } + function dy(e) { + return jy(e) && e.data[0] === lu; + } + function hy(e) { + return jy(e) && e.data[e.data.length - 1] === lu; + } + function my(e) { + return e.ownerDocument.createTextNode(lu); + } + function gy(e, t) { + return e + ? (function (e) { + if (jy(e.previousSibling)) + return ( + hy(e.previousSibling) || e.previousSibling.appendData(lu), + e.previousSibling + ); + if (jy(e)) return dy(e) || e.insertData(0, lu), e; + var t = my(e); + return e.parentNode.insertBefore(t, e), t; + })(t) + : (function (e) { + if (jy(e.nextSibling)) + return ( + dy(e.nextSibling) || e.nextSibling.insertData(0, lu), + e.nextSibling + ); + if (jy(e)) return hy(e) || e.appendData(lu), e; + var t = my(e); + return ( + e.nextSibling + ? e.parentNode.insertBefore(t, e.nextSibling) + : e.parentNode.appendChild(t), + t + ); + })(t); + } + function py(e, t) { + return Ge.isText(e.container()) ? gy(t, e.container()) : gy(t, e.getNode()); + } + function vy(e, t) { + var n = t.get(); + return n && e.container() === n && Da(n); + } + function yy(e, t) { + if (!t) return t; + var n = t.container(), + r = t.offset(); + return e + ? Da(n) + ? Ge.isText(n.nextSibling) + ? _s(n.nextSibling, 0) + : _s.after(n) + : Ba(t) + ? _s(n, r + 1) + : t + : Da(n) + ? Ge.isText(n.previousSibling) + ? _s(n.previousSibling, n.previousSibling.data.length) + : _s.before(n) + : Ha(t) + ? _s(n, r - 1) + : t; + } + function by(e, t) { + var n = Cs(t, e); + return n || e; + } + function Cy(e, t, n) { + var r = Xy.normalizeForwards(n), + o = by(t, r.container()); + return Xy.findRootInline(e, o, r).fold(function () { + return Lc.nextPosition(o, r) + .bind(d(Xy.findRootInline, e, o)) + .map(function (e) { + return Gy.before(e); + }); + }, k.none); + } + function wy(e, t) { + return null === is(e, t); + } + function xy(e, t, n) { + return Xy.findRootInline(e, t, n).filter(d(wy, t)); + } + function zy(e, t, n) { + var r = Xy.normalizeBackwards(n); + return xy(e, t, r).bind(function (e) { + return Lc.prevPosition(e, r).isNone() ? k.some(Gy.start(e)) : k.none(); + }); + } + function Ey(e, t, n) { + var r = Xy.normalizeForwards(n); + return xy(e, t, r).bind(function (e) { + return Lc.nextPosition(e, r).isNone() ? k.some(Gy.end(e)) : k.none(); + }); + } + function Ny(e, t, n) { + var r = Xy.normalizeBackwards(n), + o = by(t, r.container()); + return Xy.findRootInline(e, o, r).fold(function () { + return Lc.prevPosition(o, r) + .bind(d(Xy.findRootInline, e, o)) + .map(function (e) { + return Gy.after(e); + }); + }, k.none); + } + function Sy(e) { + return !1 === Xy.isRtl(Jy(e)); + } + function ky(e, t, n) { + return Yy([Cy, zy, Ey, Ny], [e, t, n]).filter(Sy); + } + function Ty(e) { + return e.fold($("before"), $("start"), $("end"), $("after")); + } + function Ay(e) { + return e.fold(Gy.before, Gy.before, Gy.after, Gy.after); + } + function My(n, e, r, t, o, i) { + return Ga( + Xy.findRootInline(e, r, t), + Xy.findRootInline(e, r, o), + function (e, t) { + return e !== t && Xy.hasSameParentBlock(r, e, t) + ? Gy.after(n ? e : t) + : i; + }, + ).getOr(i); + } + function Ry(e, t) { + return e.fold($(!0), function (e) { + return !(function (e, t) { + return Ty(e) === Ty(t) && Jy(e) === Jy(t); + })(e, t); + }); + } + function Dy(e, t) { + return e + ? t.fold(q(k.some, Gy.start), k.none, q(k.some, Gy.after), k.none) + : t.fold(k.none, q(k.some, Gy.before), k.none, q(k.some, Gy.end)); + } + function _y(e, t, n, r) { + var o = Xy.normalizePosition(e, r), + i = ky(t, n, o); + return ky(t, n, o) + .bind(d(Dy, e)) + .orThunk(function () { + return (function (t, n, r, o, e) { + var i = Xy.normalizePosition(t, e); + return Lc.fromPosition(t, r, i) + .map(d(Xy.normalizePosition, t)) + .fold( + function () { + return o.map(Ay); + }, + function (e) { + return ky(n, r, e).map(d(My, t, n, r, i, e)).filter(d(Ry, o)); + }, + ) + .filter(Sy); + })(e, t, n, i, r); + }); + } + function Oy(e) { + return D(e.selection.getSel().modify); + } + function By(e, t, n) { + var r = e ? 1 : -1; + return ( + t.setRng(_s(n.container(), n.offset() + r).toRange()), + t.getSel().modify("move", e ? "forward" : "backward", "word"), + !0 + ); + } + function Hy(e, t) { + var n = e.dom.createRng(); + n.setStart(t.container(), t.offset()), + n.setEnd(t.container(), t.offset()), + e.selection.setRng(n); + } + function Py(e) { + return !1 !== e.settings.inline_boundaries; + } + function Ly(e, t) { + e + ? t.setAttribute("data-mce-selected", "inline-boundary") + : t.removeAttribute("data-mce-selected"); + } + function Vy(t, e, n) { + return Wy(e, n).map(function (e) { + return Hy(t, e), n; + }); + } + function Iy(e, t, n) { + return function () { + return !!Py(t) && nb(e, t); + }; + } + var Fy, + Uy, + jy = Ge.isText, + qy = d(gy, !0), + $y = d(gy, !1), + Wy = function (n, e) { + return e.fold( + function (e) { + $s.remove(n.get()); + var t = qy(e); + return n.set(t), k.some(_s(t, t.length - 1)); + }, + function (e) { + return Lc.firstPositionIn(e).map(function (e) { + if (vy(e, n)) return _s(n.get(), 1); + $s.remove(n.get()); + var t = py(e, !0); + return n.set(t), _s(t, 1); + }); + }, + function (e) { + return Lc.lastPositionIn(e).map(function (e) { + if (vy(e, n)) return _s(n.get(), n.get().length - 1); + $s.remove(n.get()); + var t = py(e, !1); + return n.set(t), _s(t, t.length - 1); + }); + }, + function (e) { + $s.remove(n.get()); + var t = $y(e); + return n.set(t), k.some(_s(t, 1)); + }, + ); + }, + Ky = /[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/, + Xy = { + isInlineTarget: function (e, t) { + return we(bt.fromDom(t), Ff(e)); + }, + findRootInline: function (e, t, n) { + var r = (function (e, t, n) { + return y(Yi.DOM.getParents(n.container(), "*", t), e); + })(e, t, n); + return k.from(r[r.length - 1]); + }, + isRtl: function (e) { + return ( + "rtl" === Yi.DOM.getStyle(e, "direction", !0) || + (function (e) { + return Ky.test(e); + })(e.textContent) + ); + }, + isAtZwsp: function (e) { + return Ba(e) || Ha(e); + }, + normalizePosition: yy, + normalizeForwards: d(yy, !0), + normalizeBackwards: d(yy, !1), + hasSameParentBlock: function (e, t, n) { + var r = Cs(t, e), + o = Cs(n, e); + return r && r === o; + }, + }, + Yy = function (e, t) { + for (var n = 0; n < e.length; n++) { + var r = e[n].apply(null, t); + if (r.isSome()) return r; + } + return k.none(); + }, + Gy = qf([ + { before: ["element"] }, + { start: ["element"] }, + { end: ["element"] }, + { after: ["element"] }, + ]), + Jy = function (e) { + return e.fold(W, W, W, W); + }, + Qy = ky, + Zy = _y, + eb = (d(_y, !1), d(_y, !0), Ay), + tb = function (e) { + return e.fold(Gy.start, Gy.start, Gy.end, Gy.end); + }, + nb = function (e, t) { + var n = t.selection.getRng(), + r = e ? _s.fromRangeEnd(n) : _s.fromRangeStart(n); + return ( + !!Oy(t) && + (e && Ba(r) + ? By(!0, t.selection, r) + : !(e || !Ha(r)) && By(!1, t.selection, r)) + ); + }, + rb = { + move: function (e, t, n) { + return function () { + return ( + !!Py(e) && + (function (t, n, e) { + var r = t.getBody(), + o = _s.fromRangeStart(t.selection.getRng()), + i = d(Xy.isInlineTarget, t); + return Zy(e, i, r, o).bind(function (e) { + return Vy(t, n, e); + }); + })(e, t, n).isSome() + ); + }; + }, + moveNextWord: d(Iy, !0), + movePrevWord: d(Iy, !1), + setupSelectedState: function (t) { + var n = Je(null), + r = d(Xy.isInlineTarget, t); + return ( + t.on("NodeChange", function (e) { + Py(t) && + ((function (e, t, n) { + var r = y( + t.select('*[data-mce-selected="inline-boundary"]'), + e, + ), + o = y(n, e); + z(x(r, o), d(Ly, !1)), z(x(o, r), d(Ly, !0)); + })(r, t.dom, e.parents), + (function (e, t) { + if ( + e.selection.isCollapsed() && + !0 !== e.composing && + t.get() + ) { + var n = _s.fromRangeStart(e.selection.getRng()); + _s.isTextPosition(n) && + !1 === Xy.isAtZwsp(n) && + (Hy(e, $s.removeAndReposition(t.get(), n)), t.set(null)); + } + })(t, n), + (function (n, r, o, e) { + if (r.selection.isCollapsed()) { + var t = y(e, n); + z(t, function (e) { + var t = _s.fromRangeStart(r.selection.getRng()); + Qy(n, r.getBody(), t).bind(function (e) { + return Vy(r, o, e); + }); + }); + } + })(r, t, n, e.parents)); + }), + n + ); + }, + setCaretPosition: Hy, + }; + ((Uy = Fy = Fy || {})[(Uy.Br = 0)] = "Br"), + (Uy[(Uy.Block = 1)] = "Block"), + (Uy[(Uy.Wrap = 2)] = "Wrap"), + (Uy[(Uy.Eol = 3)] = "Eol"); + function ob(e, t) { + return e === Rs.Backwards ? t.reverse() : t; + } + function ib(e, t, n, r) { + for ( + var o, i, a, u, s, c, l = oc(n), f = r, d = []; + f && ((s = l), (c = f), (o = t === Rs.Forwards ? s.next(c) : s.prev(c))); + + ) { + if (Ge.isBr(o.getNode(!1))) + return t === Rs.Forwards + ? { + positions: ob(t, d).concat([o]), + breakType: Fy.Br, + breakAt: k.some(o), + } + : { positions: ob(t, d), breakType: Fy.Br, breakAt: k.some(o) }; + if (o.isVisible()) { + if (e(f, o)) { + var h = + ((i = t), + (a = f), + (u = o), + Ge.isBr(u.getNode(i === Rs.Forwards)) + ? Fy.Br + : !1 === ws(a, u) + ? Fy.Block + : Fy.Wrap); + return { positions: ob(t, d), breakType: h, breakAt: k.some(o) }; + } + d.push(o), (f = o); + } else f = o; + } + return { positions: ob(t, d), breakType: Fy.Eol, breakAt: k.none() }; + } + function ab(n, r, o, e) { + return r(o, e) + .breakAt.map(function (e) { + var t = r(o, e).positions; + return n === Rs.Backwards ? t.concat(e) : [e].concat(t); + }) + .getOr([]); + } + function ub(e, i) { + return b( + e, + function (e, o) { + return e.fold( + function () { + return k.some(o); + }, + function (r) { + return Ga( + E(r.getClientRects()), + E(o.getClientRects()), + function (e, t) { + var n = Math.abs(i - e.left); + return Math.abs(i - t.left) <= n ? o : r; + }, + ).or(e); + }, + ); + }, + k.none(), + ); + } + function sb(t, e) { + return E(e.getClientRects()).bind(function (e) { + return ub(t, e.left); + }); + } + function cb(e, t, n, r) { + var o = e === Rs.Forwards, + i = o ? Lh : Vh; + if (!r.collapsed) { + var a = mx(r); + if (hx(a)) return em(e, t, a, e === Rs.Backwards, !0); + } + var u = (function (e) { + return Ra(e.startContainer); + })(r), + s = ks(e, t.getBody(), r); + if (i(s)) return tm(t, s.getNode(!o)); + var c = Xy.normalizePosition(o, n(s)); + if (!c) return u ? r : null; + if (i(c)) return em(e, t, c.getNode(!o), o, !0); + var l = n(c); + return l && i(l) && Ms(c, l) + ? em(e, t, l.getNode(!o), o, !0) + : u + ? rm(t, c.toRange(), !0) + : null; + } + function lb(e, t, n, r) { + var o, i, a, u, s, c, l, f, d; + if ( + ((d = mx(r)), + (o = ks(e, t.getBody(), r)), + (i = n(t.getBody(), Fh(1), o)), + (a = y(i, Uh(1))), + (s = Tn.last(o.getClientRects())), + (Lh(o) || Hh(o)) && (d = o.getNode()), + (Vh(o) || Ph(o)) && (d = o.getNode(!0)), + !s) + ) + return null; + if (((c = s.left), (u = Wh(a, c)) && hx(u.node))) + return ( + (l = Math.abs(c - u.left)), + (f = Math.abs(c - u.right)), + em(e, t, u.node, l < f, !0) + ); + if (d) { + var h = (function (e, t, n, r) { + function o(e) { + return Tn.last(e.getClientRects()); + } + var i, + a, + u, + s, + c, + l, + f = oc(t), + d = [], + h = 0; + l = o( + (s = + 1 === e + ? ((i = f.next), (a = $a), (u = qa), _s.after(r)) + : ((i = f.prev), (a = qa), (u = $a), _s.before(r))), + ); + do { + if (s.isVisible() && !u((c = o(s)), l)) { + if ( + (0 < d.length && a(c, Tn.last(d)) && h++, + ((c = Fa(c)).position = s), + (c.line = h), + n(c)) + ) + return d; + d.push(c); + } + } while ((s = i(s))); + return d; + })(e, t.getBody(), Fh(1), d); + if ((u = Wh(y(h, Uh(1)), c))) return rm(t, u.position.toRange(), !0); + if ((u = Tn.last(y(h, Uh(0))))) return rm(t, u.position.toRange(), !0); + } + } + function fb(e, t, n) { + var r, + o, + i = oc(e.getBody()), + a = d(As, i.next), + u = d(As, i.prev); + if (n.collapsed && e.settings.forced_root_block) { + if (!(r = e.dom.getParent(n.startContainer, "PRE"))) return; + (1 === t ? a(_s.fromRangeStart(n)) : u(_s.fromRangeStart(n))) || + ((o = (function (e) { + var t = e.dom.create(gf(e)); + return ( + (!Sn.ie || 11 <= Sn.ie) && + (t.innerHTML = '
'), + t + ); + })(e)), + 1 === t ? e.$(r).after(o) : e.$(r).before(o), + e.selection.select(o, !0), + e.selection.collapse()); + } + } + function db(t, n) { + return function () { + var e = (function (e, t) { + var n, + r = oc(e.getBody()), + o = d(As, r.next), + i = d(As, r.prev), + a = t ? Rs.Forwards : Rs.Backwards, + u = t ? o : i, + s = e.selection.getRng(); + return (n = cb(a, e, u, s)) ? n : (n = fb(e, a, s)) || null; + })(t, n); + return !!e && (t.selection.setRng(e), !0); + }; + } + function hb(t, n) { + return function () { + var e = (function (e, t) { + var n, + r = t ? 1 : -1, + o = t ? Ym : Xm, + i = e.selection.getRng(); + return (n = lb(r, e, o, i)) ? n : (n = fb(e, r, i)) || null; + })(t, n); + return !!e && (t.selection.setRng(e), !0); + }; + } + function mb(n, r) { + return function () { + var e = r + ? _s.fromRangeEnd(n.selection.getRng()) + : _s.fromRangeStart(n.selection.getRng()), + t = r ? lx(n.getBody(), e) : cx(n.getBody(), e); + return (r ? N(t.positions) : E(t.positions)) + .filter( + (function (t) { + return function (e) { + return t ? Vh(e) : Lh(e); + }; + })(r), + ) + .fold($(!1), function (e) { + return n.selection.setRng(e.toRange()), !0; + }); + }; + } + function gb(e, t, n, r, o) { + var i = ga(bt.fromDom(n), "td,th,caption").map(function (e) { + return e.dom(); + }); + return (function (e, o, i) { + return b( + e, + function (e, r) { + return e.fold( + function () { + return k.some(r); + }, + function (e) { + var t = Math.sqrt(Math.abs(e.x - o) + Math.abs(e.y - i)), + n = Math.sqrt(Math.abs(r.x - o) + Math.abs(r.y - i)); + return k.some(n < t ? r : e); + }, + ); + }, + k.none(), + ); + })( + y( + (function (n, e) { + return v(e, function (e) { + var t = (function (e, t) { + return { + left: e.left - t, + top: e.top - t, + right: e.right + 2 * t, + bottom: e.bottom + 2 * t, + width: e.width + t, + height: e.height + t, + }; + })(Fa(e.getBoundingClientRect()), -1); + return [ + { x: t.left, y: n(t), cell: e }, + { x: t.right, y: n(t), cell: e }, + ]; + }); + })(e, i), + function (e) { + return t(e, o); + }, + ), + r, + o, + ).map(function (e) { + return e.cell; + }); + } + function pb(t, n) { + return E(n.getClientRects()) + .bind(function (e) { + return gx(t, e.left, e.top); + }) + .bind(function (e) { + return sb( + (function (t) { + return Lc.lastPositionIn(t) + .map(function (e) { + return cx(t, e).positions.concat(e); + }) + .getOr([]); + })(e), + n, + ); + }); + } + function vb(t, n) { + return N(n.getClientRects()) + .bind(function (e) { + return px(t, e.left, e.top); + }) + .bind(function (e) { + return sb( + (function (t) { + return Lc.firstPositionIn(t) + .map(function (e) { + return [e].concat(lx(t, e).positions); + }) + .getOr([]); + })(e), + n, + ); + }); + } + function yb(e, t) { + e.selection.setRng(t), $v(e, t); + } + function bb(e, t, n) { + var r = e(t, n); + return (function (e) { + return e.breakType === Fy.Wrap && 0 === e.positions.length; + })(r) || + (!Ge.isBr(n.getNode()) && + (function (e) { + return e.breakType === Fy.Br && 1 === e.positions.length; + })(r)) + ? !(function (t, n, e) { + return e.breakAt + .map(function (e) { + return t(n, e).breakAt.isSome(); + }) + .getOr(!1); + })(e, t, r) + : r.breakAt.isNone(); + } + function Cb(e, t, n, r) { + var o = e.selection.getRng(), + i = t ? 1 : -1; + if ( + ms() && + (function (e, t, n) { + var r = _s.fromRangeStart(t); + return Lc.positionIn(!e, n) + .map(function (e) { + return e.isEqual(r); + }) + .getOr(!1); + })(t, o, n) + ) { + var a = em(i, e, n, !t, !0); + return yb(e, a), !0; + } + return !1; + } + function wb(e, t) { + var n = t.getNode(e); + return Ge.isElement(n) && "TABLE" === n.nodeName ? k.some(n) : k.none(); + } + function xb(n, r, o) { + var e = wb(!!r, o), + i = !1 === r; + e.fold( + function () { + return yb(n, o.toRange()); + }, + function (t) { + return Lc.positionIn(i, n.getBody()) + .filter(function (e) { + return e.isEqual(o); + }) + .fold( + function () { + return yb(n, o.toRange()); + }, + function (e) { + return (function (n, r, o, e) { + var i = gf(r); + i + ? r.undoManager.transact(function () { + var e = bt.fromTag(i); + me(e, pf(r)), + _i(e, bt.fromTag("br")), + n ? xi(bt.fromDom(o), e) : wi(bt.fromDom(o), e); + var t = r.dom.createRng(); + t.setStart(e.dom(), 0), t.setEnd(e.dom(), 0), yb(r, t); + }) + : yb(r, e.toRange()); + })(r, n, t, o); + }, + ); + }, + ); + } + function zb(e, t, n, r) { + var o = e.selection.getRng(), + i = _s.fromRangeStart(o), + a = e.getBody(); + if (!t && vx(r, i)) { + var u = (function (t, n, e) { + return pb(n, e) + .orThunk(function () { + return E(e.getClientRects()).bind(function (e) { + return ub(fx(t, _s.before(n)), e.left); + }); + }) + .getOr(_s.before(n)); + })(a, n, i); + return xb(e, t, u), !0; + } + if (t && yx(r, i)) { + u = (function (t, n, e) { + return vb(n, e) + .orThunk(function () { + return E(e.getClientRects()).bind(function (e) { + return ub(dx(t, _s.after(n)), e.left); + }); + }) + .getOr(_s.after(n)); + })(a, n, i); + return xb(e, t, u), !0; + } + return !1; + } + function Eb(t, n) { + return function () { + return k + .from(t.dom.getParent(t.selection.getNode(), "td,th")) + .bind(function (e) { + return k.from(t.dom.getParent(e, "table")).map(function (e) { + return Cb(t, n, e); + }); + }) + .getOr(!1); + }; + } + function Nb(n, r) { + return function () { + return k + .from(n.dom.getParent(n.selection.getNode(), "td,th")) + .bind(function (t) { + return k.from(n.dom.getParent(t, "table")).map(function (e) { + return zb(n, r, e, t); + }); + }) + .getOr(!1); + }; + } + function Sb(e) { + return h(["figcaption"], ie(e)); + } + function kb(e) { + var t = j.document.createRange(); + return t.setStartBefore(e.dom()), t.setEndBefore(e.dom()), t; + } + function Tb(e, t, n) { + n ? _i(e, t) : zi(e, t); + } + function Ab(e, t, n, r) { + return "" === t + ? (function (e, t) { + var n = bt.fromTag("br"); + return Tb(e, n, t), kb(n); + })(e, r) + : (function (e, t, n, r) { + var o = bt.fromTag(n), + i = bt.fromTag("br"); + return me(o, r), _i(o, i), Tb(e, o, t), kb(i); + })(e, r, t, n); + } + function Mb(e, t, n) { + return t + ? (function (e, t) { + return lx(e, t).breakAt.isNone(); + })(e.dom(), n) + : (function (e, t) { + return cx(e, t).breakAt.isNone(); + })(e.dom(), n); + } + function Rb(t, n) { + var r = bt.fromDom(t.getBody()), + o = _s.fromRangeStart(t.selection.getRng()), + i = gf(t), + a = pf(t); + return (function (e, t) { + var n = d(ze, t); + return Ca(bt.fromDom(e.container()), In, n).filter(Sb); + })(o, r).exists(function () { + if (Mb(r, n, o)) { + var e = Ab(r, i, a, n); + return t.selection.setRng(e), !0; + } + return !1; + }); + } + function Db(e, t) { + return function () { + return !!e.selection.isCollapsed() && Rb(e, t); + }; + } + function _b(e, t) { + return v( + (function (e) { + return X(e, function (e) { + return Cd( + { + shiftKey: !1, + altKey: !1, + ctrlKey: !1, + metaKey: !1, + keyCode: 0, + action: i, + }, + e, + ); + }); + })(e), + function (e) { + return (function (e, t) { + return ( + t.keyCode === e.keyCode && + t.shiftKey === e.shiftKey && + t.altKey === e.altKey && + t.ctrlKey === e.ctrlKey && + t.metaKey === e.metaKey + ); + })(e, t) + ? [e] + : []; + }, + ); + } + function Ob(e, t) { + return { from: $(e), to: $(t) }; + } + function Bb(e, t) { + var n = bt.fromDom(e), + r = bt.fromDom(t.container()); + return xx(n, r).map(function (e) { + return (function (e, t) { + return { block: $(e), position: $(t) }; + })(e, t); + }); + } + function Hb(t, n, e) { + var r = Bb(t, _s.fromRangeStart(e)), + o = r.bind(function (e) { + return Lc.fromPosition(n, t, e.position()).bind(function (e) { + return Bb(t, e).map(function (e) { + return (function (t, n, r) { + return Ge.isBr(r.position().getNode()) && !1 === Tg(r.block()) + ? Lc.positionIn(!1, r.block().dom()) + .bind(function (e) { + return e.isEqual(r.position()) + ? Lc.fromPosition(n, t, e).bind(function (e) { + return Bb(t, e); + }) + : k.some(r); + }) + .getOr(r) + : r; + })(t, n, e); + }); + }); + }); + return Ga(r, o, Ob).filter(function (e) { + return ( + (function (e) { + return !1 === ze(e.from().block(), e.to().block()); + })(e) && + (function (e) { + return Se(e.from().block()) + .bind(function (t) { + return Se(e.to().block()).filter(function (e) { + return ze(t, e); + }); + }) + .isSome(); + })(e) && + (function (e) { + return ( + !1 === Ge.isContentEditableFalse(e.from().block().dom()) && + !1 === Ge.isContentEditableFalse(e.to().block().dom()) + ); + })(e) + ); + }); + } + function Pb(e) { + var t = (function (e) { + var t = Re(e); + return p(t, In).fold( + function () { + return t; + }, + function (e) { + return t.slice(0, e); + }, + ); + })(e); + return z(t, Oi), t; + } + function Lb(e, t) { + var n = dh(t, e); + return g(n.reverse(), Tg).each(Oi); + } + function Vb(e, t, n, r) { + if (Tg(n)) return Cg(n), Lc.firstPositionIn(n.dom()); + (function (e) { + return ( + 0 === + y(Ae(e), function (e) { + return !Tg(e); + }).length + ); + })(r) && + Tg(t) && + wi(r, bt.fromTag("br")); + var o = Lc.prevPosition(n.dom(), _s.before(r.dom())); + return ( + z(Pb(t), function (e) { + wi(r, e); + }), + Lb(e, t), + o + ); + } + function Ib(e, t, n) { + if (Tg(n)) return Oi(n), Tg(t) && Cg(t), Lc.firstPositionIn(t.dom()); + var r = Lc.lastPositionIn(n.dom()); + return ( + z(Pb(t), function (e) { + _i(n, e); + }), + Lb(e, t), + r + ); + } + function Fb(e, t) { + return Bt(t, e) + ? (function (e, t) { + var n = dh(t, e); + return k.from(n[n.length - 1]); + })(t, e) + : k.none(); + } + function Ub(e, t) { + Lc.positionIn(e, t.dom()) + .map(function (e) { + return e.getNode(); + }) + .map(bt.fromDom) + .filter(On) + .each(Oi); + } + function jb(e, t, n) { + return Ub(!0, t), Ub(!1, n), Fb(t, n).fold(d(Ib, e, t, n), d(Vb, e, t, n)); + } + function qb(e, t) { + var n = bt.fromDom(t), + r = d(ze, e); + return ba(n, Wn, r).isSome(); + } + function $b(e, t) { + var n = Lc.prevPosition(e.dom(), _s.fromRangeStart(t)).isNone(), + r = Lc.nextPosition(e.dom(), _s.fromRangeEnd(t)).isNone(); + return ( + !(function (e, t) { + return qb(e, t.startContainer) || qb(e, t.endContainer); + })(e, t) && + n && + r + ); + } + function Wb(e) { + var t = bt.fromDom(e.getBody()), + n = e.selection.getRng(); + return $b(t, n) + ? (function (e) { + return e.setContent(""), e.selection.setCursorLocation(), !0; + })(e) + : (function (n, r) { + var o = r.getRng(); + return Ga( + xx(n, bt.fromDom(o.startContainer)), + xx(n, bt.fromDom(o.endContainer)), + function (e, t) { + return ( + !1 === ze(e, t) && + (o.deleteContents(), + Sx(n, !0, e, t).each(function (e) { + r.setRng(e.toRange()); + }), + !0) + ); + }, + ).getOr(!1); + })(t, e.selection); + } + function Kb(e) { + return Ts(e).exists(On); + } + function Xb(e, t, n) { + var r = y(dh(bt.fromDom(n.container()), t), In), + o = E(r).getOr(t); + return Lc.fromPosition(e, o.dom(), n).filter(Kb); + } + function Yb(e, t) { + return Ts(t).exists(On) || Xb(!0, e, t).isSome(); + } + function Gb(e, t) { + return ( + (function (e) { + return k.from(e.getNode(!0)).map(bt.fromDom); + })(t).exists(On) || Xb(!1, e, t).isSome() + ); + } + function Jb(e, t, n, r) { + var o = r.getNode(!1 === t); + return xx(bt.fromDom(e), bt.fromDom(n.getNode())) + .map(function (e) { + return Tg(e) ? Rx.remove(e.dom()) : Rx.moveToElement(o); + }) + .orThunk(function () { + return k.some(Rx.moveToElement(o)); + }); + } + function Qb(t, n, r) { + return Lc.fromPosition(n, t, r).bind(function (e) { + return (function (e) { + return Wn(bt.fromDom(e)) || jn(bt.fromDom(e)); + })(e.getNode()) + ? k.none() + : (function (t, e, n, r) { + function o(e) { + return _n(bt.fromDom(e)) && !ws(n, r, t); + } + return Ss(!e, n).fold(function () { + return Ss(e, r).fold($(!1), o); + }, o); + })(t, n, r, e) + ? k.none() + : n && Ge.isContentEditableFalse(e.getNode()) + ? Jb(t, n, r, e) + : !1 === n && Ge.isContentEditableFalse(e.getNode(!0)) + ? Jb(t, n, r, e) + : n && Vh(r) + ? k.some(Rx.moveToPosition(e)) + : !1 === n && Lh(r) + ? k.some(Rx.moveToPosition(e)) + : k.none(); + }); + } + function Zb(t, e, n) { + return (function (e, t) { + var n = t.getNode(!1 === e), + r = e ? "after" : "before"; + return Ge.isElement(n) && n.getAttribute("data-mce-caret") === r; + })(e, n) + ? (function (e, t) { + return e && Ge.isContentEditableFalse(t.nextSibling) + ? k.some(Rx.moveToElement(t.nextSibling)) + : !1 === e && Ge.isContentEditableFalse(t.previousSibling) + ? k.some(Rx.moveToElement(t.previousSibling)) + : k.none(); + })(e, n.getNode(!1 === e)).fold(function () { + return Qb(t, e, n); + }, k.some) + : Qb(t, e, n).bind(function (e) { + return (function (t, n, e) { + return e.fold( + function (e) { + return k.some(Rx.remove(e)); + }, + function (e) { + return k.some(Rx.moveToElement(e)); + }, + function (e) { + return ws(n, e, t) ? k.none() : k.some(Rx.moveToPosition(e)); + }, + ); + })(t, n, e); + }); + } + function eC(e, t) { + return k.from(Dx(e.getBody(), t)); + } + function tC(t, n) { + var e = t.selection.getNode(); + return eC(t, e) + .filter(Ge.isContentEditableFalse) + .fold( + function () { + return (function (e, t, n) { + var r = Ns(t ? 1 : -1, e, n), + o = _s.fromRangeStart(r), + i = bt.fromDom(e); + return !1 === t && Vh(o) + ? k.some(Rx.remove(o.getNode(!0))) + : t && Lh(o) + ? k.some(Rx.remove(o.getNode())) + : !1 === t && Lh(o) && Gb(i, o) + ? Ax(i, o).map(function (e) { + return Rx.remove(e.getNode()); + }) + : t && Vh(o) && Yb(i, o) + ? Mx(i, o).map(function (e) { + return Rx.remove(e.getNode()); + }) + : Zb(e, t, o); + })(t.getBody(), n, t.selection.getRng()) + .map(function (e) { + return e.fold( + (function (t, n) { + return function (e) { + return ( + t._selectionOverrides.hideFakeCaret(), + Ag(t, n, bt.fromDom(e)), + !0 + ); + }; + })(t, n), + (function (n, r) { + return function (e) { + var t = r ? _s.before(e) : _s.after(e); + return n.selection.setRng(t.toRange()), !0; + }; + })(t, n), + (function (t) { + return function (e) { + return t.selection.setRng(e.toRange()), !0; + }; + })(t), + ); + }) + .getOr(!1); + }, + function () { + return !0; + }, + ); + } + function nC(e, t) { + var n = e.selection.getNode(); + return ( + !!Ge.isContentEditableFalse(n) && + eC(e, n.parentNode) + .filter(Ge.isContentEditableFalse) + .fold( + function () { + return ( + (function (e) { + z(ga(e, ".mce-offscreen-selection"), Oi); + })(bt.fromDom(e.getBody())), + Ag(e, t, bt.fromDom(e.selection.getNode())), + zx(e), + !0 + ); + }, + function () { + return !0; + }, + ) + ); + } + function rC(e, t, n, r, o, i) { + var a = em(r, e, i.getNode(!o), o, !0); + if (t.collapsed) { + var u = t.cloneRange(); + o + ? u.setEnd(a.startContainer, a.startOffset) + : u.setStart(a.endContainer, a.endOffset), + u.deleteContents(); + } else t.deleteContents(); + return ( + e.selection.setRng(a), + (function (e, t) { + Ge.isText(t) && 0 === t.data.length && e.remove(t); + })(e.dom, n), + !0 + ); + } + function oC(t, n) { + return function (e) { + return Wy(n, e) + .map(function (e) { + return rb.setCaretPosition(t, e), !0; + }) + .getOr(!1); + }; + } + function iC(e, t, n, r) { + var o = e.getBody(), + i = d(Xy.isInlineTarget, e); + e.undoManager.ignore(function () { + e.selection.setRng( + (function (e, t) { + var n = j.document.createRange(); + return ( + n.setStart(e.container(), e.offset()), + n.setEnd(t.container(), t.offset()), + n + ); + })(n, r), + ), + e.execCommand("Delete"), + Qy(i, o, _s.fromRangeStart(e.selection.getRng())).map(tb).map(oC(e, t)); + }), + e.nodeChanged(); + } + function aC(n, r, o, i) { + var a = (function (e, t) { + var n = Cs(t, e); + return n || e; + })(n.getBody(), i.container()), + u = d(Xy.isInlineTarget, n), + s = Qy(u, a, i); + return s + .bind(function (e) { + return o + ? e.fold($(k.some(tb(e))), k.none, $(k.some(eb(e))), k.none) + : e.fold(k.none, $(k.some(eb(e))), k.none, $(k.some(tb(e)))); + }) + .map(oC(n, r)) + .getOrThunk(function () { + var t = Lc.navigate(o, a, i), + e = t.bind(function (e) { + return Qy(u, a, e); + }); + return s.isSome() && e.isSome() + ? Xy.findRootInline(u, a, i) + .map(function (e) { + return ( + !!(function (o) { + return Ga( + Lc.firstPositionIn(o), + Lc.lastPositionIn(o), + function (e, t) { + var n = Xy.normalizePosition(!0, e), + r = Xy.normalizePosition(!1, t); + return Lc.nextPosition(o, n) + .map(function (e) { + return e.isEqual(r); + }) + .getOr(!0); + }, + ).getOr(!0); + })(e) && (Ag(n, o, bt.fromDom(e)), !0) + ); + }) + .getOr(!1) + : e + .bind(function (e) { + return t.map(function (e) { + return o ? iC(n, r, i, e) : iC(n, r, e, i), !0; + }); + }) + .getOr(!1); + }); + } + function uC(e) { + return 1 === Re(e).length; + } + function sC(e, t, n, r) { + var o = d($m, t), + i = X(y(r, o), function (e) { + return e.dom(); + }); + if (0 === i.length) Ag(t, e, n); + else { + var a = (function (e, t) { + var n = Lm(!1), + r = jm(t, n.dom()); + return wi(bt.fromDom(e), n), Oi(bt.fromDom(e)), _s(r, 0); + })(n.dom(), i); + t.selection.setRng(a.toRange()); + } + } + function cC(n, r) { + var e = bt.fromDom(n.getBody()), + t = bt.fromDom(n.selection.getStart()), + o = y( + (function (e, t) { + var n = dh(t, e); + return p(n, In).fold($(n), function (e) { + return n.slice(0, e); + }); + })(e, t), + uC, + ); + return N(o) + .map(function (e) { + var t = _s.fromRangeStart(n.selection.getRng()); + return ( + !( + !Ex(r, t, e.dom()) || + (function (e) { + return os(e.dom()) && Hm(e.dom()); + })(e) + ) && (sC(r, n, e, o), !0) + ); + }) + .getOr(!1); + } + function lC(e, t) { + return { start: $(e), end: $(t) }; + } + function fC(e, t) { + return za(bt.fromDom(e), "td,th", t); + } + function dC(e, t) { + return wa(e, "table", t); + } + function hC(e) { + return !1 === ze(e.start(), e.end()); + } + function mC(e, n) { + return dC(e.start(), n).bind(function (t) { + return dC(e.end(), n).bind(function (e) { + return (function (e, t) { + return e ? k.some(t) : k.none(); + })(ze(t, e), t); + }); + }); + } + function gC(e) { + return ga(e, "td,th"); + } + function pC(n, e) { + var t = fC(e.startContainer, n), + r = fC(e.endContainer, n); + return e.collapsed + ? k.none() + : Ga(t, r, lC).fold( + function () { + return t.fold( + function () { + return r.bind(function (t) { + return dC(t, n).bind(function (e) { + return E(gC(e)).map(function (e) { + return lC(e, t); + }); + }); + }); + }, + function (t) { + return dC(t, n).bind(function (e) { + return N(gC(e)).map(function (e) { + return lC(t, e); + }); + }); + }, + ); + }, + function (e) { + return Vx(n, e) + ? k.none() + : (function (t, e) { + return dC(t.start(), e).bind(function (e) { + return N(gC(e)).map(function (e) { + return lC(t.start(), e); + }); + }); + })(e, n); + }, + ); + } + function vC(t, e) { + return mC(t, e).map(function (e) { + return (function (e, t, n) { + return { rng: $(e), table: $(t), cells: $(n) }; + })(t, e, gC(e)); + }); + } + function yC(e, t) { + var n = (function (t) { + return function (e) { + return ze(t, e); + }; + })(e); + return (function (e, t) { + var n = fC(e.startContainer, t), + r = fC(e.endContainer, t); + return Ga(n, r, lC) + .filter(hC) + .filter(function (e) { + return Vx(t, e); + }) + .orThunk(function () { + return pC(t, e); + }); + })(t, n).bind(function (e) { + return vC(e, n); + }); + } + function bC(e, t) { + return p(e, function (e) { + return ze(e, t); + }); + } + function CC(n) { + return (function (n) { + return Ga( + bC(n.cells(), n.rng().start()), + bC(n.cells(), n.rng().end()), + function (e, t) { + return n.cells().slice(e, t + 1); + }, + ); + })(n).map(function (e) { + var t = n.cells(); + return e.length === t.length + ? Lx.removeTable(n.table()) + : Lx.emptyCells(e); + }); + } + function wC(e, t) { + return z(t, Cg), e.selection.setCursorLocation(t[0].dom(), 0), !0; + } + function xC(e, t) { + return Ag(e, !1, t), !0; + } + function zC(t, e, n) { + return (function (e, t) { + return yC(e, t).bind(CC); + })(e, n).map(function (e) { + return e.fold(d(xC, t), d(wC, t)); + }); + } + function EC(t, e, n, r) { + return Ix(e, r) + .fold( + function () { + return zC(t, e, n); + }, + function (e) { + return (function (e, t) { + return Fx(e, t); + })(t, e); + }, + ) + .getOr(!1); + } + function NC(e, t) { + return g(dh(t, e), Wn); + } + function SC(t, n, r, o, i) { + return Lc.navigate(r, t.getBody(), i) + .bind(function (e) { + return (function (e, n, r, o) { + return Lc.firstPositionIn(e.dom()) + .bind(function (t) { + return Lc.lastPositionIn(e.dom()).map(function (e) { + return n + ? r.isEqual(t) && o.isEqual(e) + : r.isEqual(e) && o.isEqual(t); + }); + }) + .getOr(!0); + })(o, r, i, e) + ? (function (e, t) { + return Fx(e, t); + })(t, o) + : (function (e, t, n) { + return Ix(e, bt.fromDom(n.getNode())).map(function (e) { + return !1 === ze(e, t); + }); + })(n, o, e); + }) + .or(k.some(!0)); + } + function kC(t, n, r, e) { + var o = _s.fromRangeStart(t.selection.getRng()); + return NC(r, e) + .bind(function (e) { + return Tg(e) + ? Fx(t, e) + : (function (e, t, n, r, o) { + return Lc.navigate(n, e.getBody(), o).bind(function (e) { + return NC(t, bt.fromDom(e.getNode())).map(function (e) { + return !1 === ze(e, r); + }); + }); + })(t, r, n, e, o); + }) + .getOr(!1); + } + function TC(e, t) { + return e ? Hh(t) : Ph(t); + } + function AC(t, n, e) { + var r = bt.fromDom(t.getBody()); + return Ix(r, e).fold( + function () { + return ( + kC(t, n, r, e) || + (function (e, t) { + var n = _s.fromRangeStart(e.selection.getRng()); + return ( + TC(t, n) || + Lc.fromPosition(t, e.getBody(), n) + .map(function (e) { + return TC(t, e); + }) + .getOr(!1) + ); + })(t, n) + ); + }, + function (e) { + return (function (e, t, n, r) { + var o = _s.fromRangeStart(e.selection.getRng()); + return Tg(r) ? Fx(e, r) : SC(e, n, t, r, o); + })(t, n, r, e).getOr(!1); + }, + ); + } + function MC(e) { + var t = parseInt(e, 10); + return isNaN(t) ? 0 : t; + } + function RC(e, t) { + return ( + (e || + (function (e) { + return "table" === ie(e); + })(t) + ? "margin" + : "padding") + ("rtl" === ve(t, "direction") ? "-right" : "-left") + ); + } + function DC(e) { + var t = qx(e); + return ( + !0 !== e.readonly && + (1 < t.length || + (function (r, e) { + return w(e, function (e) { + var t = RC(Pf(r), e), + n = ye(e, t).map(MC).getOr(0); + return "false" !== r.dom.getContentEditable(e.dom()) && 0 < n; + }); + })(e, t)) + ); + } + function _C(e) { + return Un(e) || jn(e); + } + function OC(e, t) { + var n = e.dom, + r = e.selection, + o = e.formatter, + i = Lf(e), + a = /[a-z%]+$/i.exec(i)[0], + u = parseInt(i, 10), + s = Pf(e), + c = gf(e); + e.queryCommandState("InsertUnorderedList") || + e.queryCommandState("InsertOrderedList") || + "" !== c || + n.getParent(r.getNode(), n.isBlock) || + o.apply("div"), + z(qx(e), function (e) { + !(function (e, t, n, r, o, i) { + var a = RC(n, bt.fromDom(i)); + if ("outdent" === t) { + var u = Math.max(0, MC(i.style[a]) - r); + e.setStyle(i, a, u ? u + o : ""); + } else { + u = MC(i.style[a]) + r + o; + e.setStyle(i, a, u); + } + })(n, t, s, u, a, e.dom()); + }); + } + function BC(e, t, n) { + return Lc.navigateIgnore(e, t, n, xh); + } + function HC(e, t) { + return g(dh(bt.fromDom(t.container()), e), In); + } + function PC(e, n, r) { + return BC(e, n.dom(), r).forall(function (t) { + return HC(n, r).fold( + function () { + return !1 === ws(t, r, n.dom()); + }, + function (e) { + return !1 === ws(t, r, n.dom()) && Bt(e, bt.fromDom(t.container())); + }, + ); + }); + } + function LC(t, n, r) { + return HC(n, r).fold( + function () { + return BC(t, n.dom(), r).forall(function (e) { + return !1 === ws(e, r, n.dom()); + }); + }, + function (e) { + return BC(t, e.dom(), r).isNone(); + }, + ); + } + function VC(e) { + return k.from(e.dom.getParent(e.selection.getStart(!0), e.dom.isBlock)); + } + function IC(e, t) { + return e && e.parentNode && e.parentNode.nodeName === t; + } + function FC(e) { + return e && /^(OL|UL|LI)$/.test(e.nodeName); + } + function UC(e) { + var t = e.parentNode; + return /^(LI|DT|DD)$/.test(t.nodeName) ? t : e; + } + function jC(e, t, n) { + for (var r = e[n ? "firstChild" : "lastChild"]; r && !Ge.isElement(r); ) + r = r[n ? "nextSibling" : "previousSibling"]; + return r === t; + } + function qC(e) { + e.innerHTML = '
'; + } + function $C(e, t) { + return ( + e.nodeName === t || + (e.previousSibling && e.previousSibling.nodeName === t) + ); + } + function WC(e, t) { + return ( + t && + e.isBlock(t) && + !/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName) && + !/^(fixed|absolute)/i.test(t.style.position) && + "true" !== e.getContentEditable(t) + ); + } + function KC(e, t, n) { + return !1 === Ge.isText(t) + ? n + : e + ? 1 === n && t.data.charAt(n - 1) === lu + ? 0 + : n + : n === t.data.length - 1 && t.data.charAt(n) === lu + ? t.data.length + : n; + } + function XC(e, t) { + var n, + r, + o = e.getRoot(); + for (n = t; n !== o && "false" !== e.getContentEditable(n); ) + "true" === e.getContentEditable(n) && (r = n), (n = n.parentNode); + return n !== o ? r : o; + } + function YC(e, t) { + var n = gf(e); + n && + n.toLowerCase() === t.tagName.toLowerCase() && + e.dom.setAttribs(t, pf(e)); + } + function GC(e, t, n) { + var r = e.create("span", {}, " "); + n.parentNode.insertBefore(r, n), t.scrollIntoView(r), e.remove(r); + } + function JC(e, t, n, r) { + var o = e.createRng(); + r + ? (o.setStartBefore(n), o.setEndBefore(n)) + : (o.setStartAfter(n), o.setEndAfter(n)), + t.setRng(o); + } + function QC(e, t) { + var n, + r, + o = e.selection, + i = e.dom, + a = o.getRng(); + uy(i, a).each(function (e) { + a.setStart(e.startContainer, e.startOffset), + a.setEnd(e.endContainer, e.endOffset); + }); + var u = a.startOffset, + s = a.startContainer; + if (1 === s.nodeType && s.hasChildNodes()) { + var c = u > s.childNodes.length - 1; + (s = s.childNodes[Math.min(u, s.childNodes.length - 1)] || s), + (u = c && 3 === s.nodeType ? s.nodeValue.length : 0); + } + var l = i.getParent(s, i.isBlock), + f = l ? i.getParent(l.parentNode, i.isBlock) : null, + d = f ? f.nodeName.toUpperCase() : "", + h = !(!t || !t.ctrlKey); + "LI" !== d || h || (l = f), + s && + 3 === s.nodeType && + u >= s.nodeValue.length && + !(function (e, t, n) { + for ( + var r, o = new bi(t, n), i = e.getNonEmptyElements(); + (r = o.next()); + + ) + if (i[r.nodeName.toLowerCase()] || 0 < r.length) return !0; + })(e.schema, s, l) && + ((n = i.create("br")), + a.insertNode(n), + a.setStartAfter(n), + a.setEndAfter(n), + (r = !0)), + (n = i.create("br")), + Yu(i, a, n), + GC(i, o, n), + JC(i, o, n, r), + e.undoManager.add(); + } + function ZC(e, t) { + var n = bt.fromTag("br"); + wi(bt.fromDom(t), n), e.undoManager.add(); + } + function ew(e, t) { + oz(e.getBody(), t) || xi(bt.fromDom(t), bt.fromTag("br")); + var n = bt.fromTag("br"); + xi(bt.fromDom(t), n), + GC(e.dom, e.selection, n.dom()), + JC(e.dom, e.selection, n.dom(), !1), + e.undoManager.add(); + } + function tw(e) { + return e && "A" === e.nodeName && "href" in e; + } + function nw(e) { + return e.fold($(!1), tw, tw, $(!1)); + } + function rw(e, t) { + t.fold(i, d(ZC, e), d(ew, e), i); + } + function ow(e, t) { + return Zx(e) + .filter(function (e) { + return 0 < t.length && we(bt.fromDom(e), t); + }) + .isSome(); + } + function iw(e, t) { + return uz(e); + } + function aw(n) { + return function (e, t) { + return ("" === gf(e)) === n; + }; + } + function uw(n) { + return function (e, t) { + return tz(e) === n; + }; + } + function sw(n, r) { + return function (e, t) { + return (ez(e) === n.toUpperCase()) === r; + }; + } + function cw(e) { + return sw("pre", e); + } + function lw(n) { + return function (e, t) { + return mf(e) === n; + }; + } + function fw(e, t) { + return az(e); + } + function dw(e, t) { + return t; + } + function hw(e) { + var t = gf(e), + n = Qx(e.dom, e.selection.getStart()); + return n && e.schema.isValidChild(n.nodeName, t || "P"); + } + function mw(e, t) { + return function (n, r) { + return b( + e, + function (e, t) { + return e && t(n, r); + }, + !0, + ) + ? k.some(t) + : k.none(); + }; + } + function gw(n, r) { + var e = r.container(), + t = r.offset(); + return Ge.isText(e) + ? (e.insertData(t, n), k.some(ju(e, t + n.length))) + : Ts(r).map(function (e) { + var t = bt.fromText(n); + return r.isAtEnd() ? xi(e, t) : wi(e, t), ju(t.dom(), n.length); + }); + } + function pw(e) { + return ju.isTextPosition(e) && !e.isAtStart() && !e.isAtEnd(); + } + function vw(e, t) { + var n = y(dh(bt.fromDom(t.container()), e), In); + return E(n).getOr(e); + } + function yw(e, t) { + return pw(t) + ? _h(t) + : _h(t) || Lc.prevPosition(vw(e, t).dom(), t).exists(_h); + } + function bw(e, t) { + return pw(t) + ? Dh(t) + : Dh(t) || Lc.nextPosition(vw(e, t).dom(), t).exists(Dh); + } + function Cw(e) { + return Ts(e) + .bind(function (e) { + return Ca(e, zt); + }) + .exists(function (e) { + return (function (e) { + return h(["pre", "pre-wrap"], e); + })(ve(e, "white-space")); + }); + } + function ww(e, t) { + return ( + (function (e, t) { + return Lc.prevPosition(e.dom(), t).isNone(); + })(e, t) || + (function (e, t) { + return Lc.nextPosition(e.dom(), t).isNone(); + })(e, t) || + $x(e, t) || + Wx(e, t) || + Gb(e, t) || + Yb(e, t) + ); + } + function xw(e, t) { + var n = (function (e) { + var t = e.container(), + n = e.offset(); + return Ge.isText(t) && n < t.data.length ? ju(t, n + 1) : e; + })(t); + return !Cw(n) && (Wx(e, n) || Xx(e, n) || Yb(e, n) || bw(e, n)); + } + function zw(e, t) { + return ( + (function (e, t) { + return !Cw(t) && ($x(e, t) || Kx(e, t) || Gb(e, t) || yw(e, t)); + })(e, t) || xw(e, t) + ); + } + function Ew(e, t) { + return Rh(e.charAt(t)); + } + function Nw(e) { + var t = e.container(); + return Ge.isText(t) && Z(t.data, "\xa0"); + } + function Sw(e) { + var t = e.data, + n = (function (e) { + var n = e.split(""); + return X(n, function (e, t) { + return Rh(e) && + 0 < t && + t < n.length - 1 && + Ch(n[t - 1]) && + Ch(n[t + 1]) + ? " " + : e; + }).join(""); + })(t); + return n !== t && ((e.data = n), !0); + } + function kw(n, e) { + return k + .some(e) + .filter(Nw) + .bind(function (e) { + var t = e.container(); + return (function (e, t) { + var n = t.data, + r = ju(t, 0); + return !(!Ew(n, 0) || zw(e, r)) && ((t.data = " " + n.slice(1)), !0); + })(n, t) || + Sw(t) || + (function (e, t) { + var n = t.data, + r = ju(t, n.length - 1); + return ( + !(!Ew(n, n.length - 1) || zw(e, r)) && + ((t.data = n.slice(0, -1) + " "), !0) + ); + })(n, t) + ? k.some(e) + : k.none(); + }); + } + function Tw(t) { + var e = bt.fromDom(t.getBody()); + t.selection.isCollapsed() && + kw(e, ju.fromRangeStart(t.selection.getRng())).each(function (e) { + t.selection.setRng(e.toRange()); + }); + } + function Aw(t, n) { + return function (e) { + return (function (e, t) { + return !Cw(t) && (ww(e, t) || yw(e, t) || bw(e, t)); + })(t, e) + ? dz(n) + : hz(n); + }; + } + function Mw(e) { + var t = _s.fromRangeStart(e.selection.getRng()), + n = bt.fromDom(e.getBody()); + if (e.selection.isCollapsed()) { + var r = d(Xy.isInlineTarget, e), + o = _s.fromRangeStart(e.selection.getRng()); + return Qy(r, e.getBody(), o) + .bind( + (function (t) { + return function (e) { + return e.fold( + function (e) { + return Lc.prevPosition(t.dom(), _s.before(e)); + }, + function (e) { + return Lc.firstPositionIn(e); + }, + function (e) { + return Lc.lastPositionIn(e); + }, + function (e) { + return Lc.nextPosition(t.dom(), _s.after(e)); + }, + ); + }; + })(n), + ) + .bind(Aw(n, t)) + .exists( + (function (t) { + return function (e) { + return t.selection.setRng(e.toRange()), t.nodeChanged(), !0; + }; + })(e), + ); + } + return !1; + } + function Rw(e, t) { + t.hasAttribute("data-mce-caret") && + (La(t), + (function (e) { + e.selection.setRng(e.selection.getRng()); + })(e), + e.selection.scrollIntoView(t)); + } + function Dw(e, t) { + var n = (function (e) { + return xa(bt.fromDom(e.getBody()), "*[data-mce-caret]").fold( + $(null), + function (e) { + return e.dom(); + }, + ); + })(e); + if (n) + return "compositionstart" === t.type + ? (t.preventDefault(), t.stopPropagation(), void Rw(e, n)) + : void (Oa(n) && (Rw(e, n), e.undoManager.add())); + } + function _w(t) { + !(function (e) { + var t = ua(function () { + e.composing || Tw(e); + }, 0); + pz.isIE() && + (e.on("keypress", function (e) { + t.throttle(); + }), + e.on("remove", function (e) { + t.cancel(); + })); + })(t), + t.on("input", function (e) { + !1 === e.isComposing && Tw(t); + }); + } + function Ow(a) { + function e(e, t) { + try { + a.getDoc().execCommand(e, !1, t); + } catch (n) {} + } + function u(e) { + return e.isDefaultPrevented(); + } + function t() { + a.shortcuts.add("meta+a", null, "SelectAll"); + } + function n() { + a.on("keydown", function (e) { + if ( + !u(e) && + e.keyCode === i && + l.isCollapsed() && + 0 === l.getRng().startOffset + ) { + var t = l.getNode().previousSibling; + if (t && t.nodeName && "table" === t.nodeName.toLowerCase()) + return e.preventDefault(), !1; + } + }); + } + function r() { + a.inline || + (a.contentStyles.push("body {min-height: 150px}"), + a.on("click", function (e) { + var t; + if ("HTML" === e.target.nodeName) { + if (11 < Sn.ie) return void a.getBody().focus(); + (t = a.selection.getRng()), + a.getBody().focus(), + a.selection.setRng(t), + a.selection.normalize(), + a.nodeChanged(); + } + })); + } + var o = Rn.each, + i = Mh.BACKSPACE, + s = Mh.DELETE, + c = a.dom, + l = a.selection, + f = a.settings, + d = a.parser, + h = Sn.gecko, + m = Sn.ie, + g = Sn.webkit, + p = "data:text/mce-internal,", + v = m ? "Text" : "URL"; + function y(e) { + var t = c.create("body"), + n = e.cloneContents(); + return t.appendChild(n), l.serializer.serialize(t, { format: "html" }); + } + function b() { + var e = c.getAttribs(l.getStart().cloneNode(!1)); + return function () { + var t = l.getStart(); + t !== a.getBody() && + (c.setAttrib(t, "style", null), + o(e, function (e) { + t.setAttributeNode(e.cloneNode(!0)); + })); + }; + } + function C() { + return ( + !l.isCollapsed() && + c.getParent(l.getStart(), c.isBlock) !== + c.getParent(l.getEnd(), c.isBlock) + ); + } + return ( + a.on("keydown", function (e) { + var t, n, r, o, i; + if ( + !u(e) && + e.keyCode === Mh.BACKSPACE && + ((n = (t = l.getRng()).startContainer), + (r = t.startOffset), + (o = c.getRoot()), + (i = n), + t.collapsed && 0 === r) + ) { + for ( + ; + i && + i.parentNode && + i.parentNode.firstChild === i && + i.parentNode !== o; + + ) + i = i.parentNode; + "BLOCKQUOTE" === i.tagName && + (a.formatter.toggle("blockquote", null, i), + (t = c.createRng()).setStart(n, 0), + t.setEnd(n, 0), + l.setRng(t)); + } + }), + a.on("keydown", function (e) { + var t, + n, + r = e.keyCode; + if (!u(e) && (r === s || r === i)) { + if ( + ((t = a.selection.isCollapsed()), + (n = a.getBody()), + t && !c.isEmpty(n)) + ) + return; + if ( + !t && + !(function (e) { + var t = y(e), + n = c.createRng(); + return n.selectNode(a.getBody()), t === y(n); + })(a.selection.getRng()) + ) + return; + e.preventDefault(), + a.setContent(""), + n.firstChild && c.isBlock(n.firstChild) + ? a.selection.setCursorLocation(n.firstChild, 0) + : a.selection.setCursorLocation(n, 0), + a.nodeChanged(); + } + }), + Sn.windowsPhone || + a.on( + "keyup focusin mouseup", + function (e) { + Mh.modifierPressed(e) || l.normalize(); + }, + !0, + ), + g && + (a.inline || + c.bind(a.getDoc(), "mousedown mouseup", function (e) { + var t; + if (e.target === a.getDoc().documentElement) + if ( + ((t = l.getRng()), a.getBody().focus(), "mousedown" === e.type) + ) { + if (_a(t.startContainer)) return; + l.placeCaretAt(e.clientX, e.clientY); + } else l.setRng(t); + }), + a.on("click", function (e) { + var t = e.target; + /^(IMG|HR)$/.test(t.nodeName) && + "false" !== c.getContentEditableParent(t) && + (e.preventDefault(), a.selection.select(t), a.nodeChanged()), + "A" === t.nodeName && + c.hasClass(t, "mce-item-anchor") && + (e.preventDefault(), l.select(t)); + }), + f.forced_root_block && + a.on("init", function () { + e("DefaultParagraphSeparator", gf(a)); + }), + a.on("init", function () { + a.dom.bind(a.getBody(), "submit", function (e) { + e.preventDefault(); + }); + }), + n(), + d.addNodeFilter("br", function (e) { + for (var t = e.length; t--; ) + "Apple-interchange-newline" === e[t].attr("class") && e[t].remove(); + }), + Sn.iOS + ? (a.inline || + a.on("keydown", function () { + j.document.activeElement === j.document.body && + a.getWin().focus(); + }), + r(), + a.on("click", function (e) { + var t = e.target; + do { + if ("A" === t.tagName) return void e.preventDefault(); + } while ((t = t.parentNode)); + }), + a.contentStyles.push( + ".mce-content-body {-webkit-touch-callout: none}", + )) + : t()), + 11 <= Sn.ie && (r(), n()), + Sn.ie && + (t(), + e("AutoUrlDetect", !1), + a.on("dragstart", function (e) { + !(function (e) { + var t, n; + e.dataTransfer && + (a.selection.isCollapsed() && + "IMG" === e.target.tagName && + l.select(e.target), + 0 < (t = a.selection.getContent()).length && + ((n = p + escape(a.id) + "," + escape(t)), + e.dataTransfer.setData(v, n))); + })(e); + }), + a.on("drop", function (e) { + if (!u(e)) { + var t = (function (e) { + var t; + return e.dataTransfer && + (t = e.dataTransfer.getData(v)) && + 0 <= t.indexOf(p) + ? ((t = t.substr(p.length).split(",")), + { id: unescape(t[0]), html: unescape(t[1]) }) + : null; + })(e); + if (t && t.id !== a.id) { + e.preventDefault(); + var n = Wv(e.x, e.y, a.getDoc()); + l.setRng(n), + (function (e, t) { + a.queryCommandSupported("mceInsertClipboardContent") + ? a.execCommand("mceInsertClipboardContent", !1, { + content: e, + internal: t, + }) + : a.execCommand("mceInsertContent", !1, e); + })(t.html, !0); + } + } + })), + h && + (a.on("keydown", function (e) { + if (!u(e) && e.keyCode === i) { + if (!a.getBody().getElementsByTagName("hr").length) return; + if (l.isCollapsed() && 0 === l.getRng().startOffset) { + var t = l.getNode(), + n = t.previousSibling; + if ("HR" === t.nodeName) + return c.remove(t), void e.preventDefault(); + n && + n.nodeName && + "hr" === n.nodeName.toLowerCase() && + (c.remove(n), e.preventDefault()); + } + } + }), + j.Range.prototype.getClientRects || + a.on("mousedown", function (e) { + if (!u(e) && "HTML" === e.target.nodeName) { + var t = a.getBody(); + t.blur(), + vn.setEditorTimeout(a, function () { + t.focus(); + }); + } + }), + a.on("keypress", function (e) { + var t; + if (!u(e) && (8 === e.keyCode || 46 === e.keyCode) && C()) + return ( + (t = b()), + a.getDoc().execCommand("delete", !1, null), + t(), + e.preventDefault(), + !1 + ); + }), + c.bind(a.getDoc(), "cut", function (e) { + var t; + !u(e) && + C() && + ((t = b()), + vn.setEditorTimeout(a, function () { + t(); + })); + }), + f.readonly || + a.on("BeforeExecCommand mousedown", function () { + e("StyleWithCSS", !1), + e("enableInlineTableEditing", !1), + f.object_resizing || e("enableObjectResizing", !1); + }), + a.on("SetContent ExecCommand", function (e) { + ("setcontent" !== e.type && "mceInsertLink" !== e.command) || + o(c.select("a"), function (e) { + var t = e.parentNode, + n = c.getRoot(); + if (t.lastChild === e) { + for (; t && !c.isBlock(t); ) { + if (t.parentNode.lastChild !== t || t === n) return; + t = t.parentNode; + } + c.add(t, "br", { "data-mce-bogus": 1 }); + } + }); + }), + a.contentStyles.push( + "img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}", + ), + Sn.mac && + a.on("keydown", function (e) { + !Mh.metaKeyPressed(e) || + e.shiftKey || + (37 !== e.keyCode && 39 !== e.keyCode) || + (e.preventDefault(), + a.selection + .getSel() + .modify( + "move", + 37 === e.keyCode ? "backward" : "forward", + "lineboundary", + )); + }), + n()), + { + refreshContentEditable: function () {}, + isHidden: function () { + var e; + return ( + !(!h || a.removed) && + (!(e = a.selection.getSel()) || !e.rangeCount || 0 === e.rangeCount) + ); + }, + } + ); + } + function Bw(e) { + return Ge.isElement(e) && Fn(bt.fromDom(e)); + } + function Hw(t) { + t.on("click", function (e) { + 3 <= e.detail && + (function (e) { + var t = e.selection.getRng(), + n = ju.fromRangeStart(t), + r = ju.fromRangeEnd(t); + if (ju.isElementPosition(n)) { + var o = n.container(); + Bw(o) && + Lc.firstPositionIn(o).each(function (e) { + return t.setStart(e.container(), e.offset()); + }); + } + if (ju.isElementPosition(r)) { + o = n.container(); + Bw(o) && + Lc.lastPositionIn(o).each(function (e) { + return t.setEnd(e.container(), e.offset()); + }); + } + e.selection.setRng(dp(t)); + })(t); + }); + } + function Pw(e) { + !(function (t) { + t.on("click", function (e) { + t.dom.getParent(e.target, "details") && e.preventDefault(); + }); + })(e), + (function (e) { + e.parser.addNodeFilter("details", function (e) { + z(e, function (e) { + e.attr("data-mce-open", e.attr("open")), e.attr("open", "open"); + }); + }), + e.serializer.addNodeFilter("details", function (e) { + z(e, function (e) { + var t = e.attr("data-mce-open"); + e.attr("open", K(t) ? t : null), e.attr("data-mce-open", null); + }); + }); + })(e); + } + function Lw(e) { + e.bindPendingEventDelegates(), + (e.initialized = !0), + e.fire("init"), + e.focus(!0), + e.nodeChanged({ initial: !0 }), + e.execCallback("init_instance_callback", e), + (function (t) { + t.settings.auto_focus && + vn.setEditorTimeout( + t, + function () { + var e; + (e = + !0 === t.settings.auto_focus + ? t + : t.editorManager.get(t.settings.auto_focus)).destroyed || + e.focus(); + }, + 100, + ); + })(e); + } + function Vw(e, t) { + var n = e.editorManager.translate("Rich Text Area. Press ALT-0 for help."), + r = (function (e, t, n, r) { + var o = bt.fromTag("iframe"); + return ( + me(o, r), + me(o, { + id: e + "_ifr", + frameBorder: "0", + allowTransparency: "true", + title: t, + }), + da(o, "tox-edit-area__iframe"), + o + ); + })(e.id, n, t.height, sf(e)).dom(); + r.onload = function () { + (r.onload = null), e.fire("load"); + }; + var o = (function (e, t) { + if ( + j.document.domain !== j.window.location.hostname && + Sn.browser.isIE() + ) { + var n = lh("mce"); + e[n] = function () { + Cz(e); + }; + var r = + 'javascript:(function(){document.open();document.domain="' + + j.document.domain + + '";var ed = window.parent.tinymce.get("' + + e.id + + '");document.write(ed.iframeHTML);document.close();ed.' + + n + + "(true);})()"; + return wz.setAttrib(t, "src", r), !0; + } + return !1; + })(e, r); + return ( + (e.contentAreaContainer = t.iframeContainer), + (e.iframeElement = r), + (e.iframeHTML = (function (e) { + var t, n, r; + return ( + (r = cf(e) + ""), + lf(e) !== e.documentBaseUrl && + (r += ''), + (r += + ''), + (t = ff(e)), + (n = df(e)), + hf(e) && + (r += + ''), + (r += + '
') + ); + })(e)), + wz.add(t.iframeContainer, r), + o + ); + } + function Iw(e) { + e.contentCSS = e.contentCSS.concat( + (function (t) { + var e = Vf(t), + n = t.editorManager.baseURL + "/skins/content", + r = "content" + t.editorManager.suffix + ".css", + o = !0 === t.inline; + return X(e, function (e) { + return (function (e) { + return /^[a-z0-9\-]+$/i.test(e); + })(e) && !o + ? n + "/" + e + "/" + r + : t.documentBaseURI.toAbsolute(e); + }); + })(e), + ); + } + function Fw(e) { + return e.replace(/^\-/, ""); + } + function Uw(e) { + return { editorContainer: e, iframeContainer: e }; + } + function jw(e) { + var t = e.getElement(); + return e.inline + ? Uw(null) + : (function (e) { + var t = zz.create("div"); + return zz.insertAfter(t, e), Uw(t); + })(t); + } + function qw(e) { + return "-" === e.charAt(0); + } + function $w(t, e) { + (function (e) { + return k + .from(Ef(e)) + .filter(function (e) { + return 0 < e.length; + }) + .map(function (e) { + return { url: e, name: k.none() }; + }); + })(e) + .orThunk(function () { + return (function (t) { + return k + .from(zf(t)) + .filter(function (e) { + return 0 < e.length && !$d.has(e); + }) + .map(function (e) { + return { + url: t.editorManager.baseURL + "/icons/" + e + "/icons.js", + name: k.some(e), + }; + }); + })(e); + }) + .each(function (e) { + t.add(e.url, i, undefined, function () { + qd.iconsLoadError(e.url, e.name.getOrUndefined()); + }); + }); + } + function Ww(e, t) { + var n = Zi.ScriptLoader; + !(function (e, t, n, r) { + var o = t.settings, + i = o.theme; + if (K(i)) { + if (!qw(i) && !Kd.urls.hasOwnProperty(i)) { + var a = o.theme_url; + a + ? Kd.load(i, t.documentBaseURI.toAbsolute(a)) + : Kd.load(i, "themes/" + i + "/theme" + n + ".js"); + } + e.loadQueue(function () { + Kd.waitFor(i, r); + }); + } else r(); + })(n, e, t, function () { + !(function (e, t) { + var n = Bf(t), + r = Hf(t); + if (!1 === oa.hasCode(n) && "en" !== n) { + var o = + "" !== r ? r : t.editorManager.baseURL + "/langs/" + n + ".js"; + e.add(o, i, undefined, function () { + qd.languageLoadError(o, n); + }); + } + })(n, e), + $w(n, e), + (function (n, r) { + A(n.plugins) && (n.plugins = n.plugins.join(" ")), + Rn.each(n.external_plugins, function (e, t) { + Wd.load(t, e, i, undefined, function () { + qd.pluginLoadError(t, e); + }), + (n.plugins += " " + t); + }), + Rn.each(n.plugins.split(/[ ,]/), function (e) { + if ((e = Rn.trim(e)) && !Wd.urls[e]) + if (qw(e)) { + e = e.substr(1, e.length); + var t = Wd.dependencies(e); + Rn.each(t, function (e) { + var t = { + prefix: "plugins/", + resource: e, + suffix: "/plugin" + r + ".js", + }; + (e = Wd.createUrl(t, e)), + Wd.load(e.resource, e, i, undefined, function () { + qd.pluginLoadError( + e.prefix + e.resource + e.suffix, + e.resource, + ); + }); + }); + } else { + var n = { + prefix: "plugins/", + resource: e, + suffix: "/plugin" + r + ".js", + }; + Wd.load(e, n, i, undefined, function () { + qd.pluginLoadError(n.prefix + n.resource + n.suffix, e); + }); + } + }); + })(e.settings, t), + n.loadQueue( + function () { + e.removed || Nz(e); + }, + e, + function () { + e.removed || Nz(e); + }, + ); + }); + } + function Kw(e) { + return Rn.grep(e.childNodes, function (e) { + return "LI" === e.nodeName; + }); + } + function Xw(e) { + return ( + e && + e.firstChild && + e.firstChild === e.lastChild && + (function (e) { + return "\xa0" === e.data || Ge.isBr(e); + })(e.firstChild) + ); + } + function Yw(e) { + return 0 < e.length && + (function (e) { + return !e.firstChild || Xw(e); + })(e[e.length - 1]) + ? e.slice(0, -1) + : e; + } + function Gw(e, t) { + var n = e.getParent(t, e.isBlock); + return n && "LI" === n.nodeName ? n : null; + } + function Jw(e, t) { + var n = _s.after(e), + r = oc(t).prev(n); + return r ? r.toRange() : null; + } + function Qw(t, e, n) { + var r = t.parentNode; + return ( + Rn.each(e, function (e) { + r.insertBefore(e, t); + }), + (function (e, t) { + var n = _s.before(e), + r = oc(t).next(n); + return r ? r.toRange() : null; + })(t, n) + ); + } + function Zw(e, t) { + var n = e.selection.getRng(), + r = n.startContainer, + o = n.startOffset; + n.collapsed && + (function (e, t) { + return Ge.isText(e) && "\xa0" === e.nodeValue[t - 1]; + })(r, o) && + Ge.isText(r) && + (r.insertData(o - 1, " "), + r.deleteData(o, 1), + n.setStart(r, o), + n.setEnd(r, o), + e.selection.setRng(n)), + e.selection.setContent(t); + } + function ex(e, t, n) { + var r, + o, + i, + a, + u, + s, + c, + l, + f, + d, + h, + m = e.selection, + g = e.dom; + if ( + (/^ | $/.test(t) && + (t = (function (e, t) { + var n, r; + (n = e.startContainer), (r = e.startOffset); + function o(e) { + return n[e] && 3 === n[e].nodeType; + } + return ( + 3 === n.nodeType && + (0 < r + ? (t = t.replace(/^ /, " ")) + : o("previousSibling") || (t = t.replace(/^ /, " ")), + r < n.length + ? (t = t.replace(/ (
|)$/, " ")) + : o("nextSibling") || + (t = t.replace(/( | )(
|)$/, " "))), + t + ); + })(m.getRng(), t)), + (r = e.parser), + (h = n.merge), + (o = vl({ validate: e.settings.validate }, e.schema)), + (d = + '​'), + (s = { content: t, format: "html", selection: !0, paste: n.paste }), + (s = e.fire("BeforeSetContent", s)).isDefaultPrevented()) + ) + e.fire("SetContent", { + content: s.content, + format: "html", + selection: !0, + paste: n.paste, + }); + else { + -1 === (t = s.content).indexOf("{$caret}") && (t += "{$caret}"), + (t = t.replace(/\{\$caret\}/, d)); + var p = + (l = m.getRng()).startContainer || + (l.parentElement ? l.parentElement() : null), + v = e.getBody(); + p === v && + m.isCollapsed() && + g.isBlock(v.firstChild) && + (function (e, t) { + return t && !e.schema.getShortEndedElements()[t.nodeName]; + })(e, v.firstChild) && + g.isEmpty(v.firstChild) && + ((l = g.createRng()).setStart(v.firstChild, 0), + l.setEnd(v.firstChild, 0), + m.setRng(l)), + m.isCollapsed() || + (e.selection.setRng(dp(e.selection.getRng())), + e.getDoc().execCommand("Delete", !1, null), + (t = (function (e, t) { + var n, r; + return ( + (n = e.startContainer), + (r = e.startOffset), + 3 === n.nodeType && + e.collapsed && + ("\xa0" === n.data[r] + ? (n.deleteData(r, 1), /[\u00a0| ]$/.test(t) || (t += " ")) + : "\xa0" === n.data[r - 1] && + (n.deleteData(r - 1, 1), + /[\u00a0| ]$/.test(t) || (t = " " + t))), + t + ); + })(e.selection.getRng(), t))); + var y = { + context: (i = m.getNode()).nodeName.toLowerCase(), + data: n.data, + insert: !0, + }; + if (((u = r.parse(t, y)), !0 === n.paste && Tz(e.schema, u) && Mz(g, i))) + return ( + (l = Az(o, g, e.selection.getRng(), u)), + e.selection.setRng(l), + void e.fire("SetContent", s) + ); + if ( + ((function (e) { + for (var t = e; (t = t.walk()); ) + 1 === t.type && t.attr("data-mce-fragment", "1"); + })(u), + "mce_marker" === (f = u.lastChild).attr("id")) + ) + for (f = (c = f).prev; f; f = f.walk(!0)) + if (3 === f.type || !g.isBlock(f.name)) { + e.schema.isValidChild(f.parent.name, "span") && + f.parent.insert(c, f, "br" === f.name); + break; + } + if ((e._selectionOverrides.showBlockCaretContainer(i), y.invalid)) { + for ( + Zw(e, d), + i = m.getNode(), + a = e.getBody(), + 9 === i.nodeType ? (i = f = a) : (f = i); + f !== a; + + ) + f = (i = f).parentNode; + (t = i === a ? a.innerHTML : g.getOuterHTML(i)), + (t = o.serialize( + r.parse( + t.replace( + //i, + function () { + return o.serialize(u); + }, + ), + ), + )), + i === a ? g.setHTML(a, t) : g.setOuterHTML(i, t); + } else + !(function (e, t, n) { + if ("all" === n.getAttribute("data-mce-bogus")) + n.parentNode.insertBefore(e.dom.createFragment(t), n); + else { + var r = n.firstChild, + o = n.lastChild; + !r || (r === o && "BR" === r.nodeName) + ? e.dom.setHTML(n, t) + : Zw(e, t); + } + })(e, (t = o.serialize(u)), i); + !(function (e, t) { + var n = e.schema.getTextInlineElements(), + r = e.dom; + if (t) { + var o = e.getBody(), + i = new Bg(r); + Rn.each(r.select("*[data-mce-fragment]"), function (e) { + for (var t = e.parentNode; t && t !== o; t = t.parentNode) + n[e.nodeName.toLowerCase()] && i.compare(t, e) && r.remove(e, !0); + }); + } + })(e, h), + (function (n, e) { + var t, + r, + o, + i, + a, + u = n.dom, + s = n.selection; + if (e) { + if ( + (n.selection.scrollIntoView(e), + (t = (function (e) { + for (var t = n.getBody(); e && e !== t; e = e.parentNode) + if ("false" === n.dom.getContentEditable(e)) return e; + return null; + })(e))) + ) + return u.remove(e), s.select(t); + var c = u.createRng(); + (i = e.previousSibling) && 3 === i.nodeType + ? (c.setStart(i, i.nodeValue.length), + Sn.ie || + ((a = e.nextSibling) && + 3 === a.nodeType && + (i.appendData(a.data), a.parentNode.removeChild(a)))) + : (c.setStartBefore(e), c.setEndBefore(e)); + (r = u.getParent(e, u.isBlock)), + u.remove(e), + r && + u.isEmpty(r) && + (n.$(r).empty(), + c.setStart(r, 0), + c.setEnd(r, 0), + Rz(r) || + (function (e) { + return !!e.getAttribute("data-mce-fragment"); + })(r) || + !(o = (function (e) { + var t = _s.fromRangeStart(e); + if ((t = oc(n.getBody()).next(t))) return t.toRange(); + })(c)) + ? u.add(r, u.create("br", { "data-mce-bogus": "1" })) + : ((c = o), u.remove(r))), + s.setRng(c); + } + })(e, g.get("mce_marker")), + (function (e) { + Rn.each(e.getElementsByTagName("*"), function (e) { + e.removeAttribute("data-mce-fragment"); + }); + })(e.getBody()), + (function (e, t) { + k.from(e.getParent(t, "td,th")).map(bt.fromDom).each(wg); + })(e.dom, e.selection.getStart()), + e.fire("SetContent", s), + e.addVisual(); + } + } + function tx(e, t) { + e.getDoc().execCommand(t, !1, null); + } + function nx(e, t, n) { + return t(e).orThunk(function () { + return n(e) + ? k.none() + : (function (e, t, n) { + for (var r = e.dom(), o = D(n) ? n : $(!1); r.parentNode; ) { + r = r.parentNode; + var i = bt.fromDom(r), + a = t(i); + if (a.isSome()) return a; + if (o(i)) break; + } + return k.none(); + })(e, t, n); + }); + } + function rx(e, t, n) { + function r(t) { + return ye(t, e).orThunk(function () { + return "font" === ie(t) + ? le(Bz, e).bind(function (e) { + return (function (e, t) { + return k.from(ge(e, t)); + })(t, e); + }) + : k.none(); + }); + } + return nx( + bt.fromDom(n), + function (e) { + return r(e); + }, + function (e) { + return ze(bt.fromDom(t), e); + }, + ); + } + function ox(n) { + return function (t, e) { + return k + .from(e) + .map(bt.fromDom) + .filter(zt) + .bind(function (e) { + return rx(n, t, e.dom()).or( + (function (e, t) { + return k.from(Yi.DOM.getStyle(t, e, !0)); + })(n, e.dom()), + ); + }) + .getOr(""); + }; + } + function ix(e) { + return Lc.firstPositionIn(e.getBody()).map(function (e) { + var t = e.container(); + return Ge.isText(t) ? t.parentNode : t; + }); + } + function ax(t) { + return k.from(t.selection.getRng()).bind(function (e) { + return (function (e, t) { + return e.startContainer === t && 0 === e.startOffset; + })(e, t.getBody()) + ? k.none() + : k.from(t.selection.getStart(!0)); + }); + } + function ux(e, t) { + if (/^[0-9\.]+$/.test(t)) { + var n = parseInt(t, 10); + if (1 <= n && n <= 7) { + var r = wf(e), + o = xf(e); + return o ? o[n - 1] || t : r[n - 1] || t; + } + return t; + } + return t; + } + function sx(e, t) { + var n = ux(e, t); + e.formatter.toggle("fontname", { + value: (function (e) { + var t = e.split(/\s*,\s*/); + return X(t, function (e) { + return -1 === e.indexOf(" ") || ee(e, '"') || ee(e, "'") + ? e + : "'" + e + "'"; + }).join(","); + })(n), + }), + e.nodeChanged(); + } + var cx = d(ib, ju.isAbove, -1), + lx = d(ib, ju.isBelow, 1), + fx = d(ab, -1, cx), + dx = d(ab, 1, lx), + hx = Ge.isContentEditableFalse, + mx = Ka, + gx = d( + gb, + function (e) { + return e.bottom; + }, + function (e, t) { + return e.y < t; + }, + ), + px = d( + gb, + function (e) { + return e.top; + }, + function (e, t) { + return e.y > t; + }, + ), + vx = d(bb, cx), + yx = d(bb, lx), + bx = function (e) { + for (var t = [], n = 1; n < arguments.length; n++) + t[n - 1] = arguments[n]; + var r = Array.prototype.slice.call(arguments, 1); + return function () { + return e.apply(null, r); + }; + }, + Cx = function (e, t) { + return g(_b(e, t), function (e) { + return e.action(); + }); + }, + wx = function (t, n) { + t.on("keydown", function (e) { + !1 === e.isDefaultPrevented() && + (function (e, t, n) { + var r = oe().os; + Cx( + [ + { keyCode: Mh.RIGHT, action: db(e, !0) }, + { keyCode: Mh.LEFT, action: db(e, !1) }, + { keyCode: Mh.UP, action: hb(e, !1) }, + { keyCode: Mh.DOWN, action: hb(e, !0) }, + { keyCode: Mh.RIGHT, action: Eb(e, !0) }, + { keyCode: Mh.LEFT, action: Eb(e, !1) }, + { keyCode: Mh.UP, action: Nb(e, !1) }, + { keyCode: Mh.DOWN, action: Nb(e, !0) }, + { keyCode: Mh.RIGHT, action: rb.move(e, t, !0) }, + { keyCode: Mh.LEFT, action: rb.move(e, t, !1) }, + { + keyCode: Mh.RIGHT, + ctrlKey: !r.isOSX(), + altKey: r.isOSX(), + action: rb.moveNextWord(e, t), + }, + { + keyCode: Mh.LEFT, + ctrlKey: !r.isOSX(), + altKey: r.isOSX(), + action: rb.movePrevWord(e, t), + }, + { keyCode: Mh.UP, action: Db(e, !1) }, + { keyCode: Mh.DOWN, action: Db(e, !0) }, + ], + n, + ).each(function (e) { + n.preventDefault(); + }); + })(t, n, e); + }); + }, + xx = function (e, t) { + return Bt(e, t) + ? Ca( + t, + function (e) { + return Fn(e) || jn(e); + }, + (function (t) { + return function (e) { + return ze(t, bt.fromDom(e.dom().parentNode)); + }; + })(e), + ) + : k.none(); + }, + zx = function (e) { + e.dom.isEmpty(e.getBody()) && + (e.setContent(""), + (function (e) { + var t = e.getBody(), + n = t.firstChild && e.dom.isBlock(t.firstChild) ? t.firstChild : t; + e.selection.setCursorLocation(n, 0); + })(e)); + }, + Ex = function (i, a, u) { + return Ga(Lc.firstPositionIn(u), Lc.lastPositionIn(u), function (e, t) { + var n = Xy.normalizePosition(!0, e), + r = Xy.normalizePosition(!1, t), + o = Xy.normalizePosition(!1, a); + return i + ? Lc.nextPosition(u, o) + .map(function (e) { + return e.isEqual(r) && a.isEqual(n); + }) + .getOr(!1) + : Lc.prevPosition(u, o) + .map(function (e) { + return e.isEqual(n) && a.isEqual(r); + }) + .getOr(!1); + }).getOr(!0); + }, + Nx = function (e, t, n) { + return n.collapsed ? Hb(e, t, n) : k.none(); + }, + Sx = function (e, t, n, r) { + return t ? jb(e, r, n) : jb(e, n, r); + }, + kx = function (t, n) { + var r = bt.fromDom(t.getBody()), + e = Nx(r.dom(), n, t.selection.getRng()).bind(function (e) { + return Sx(r, n, e.from().block(), e.to().block()); + }); + return ( + e.each(function (e) { + t.selection.setRng(e.toRange()); + }), + e.isSome() + ); + }, + Tx = function (e, t) { + return !e.selection.isCollapsed() && Wb(e); + }, + Ax = d(Xb, !1), + Mx = d(Xb, !0), + Rx = qf([ + { remove: ["element"] }, + { moveToElement: ["element"] }, + { moveToPosition: ["position"] }, + ]), + Dx = function (e, t) { + for (; t && t !== e; ) { + if (Ge.isContentEditableTrue(t) || Ge.isContentEditableFalse(t)) + return t; + t = t.parentNode; + } + return null; + }, + _x = function (e, t) { + return e.selection.isCollapsed() ? tC(e, t) : nC(e, t); + }, + Ox = function (e) { + var t, + n = Dx(e.getBody(), e.selection.getNode()); + return ( + Ge.isContentEditableTrue(n) && + e.dom.isBlock(n) && + e.dom.isEmpty(n) && + ((t = e.dom.create("br", { "data-mce-bogus": "1" })), + e.dom.setHTML(n, ""), + n.appendChild(t), + e.selection.setRng(_s.before(t).toRange())), + !0 + ); + }, + Bx = function (e, t) { + return (function (e, t) { + var n = e.selection.getRng(); + if (!Ge.isText(n.commonAncestorContainer)) return !1; + var r = t ? Rs.Forwards : Rs.Backwards, + o = oc(e.getBody()), + i = d(As, o.next), + a = d(As, o.prev), + u = t ? i : a, + s = t ? Lh : Vh, + c = ks(r, e.getBody(), n), + l = Xy.normalizePosition(t, u(c)); + if (!l || !Ms(c, l)) return !1; + if (s(l)) return rC(e, n, c.getNode(), r, t, l); + var f = u(l); + return !!(f && s(f) && Ms(l, f)) && rC(e, n, c.getNode(), r, t, f); + })(e, t); + }, + Hx = function (e, t, n) { + if ( + e.selection.isCollapsed() && + (function (e) { + return !1 !== e.settings.inline_boundaries; + })(e) + ) { + var r = _s.fromRangeStart(e.selection.getRng()); + return aC(e, t, n, r); + } + return !1; + }, + Px = function (e, t) { + return !!e.selection.isCollapsed() && cC(e, t); + }, + Lx = qf([{ removeTable: ["element"] }, { emptyCells: ["cells"] }]), + Vx = function (e, t) { + return mC(t, e).isSome(); + }, + Ix = function (e, t) { + return g(dh(t, e), function (e) { + return "caption" === ie(e); + }); + }, + Fx = function (e, t) { + return Cg(t), e.selection.setCursorLocation(t.dom(), 0), k.some(!0); + }, + Ux = function (e, t) { + var n = bt.fromDom(e.selection.getStart(!0)), + r = oy(e); + return e.selection.isCollapsed() && 0 === r.length + ? AC(e, t, n) + : (function (e, t) { + var n = bt.fromDom(e.getBody()), + r = e.selection.getRng(), + o = oy(e); + return 0 !== o.length ? wC(e, o) : EC(e, n, r, t); + })(e, n); + }, + jx = function (e, t) { + return ( + !!e.selection.isCollapsed() && + (function (t, n) { + var e = _s.fromRangeStart(t.selection.getRng()); + return Lc.fromPosition(n, t.getBody(), e) + .filter(function (e) { + return n ? Oh(e) : Bh(e); + }) + .bind(function (e) { + return k.from(xs(n ? 0 : -1, e)); + }) + .map(function (e) { + return t.selection.select(e), !0; + }) + .getOr(!1); + })(e, t) + ); + }, + qx = function (e) { + return y(X(e.selection.getSelectedBlocks(), bt.fromDom), function (e) { + return ( + !_C(e) && + !(function (e) { + return Se(e).map(_C).getOr(!1); + })(e) && + (function (e) { + return Ca(e, function (e) { + return ( + Ge.isContentEditableTrue(e.dom()) || + Ge.isContentEditableFalse(e.dom()) + ); + }).exists(function (e) { + return Ge.isContentEditableTrue(e.dom()); + }); + })(e) + ); + }); + }, + $x = d(LC, !1), + Wx = d(LC, !0), + Kx = d(PC, !1), + Xx = d(PC, !0), + Yx = function (e, t, n) { + if (e.selection.isCollapsed() && DC(e)) { + var r = e.dom, + o = e.selection.getRng(), + i = _s.fromRangeStart(o), + a = r.getParent(o.startContainer, r.isBlock); + if (null !== a && $x(bt.fromDom(a), i)) return OC(e, "outdent"), !0; + } + return !1; + }, + Gx = function (t, n) { + t.on("keydown", function (e) { + !1 === e.isDefaultPrevented() && + (function (e, t, n) { + Cx( + [ + { keyCode: Mh.BACKSPACE, action: bx(Yx, e, !1) }, + { keyCode: Mh.BACKSPACE, action: bx(_x, e, !1) }, + { keyCode: Mh.DELETE, action: bx(_x, e, !0) }, + { keyCode: Mh.BACKSPACE, action: bx(Bx, e, !1) }, + { keyCode: Mh.DELETE, action: bx(Bx, e, !0) }, + { keyCode: Mh.BACKSPACE, action: bx(Hx, e, t, !1) }, + { keyCode: Mh.DELETE, action: bx(Hx, e, t, !0) }, + { keyCode: Mh.BACKSPACE, action: bx(Ux, e, !1) }, + { keyCode: Mh.DELETE, action: bx(Ux, e, !0) }, + { keyCode: Mh.BACKSPACE, action: bx(jx, e, !1) }, + { keyCode: Mh.DELETE, action: bx(jx, e, !0) }, + { keyCode: Mh.BACKSPACE, action: bx(Tx, e, !1) }, + { keyCode: Mh.DELETE, action: bx(Tx, e, !0) }, + { keyCode: Mh.BACKSPACE, action: bx(kx, e, !1) }, + { keyCode: Mh.DELETE, action: bx(kx, e, !0) }, + { keyCode: Mh.BACKSPACE, action: bx(Px, e, !1) }, + { keyCode: Mh.DELETE, action: bx(Px, e, !0) }, + ], + n, + ).each(function (e) { + n.preventDefault(); + }); + })(t, n, e); + }), + t.on("keyup", function (e) { + !1 === e.isDefaultPrevented() && + (function (e, t) { + Cx( + [ + { keyCode: Mh.BACKSPACE, action: bx(Ox, e) }, + { keyCode: Mh.DELETE, action: bx(Ox, e) }, + ], + t, + ); + })(t, e); + }); + }, + Jx = function (e, t) { + var n, + r, + o = t, + i = e.dom, + a = e.schema.getMoveCaretBeforeOnEnterElements(); + if (t) { + if (/^(LI|DT|DD)$/.test(t.nodeName)) { + var u = (function (e) { + for (; e; ) { + if ( + 1 === e.nodeType || + (3 === e.nodeType && e.data && /[\r\n\s]/.test(e.data)) + ) + return e; + e = e.nextSibling; + } + })(t.firstChild); + u && + /^(UL|OL|DL)$/.test(u.nodeName) && + t.insertBefore(i.doc.createTextNode("\xa0"), t.firstChild); + } + if (((r = i.createRng()), t.normalize(), t.hasChildNodes())) { + for (var s = new bi(t, t); (n = s.current()); ) { + if (Ge.isText(n)) { + r.setStart(n, 0), r.setEnd(n, 0); + break; + } + if (a[n.nodeName.toLowerCase()]) { + r.setStartBefore(n), r.setEndBefore(n); + break; + } + (o = n), (n = s.next()); + } + n || (r.setStart(o, 0), r.setEnd(o, 0)); + } else + Ge.isBr(t) + ? t.nextSibling && i.isBlock(t.nextSibling) + ? (r.setStartBefore(t), r.setEndBefore(t)) + : (r.setStartAfter(t), r.setEndAfter(t)) + : (r.setStart(t, 0), r.setEnd(t, 0)); + e.selection.setRng(r), e.selection.scrollIntoView(t); + } + }, + Qx = function (e, t) { + var n, + r, + o = e.getRoot(); + for (n = t; n !== o && "false" !== e.getContentEditable(n); ) + "true" === e.getContentEditable(n) && (r = n), (n = n.parentNode); + return n !== o ? r : o; + }, + Zx = VC, + ez = function (e) { + return VC(e).fold($(""), function (e) { + return e.nodeName.toUpperCase(); + }); + }, + tz = function (e) { + return VC(e) + .filter(function (e) { + return jn(bt.fromDom(e)); + }) + .isSome(); + }, + nz = function (e, t, n, r, o) { + var i = e.dom, + a = e.selection.getRng(); + if (n !== e.getBody()) { + !(function (e) { + return FC(e) && FC(e.parentNode); + })(n) || (o = "LI"); + var u = o ? t(o) : i.create("BR"); + if (jC(n, r, !0) && jC(n, r, !1)) + IC(n, "LI") ? i.insertAfter(u, UC(n)) : i.replace(u, n); + else if (jC(n, r, !0)) + IC(n, "LI") + ? (i.insertAfter(u, UC(n)), + u.appendChild(i.doc.createTextNode(" ")), + u.appendChild(n)) + : n.parentNode.insertBefore(u, n); + else if (jC(n, r, !1)) i.insertAfter(u, UC(n)); + else { + n = UC(n); + var s = a.cloneRange(); + s.setStartAfter(r), s.setEndAfter(n); + var c = s.extractContents(); + "LI" === o && + (function (e, t) { + return e.firstChild && e.firstChild.nodeName === t; + })(c, "LI") + ? ((u = c.firstChild), i.insertAfter(c, n)) + : (i.insertAfter(c, n), i.insertAfter(u, n)); + } + i.remove(r), Jx(e, u); + } + }, + rz = function (a, e) { + function t(e) { + var t, + n, + r, + o = s, + i = b.getTextInlineElements(); + if ( + (e || "TABLE" === m || "HR" === m + ? ((t = y.create(e || p)), YC(a, t)) + : (t = c.cloneNode(!1)), + (r = t), + !1 === bf(a)) + ) + y.setAttrib(t, "style", null), y.setAttrib(t, "class", null); + else + do { + if (i[o.nodeName]) { + if (os(o) || Uc(o)) continue; + (n = o.cloneNode(!1)), + y.setAttrib(n, "id", ""), + t.hasChildNodes() ? n.appendChild(t.firstChild) : (r = n), + t.appendChild(n); + } + } while ((o = o.parentNode) && o !== u); + return qC(r), t; + } + function n(e) { + var t, + n, + r = KC(e, s, i); + if (Ge.isText(s) && (e ? 0 < r : r < s.nodeValue.length)) return !1; + if (s.parentNode === c && v && !e) return !0; + if (e && Ge.isElement(s) && s === c.firstChild) return !0; + if ($C(s, "TABLE") || $C(s, "HR")) return (v && !e) || (!v && e); + var o = new bi(s, c); + for ( + Ge.isText(s) && + (e && 0 === r ? o.prev() : e || r !== s.nodeValue.length || o.next()); + (t = o.current()); + + ) { + if (Ge.isElement(t)) { + if ( + !t.getAttribute("data-mce-bogus") && + ((n = t.nodeName.toLowerCase()), C[n] && "br" !== n) + ) + return !1; + } else if (Ge.isText(t) && !/^[ \t\r\n]*$/.test(t.nodeValue)) + return !1; + e ? o.prev() : o.next(); + } + return !0; + } + function r() { + (f = /^(H[1-6]|PRE|FIGURE)$/.test(m) && "HGROUP" !== g ? t(p) : t()), + Cf(a) && WC(y, h) && y.isEmpty(c) + ? (f = y.split(h, c)) + : y.insertAfter(f, c), + Jx(a, f); + } + var o, + u, + s, + i, + c, + l, + f, + d, + h, + m, + g, + p, + v, + y = a.dom, + b = a.schema, + C = b.getNonEmptyElements(), + w = a.selection.getRng(); + uy(y, w).each(function (e) { + w.setStart(e.startContainer, e.startOffset), + w.setEnd(e.endContainer, e.endOffset); + }), + (s = w.startContainer), + (i = w.startOffset), + (p = gf(a)), + (l = !(!e || !e.shiftKey)); + var x = !(!e || !e.ctrlKey); + Ge.isElement(s) && + s.hasChildNodes() && + ((v = i > s.childNodes.length - 1), + (s = s.childNodes[Math.min(i, s.childNodes.length - 1)] || s), + (i = v && Ge.isText(s) ? s.nodeValue.length : 0)), + (u = XC(y, s)) && + (((p && !l) || (!p && l)) && + (s = (function (e, t, n, r, o) { + var i, + a, + u, + s, + c, + l, + f = t || "P", + d = e.dom, + h = XC(d, r); + if (!(a = d.getParent(r, d.isBlock)) || !WC(d, a)) { + if ( + ((l = + (a = a || h) === e.getBody() || + (function (e) { + return e && /^(TD|TH|CAPTION)$/.test(e.nodeName); + })(a) + ? a.nodeName.toLowerCase() + : a.parentNode.nodeName.toLowerCase()), + !a.hasChildNodes()) + ) + return ( + (i = d.create(f)), + YC(e, i), + a.appendChild(i), + n.setStart(i, 0), + n.setEnd(i, 0), + i + ); + for (s = r; s.parentNode !== a; ) s = s.parentNode; + for (; s && !d.isBlock(s); ) s = (u = s).previousSibling; + if (u && e.schema.isValidChild(l, f.toLowerCase())) { + for ( + i = d.create(f), + YC(e, i), + u.parentNode.insertBefore(i, u), + s = u; + s && !d.isBlock(s); + + ) + (c = s.nextSibling), i.appendChild(s), (s = c); + n.setStart(r, o), n.setEnd(r, o); + } + } + return r; + })(a, p, w, s, i)), + (c = y.getParent(s, y.isBlock)), + (h = c ? y.getParent(c.parentNode, y.isBlock) : null), + (m = c ? c.nodeName.toUpperCase() : ""), + "LI" !== (g = h ? h.nodeName.toUpperCase() : "") || + x || + ((h = (c = h).parentNode), (m = g)), + /^(LI|DT|DD)$/.test(m) && y.isEmpty(c) + ? nz(a, t, h, c, p) + : (p && c === a.getBody()) || + ((p = p || "P"), + Ra(c) + ? ((f = La(c)), y.isEmpty(c) && qC(c), Jx(a, f)) + : n() + ? r() + : n(!0) + ? ((f = c.parentNode.insertBefore(t(), c)), + Jx(a, $C(c, "HR") ? f : c)) + : ((o = (function (e) { + var t = e.cloneRange(); + return ( + t.setStart( + e.startContainer, + KC(!0, e.startContainer, e.startOffset), + ), + t.setEnd( + e.endContainer, + KC(!1, e.endContainer, e.endOffset), + ), + t + ); + })(w).cloneRange()).setEndAfter(c), + (function (e) { + z(va(bt.fromDom(e), Et), function (e) { + var t = e.dom(); + t.nodeValue = fu(t.nodeValue); + }); + })((d = o.extractContents())), + (function (e) { + for ( + ; + Ge.isText(e) && + (e.nodeValue = e.nodeValue.replace(/^[\r\n]+/, "")), + (e = e.firstChild); + + ); + })(d), + (f = d.firstChild), + y.insertAfter(d, c), + (function (e, t, n) { + var r, + o = n, + i = []; + if (o) { + for (; (o = o.firstChild); ) { + if (e.isBlock(o)) return; + Ge.isElement(o) && + !t[o.nodeName.toLowerCase()] && + i.push(o); + } + for (r = i.length; r--; ) + !(o = i[r]).hasChildNodes() || + (o.firstChild === o.lastChild && + "" === o.firstChild.nodeValue) + ? e.remove(o) + : ((a = e), + (u = o) && + "A" === u.nodeName && + a.isEmpty(u) && + e.remove(o)); + var a, u; + } + })(y, C, f), + (function (e, t) { + var n; + t.normalize(), + ((n = t.lastChild) && + !/^(left|right)$/gi.test(e.getStyle(n, "float", !0))) || + e.add(t, "br"); + })(y, c), + y.isEmpty(c) && qC(c), + f.normalize(), + y.isEmpty(f) ? (y.remove(f), r()) : Jx(a, f)), + y.setAttrib(f, "id", ""), + a.fire("NewBlock", { newBlock: f }))); + }, + oz = function (e, t) { + return ( + !!(function (e) { + return Ge.isBr(e.getNode()); + })(_s.after(t)) || + Lc.nextPosition(e, _s.after(t)) + .map(function (e) { + return Ge.isBr(e.getNode()); + }) + .getOr(!1) + ); + }, + iz = function (e, t) { + var n = (function (e) { + var t = d(Xy.isInlineTarget, e), + n = _s.fromRangeStart(e.selection.getRng()); + return Qy(t, e.getBody(), n).filter(nw); + })(e); + n.isSome() ? n.each(d(rw, e)) : QC(e, t); + }, + az = function (e) { + return ow(e, vf(e)); + }, + uz = function (e) { + return ow(e, yf(e)); + }, + sz = qf([{ br: [] }, { block: [] }, { none: [] }]), + cz = function (e, t) { + return Yy( + [ + mw([iw], sz.none()), + mw([sw("summary", !0)], sz.br()), + mw([cw(!0), lw(!1), dw], sz.br()), + mw([cw(!0), lw(!1)], sz.block()), + mw([cw(!0), lw(!0), dw], sz.block()), + mw([cw(!0), lw(!0)], sz.br()), + mw([uw(!0), dw], sz.br()), + mw([uw(!0)], sz.block()), + mw([aw(!0), dw, hw], sz.block()), + mw([aw(!0)], sz.br()), + mw([fw], sz.br()), + mw([aw(!1), dw], sz.br()), + mw([hw], sz.block()), + ], + [e, !(!t || !t.shiftKey)], + ).getOr(sz.none()); + }, + lz = function (e, t) { + cz(e, t).fold( + function () { + iz(e, t); + }, + function () { + rz(e, t); + }, + i, + ); + }, + fz = function (t) { + t.on("keydown", function (e) { + e.keyCode === Mh.ENTER && + (function (e, t) { + t.isDefaultPrevented() || + (t.preventDefault(), + (function (e) { + e.typing && ((e.typing = !1), e.add()); + })(e.undoManager), + e.undoManager.transact(function () { + !1 === e.selection.isCollapsed() && e.execCommand("Delete"), + lz(e, t); + })); + })(t, e); + }); + }, + dz = d(gw, "\xa0"), + hz = d(gw, " "), + mz = function (t) { + t.on("keydown", function (e) { + !1 === e.isDefaultPrevented() && + (function (e, t) { + Cx([{ keyCode: Mh.SPACEBAR, action: bx(Mw, e) }], t).each(function ( + e, + ) { + t.preventDefault(); + }); + })(t, e); + }); + }, + gz = function (e) { + e.on("keyup compositionstart", d(Dw, e)); + }, + pz = oe().browser, + vz = function (t) { + t.on("keydown", function (e) { + !1 === e.isDefaultPrevented() && + (function (e, t) { + Cx( + [ + { keyCode: Mh.END, action: mb(e, !0) }, + { keyCode: Mh.HOME, action: mb(e, !1) }, + ], + t, + ).each(function (e) { + t.preventDefault(); + }); + })(t, e); + }); + }, + yz = function (e) { + var t = rb.setupSelectedState(e); + gz(e), wx(e, t), Gx(e, t), fz(e), mz(e), _w(e), vz(e); + }, + bz = Yi.DOM, + Cz = function (t, e) { + var n, + r, + o = t.settings, + i = t.getElement(), + a = t.getDoc(); + o.inline || (t.getElement().style.visibility = t.orgVisibility), + e || t.inline || (a.open(), a.write(t.iframeHTML), a.close()), + t.inline && + (t.on("remove", function () { + var e = this.getBody(); + bz.removeClass(e, "mce-content-body"), + bz.removeClass(e, "mce-edit-focus"), + bz.setAttrib(e, "contentEditable", null); + }), + bz.addClass(i, "mce-content-body"), + (t.contentDocument = a = j.document), + (t.contentWindow = j.window), + (t.bodyElement = i), + (t.contentAreaContainer = i), + (o.root_name = i.nodeName.toLowerCase())), + ((n = t.getBody()).disabled = !0), + (t.readonly = o.readonly), + t.readonly || + (t.inline && + "static" === bz.getStyle(n, "position", !0) && + (n.style.position = "relative"), + (n.contentEditable = t.getParam("content_editable_state", !0))), + (n.disabled = !1), + (t.editorUpload = eh(t)), + (t.schema = vr(o)), + (t.dom = Yi(a, { + keep_values: !0, + url_converter: t.convertURL, + url_converter_scope: t, + hex_colors: o.force_hex_style_colors, + update_styles: !0, + root_element: t.inline ? t.getBody() : null, + collect: function () { + return t.inline; + }, + schema: t.schema, + contentCssCors: _f(t), + referrerPolicy: Of(t), + onSetAttrib: function (e) { + t.fire("SetAttrib", e); + }, + })), + (t.parser = (function (u) { + var e = Sp(u.settings, u.schema); + return ( + e.addAttributeFilter("src,href,style,tabindex", function (e, t) { + for (var n, r, o, i = e.length, a = u.dom; i--; ) + if ( + ((r = (n = e[i]).attr(t)), (o = "data-mce-" + t), !n.attr(o)) + ) { + if (0 === r.indexOf("data:") || 0 === r.indexOf("blob:")) + continue; + "style" === t + ? ((r = a.serializeStyle(a.parseStyle(r), n.name)).length || + (r = null), + n.attr(o, r), + n.attr(t, r)) + : "tabindex" === t + ? (n.attr(o, r), n.attr(t, null)) + : n.attr(o, u.convertURL(r, t, n.name)); + } + }), + e.addNodeFilter("script", function (e) { + for (var t, n, r = e.length; r--; ) + 0 !== + (n = (t = e[r]).attr("type") || "no/type").indexOf("mce-") && + t.attr("type", "mce-" + n); + }), + e.addNodeFilter("#cdata", function (e) { + for (var t, n = e.length; n--; ) + ((t = e[n]).type = 8), + (t.name = "#comment"), + (t.value = "[CDATA[" + t.value + "]]"); + }), + e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div", function (e) { + for ( + var t, n = e.length, r = u.schema.getNonEmptyElements(); + n--; + + ) + (t = e[n]).isEmpty(r) && + 0 === t.getAll("br").length && + (t.append(new sl("br", 1)).shortEnded = !0); + }), + e + ); + })(t)), + (t.serializer = Mp(o, t)), + (t.selection = fy(t.dom, t.getWin(), t.serializer, t)), + (t.annotator = rl(t)), + (t.formatter = wp(t)), + (t.undoManager = gm(t)), + (t._nodeChangeDispatcher = new vh(t)), + (t._selectionOverrides = im(t)), + Pw(t), + Hw(t), + yz(t), + hh(t), + t.fire("PreInit"), + o.browser_spellcheck || + o.gecko_spellcheck || + ((a.body.spellcheck = !1), bz.setAttrib(n, "spellcheck", "false")), + (t.quirks = Ow(t)), + t.fire("PostRender"); + var u = If(t); + u !== undefined && (n.dir = u), + o.protect && + t.on("BeforeSetContent", function (t) { + Rn.each(o.protect, function (e) { + t.content = t.content.replace(e, function (e) { + return "\x3c!--mce:protected " + escape(e) + "--\x3e"; + }); + }); + }), + t.on("SetContent", function () { + t.addVisual(t.getBody()); + }), + t.load({ initial: !0, format: "html" }), + (t.startContent = t.getContent({ format: "raw" })), + t.on("compositionstart compositionend", function (e) { + t.composing = "compositionstart" === e.type; + }), + 0 < t.contentStyles.length && + ((r = ""), + Rn.each(t.contentStyles, function (e) { + r += e + "\r\n"; + }), + t.dom.addStyle(r)), + (function (e) { + return e.inline ? bz.styleSheetLoader : e.dom.styleSheetLoader; + })(t).loadAll( + t.contentCSS, + function (e) { + Lw(t); + }, + function (e) { + Lw(t); + }, + ), + o.content_style && + (function (e, t) { + var n = bt.fromDom(e.getDoc().head), + r = bt.fromTag("style"); + At(r, "type", "text/css"), _i(r, bt.fromText(t)), _i(n, r); + })(t, o.content_style); + }, + wz = Yi.DOM, + xz = function (e, t) { + var n = Vw(e, t); + t.editorContainer && + ((wz.get(t.editorContainer).style.display = e.orgDisplay), + (e.hidden = wz.isHidden(t.editorContainer))), + (e.getElement().style.display = "none"), + wz.setAttrib(e.id, "aria-hidden", "true"), + n || Cz(e); + }, + zz = Yi.DOM, + Ez = function (t, n, e) { + var r = Wd.get(e), + o = Wd.urls[e] || t.documentBaseUrl.replace(/\/$/, ""); + if (((e = Rn.trim(e)), r && -1 === Rn.inArray(n, e))) { + if ( + (Rn.each(Wd.dependencies(e), function (e) { + Ez(t, n, e); + }), + t.plugins[e]) + ) + return; + try { + var i = new r(t, o, t.$); + (t.plugins[e] = i).init && (i.init(t, o), n.push(e)); + } catch (xN) { + qd.pluginInitError(t, e, xN); + } + } + }, + Nz = function (e) { + e.fire("ScriptsLoaded"), + (function (n) { + var e = Rn.trim(n.settings.icons), + r = n.ui.registry.getAll().icons, + t = G( + G( + {}, + { + "accessibility-check": + '', + "action-next": + '', + "action-prev": + '', + "align-center": + '', + "align-justify": + '', + "align-left": + '', + "align-none": + '', + "align-right": + '', + "arrow-left": + '', + "arrow-right": + '', + bold: '', + bookmark: + '', + "border-width": + '', + brightness: + '', + browse: + '', + cancel: + '', + "change-case": + '', + "character-count": + '', + "checklist-rtl": + '', + checklist: + '', + checkmark: + '', + "chevron-down": + '', + "chevron-left": + '', + "chevron-right": + '', + "chevron-up": + '', + close: + '', + "code-sample": + '', + "color-levels": + '', + "color-picker": + '', + "color-swatch-remove-color": + '', + "color-swatch": + '', + "comment-add": + '', + comment: + '', + contrast: + '', + copy: '', + crop: '', + cut: '', + "document-properties": + '', + drag: '', + duplicate: + '', + "edit-block": + '', + "edit-image": + '', + "embed-page": + '', + embed: + '', + emoji: + '', + fill: '', + "flip-horizontally": + '', + "flip-vertically": + '', + "format-painter": + '', + fullscreen: + '', + gallery: + '', + gamma: + '', + help: '', + "highlight-bg-color": + '', + home: '', + "horizontal-rule": + '', + "image-options": + '', + image: + '', + indent: + '', + info: '', + "insert-character": + '', + "insert-time": + '', + invert: + '', + italic: + '', + line: '', + link: '', + "list-bull-circle": + '', + "list-bull-default": + '', + "list-bull-square": + '', + "list-num-default-rtl": + '', + "list-num-default": + '', + "list-num-lower-alpha-rtl": + '', + "list-num-lower-alpha": + '', + "list-num-lower-greek-rtl": + '', + "list-num-lower-greek": + '', + "list-num-lower-roman-rtl": + '', + "list-num-lower-roman": + '', + "list-num-upper-alpha-rtl": + '', + "list-num-upper-alpha": + '', + "list-num-upper-roman-rtl": + '', + "list-num-upper-roman": + '', + lock: '', + ltr: '', + "more-drawer": + '', + "new-document": + '', + "new-tab": + '', + "non-breaking": + '', + notice: + '', + "ordered-list-rtl": + '', + "ordered-list": + '', + orientation: + '', + outdent: + '', + "page-break": + '', + "paste-text": + '', + paste: + '', + "permanent-pen": + '', + plus: '', + preferences: + '', + preview: + '', + print: + '', + quote: + '', + redo: '', + reload: + '', + "remove-formatting": + '', + remove: + '', + "resize-handle": + '', + resize: + '', + "restore-draft": + '', + "rotate-left": + '', + "rotate-right": + '', + rtl: '', + save: '', + search: + '', + "select-all": + '', + selected: + '', + settings: + '', + sharpen: + '', + sourcecode: + '', + "spell-check": + '', + "strike-through": + '', + subscript: + '', + superscript: + '', + "table-cell-properties": + '', + "table-cell-select-all": + '', + "table-cell-select-inner": + '', + "table-delete-column": + '', + "table-delete-row": + '', + "table-delete-table": + '', + "table-insert-column-after": + '', + "table-insert-column-before": + '', + "table-insert-row-above": + '', + "table-insert-row-after": + '', + "table-left-header": + '', + "table-merge-cells": + '', + "table-row-properties": + '', + "table-split-cells": + '', + "table-top-header": + '', + table: + '', + template: + '', + "temporary-placeholder": + '', + "text-color": + '', + toc: '', + translate: + '', + underline: + '', + undo: '', + unlink: + '', + unlock: + '', + "unordered-list": + '', + unselected: + '', + upload: + '', + user: '', + visualblocks: + '', + visualchars: + '', + warning: + '', + "zoom-in": + '', + "zoom-out": + '', + }, + ), + $d.get(e).icons, + ); + ue(t, function (e, t) { + Tt(r, t) || n.ui.registry.addIcon(t, e); + }); + })(e), + (function (e) { + var t = e.settings.theme; + if (K(t)) { + e.settings.theme = Fw(t); + var n = Kd.get(t); + (e.theme = new n(e, Kd.urls[t])), + e.theme.init && + e.theme.init( + e, + Kd.urls[t] || e.documentBaseUrl.replace(/\/$/, ""), + e.$, + ); + } else e.theme = {}; + })(e), + (function (t) { + var n = []; + Rn.each(t.settings.plugins.split(/[ ,]/), function (e) { + Ez(t, n, Fw(e)); + }); + })(e); + var t = (function (e) { + var t = e.getElement(); + return ( + (e.orgDisplay = t.style.display), + K(e.settings.theme) + ? (function (e) { + return e.theme.renderUI(); + })(e) + : D(e.settings.theme) + ? (function (e) { + var t = e.getElement(), + n = (0, e.settings.theme)(e, t); + return ( + n.editorContainer.nodeType && + (n.editorContainer.id = + n.editorContainer.id || e.id + "_parent"), + n.iframeContainer && + n.iframeContainer.nodeType && + (n.iframeContainer.id = + n.iframeContainer.id || e.id + "_iframecontainer"), + (n.height = n.iframeHeight ? n.iframeHeight : t.offsetHeight), + n + ); + })(e) + : jw(e) + ); + })(e); + return ( + (e.editorContainer = t.editorContainer ? t.editorContainer : null), + Iw(e), + e.inline ? Cz(e) : xz(e, t) + ); + }, + Sz = Yi.DOM, + kz = function (t) { + var e = t.settings, + n = t.id; + oa.setCode(Bf(t)); + var r = function () { + Sz.unbind(j.window, "ready", r), t.render(); + }; + if (Tr.Event.domLoaded) { + if (t.getElement() && Sn.contentEditable) { + e.inline + ? (t.inline = !0) + : ((t.orgVisibility = t.getElement().style.visibility), + (t.getElement().style.visibility = "hidden")); + var o = t.getElement().form || Sz.getParent(n, "form"); + o && + ((t.formElement = o), + e.hidden_input && + !Ge.isTextareaOrInput(t.getElement()) && + (Sz.insertAfter( + Sz.create("input", { type: "hidden", name: n }), + n, + ), + (t.hasHiddenInput = !0)), + (t.formEventDelegate = function (e) { + t.fire(e.type, e); + }), + Sz.bind(o, "submit reset", t.formEventDelegate), + t.on("reset", function () { + t.resetContent(); + }), + !e.submit_patch || + o.submit.nodeType || + o.submit.length || + o._mceOldSubmit || + ((o._mceOldSubmit = o.submit), + (o.submit = function () { + return ( + t.editorManager.triggerSave(), + t.setDirty(!1), + o._mceOldSubmit(o) + ); + }))), + (t.windowManager = Bd(t)), + (t.notificationManager = Od(t)), + "xml" === e.encoding && + t.on("GetContent", function (e) { + e.save && (e.content = Sz.encode(e.content)); + }), + e.add_form_submit_trigger && + t.on("submit", function () { + t.initialized && t.save(); + }), + e.add_unload_trigger && + ((t._beforeUnload = function () { + !t.initialized || + t.destroyed || + t.isHidden() || + t.save({ format: "raw", no_events: !0, set_dirty: !1 }); + }), + t.editorManager.on("BeforeUnload", t._beforeUnload)), + t.editorManager.add(t), + Ww(t, t.suffix); + } + } else Sz.bind(j.window, "ready", r); + }, + Tz = function (e, t) { + var n = t.firstChild, + r = t.lastChild; + return ( + n && "meta" === n.name && (n = n.next), + r && "mce_marker" === r.attr("id") && (r = r.prev), + (function (e, t) { + var n = e.getNonEmptyElements(); + return ( + t && + (t.isEmpty(n) || + (function (e, t) { + return ( + e.getBlockElements()[t.name] && + (function (e) { + return e.firstChild && e.firstChild === e.lastChild; + })(t) && + (function (e) { + return "br" === e.name || "\xa0" === e.value; + })(t.firstChild) + ); + })(e, t)) + ); + })(e, r) && (r = r.prev), + !(!n || n !== r) && ("ul" === n.name || "ol" === n.name) + ); + }, + Az = function (e, o, i, t) { + function n(e) { + var t = _s.fromRangeStart(i), + n = oc(o.getRoot()), + r = 1 === e ? n.prev(t) : n.next(t); + return !r || Gw(o, r.getNode()) !== a; + } + var r = (function (e, t, n) { + var r = t.serialize(n); + return (function (e) { + var t = e.firstChild, + n = e.lastChild; + return ( + t && "META" === t.nodeName && t.parentNode.removeChild(t), + n && "mce_marker" === n.id && n.parentNode.removeChild(n), + e + ); + })(e.createFragment(r)); + })(o, e, t), + a = Gw(o, i.startContainer), + u = Yw(Kw(r.firstChild)), + s = o.getRoot(); + return n(1) + ? Qw(a, u, s) + : n(2) + ? (function (e, t, n, r) { + return r.insertAfter(t.reverse(), e), Jw(t[0], n); + })(a, u, s, o) + : (function (t, e, n, r) { + var o = (function (e, t) { + var n = t.cloneRange(), + r = t.cloneRange(); + return ( + n.setStartBefore(e), + r.setEndAfter(e), + [n.cloneContents(), r.cloneContents()] + ); + })(t, r), + i = t.parentNode; + return ( + i.insertBefore(o[0], t), + Rn.each(e, function (e) { + i.insertBefore(e, t); + }), + i.insertBefore(o[1], t), + i.removeChild(t), + Jw(e[e.length - 1], n) + ); + })(a, u, s, i); + }, + Mz = function (e, t) { + return !!Gw(e, t); + }, + Rz = Ge.matchNodeNames(["td", "th"]), + Dz = function (e, t) { + var n = (function (e) { + var t; + return "string" != typeof e + ? ((t = Rn.extend({ paste: e.paste, data: { paste: e.paste } }, e)), + { content: e.content, details: t }) + : { content: e, details: {} }; + })(t); + ex(e, n.content, n.details); + }, + _z = function (e) { + Yx(e, !1) || + _x(e, !1) || + Bx(e, !1) || + Hx(e, !1) || + kx(e, !1) || + Ux(e) || + Tx(e, !1) || + Px(e, !1) || + (tx(e, "Delete"), zx(e)); + }, + Oz = function (e) { + _x(e, !0) || + Bx(e, !0) || + Hx(e, !0) || + kx(e, !0) || + Ux(e) || + Tx(e, !0) || + Px(e, !0) || + tx(e, "ForwardDelete"); + }, + Bz = { "font-size": "size", "font-family": "face" }, + Hz = { + getFontSize: ox("font-size"), + getFontFamily: q(function (e) { + return e.replace(/[\'\"\\]/g, "").replace(/,\s+/g, ","); + }, ox("font-family")), + toPt: function (e, t) { + return /[0-9.]+px$/.test(e) + ? (function (e, t) { + var n = Math.pow(10, t); + return Math.round(e * n) / n; + })((72 * parseInt(e, 10)) / 96, t || 0) + "pt" + : e; + }, + }, + Pz = Rn.each, + Lz = Rn.map, + Vz = Rn.inArray, + Iz = + ((Fz.prototype.execCommand = function (t, n, r, e) { + var o, + i, + a = !1, + u = this; + if (!u.editor.removed) { + if ( + (/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test( + t, + ) || + (e && e.skip_focus) + ? Qf(u.editor) + : u.editor.focus(), + (e = u.editor.fire("BeforeExecCommand", { + command: t, + ui: n, + value: r, + })).isDefaultPrevented()) + ) + return !1; + if (((i = t.toLowerCase()), (o = u.commands.exec[i]))) + return ( + o(i, n, r), + u.editor.fire("ExecCommand", { command: t, ui: n, value: r }), + !0 + ); + if ( + (Pz(this.editor.plugins, function (e) { + if (e.execCommand && e.execCommand(t, n, r)) + return ( + u.editor.fire("ExecCommand", { command: t, ui: n, value: r }), + !(a = !0) + ); + }), + a) + ) + return a; + if ( + u.editor.theme && + u.editor.theme.execCommand && + u.editor.theme.execCommand(t, n, r) + ) + return ( + u.editor.fire("ExecCommand", { command: t, ui: n, value: r }), !0 + ); + try { + a = u.editor.getDoc().execCommand(t, n, r); + } catch (s) {} + return ( + !!a && + (u.editor.fire("ExecCommand", { command: t, ui: n, value: r }), !0) + ); + } + }), + (Fz.prototype.queryCommandState = function (e) { + var t; + if (!this.editor.quirks.isHidden() && !this.editor.removed) { + if (((e = e.toLowerCase()), (t = this.commands.state[e]))) + return t(e); + try { + return this.editor.getDoc().queryCommandState(e); + } catch (n) {} + return !1; + } + }), + (Fz.prototype.queryCommandValue = function (e) { + var t; + if (!this.editor.quirks.isHidden() && !this.editor.removed) { + if (((e = e.toLowerCase()), (t = this.commands.value[e]))) + return t(e); + try { + return this.editor.getDoc().queryCommandValue(e); + } catch (n) {} + } + }), + (Fz.prototype.addCommands = function (e, n) { + var r = this; + (n = n || "exec"), + Pz(e, function (t, e) { + Pz(e.toLowerCase().split(","), function (e) { + r.commands[n][e] = t; + }); + }); + }), + (Fz.prototype.addCommand = function (e, o, i) { + var a = this; + (e = e.toLowerCase()), + (this.commands.exec[e] = function (e, t, n, r) { + return o.call(i || a.editor, t, n, r); + }); + }), + (Fz.prototype.queryCommandSupported = function (e) { + if (((e = e.toLowerCase()), this.commands.exec[e])) return !0; + try { + return this.editor.getDoc().queryCommandSupported(e); + } catch (t) {} + return !1; + }), + (Fz.prototype.addQueryStateHandler = function (e, t, n) { + var r = this; + (e = e.toLowerCase()), + (this.commands.state[e] = function () { + return t.call(n || r.editor); + }); + }), + (Fz.prototype.addQueryValueHandler = function (e, t, n) { + var r = this; + (e = e.toLowerCase()), + (this.commands.value[e] = function () { + return t.call(n || r.editor); + }); + }), + (Fz.prototype.hasCustomCommand = function (e) { + return (e = e.toLowerCase()), !!this.commands.exec[e]; + }), + (Fz.prototype.execNativeCommand = function (e, t, n) { + return ( + t === undefined && (t = !1), + n === undefined && (n = null), + this.editor.getDoc().execCommand(e, t, n) + ); + }), + (Fz.prototype.isFormatMatch = function (e) { + return this.editor.formatter.match(e); + }), + (Fz.prototype.toggleFormat = function (e, t) { + this.editor.formatter.toggle(e, t ? { value: t } : undefined), + this.editor.nodeChanged(); + }), + (Fz.prototype.storeSelection = function (e) { + this.selectionBookmark = this.editor.selection.getBookmark(e); + }), + (Fz.prototype.restoreSelection = function () { + this.editor.selection.moveToBookmark(this.selectionBookmark); + }), + (Fz.prototype.setupCommands = function (i) { + var a = this; + function e(n) { + return function () { + var e = i.selection.isCollapsed() + ? [i.dom.getParent(i.selection.getNode(), i.dom.isBlock)] + : i.selection.getSelectedBlocks(), + t = Lz(e, function (e) { + return !!i.formatter.matchNode(e, n); + }); + return -1 !== Vz(t, !0); + }; + } + this.addCommands({ + "mceResetDesignMode,mceBeginUndoLevel": function () {}, + "mceEndUndoLevel,mceAddUndoLevel": function () { + i.undoManager.add(); + }, + "Cut,Copy,Paste": function (e) { + var t, + n = i.getDoc(); + try { + a.execNativeCommand(e); + } catch (o) { + t = !0; + } + if ( + ("paste" !== e || n.queryCommandEnabled(e) || (t = !0), + t || !n.queryCommandSupported(e)) + ) { + var r = i.translate( + "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.", + ); + Sn.mac && (r = r.replace(/Ctrl\+/g, "\u2318+")), + i.notificationManager.open({ text: r, type: "error" }); + } + }, + unlink: function () { + if (i.selection.isCollapsed()) { + var e = i.dom.getParent(i.selection.getStart(), "a"); + e && i.dom.remove(e, !0); + } else i.formatter.remove("link"); + }, + "JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone": + function (e) { + var t = e.substring(7); + "full" === t && (t = "justify"), + Pz("left,center,right,justify".split(","), function (e) { + t !== e && i.formatter.remove("align" + e); + }), + "none" !== t && a.toggleFormat("align" + t); + }, + "InsertUnorderedList,InsertOrderedList": function (e) { + var t, n; + a.execNativeCommand(e), + (t = i.dom.getParent(i.selection.getNode(), "ol,ul")) && + ((n = t.parentNode), + /^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName) && + (a.storeSelection(), + i.dom.split(n, t), + a.restoreSelection())); + }, + "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": + function (e) { + a.toggleFormat(e); + }, + "ForeColor,HiliteColor": function (e, t, n) { + a.toggleFormat(e, n); + }, + FontName: function (e, t, n) { + sx(i, n); + }, + FontSize: function (e, t, n) { + !(function (e, t) { + e.formatter.toggle("fontsize", { value: ux(e, t) }), + e.nodeChanged(); + })(i, n); + }, + RemoveFormat: function (e) { + i.formatter.remove(e); + }, + mceBlockQuote: function () { + a.toggleFormat("blockquote"); + }, + FormatBlock: function (e, t, n) { + return a.toggleFormat(n || "p"); + }, + mceCleanup: function () { + var e = i.selection.getBookmark(); + i.setContent(i.getContent()), i.selection.moveToBookmark(e); + }, + mceRemoveNode: function (e, t, n) { + var r = n || i.selection.getNode(); + r !== i.getBody() && + (a.storeSelection(), i.dom.remove(r, !0), a.restoreSelection()); + }, + mceSelectNodeDepth: function (e, t, n) { + var r = 0; + i.dom.getParent( + i.selection.getNode(), + function (e) { + if (1 === e.nodeType && r++ === n) + return i.selection.select(e), !1; + }, + i.getBody(), + ); + }, + mceSelectNode: function (e, t, n) { + i.selection.select(n); + }, + mceInsertContent: function (e, t, n) { + Dz(i, n); + }, + mceInsertRawHTML: function (e, t, n) { + i.selection.setContent("tiny_mce_marker"); + var r = i.getContent(); + i.setContent( + r.replace(/tiny_mce_marker/g, function () { + return n; + }), + ); + }, + mceInsertNewLine: function (e, t, n) { + lz(i, n); + }, + mceToggleFormat: function (e, t, n) { + a.toggleFormat(n); + }, + mceSetContent: function (e, t, n) { + i.setContent(n); + }, + "Indent,Outdent": function (e) { + OC(i, e); + }, + mceRepaint: function () {}, + InsertHorizontalRule: function () { + i.execCommand("mceInsertContent", !1, "
"); + }, + mceToggleVisualAid: function () { + (i.hasVisual = !i.hasVisual), i.addVisual(); + }, + mceReplaceContent: function (e, t, n) { + i.execCommand( + "mceInsertContent", + !1, + n.replace( + /\{\$selection\}/g, + i.selection.getContent({ format: "text" }), + ), + ); + }, + mceInsertLink: function (e, t, n) { + var r; + "string" == typeof n && (n = { href: n }), + (r = i.dom.getParent(i.selection.getNode(), "a")), + (n.href = n.href.replace(/ /g, "%20")), + (r && n.href) || i.formatter.remove("link"), + n.href && i.formatter.apply("link", n, r); + }, + selectAll: function () { + var e = i.dom.getParent( + i.selection.getStart(), + Ge.isContentEditableTrue, + ); + if (e) { + var t = i.dom.createRng(); + t.selectNodeContents(e), i.selection.setRng(t); + } + }, + delete: function () { + _z(i); + }, + forwardDelete: function () { + Oz(i); + }, + mceNewDocument: function () { + i.setContent(""); + }, + InsertLineBreak: function (e, t, n) { + return iz(i, n), !0; + }, + }), + a.addCommands( + { + JustifyLeft: e("alignleft"), + JustifyCenter: e("aligncenter"), + JustifyRight: e("alignright"), + JustifyFull: e("alignjustify"), + "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": + function (e) { + return a.isFormatMatch(e); + }, + mceBlockQuote: function () { + return a.isFormatMatch("blockquote"); + }, + Outdent: function () { + return DC(i); + }, + "InsertUnorderedList,InsertOrderedList": function (e) { + var t = i.dom.getParent(i.selection.getNode(), "ul,ol"); + return ( + t && + (("insertunorderedlist" === e && "UL" === t.tagName) || + ("insertorderedlist" === e && "OL" === t.tagName)) + ); + }, + }, + "state", + ), + a.addCommands({ + Undo: function () { + i.undoManager.undo(); + }, + Redo: function () { + i.undoManager.redo(); + }, + }), + a.addQueryValueHandler( + "FontName", + function () { + return (function (t) { + return ax(t).fold( + function () { + return ix(t) + .map(function (e) { + return Hz.getFontFamily(t.getBody(), e); + }) + .getOr(""); + }, + function (e) { + return Hz.getFontFamily(t.getBody(), e); + }, + ); + })(i); + }, + this, + ), + a.addQueryValueHandler( + "FontSize", + function () { + return (function (t) { + return ax(t).fold( + function () { + return ix(t) + .map(function (e) { + return Hz.getFontSize(t.getBody(), e); + }) + .getOr(""); + }, + function (e) { + return Hz.getFontSize(t.getBody(), e); + }, + ); + })(i); + }, + this, + ); + }), + Fz); + function Fz(e) { + (this.commands = { state: {}, exec: {}, value: {} }), + (this.editor = e), + this.setupCommands(e); + } + var Uz = Rn.makeMap( + "focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel", + " ", + ), + jz = + ((qz.isNative = function (e) { + return !!Uz[e.toLowerCase()]; + }), + (qz.prototype.fire = function (e, t) { + var n, r, o, i; + if ( + ((e = e.toLowerCase()), + ((t = t || {}).type = e), + t.target || (t.target = this.scope), + t.preventDefault || + ((t.preventDefault = function () { + t.isDefaultPrevented = a; + }), + (t.stopPropagation = function () { + t.isPropagationStopped = a; + }), + (t.stopImmediatePropagation = function () { + t.isImmediatePropagationStopped = a; + }), + (t.isDefaultPrevented = c), + (t.isPropagationStopped = c), + (t.isImmediatePropagationStopped = c)), + this.settings.beforeFire && this.settings.beforeFire(t), + (n = this.bindings[e])) + ) + for (r = 0, o = n.length; r < o; r++) { + if ( + ((i = n[r]).once && this.off(e, i.func), + t.isImmediatePropagationStopped()) + ) + return t.stopPropagation(), t; + if (!1 === i.func.call(this.scope, t)) return t.preventDefault(), t; + } + return t; + }), + (qz.prototype.on = function (e, t, n, r) { + var o, i, a; + if ((!1 === t && (t = c), t)) { + var u = { func: t }; + for ( + r && Rn.extend(u, r), a = (i = e.toLowerCase().split(" ")).length; + a--; + + ) + (e = i[a]), + (o = this.bindings[e]) || + ((o = this.bindings[e] = []), this.toggleEvent(e, !0)), + n ? o.unshift(u) : o.push(u); + } + return this; + }), + (qz.prototype.off = function (e, t) { + var n, r, o, i, a; + if (e) + for (n = (i = e.toLowerCase().split(" ")).length; n--; ) { + if (((e = i[n]), (r = this.bindings[e]), !e)) { + for (o in this.bindings) + this.toggleEvent(o, !1), delete this.bindings[o]; + return this; + } + if (r) { + if (t) + for (a = r.length; a--; ) + r[a].func === t && + ((r = r.slice(0, a).concat(r.slice(a + 1))), + (this.bindings[e] = r)); + else r.length = 0; + r.length || (this.toggleEvent(e, !1), delete this.bindings[e]); + } + } + else { + for (e in this.bindings) this.toggleEvent(e, !1); + this.bindings = {}; + } + return this; + }), + (qz.prototype.once = function (e, t, n) { + return this.on(e, t, n, { once: !0 }); + }), + (qz.prototype.has = function (e) { + return ( + (e = e.toLowerCase()), + !(!this.bindings[e] || 0 === this.bindings[e].length) + ); + }), + qz); + function qz(e) { + (this.bindings = {}), + (this.settings = e || {}), + (this.scope = this.settings.scope || this), + (this.toggleEvent = this.settings.toggleEvent || c); + } + function $z(n) { + return ( + n._eventDispatcher || + (n._eventDispatcher = new jz({ + scope: n, + toggleEvent: function (e, t) { + jz.isNative(e) && n.toggleNativeEvent && n.toggleNativeEvent(e, t); + }, + })), + n._eventDispatcher + ); + } + function Wz(e, t, n) { + ma(e, t) && !1 === n + ? (function (e, t) { + ca(e) ? e.dom().classList.remove(t) : fa(e, t); + ha(e); + })(e, t) + : n && da(e, t); + } + function Kz(e, t, n) { + try { + e.getDoc().execCommand(t, !1, n); + } catch (r) {} + } + function Xz(e, t) { + e.dom().contentEditable = t ? "true" : "false"; + } + function Yz(e, t) { + var n = bt.fromDom(e.getBody()); + Wz(n, "mce-content-readonly", t), + t + ? (e.selection.controlSelection.hideResizeRect(), + e._selectionOverrides.hideFakeCaret(), + (function (e) { + k.from(e.selection.getNode()).each(function (e) { + e.removeAttribute("data-mce-selected"); + }); + })(e), + (e.readonly = !0), + Xz(n, !1), + (function (e) { + z(ga(e, '*[contenteditable="true"]'), function (e) { + At(e, iE, "true"), Xz(e, !1); + }); + })(n)) + : ((e.readonly = !1), + Xz(n, !0), + (function (e) { + z(ga(e, "*[" + iE + '="true"]'), function (e) { + pe(e, iE), Xz(e, !0); + }); + })(n), + Kz(e, "StyleWithCSS", !1), + Kz(e, "enableInlineTableEditing", !1), + Kz(e, "enableObjectResizing", !1), + cd(e) && e.focus(), + (function (e) { + e.selection.setRng(e.selection.getRng()); + })(e), + e.nodeChanged()); + } + function Gz(e) { + return !0 === e.readonly; + } + function Jz(t) { + t.parser.addAttributeFilter("contenteditable", function (e) { + Gz(t) && + z(e, function (e) { + e.attr(iE, e.attr("contenteditable")), + e.attr("contenteditable", "false"); + }); + }), + t.serializer.addAttributeFilter(iE, function (e) { + Gz(t) && + z(e, function (e) { + e.attr("contenteditable", e.attr(iE)); + }); + }), + t.serializer.addTempAttr(iE); + } + function Qz(e, t) { + return "selectionchange" === t + ? e.getDoc() + : !e.inline && + /^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t) + ? e.getDoc().documentElement + : e.settings.event_root + ? (e.eventRoot || (e.eventRoot = aE.select(e.settings.event_root)[0]), + e.eventRoot) + : e.getBody(); + } + function Zz(e, t, n) { + !(function (e) { + return !e.hidden && !Gz(e); + })(e) + ? Gz(e) && + (function (e, t) { + var n = t.target; + !(function (e) { + return "click" === e.type; + })(t) || + Mh.metaKeyPressed(t) || + !(function (e, t) { + return null !== e.dom.getParent(t, "a"); + })(e, n) || + t.preventDefault(); + })(e, n) + : e.fire(t, n); + } + function eE(i, a) { + var e, t; + if ((i.delegates || (i.delegates = {}), !i.delegates[a] && !i.removed)) + if (((e = Qz(i, a)), i.settings.event_root)) { + if ( + (rE || + ((rE = {}), + i.editorManager.on("removeEditor", function () { + var e; + if (!i.editorManager.activeEditor && rE) { + for (e in rE) i.dom.unbind(Qz(i, e)); + rE = null; + } + })), + rE[a]) + ) + return; + (t = function (e) { + for ( + var t = e.target, n = i.editorManager.get(), r = n.length; + r--; + + ) { + var o = n[r].getBody(); + (o !== t && !aE.isChildOf(t, o)) || Zz(n[r], a, e); + } + }), + (rE[a] = t), + aE.bind(e, a, t); + } else + (t = function (e) { + Zz(i, a, e); + }), + aE.bind(e, a, t), + (i.delegates[a] = t); + } + function tE(e, t, n, r) { + var o = n[t.get()], + i = n[r]; + try { + i.activate(); + } catch (xN) { + return void j.console.error( + "problem while activating editor mode " + r + ":", + xN, + ); + } + o.deactivate(), + o.editorReadOnly !== i.editorReadOnly && Yz(e, i.editorReadOnly), + t.set(r), + md(e, r); + } + function nE(t) { + var n = Je("design"), + r = Je({ + design: { activate: i, deactivate: i, editorReadOnly: !1 }, + readonly: { activate: i, deactivate: i, editorReadOnly: !0 }, + }); + return ( + (function (e) { + e.serializer + ? Jz(e) + : e.on("PreInit", function () { + Jz(e); + }); + })(t), + (function (t) { + t.on("ShowCaret", function (e) { + Gz(t) && e.preventDefault(); + }), + t.on("ObjectSelected", function (e) { + Gz(t) && e.preventDefault(); + }); + })(t), + { + isReadOnly: function () { + return Gz(t); + }, + set: function (e) { + return (function (e, t, n, r) { + if (r !== n.get()) { + if (!Tt(t, r)) + throw new Error("Editor mode '" + r + "' is invalid"); + e.initialized + ? tE(e, n, t, r) + : e.on("init", function () { + return tE(e, n, t, r); + }); + } + })(t, r.get(), n, e); + }, + get: function () { + return n.get(); + }, + register: function (e, t) { + r.set( + (function (e, t, n) { + var r; + if (h(sE, t)) + throw new Error("Cannot override default mode " + t); + return G( + G({}, e), + (((r = {})[t] = G(G({}, n), { + deactivate: function () { + try { + n.deactivate(); + } catch (xN) { + j.console.error( + "problem while deactivating editor mode " + t + ":", + xN, + ); + } + }, + })), + r), + ); + })(r.get(), e, t), + ); + }, + } + ); + } + var rE, + oE = { + fire: function (e, t, n) { + if (this.removed && "remove" !== e && "detach" !== e) return t; + var r = $z(this).fire(e, t); + if (!1 !== n && this.parent) + for (var o = this.parent(); o && !r.isPropagationStopped(); ) + o.fire(e, r, !1), (o = o.parent()); + return r; + }, + on: function (e, t, n) { + return $z(this).on(e, t, n); + }, + off: function (e, t) { + return $z(this).off(e, t); + }, + once: function (e, t) { + return $z(this).once(e, t); + }, + hasEventListeners: function (e) { + return $z(this).has(e); + }, + }, + iE = "data-mce-contenteditable", + aE = Yi.DOM, + uE = G(G({}, oE), { + bindPendingEventDelegates: function () { + var t = this; + Rn.each(t._pendingNativeEvents, function (e) { + eE(t, e); + }); + }, + toggleNativeEvent: function (e, t) { + var n = this; + "focus" !== e && + "blur" !== e && + (t + ? n.initialized + ? eE(n, e) + : n._pendingNativeEvents + ? n._pendingNativeEvents.push(e) + : (n._pendingNativeEvents = [e]) + : n.initialized && + (n.dom.unbind(Qz(n, e), e, n.delegates[e]), + delete n.delegates[e])); + }, + unbindAllNativeEvents: function () { + var e, + t = this, + n = t.getBody(), + r = t.dom; + if (t.delegates) { + for (e in t.delegates) t.dom.unbind(Qz(t, e), e, t.delegates[e]); + delete t.delegates; + } + !t.inline && + n && + r && + ((n.onload = null), r.unbind(t.getWin()), r.unbind(t.getDoc())), + r && (r.unbind(n), r.unbind(t.getContainer())); + }, + }), + sE = ["design", "readonly"], + cE = Rn.each, + lE = Rn.explode, + fE = { + f1: 112, + f2: 113, + f3: 114, + f4: 115, + f5: 116, + f6: 117, + f7: 118, + f8: 119, + f9: 120, + f10: 121, + f11: 122, + f12: 123, + }, + dE = Rn.makeMap("alt,ctrl,shift,meta,access"), + hE = + ((mE.prototype.add = function (e, n, r, o) { + var t, + i = this; + return ( + "string" == typeof (t = r) + ? (r = function () { + i.editor.execCommand(t, !1, null); + }) + : Rn.isArray(t) && + (r = function () { + i.editor.execCommand(t[0], t[1], t[2]); + }), + cE(lE(Rn.trim(e)), function (e) { + var t = i.createShortcut(e, n, r, o); + i.shortcuts[t.id] = t; + }), + !0 + ); + }), + (mE.prototype.remove = function (e) { + var t = this.createShortcut(e); + return !!this.shortcuts[t.id] && (delete this.shortcuts[t.id], !0); + }), + (mE.prototype.parseShortcut = function (e) { + var t, + n, + r = {}; + for (n in (cE(lE(e.toLowerCase(), "+"), function (e) { + e in dE + ? (r[e] = !0) + : /^[0-9]{2,}$/.test(e) + ? (r.keyCode = parseInt(e, 10)) + : ((r.charCode = e.charCodeAt(0)), + (r.keyCode = fE[e] || e.toUpperCase().charCodeAt(0))); + }), + (t = [r.keyCode]), + dE)) + r[n] ? t.push(n) : (r[n] = !1); + return ( + (r.id = t.join(",")), + r.access && ((r.alt = !0), Sn.mac ? (r.ctrl = !0) : (r.shift = !0)), + r.meta && (Sn.mac ? (r.meta = !0) : ((r.ctrl = !0), (r.meta = !1))), + r + ); + }), + (mE.prototype.createShortcut = function (e, t, n, r) { + var o; + return ( + ((o = Rn.map(lE(e, ">"), this.parseShortcut))[o.length - 1] = + Rn.extend(o[o.length - 1], { func: n, scope: r || this.editor })), + Rn.extend(o[0], { + desc: this.editor.translate(t), + subpatterns: o.slice(1), + }) + ); + }), + (mE.prototype.hasModifier = function (e) { + return e.altKey || e.ctrlKey || e.metaKey; + }), + (mE.prototype.isFunctionKey = function (e) { + return "keydown" === e.type && 112 <= e.keyCode && e.keyCode <= 123; + }), + (mE.prototype.matchShortcut = function (e, t) { + return ( + !!t && + t.ctrl === e.ctrlKey && + t.meta === e.metaKey && + t.alt === e.altKey && + t.shift === e.shiftKey && + !!( + e.keyCode === t.keyCode || + (e.charCode && e.charCode === t.charCode) + ) && + (e.preventDefault(), !0) + ); + }), + (mE.prototype.executeShortcutAction = function (e) { + return e.func ? e.func.call(e.scope) : null; + }), + mE); + function mE(e) { + (this.shortcuts = {}), (this.pendingPatterns = []), (this.editor = e); + var n = this; + e.on("keyup keypress keydown", function (t) { + (!n.hasModifier(t) && !n.isFunctionKey(t)) || + t.isDefaultPrevented() || + (cE(n.shortcuts, function (e) { + if (n.matchShortcut(t, e)) + return ( + (n.pendingPatterns = e.subpatterns.slice(0)), + "keydown" === t.type && n.executeShortcutAction(e), + !0 + ); + }), + n.matchShortcut(t, n.pendingPatterns[0]) && + (1 === n.pendingPatterns.length && + "keydown" === t.type && + n.executeShortcutAction(n.pendingPatterns[0]), + n.pendingPatterns.shift())); + }); + } + function gE() { + var e = (function () { + function e(n, r) { + return function (e, t) { + return (n[e.toLowerCase()] = G(G({}, t), { type: r })); + }; + } + var t = {}, + n = {}, + r = {}, + o = {}, + i = {}, + a = {}, + u = {}; + return { + addButton: e(t, "button"), + addToggleButton: e(t, "togglebutton"), + addMenuButton: e(t, "menubutton"), + addSplitButton: e(t, "splitbutton"), + addMenuItem: e(n, "menuitem"), + addNestedMenuItem: e(n, "nestedmenuitem"), + addToggleMenuItem: e(n, "togglemenuitem"), + addAutocompleter: e(r, "autocompleter"), + addContextMenu: e(i, "contextmenu"), + addContextToolbar: e(a, "contexttoolbar"), + addContextForm: e(a, "contextform"), + addSidebar: e(u, "sidebar"), + addIcon: function (e, t) { + return (o[e.toLowerCase()] = t); + }, + getAll: function () { + return { + buttons: t, + menuItems: n, + icons: o, + popups: r, + contextMenus: i, + contextToolbars: a, + sidebars: u, + }; + }, + }; + })(); + return { + addAutocompleter: e.addAutocompleter, + addButton: e.addButton, + addContextForm: e.addContextForm, + addContextMenu: e.addContextMenu, + addContextToolbar: e.addContextToolbar, + addIcon: e.addIcon, + addMenuButton: e.addMenuButton, + addMenuItem: e.addMenuItem, + addNestedMenuItem: e.addNestedMenuItem, + addSidebar: e.addSidebar, + addSplitButton: e.addSplitButton, + addToggleButton: e.addToggleButton, + addToggleMenuItem: e.addToggleMenuItem, + getAll: e.getAll, + }; + } + var pE = Rn.each, + vE = Rn.trim, + yE = + "source protocol authority userInfo user password host port relative path directory file query anchor".split( + " ", + ), + bE = { ftp: 21, http: 80, https: 443, mailto: 25 }, + CE = + ((wE.parseDataUri = function (e) { + var t, + n = decodeURIComponent(e).split(","), + r = /data:([^;]+)/.exec(n[0]); + return r && (t = r[1]), { type: t, data: n[1] }; + }), + (wE.getDocumentBaseUrl = function (e) { + var t; + return ( + (t = + 0 !== e.protocol.indexOf("http") && "file:" !== e.protocol + ? e.href + : e.protocol + "//" + e.host + e.pathname), + /^[^:]+:\/\/\/?[^\/]+\//.test(t) && + ((t = t.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, "")), + /[\/\\]$/.test(t) || (t += "/")), + t + ); + }), + (wE.prototype.setPath = function (e) { + var t = /^(.*?)\/?(\w+)?$/.exec(e); + (this.path = t[0]), + (this.directory = t[1]), + (this.file = t[2]), + (this.source = ""), + this.getURI(); + }), + (wE.prototype.toRelative = function (e) { + var t; + if ("./" === e) return e; + var n = new wE(e, { base_uri: this }); + if ( + ("mce_host" !== n.host && this.host !== n.host && n.host) || + this.port !== n.port || + (this.protocol !== n.protocol && "" !== n.protocol) + ) + return n.getURI(); + var r = this.getURI(), + o = n.getURI(); + return r === o || + ("/" === r.charAt(r.length - 1) && r.substr(0, r.length - 1) === o) + ? r + : ((t = this.toRelPath(this.path, n.path)), + n.query && (t += "?" + n.query), + n.anchor && (t += "#" + n.anchor), + t); + }), + (wE.prototype.toAbsolute = function (e, t) { + var n = new wE(e, { base_uri: this }); + return n.getURI(t && this.isSameOrigin(n)); + }), + (wE.prototype.isSameOrigin = function (e) { + if (this.host == e.host && this.protocol == e.protocol) { + if (this.port == e.port) return !0; + var t = bE[this.protocol]; + if (t && (this.port || t) == (e.port || t)) return !0; + } + return !1; + }), + (wE.prototype.toRelPath = function (e, t) { + var n, + r, + o, + i = 0, + a = "", + u = e.substring(0, e.lastIndexOf("/")).split("/"); + if (((n = t.split("/")), u.length >= n.length)) + for (r = 0, o = u.length; r < o; r++) + if (r >= n.length || u[r] !== n[r]) { + i = r + 1; + break; + } + if (u.length < n.length) + for (r = 0, o = n.length; r < o; r++) + if (r >= u.length || u[r] !== n[r]) { + i = r + 1; + break; + } + if (1 === i) return t; + for (r = 0, o = u.length - (i - 1); r < o; r++) a += "../"; + for (r = i - 1, o = n.length; r < o; r++) + a += r !== i - 1 ? "/" + n[r] : n[r]; + return a; + }), + (wE.prototype.toAbsPath = function (e, t) { + var n, + r, + o, + i = 0, + a = []; + r = /\/$/.test(t) ? "/" : ""; + var u = e.split("/"), + s = t.split("/"); + for ( + pE(u, function (e) { + e && a.push(e); + }), + u = a, + n = s.length - 1, + a = []; + 0 <= n; + n-- + ) + 0 !== s[n].length && + "." !== s[n] && + (".." !== s[n] ? (0 < i ? i-- : a.push(s[n])) : i++); + return ( + 0 !== + (o = + (n = u.length - i) <= 0 + ? a.reverse().join("/") + : u.slice(0, n).join("/") + + "/" + + a.reverse().join("/")).indexOf("/") && (o = "/" + o), + r && o.lastIndexOf("/") !== o.length - 1 && (o += r), + o + ); + }), + (wE.prototype.getURI = function (e) { + var t; + return ( + void 0 === e && (e = !1), + (this.source && !e) || + ((t = ""), + e || + (this.protocol ? (t += this.protocol + "://") : (t += "//"), + this.userInfo && (t += this.userInfo + "@"), + this.host && (t += this.host), + this.port && (t += ":" + this.port)), + this.path && (t += this.path), + this.query && (t += "?" + this.query), + this.anchor && (t += "#" + this.anchor), + (this.source = t)), + this.source + ); + }), + wE); + function wE(e, t) { + (e = vE(e)), (this.settings = t || {}); + var n = this.settings.base_uri, + r = this; + if (/^([\w\-]+):([^\/]{2})/i.test(e) || /^\s*#/.test(e)) r.source = e; + else { + var o = 0 === e.indexOf("//"); + if ( + (0 !== e.indexOf("/") || + o || + (e = ((n && n.protocol) || "http") + "://mce_host" + e), + !/^[\w\-]*:?\/\//.test(e)) + ) { + var i = this.settings.base_uri + ? this.settings.base_uri.path + : new wE(j.document.location.href).directory; + if (this.settings.base_uri && "" == this.settings.base_uri.protocol) + e = "//mce_host" + r.toAbsPath(i, e); + else { + var a = /([^#?]*)([#?]?.*)/.exec(e); + e = + ((n && n.protocol) || "http") + + "://mce_host" + + r.toAbsPath(i, a[1]) + + a[2]; + } + } + e = e.replace(/@@/g, "(mce_at)"); + var u = + /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec( + e, + ); + pE(yE, function (e, t) { + var n = u[t]; + (n = n && n.replace(/\(mce_at\)/g, "@@")), (r[e] = n); + }), + n && + (r.protocol || (r.protocol = n.protocol), + r.userInfo || (r.userInfo = n.userInfo), + r.port || "mce_host" !== r.host || (r.port = n.port), + (r.host && "mce_host" !== r.host) || (r.host = n.host), + (r.source = "")), + o && (r.protocol = ""); + } + } + var xE = Yi.DOM, + zE = Rn.extend, + EE = Rn.each, + NE = Rn.resolve, + SE = Sn.ie, + kE = + ((TE.prototype.render = function () { + kz(this); + }), + (TE.prototype.focus = function (e) { + ud(this, e); + }), + (TE.prototype.hasFocus = function () { + return sd(this); + }), + (TE.prototype.execCallback = function (e) { + for (var t = [], n = 1; n < arguments.length; n++) + t[n - 1] = arguments[n]; + var r, + o = this.settings[e]; + if (o) + return ( + this.callbackLookup && + (r = this.callbackLookup[e]) && + ((o = r.func), (r = r.scope)), + "string" == typeof o && + ((r = (r = o.replace(/\.\w+$/, "")) ? NE(r) : 0), + (o = NE(o)), + (this.callbackLookup = this.callbackLookup || {}), + (this.callbackLookup[e] = { func: o, scope: r })), + o.apply(r || this, Array.prototype.slice.call(arguments, 1)) + ); + }), + (TE.prototype.translate = function (e) { + return oa.translate(e); + }), + (TE.prototype.getParam = function (e, t, n) { + return tf(this, e, t, n); + }), + (TE.prototype.nodeChanged = function (e) { + this._nodeChangeDispatcher.nodeChanged(e); + }), + (TE.prototype.addCommand = function (e, t, n) { + this.editorCommands.addCommand(e, t, n); + }), + (TE.prototype.addQueryStateHandler = function (e, t, n) { + this.editorCommands.addQueryStateHandler(e, t, n); + }), + (TE.prototype.addQueryValueHandler = function (e, t, n) { + this.editorCommands.addQueryValueHandler(e, t, n); + }), + (TE.prototype.addShortcut = function (e, t, n, r) { + this.shortcuts.add(e, t, n, r); + }), + (TE.prototype.execCommand = function (e, t, n, r) { + return this.editorCommands.execCommand(e, t, n, r); + }), + (TE.prototype.queryCommandState = function (e) { + return this.editorCommands.queryCommandState(e); + }), + (TE.prototype.queryCommandValue = function (e) { + return this.editorCommands.queryCommandValue(e); + }), + (TE.prototype.queryCommandSupported = function (e) { + return this.editorCommands.queryCommandSupported(e); + }), + (TE.prototype.show = function () { + this.hidden && + ((this.hidden = !1), + this.inline + ? (this.getBody().contentEditable = "true") + : (xE.show(this.getContainer()), xE.hide(this.id)), + this.load(), + this.fire("show")); + }), + (TE.prototype.hide = function () { + var e = this, + t = e.getDoc(); + e.hidden || + (SE && t && !e.inline && t.execCommand("SelectAll"), + e.save(), + e.inline + ? ((e.getBody().contentEditable = "false"), + e === e.editorManager.focusedEditor && + (e.editorManager.focusedEditor = null)) + : (xE.hide(e.getContainer()), + xE.setStyle(e.id, "display", e.orgDisplay)), + (e.hidden = !0), + e.fire("hide")); + }), + (TE.prototype.isHidden = function () { + return !!this.hidden; + }), + (TE.prototype.setProgressState = function (e, t) { + this.fire("ProgressState", { state: e, time: t }); + }), + (TE.prototype.load = function (e) { + var t, + n = this.getElement(); + if (this.removed) return ""; + if (n) { + (e = e || {}).load = !0; + var r = Ge.isTextareaOrInput(n) ? n.value : n.innerHTML; + return ( + (t = this.setContent(r, e)), + (e.element = n), + e.no_events || this.fire("LoadContent", e), + (e.element = n = null), + t + ); + } + }), + (TE.prototype.save = function (e) { + var t, + n, + r = this, + o = r.getElement(); + if (o && r.initialized && !r.removed) + return ( + ((e = e || {}).save = !0), + (e.element = o), + (e.content = r.getContent(e)), + e.no_events || r.fire("SaveContent", e), + "raw" === e.format && r.fire("RawSaveContent", e), + (t = e.content), + Ge.isTextareaOrInput(o) + ? (o.value = t) + : ((!e.is_removing && r.inline) || (o.innerHTML = t), + (n = xE.getParent(r.id, "form")) && + EE(n.elements, function (e) { + if (e.name === r.id) return (e.value = t), !1; + })), + (e.element = o = null), + !1 !== e.set_dirty && r.setDirty(!1), + t + ); + }), + (TE.prototype.setContent = function (e, t) { + return ql(this, e, t); + }), + (TE.prototype.getContent = function (e) { + return (function (t, n) { + return ( + void 0 === n && (n = {}), + k + .from(t.getBody()) + .fold( + $("tree" === n.format ? new sl("body", 11) : ""), + function (e) { + return gl(t, n, e); + }, + ) + ); + })(this, e); + }), + (TE.prototype.insertContent = function (e, t) { + t && (e = zE({ content: e }, t)), + this.execCommand("mceInsertContent", !1, e); + }), + (TE.prototype.resetContent = function (e) { + e === undefined + ? ql(this, this.startContent, { format: "raw" }) + : ql(this, e), + this.undoManager.reset(), + this.setDirty(!1), + this.nodeChanged(); + }), + (TE.prototype.isDirty = function () { + return !this.isNotDirty; + }), + (TE.prototype.setDirty = function (e) { + var t = !this.isNotDirty; + (this.isNotDirty = !e), e && e !== t && this.fire("dirty"); + }), + (TE.prototype.getContainer = function () { + return ( + this.container || + (this.container = xE.get( + this.editorContainer || this.id + "_parent", + )), + this.container + ); + }), + (TE.prototype.getContentAreaContainer = function () { + return this.contentAreaContainer; + }), + (TE.prototype.getElement = function () { + return ( + this.targetElm || (this.targetElm = xE.get(this.id)), this.targetElm + ); + }), + (TE.prototype.getWin = function () { + var e; + return ( + this.contentWindow || + ((e = this.iframeElement) && + (this.contentWindow = e.contentWindow)), + this.contentWindow + ); + }), + (TE.prototype.getDoc = function () { + var e; + return ( + this.contentDocument || + ((e = this.getWin()) && (this.contentDocument = e.document)), + this.contentDocument + ); + }), + (TE.prototype.getBody = function () { + var e = this.getDoc(); + return this.bodyElement || (e ? e.body : null); + }), + (TE.prototype.convertURL = function (e, t, n) { + var r = this.settings; + return r.urlconverter_callback + ? this.execCallback("urlconverter_callback", e, n, !0, t) + : !r.convert_urls || + (n && "LINK" === n.nodeName) || + 0 === e.indexOf("file:") || + 0 === e.length + ? e + : r.relative_urls + ? this.documentBaseURI.toRelative(e) + : (e = this.documentBaseURI.toAbsolute(e, r.remove_script_host)); + }), + (TE.prototype.addVisual = function (e) { + var n, + r = this, + o = r.settings, + i = r.dom; + (e = e || r.getBody()), + r.hasVisual === undefined && (r.hasVisual = o.visual), + EE(i.select("table,a", e), function (e) { + var t; + switch (e.nodeName) { + case "TABLE": + return ( + (n = o.visual_table_class || "mce-item-table"), + void (((t = i.getAttrib(e, "border")) && "0" !== t) || + !r.hasVisual + ? i.removeClass(e, n) + : i.addClass(e, n)) + ); + case "A": + return void ( + i.getAttrib(e, "href") || + ((t = i.getAttrib(e, "name") || e.id), + (n = o.visual_anchor_class || "mce-item-anchor"), + t && r.hasVisual ? i.addClass(e, n) : i.removeClass(e, n)) + ); + } + }), + r.fire("VisualAid", { element: e, hasVisual: r.hasVisual }); + }), + (TE.prototype.remove = function () { + Wl(this); + }), + (TE.prototype.destroy = function (e) { + Kl(this, e); + }), + (TE.prototype.uploadImages = function (e) { + return this.editorUpload.uploadImages(e); + }), + (TE.prototype._scanForImages = function () { + return this.editorUpload.scanForImages(); + }), + (TE.prototype.addButton = function () { + throw new Error( + "editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead", + ); + }), + (TE.prototype.addSidebar = function () { + throw new Error( + "editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead", + ); + }), + (TE.prototype.addMenuItem = function () { + throw new Error( + "editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead", + ); + }), + (TE.prototype.addContextToolbar = function () { + throw new Error( + "editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead", + ); + }), + TE); + function TE(e, t, n) { + var r = this; + (this.plugins = {}), + (this.contentCSS = []), + (this.contentStyles = []), + (this.loadedCSS = {}), + (this.isNotDirty = !1), + (this.editorManager = n), + (this.documentBaseUrl = n.documentBaseURL), + zE(this, uE), + (this.settings = Zl(this, e, this.documentBaseUrl, n.defaultSettings, t)), + this.settings.suffix && (n.suffix = this.settings.suffix), + (this.suffix = n.suffix), + this.settings.base_url && n._setBaseUrl(this.settings.base_url), + (this.baseUri = n.baseURI), + this.settings.referrer_policy && + (Zi.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy), + Yi.DOM.styleSheetLoader._setReferrerPolicy( + this.settings.referrer_policy, + )), + (pa.languageLoad = this.settings.language_load), + (pa.baseURL = n.baseURL), + (this.id = e), + this.setDirty(!1), + (this.documentBaseURI = new CE(this.settings.document_base_url, { + base_uri: this.baseUri, + })), + (this.baseURI = this.baseUri), + (this.inline = !!this.settings.inline), + (this.shortcuts = new hE(this)), + (this.editorCommands = new Iz(this)), + this.settings.cache_suffix && + (Sn.cacheSuffix = this.settings.cache_suffix.replace(/^[\?\&]+/, "")), + (this.ui = { registry: gE() }); + var o = nE(this); + (this.mode = o), + (this.setMode = o.set), + n.fire("SetupEditor", { editor: this }), + this.execCallback("setup", this), + (this.$ = yi.overrideDefaults(function () { + return { + context: r.inline ? r.getBody() : r.getDoc(), + element: r.getBody(), + }; + })); + } + function AE(t) { + var n = t.type; + HE(jE.get(), function (e) { + switch (n) { + case "scroll": + e.fire("ScrollWindow", t); + break; + case "resize": + e.fire("ResizeWindow", t); + } + }); + } + function ME(e) { + e !== VE && + (e + ? yi(window).on("resize scroll", AE) + : yi(window).off("resize scroll", AE), + (VE = e)); + } + function RE(t) { + var e = FE; + delete IE[t.id]; + for (var n = 0; n < IE.length; n++) + if (IE[n] === t) { + IE.splice(n, 1); + break; + } + return ( + (FE = y(FE, function (e) { + return t !== e; + })), + jE.activeEditor === t && (jE.activeEditor = 0 < FE.length ? FE[0] : null), + jE.focusedEditor === t && (jE.focusedEditor = null), + e.length !== FE.length + ); + } + var DE, + _E, + OE = Yi.DOM, + BE = Rn.explode, + HE = Rn.each, + PE = Rn.extend, + LE = 0, + VE = !1, + IE = [], + FE = [], + UE = "CSS1Compat" !== j.document.compatMode, + jE = G(G({}, oE), { + baseURI: null, + baseURL: null, + defaultSettings: {}, + documentBaseURL: null, + suffix: null, + $: yi, + majorVersion: "5", + minorVersion: "1.6", + releaseDate: "2020-01-28", + editors: IE, + i18n: oa, + activeEditor: null, + focusedEditor: null, + settings: {}, + setup: function () { + var e, + t, + n = ""; + (t = CE.getDocumentBaseUrl(j.document.location)), + /^[^:]+:\/\/\/?[^\/]+\//.test(t) && + ((t = t.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, "")), + /[\/\\]$/.test(t) || (t += "/")); + var r = window.tinymce || window.tinyMCEPreInit; + if (r) (e = r.base || r.baseURL), (n = r.suffix); + else { + for ( + var o = j.document.getElementsByTagName("script"), i = 0; + i < o.length; + i++ + ) { + var a; + if ("" !== (a = o[i].src || "")) { + var u = a.substring(a.lastIndexOf("/")); + if (/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)) { + -1 !== u.indexOf(".min") && (n = ".min"), + (e = a.substring(0, a.lastIndexOf("/"))); + break; + } + } + } + if (!e && j.document.currentScript) + -1 !== (a = j.document.currentScript.src).indexOf(".min") && + (n = ".min"), + (e = a.substring(0, a.lastIndexOf("/"))); + } + (this.baseURL = new CE(t).toAbsolute(e)), + (this.documentBaseURL = t), + (this.baseURI = new CE(this.baseURL)), + (this.suffix = n), + rd(this); + }, + overrideDefaults: function (e) { + var t, n; + (t = e.base_url) && this._setBaseUrl(t), + (n = e.suffix), + e.suffix && (this.suffix = n); + var r = (this.defaultSettings = e).plugin_base_urls; + for (var o in r) pa.PluginManager.urls[o] = r[o]; + }, + init: function (r) { + var n, + u, + s = this; + u = Rn.makeMap( + "area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu", + " ", + ); + function c(e) { + var t = e.id; + return ( + t || + ((t = (t = e.name) && !OE.get(t) ? e.name : OE.uniqueId()), + e.setAttribute("id", t)), + t + ); + } + function l(e, t) { + return t.constructor === RegExp + ? t.test(e.className) + : OE.hasClass(e, t); + } + var f = function (e) { + n = e; + }, + e = function () { + function n(e, t, n) { + var r = new kE(e, t, s); + a.push(r), + r.on("init", function () { + ++i === o.length && f(a); + }), + (r.targetElm = r.targetElm || n), + r.render(); + } + var o, + i = 0, + a = []; + OE.unbind(window, "ready", e), + (function (e) { + var t = r[e]; + if (t) t.apply(s, Array.prototype.slice.call(arguments, 2)); + })("onpageload"), + (o = yi.unique( + (function (t) { + var e, + n = []; + if (Sn.browser.isIE() && Sn.browser.version.major < 11) + return ( + qd.initError( + "TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/", + ), + [] + ); + if (UE) + return ( + qd.initError( + "Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode.", + ), + [] + ); + if (t.types) + return ( + HE(t.types, function (e) { + n = n.concat(OE.select(e.selector)); + }), + n + ); + if (t.selector) return OE.select(t.selector); + if (t.target) return [t.target]; + switch (t.mode) { + case "exact": + 0 < (e = t.elements || "").length && + HE(BE(e), function (t) { + var e; + (e = OE.get(t)) + ? n.push(e) + : HE(j.document.forms, function (e) { + HE(e.elements, function (e) { + e.name === t && + ((t = "mce_editor_" + LE++), + OE.setAttrib(e, "id", t), + n.push(e)); + }); + }); + }); + break; + case "textareas": + case "specific_textareas": + HE(OE.select("textarea"), function (e) { + (t.editor_deselector && l(e, t.editor_deselector)) || + (t.editor_selector && !l(e, t.editor_selector)) || + n.push(e); + }); + } + return n; + })(r), + )), + r.types + ? HE(r.types, function (t) { + Rn.each(o, function (e) { + return ( + !OE.is(e, t.selector) || (n(c(e), PE({}, r, t), e), !1) + ); + }); + }) + : (Rn.each(o, function (e) { + !(function (e) { + e && + e.initialized && + !(e.getContainer() || e.getBody()).parentNode && + (RE(e), + e.unbindAllNativeEvents(), + e.destroy(!0), + (e.removed = !0), + (e = null)); + })(s.get(e.id)); + }), + 0 === + (o = Rn.grep(o, function (e) { + return !s.get(e.id); + })).length + ? f([]) + : HE(o, function (e) { + !(function (e, t) { + return e.inline && t.tagName.toLowerCase() in u; + })(r, e) + ? n(c(e), r, e) + : qd.initError( + "Could not initialize inline editor on invalid inline target element", + e, + ); + })); + }; + return ( + (s.settings = r), + OE.bind(window, "ready", e), + new en(function (t) { + n + ? t(n) + : (f = function (e) { + t(e); + }); + }) + ); + }, + get: function (t) { + return 0 === arguments.length + ? FE.slice(0) + : K(t) + ? g(FE, function (e) { + return e.id === t; + }).getOr(null) + : _(t) && FE[t] + ? FE[t] + : null; + }, + add: function (e) { + var n = this; + return ( + IE[e.id] === e || + (null === n.get(e.id) && + ((function (e) { + return "length" !== e; + })(e.id) && (IE[e.id] = e), + IE.push(e), + FE.push(e)), + ME(!0), + (n.activeEditor = e), + n.fire("AddEditor", { editor: e }), + DE || + ((DE = function (e) { + var t = n.fire("BeforeUnload"); + if (t.returnValue) + return ( + e.preventDefault(), + (e.returnValue = t.returnValue), + t.returnValue + ); + }), + window.addEventListener("beforeunload", DE))), + e + ); + }, + createEditor: function (e, t) { + return this.add(new kE(e, t, this)); + }, + remove: function (e) { + var t, + n, + r = this; + if (e) { + if (!K(e)) + return ( + (n = e), + M(r.get(n.id)) + ? null + : (RE(n) && r.fire("RemoveEditor", { editor: n }), + 0 === FE.length && + window.removeEventListener("beforeunload", DE), + n.remove(), + ME(0 < FE.length), + n) + ); + HE(OE.select(e), function (e) { + (n = r.get(e.id)) && r.remove(n); + }); + } else for (t = FE.length - 1; 0 <= t; t--) r.remove(FE[t]); + }, + execCommand: function (e, t, n) { + var r = this.get(n); + switch (e) { + case "mceAddEditor": + return this.get(n) || new kE(n, this.settings, this).render(), !0; + case "mceRemoveEditor": + return r && r.remove(), !0; + case "mceToggleEditor": + return ( + r + ? r.isHidden() + ? r.show() + : r.hide() + : this.execCommand("mceAddEditor", 0, n), + !0 + ); + } + return !!this.activeEditor && this.activeEditor.execCommand(e, t, n); + }, + triggerSave: function () { + HE(FE, function (e) { + e.save(); + }); + }, + addI18n: function (e, t) { + oa.add(e, t); + }, + translate: function (e) { + return oa.translate(e); + }, + setActive: function (e) { + var t = this.activeEditor; + this.activeEditor !== e && + (t && t.fire("deactivate", { relatedTarget: e }), + e.fire("activate", { relatedTarget: t })), + (this.activeEditor = e); + }, + _setBaseUrl: function (e) { + (this.baseURL = new CE(this.documentBaseURL).toAbsolute( + e.replace(/\/+$/, ""), + )), + (this.baseURI = new CE(this.baseURL)); + }, + }); + function qE(n) { + return { + walk: function (e, t) { + return Jc(n, e, t); + }, + split: wm, + normalize: function (t) { + return uy(n, t).fold($(!1), function (e) { + return ( + t.setStart(e.startContainer, e.startOffset), + t.setEnd(e.endContainer, e.endOffset), + !0 + ); + }); + }, + }; + } + jE.setup(), + ((_E = qE = qE || {}).compareRanges = mh), + (_E.getCaretRangeFromPoint = Wv), + (_E.getSelectedNode = Ka), + (_E.getNode = Xa); + function $E(e, t, n) { + var r, o, i, a, u, s; + return ( + (r = t.x), + (o = t.y), + (i = e.w), + (a = e.h), + (u = t.w), + (s = t.h), + "b" === (n = (n || "").split(""))[0] && (o += s), + "r" === n[1] && (r += u), + "c" === n[0] && (o += tN(s / 2)), + "c" === n[1] && (r += tN(u / 2)), + "b" === n[3] && (o -= a), + "r" === n[4] && (r -= i), + "c" === n[3] && (o -= tN(a / 2)), + "c" === n[4] && (r -= tN(i / 2)), + nN(r, o, i, a) + ); + } + function WE() {} + var KE, + XE, + YE, + GE, + JE = qE, + QE = + ((KE = {}), + (XE = {}), + { + load: function (r, o) { + var i = 'Script at URL "' + o + '" failed to load', + a = + 'Script at URL "' + + o + + "\" did not call `tinymce.Resource.add('" + + r + + "', data)` within 1 second"; + if (KE[r] !== undefined) return KE[r]; + var e = new en(function (e, t) { + var n = (function (e, t, n) { + function r(n) { + return function () { + for (var e = [], t = 0; t < arguments.length; t++) + e[t] = arguments[t]; + o || + ((o = !0), + null !== i && (j.clearTimeout(i), (i = null)), + n.apply(null, e)); + }; + } + void 0 === n && (n = 1e3); + var o = !1, + i = null, + a = r(e), + u = r(t); + return { + start: function () { + for (var e = [], t = 0; t < arguments.length; t++) + e[t] = arguments[t]; + o || + null !== i || + (i = j.setTimeout(function () { + return u.apply(null, e); + }, n)); + }, + resolve: a, + reject: u, + }; + })(e, t); + (XE[r] = n.resolve), + Zi.ScriptLoader.loadScript( + o, + function () { + return n.start(a); + }, + function () { + return n.reject(i); + }, + ); + }); + return (KE[r] = e); + }, + add: function (e, t) { + XE[e] !== undefined && (XE[e](t), delete XE[e]), + (KE[e] = en.resolve(t)); + }, + }), + ZE = Math.min, + eN = Math.max, + tN = Math.round, + nN = function (e, t, n, r) { + return { x: e, y: t, w: n, h: r }; + }, + rN = { + inflate: function (e, t, n) { + return nN(e.x - t, e.y - n, e.w + 2 * t, e.h + 2 * n); + }, + relativePosition: $E, + findBestRelativePosition: function (e, t, n, r) { + var o, i; + for (i = 0; i < r.length; i++) + if ( + (o = $E(e, t, r[i])).x >= n.x && + o.x + o.w <= n.w + n.x && + o.y >= n.y && + o.y + o.h <= n.h + n.y + ) + return r[i]; + return null; + }, + intersect: function (e, t) { + var n, r, o, i; + return ( + (n = eN(e.x, t.x)), + (r = eN(e.y, t.y)), + (o = ZE(e.x + e.w, t.x + t.w)), + (i = ZE(e.y + e.h, t.y + t.h)), + o - n < 0 || i - r < 0 ? null : nN(n, r, o - n, i - r) + ); + }, + clamp: function (e, t, n) { + var r, o, i, a, u, s, c, l, f, d; + return ( + (u = e.x), + (s = e.y), + (c = e.x + e.w), + (l = e.y + e.h), + (f = t.x + t.w), + (d = t.y + t.h), + (r = eN(0, t.x - u)), + (o = eN(0, t.y - s)), + (i = eN(0, c - f)), + (a = eN(0, l - d)), + (u += r), + (s += o), + n && ((c += r), (l += o), (u -= i), (s -= a)), + nN(u, s, (c -= i) - u, (l -= a) - s) + ); + }, + create: nN, + fromClientRect: function (e) { + return nN(e.left, e.top, e.width, e.height); + }, + }, + oN = Rn.each, + iN = Rn.extend; + WE.extend = YE = function (n) { + function r() { + var e, t, n; + if ( + !GE && + (this.init && this.init.apply(this, arguments), (t = this.Mixins)) + ) + for (e = t.length; e--; ) + (n = t[e]).init && n.init.apply(this, arguments); + } + function t() { + return this; + } + function e(n, r) { + return function () { + var e, + t = this._super; + return ( + (this._super = u[n]), + (e = r.apply(this, arguments)), + (this._super = t), + e + ); + }; + } + var o, + i, + a, + u = this.prototype; + for (i in ((GE = !0), + (o = new this()), + (GE = !1), + n.Mixins && + (oN(n.Mixins, function (e) { + for (var t in e) "init" !== t && (n[t] = e[t]); + }), + u.Mixins && (n.Mixins = u.Mixins.concat(n.Mixins))), + n.Methods && + oN(n.Methods.split(","), function (e) { + n[e] = t; + }), + n.Properties && + oN(n.Properties.split(","), function (e) { + var t = "_" + e; + n[e] = function (e) { + return e !== undefined ? ((this[t] = e), this) : this[t]; + }; + }), + n.Statics && + oN(n.Statics, function (e, t) { + r[t] = e; + }), + n.Defaults && u.Defaults && (n.Defaults = iN({}, u.Defaults, n.Defaults)), + n)) + "function" == typeof (a = n[i]) && u[i] ? (o[i] = e(i, a)) : (o[i] = a); + return (r.prototype = o), ((r.constructor = r).extend = YE), r; + }; + var aN = Math.min, + uN = Math.max, + sN = Math.round, + cN = { + serialize: function (e) { + var t = JSON.stringify(e); + return K(t) + ? t.replace(/[\u0080-\uFFFF]/g, function (e) { + var t = e.charCodeAt(0).toString(16); + return "\\u" + "0000".substring(t.length) + t; + }) + : t; + }, + parse: function (e) { + try { + return JSON.parse(e); + } catch (t) {} + }, + }, + lN = { + callbacks: {}, + count: 0, + send: function (t) { + var n = this, + r = Yi.DOM, + o = t.count !== undefined ? t.count : n.count, + i = "tinymce_jsonp_" + o; + (n.callbacks[o] = function (e) { + r.remove(i), delete n.callbacks[o], t.callback(e); + }), + r.add(r.doc.body, "script", { + id: i, + src: t.url, + type: "text/javascript", + }), + n.count++; + }, + }, + fN = G(G({}, oE), { + send: function (e) { + var t, + n = 0, + r = function () { + !e.async || 4 === t.readyState || 1e4 < n++ + ? (e.success && n < 1e4 && 200 === t.status + ? e.success.call(e.success_scope, "" + t.responseText, t, e) + : e.error && + e.error.call( + e.error_scope, + 1e4 < n ? "TIMED_OUT" : "GENERAL", + t, + e, + ), + (t = null)) + : vn.setTimeout(r, 10); + }; + if ( + ((e.scope = e.scope || this), + (e.success_scope = e.success_scope || e.scope), + (e.error_scope = e.error_scope || e.scope), + (e.async = !1 !== e.async), + (e.data = e.data || ""), + fN.fire("beforeInitialize", { settings: e }), + (t = new j.XMLHttpRequest())) + ) { + if ( + (t.overrideMimeType && t.overrideMimeType(e.content_type), + t.open(e.type || (e.data ? "POST" : "GET"), e.url, e.async), + e.crossDomain && (t.withCredentials = !0), + e.content_type && + t.setRequestHeader("Content-Type", e.content_type), + e.requestheaders && + Rn.each(e.requestheaders, function (e) { + t.setRequestHeader(e.key, e.value); + }), + t.setRequestHeader("X-Requested-With", "XMLHttpRequest"), + (t = fN.fire("beforeSend", { xhr: t, settings: e }).xhr).send( + e.data, + ), + !e.async) + ) + return r(); + vn.setTimeout(r, 10); + } + }, + }), + dN = Rn.extend, + hN = + ((mN.sendRPC = function (e) { + return new mN().send(e); + }), + (mN.prototype.send = function (e) { + var n = e.error, + r = e.success, + o = dN(this.settings, e); + (o.success = function (e, t) { + void 0 === (e = cN.parse(e)) && (e = { error: "JSON Parse error." }), + e.error + ? n.call(o.error_scope || o.scope, e.error, t) + : r.call(o.success_scope || o.scope, e.result); + }), + (o.error = function (e, t) { + n && n.call(o.error_scope || o.scope, e, t); + }), + (o.data = cN.serialize({ + id: e.id || "c" + this.count++, + method: e.method, + params: e.params, + })), + (o.content_type = "application/json"), + fN.send(o); + }), + mN); + function mN(e) { + (this.settings = dN({}, e)), (this.count = 0); + } + var gN, pN, vN, yN; + try { + gN = j.window.localStorage; + } catch (xN) { + (pN = {}), + (vN = []), + (yN = { + getItem: function (e) { + var t = pN[e]; + return t || null; + }, + setItem: function (e, t) { + vN.push(e), (pN[e] = String(t)); + }, + key: function (e) { + return vN[e]; + }, + removeItem: function (t) { + (vN = vN.filter(function (e) { + return e === t; + })), + delete pN[t]; + }, + clear: function () { + (vN = []), (pN = {}); + }, + length: 0, + }), + Object.defineProperty(yN, "length", { + get: function () { + return vN.length; + }, + configurable: !1, + enumerable: !1, + }), + (gN = yN); + } + var bN, + CN = { + geom: { Rect: rN }, + util: { + Promise: en, + Delay: vn, + Tools: Rn, + VK: Mh, + URI: CE, + Class: WE, + EventDispatcher: jz, + Observable: oE, + I18n: oa, + XHR: fN, + JSON: cN, + JSONRequest: hN, + JSONP: lN, + LocalStorage: gN, + Color: function (e) { + function t(e) { + var t; + return ( + "object" == typeof e + ? "r" in e + ? ((u = e.r), (s = e.g), (c = e.b)) + : "v" in e && + (function (e, t, n) { + var r, o, i, a; + if ( + ((e = (parseInt(e, 10) || 0) % 360), + (t = parseInt(t, 10) / 100), + (n = parseInt(n, 10) / 100), + (t = uN(0, aN(t, 1))), + (n = uN(0, aN(n, 1))), + 0 !== t) + ) { + switch ( + ((r = e / 60), + (i = (o = n * t) * (1 - Math.abs((r % 2) - 1))), + (a = n - o), + Math.floor(r)) + ) { + case 0: + (u = o), (s = i), (c = 0); + break; + case 1: + (u = i), (s = o), (c = 0); + break; + case 2: + (u = 0), (s = o), (c = i); + break; + case 3: + (u = 0), (s = i), (c = o); + break; + case 4: + (u = i), (s = 0), (c = o); + break; + case 5: + (u = o), (s = 0), (c = i); + break; + default: + u = s = c = 0; + } + (u = sN(255 * (u + a))), + (s = sN(255 * (s + a))), + (c = sN(255 * (c + a))); + } else u = s = c = sN(255 * n); + })(e.h, e.s, e.v) + : (t = + /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec( + e, + )) + ? ((u = parseInt(t[1], 10)), + (s = parseInt(t[2], 10)), + (c = parseInt(t[3], 10))) + : (t = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e)) + ? ((u = parseInt(t[1], 16)), + (s = parseInt(t[2], 16)), + (c = parseInt(t[3], 16))) + : (t = /#([0-F])([0-F])([0-F])/gi.exec(e)) && + ((u = parseInt(t[1] + t[1], 16)), + (s = parseInt(t[2] + t[2], 16)), + (c = parseInt(t[3] + t[3], 16))), + (u = u < 0 ? 0 : 255 < u ? 255 : u), + (s = s < 0 ? 0 : 255 < s ? 255 : s), + (c = c < 0 ? 0 : 255 < c ? 255 : c), + n + ); + } + var n = {}, + u = 0, + s = 0, + c = 0; + return ( + e && t(e), + (n.toRgb = function () { + return { r: u, g: s, b: c }; + }), + (n.toHsv = function () { + return (function (e, t, n) { + var r, o, i, a; + return ( + (o = 0), + (i = aN((e /= 255), aN((t /= 255), (n /= 255)))) === + (a = uN(e, uN(t, n))) + ? { h: 0, s: 0, v: 100 * (o = i) } + : ((r = (a - i) / a), + { + h: sN( + 60 * + ((e === i ? 3 : n === i ? 1 : 5) - + (e === i ? t - n : n === i ? e - t : n - e) / + ((o = a) - i)), + ), + s: sN(100 * r), + v: sN(100 * o), + }) + ); + })(u, s, c); + }), + (n.toHex = function () { + function e(e) { + return 1 < (e = parseInt(e, 10).toString(16)).length + ? e + : "0" + e; + } + return "#" + e(u) + e(s) + e(c); + }), + (n.parse = t), + n + ); + }, + }, + dom: { + EventUtils: Tr, + Sizzle: Mo, + DomQuery: yi, + TreeWalker: bi, + DOMUtils: Yi, + ScriptLoader: Zi, + RangeUtils: JE, + Serializer: Mp, + ControlSelection: Kp, + BookmarkManager: Xp, + Selection: fy, + Event: Tr.Event, + }, + html: { + Styles: zr, + Entities: ar, + Node: sl, + Schema: vr, + SaxParser: af, + DomParser: Sp, + Writer: pl, + Serializer: vl, + }, + Env: Sn, + AddOnManager: pa, + Annotator: rl, + Formatter: wp, + UndoManager: gm, + EditorCommands: Iz, + WindowManager: Bd, + NotificationManager: Od, + EditorObservable: uE, + Shortcuts: hE, + Editor: kE, + FocusManager: ed, + EditorManager: jE, + DOM: Yi.DOM, + ScriptLoader: Zi.ScriptLoader, + PluginManager: pa.PluginManager, + ThemeManager: pa.ThemeManager, + IconManager: $d, + Resource: QE, + trim: Rn.trim, + isArray: Rn.isArray, + is: Rn.is, + toArray: Rn.toArray, + makeMap: Rn.makeMap, + each: Rn.each, + map: Rn.map, + grep: Rn.grep, + inArray: Rn.inArray, + extend: Rn.extend, + create: Rn.create, + walk: Rn.walk, + createNS: Rn.createNS, + resolve: Rn.resolve, + explode: Rn.explode, + _addCacheSuffix: Rn._addCacheSuffix, + isOpera: Sn.opera, + isWebKit: Sn.webkit, + isIE: Sn.ie, + isGecko: Sn.gecko, + isMac: Sn.mac, + }, + wN = Rn.extend(jE, CN); + (bN = wN), + (window.tinymce = bN), + (window.tinyMCE = bN), + (function (e) { + if ("object" == typeof module) + try { + module.exports = e; + } catch (t) {} + })(wN); +})(window); /* Ephox Fluffy plugin * @@ -15,18 +23588,627 @@ * Version: 2.4.0-12 */ -!function(a){"use strict";var n,t,r,e,u=void 0!==a.window?a.window:Function("return this;")(),i=function(n,t){return{isRequired:n,applyPatch:t}},c=function(i,o){return function(){for(var n=[],t=0;ti&&(a.clearInterval(o),r())},e)},K=function(i){return function(){var n,t,r,e=(n=i,t="position",r=n.currentStyle?n.currentStyle[t]:a.window.getComputedStyle(n,null)[t],r||"").toLowerCase();return"absolute"===e||"fixed"===e}},Q=function(n){n.parentNode.removeChild(n)},W=function(n,t){var r,e=((r=a.document.createElement("div")).style.display="none",r.className="mce-floatpanel",r);a.document.body.appendChild(e),J(K(e),function(){Q(e),n()},function(){Q(e),t()},10,5e3)},X=function(n,t){n.notificationManager?n.notificationManager.open({text:t,type:"warning",timeout:0,icon:""}):n.windowManager.alert(t)},Y=function(n){n.EditorManager.on("AddEditor",function(n){var t=n.editor,r=t.settings.service_message;r&&W(function(){X(t,t.settings.service_message)},function(){a.alert(r)})})},Z=function(n){var t,r,e=L("tinymce.util.URI",u);(t=n.base_url)&&(this.baseURL=new e(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new e(this.baseURL)),r=n.suffix,n.suffix&&(this.suffix=r),this.defaultSettings=n},nn=function(n){return[L("tinymce.util.Tools",u).extend({},this.defaultSettings,n)]},tn={patch:i(function(n){return"function"!=typeof n.overrideDefaults},function(n){Y(n),n.overrideDefaults=Z,n.EditorManager.init=c(n.EditorManager.init,nn)})},rn={patch:i(function(n){return $(n,"4.5.0")},function(n){var e;n.overrideDefaults=c(n.overrideDefaults,(e=n,function(n){var t=n.plugin_base_urls;for(var r in t)e.PluginManager.urls[r]=t[r]}))})},en=function(n){o(n,[tn.patch,rn.patch,G.patch,k.patch])};en(u.tinymce)}(window); +!(function (a) { + "use strict"; + var n, + t, + r, + e, + u = void 0 !== a.window ? a.window : Function("return this;")(), + i = function (n, t) { + return { isRequired: n, applyPatch: t }; + }, + c = function (i, o) { + return function () { + for (var n = [], t = 0; t < arguments.length; t++) n[t] = arguments[t]; + var r = o.apply(this, n), + e = void 0 === r ? n : r; + return i.apply(this, e); + }; + }, + o = function (n, t) { + if (n) + for (var r = 0; r < t.length; r++) + t[r].isRequired(n) && t[r].applyPatch(n); + return n; + }, + f = function () {}, + l = function (n) { + return function () { + return n; + }; + }, + s = l(!1), + g = l(!0), + p = function () { + return d; + }, + d = + ((n = function (n) { + return n.isNone(); + }), + (e = { + fold: function (n, t) { + return n(); + }, + is: s, + isSome: s, + isNone: g, + getOr: (r = function (n) { + return n; + }), + getOrThunk: (t = function (n) { + return n(); + }), + getOrDie: function (n) { + throw new Error(n || "error: getOrDie called on none."); + }, + getOrNull: l(null), + getOrUndefined: l(void 0), + or: r, + orThunk: t, + map: p, + each: f, + bind: p, + exists: s, + forall: g, + filter: p, + equals: n, + equals_: n, + toArray: function () { + return []; + }, + toString: l("none()"), + }), + Object.freeze && Object.freeze(e), + e), + h = function (r) { + var n = l(r), + t = function () { + return i; + }, + e = function (n) { + return n(r); + }, + i = { + fold: function (n, t) { + return t(r); + }, + is: function (n) { + return r === n; + }, + isSome: g, + isNone: s, + getOr: n, + getOrThunk: n, + getOrDie: n, + getOrNull: n, + getOrUndefined: n, + or: t, + orThunk: t, + map: function (n) { + return h(n(r)); + }, + each: function (n) { + n(r); + }, + bind: e, + exists: e, + forall: e, + filter: function (n) { + return n(r) ? i : d; + }, + toArray: function () { + return [r]; + }, + toString: function () { + return "some(" + r + ")"; + }, + equals: function (n) { + return n.is(r); + }, + equals_: function (n, t) { + return n.fold(s, function (n) { + return t(r, n); + }); + }, + }; + return i; + }, + v = p, + y = function (n) { + return null == n ? d : h(n); + }, + m = function (t) { + return function (n) { + return ( + (function (n) { + if (null === n) return "null"; + var t = typeof n; + return "object" === t && + (Array.prototype.isPrototypeOf(n) || + (n.constructor && "Array" === n.constructor.name)) + ? "array" + : "object" === t && + (String.prototype.isPrototypeOf(n) || + (n.constructor && "String" === n.constructor.name)) + ? "string" + : t; + })(n) === t + ); + }; + }, + w = m("object"), + O = m("array"), + b = m("undefined"), + j = m("function"), + A = (Array.prototype.slice, Array.prototype.indexOf), + x = Array.prototype.push, + E = function (n, t) { + return (r = n), (e = t), -1 < A.call(r, e); + var r, e; + }, + S = function (n, t) { + return (function (n) { + for (var t = [], r = 0, e = n.length; r < e; ++r) { + if (!O(n[r])) + throw new Error( + "Arr.flatten item " + r + " was not an array, input: " + n, + ); + x.apply(t, n[r]); + } + return t; + })( + (function (n, t) { + for (var r = n.length, e = new Array(r), i = 0; i < r; i++) { + var o = n[i]; + e[i] = t(o, i); + } + return e; + })(n, t), + ); + }, + M = (j(Array.from) && Array.from, Object.prototype.hasOwnProperty), + _ = function (u) { + return function () { + for (var n = new Array(arguments.length), t = 0; t < n.length; t++) + n[t] = arguments[t]; + if (0 === n.length) throw new Error("Can't merge zero objects"); + for (var r = {}, e = 0; e < n.length; e++) { + var i = n[e]; + for (var o in i) M.call(i, o) && (r[o] = u(r[o], i[o])); + } + return r; + }; + }, + D = _(function (n, t) { + return w(n) && w(t) ? D(n, t) : t; + }), + P = _(function (n, t) { + return t; + }), + U = Object.keys, + N = Object.hasOwnProperty, + R = function (n, t) { + for (var r = U(n), e = 0, i = r.length; e < i; e++) { + var o = r[e]; + t(n[o], o); + } + }, + T = function (n, t) { + return q(n, t) ? y(n[t]) : v(); + }, + q = function (n, t) { + return N.call(n, t); + }, + C = function (n) { + if (b(n) || "" === n) return []; + var t = O(n) + ? S(n, function (n) { + return n.split(/[\s+,]/); + }) + : n.split(/[\s+,]/); + return S(t, function (n) { + return 0 < n.length ? [n.trim()] : []; + }); + }, + I = function (n, t) { + var r, + e, + i, + o = D(n, t), + u = C(t.plugins), + a = T(o, "custom_plugin_urls").getOr({}), + c = + ((r = function (n, t) { + return E(u, t); + }), + (e = {}), + (i = {}), + R(a, function (n, t) { + (r(n, t) ? e : i)[t] = n; + }), + { t: e, f: i }), + f = T(o, "external_plugins").getOr({}), + l = {}; + R(c.t, function (n, t) { + l[t] = n; + }); + var s = P(l, f); + return P(t, 0 === U(s).length ? {} : { external_plugins: s }); + }, + k = { + getCustomPluginUrls: I, + patch: i( + function () { + return !0; + }, + function (t) { + t.EditorManager.init = c(t.EditorManager.init, function (n) { + return [I(t.defaultSettings, n)]; + }); + }, + ), + }, + L = function (n, t) { + return (function (n, t) { + for (var r = null != t ? t : u, e = 0; e < n.length && null != r; ++e) + r = r[n[e]]; + return r; + })(n.split("."), t); + }, + z = function (n) { + return parseInt(n, 10); + }, + V = function (n, t) { + var r = n - t; + return 0 === r ? 0 : 0 < r ? 1 : -1; + }, + B = function (n, t, r) { + return { major: n, minor: t, patch: r }; + }, + F = function (n) { + var t = /([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(n); + return t ? B(z(t[1]), z(t[2]), z(t[3])) : B(0, 0, 0); + }, + $ = function (n, t) { + return ( + !!n && + -1 === + (function (n, t) { + var r = V(n.major, t.major); + if (0 !== r) return r; + var e = V(n.minor, t.minor); + if (0 !== e) return e; + var i = V(n.patch, t.patch); + return 0 !== i ? i : 0; + })( + F( + [(r = n).majorVersion, r.minorVersion] + .join(".") + .split(".") + .slice(0, 3) + .join("."), + ), + F(t), + ) + ); + var r; + }, + G = { + patch: i( + function (n) { + return $(n, "4.7.0"); + }, + function (n) { + var o; + n.EditorManager.init = c( + n.EditorManager.init, + ((o = n.EditorManager), + function (n) { + var t = L("tinymce.util.Tools", u), + r = C(n.plugins), + e = o.defaultSettings.forced_plugins || [], + i = 0 < e.length ? r.concat(e) : r; + return [t.extend({}, n, { plugins: i })]; + }), + ); + }, + ), + }, + H = function () { + return new Date().getTime(); + }, + J = function (n, t, r, e, i) { + var o, + u = H(); + o = a.setInterval(function () { + n() && (a.clearInterval(o), t()), + H() - u > i && (a.clearInterval(o), r()); + }, e); + }, + K = function (i) { + return function () { + var n, + t, + r, + e = ((n = i), + (t = "position"), + (r = n.currentStyle + ? n.currentStyle[t] + : a.window.getComputedStyle(n, null)[t]), + r || "").toLowerCase(); + return "absolute" === e || "fixed" === e; + }; + }, + Q = function (n) { + n.parentNode.removeChild(n); + }, + W = function (n, t) { + var r, + e = + (((r = a.document.createElement("div")).style.display = "none"), + (r.className = "mce-floatpanel"), + r); + a.document.body.appendChild(e), + J( + K(e), + function () { + Q(e), n(); + }, + function () { + Q(e), t(); + }, + 10, + 5e3, + ); + }, + X = function (n, t) { + n.notificationManager + ? n.notificationManager.open({ + text: t, + type: "warning", + timeout: 0, + icon: "", + }) + : n.windowManager.alert(t); + }, + Y = function (n) { + n.EditorManager.on("AddEditor", function (n) { + var t = n.editor, + r = t.settings.service_message; + r && + W( + function () { + X(t, t.settings.service_message); + }, + function () { + a.alert(r); + }, + ); + }); + }, + Z = function (n) { + var t, + r, + e = L("tinymce.util.URI", u); + (t = n.base_url) && + ((this.baseURL = new e(this.documentBaseURL).toAbsolute( + t.replace(/\/+$/, ""), + )), + (this.baseURI = new e(this.baseURL))), + (r = n.suffix), + n.suffix && (this.suffix = r), + (this.defaultSettings = n); + }, + nn = function (n) { + return [L("tinymce.util.Tools", u).extend({}, this.defaultSettings, n)]; + }, + tn = { + patch: i( + function (n) { + return "function" != typeof n.overrideDefaults; + }, + function (n) { + Y(n), + (n.overrideDefaults = Z), + (n.EditorManager.init = c(n.EditorManager.init, nn)); + }, + ), + }, + rn = { + patch: i( + function (n) { + return $(n, "4.5.0"); + }, + function (n) { + var e; + n.overrideDefaults = c( + n.overrideDefaults, + ((e = n), + function (n) { + var t = n.plugin_base_urls; + for (var r in t) e.PluginManager.urls[r] = t[r]; + }), + ); + }, + ), + }, + en = function (n) { + o(n, [tn.patch, rn.patch, G.patch, k.patch]); + }; + en(u.tinymce); +})(window); -(function(cloudSettings) { - tinymce.overrideDefaults(cloudSettings); -})({"imagetools_proxy":"https://imageproxy.tiny.cloud/2/image","suffix":".min","linkchecker_service_url":"https://hyperlinking.tiny.cloud","spellchecker_rpc_url":"https://spelling.tiny.cloud","spellchecker_api_key":"no-api-key","tinydrive_service_url":"https://catalog.tiny.cloud","api_key":"no-api-key","imagetools_api_key":"no-api-key","tinydrive_api_key":"no-api-key","forced_plugins":["chiffer"],"referrer_policy":"origin","content_css_cors":true,"custom_plugin_urls":{},"chiffer_snowplow_service_url":"https://sp.tinymce.com/i","mediaembed_api_key":"no-api-key","linkchecker_api_key":"no-api-key","mediaembed_service_url":"https://hyperlinking.tiny.cloud","service_message":"This domain is not registered with Tiny Cloud. \u003ca target=\"_blank\" href=\"https://www.tiny.cloud/auth/signup/\"\u003eStart a free trial\u003c/a\u003e to discover our premium cloud services and pro support."}); -tinymce.baseURL = "https://cdn.tiny.cloud/1/no-api-key/tinymce/5.1.6-68" +(function (cloudSettings) { + tinymce.overrideDefaults(cloudSettings); +})({ + imagetools_proxy: "https://imageproxy.tiny.cloud/2/image", + suffix: ".min", + linkchecker_service_url: "https://hyperlinking.tiny.cloud", + spellchecker_rpc_url: "https://spelling.tiny.cloud", + spellchecker_api_key: "no-api-key", + tinydrive_service_url: "https://catalog.tiny.cloud", + api_key: "no-api-key", + imagetools_api_key: "no-api-key", + tinydrive_api_key: "no-api-key", + forced_plugins: ["chiffer"], + referrer_policy: "origin", + content_css_cors: true, + custom_plugin_urls: {}, + chiffer_snowplow_service_url: "https://sp.tinymce.com/i", + mediaembed_api_key: "no-api-key", + linkchecker_api_key: "no-api-key", + mediaembed_service_url: "https://hyperlinking.tiny.cloud", + service_message: + 'This domain is not registered with Tiny Cloud. \u003ca target="_blank" href="https://www.tiny.cloud/auth/signup/"\u003eStart a free trial\u003c/a\u003e to discover our premium cloud services and pro support.', +}); +tinymce.baseURL = "https://cdn.tiny.cloud/1/no-api-key/tinymce/5.1.6-68"; /* Ephox chiffer plugin -* -* Copyright 2010-2019 Tiny Technologies Inc. All rights reserved. -* -* Version: 1.4.2-9 -*/ + * + * Copyright 2010-2019 Tiny Technologies Inc. All rights reserved. + * + * Version: 1.4.2-9 + */ -!function(u){"use strict";for(var t,a=function(){return(new Date).getTime()},c=(t="string",function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===t}),o=[],n=0;n<256;++n)o[n]=(n+256).toString(16).substr(1);var f=function(){var n,t,r,e=function(){for(var n=new Array(16),t=0,r=0;r<16;r++)0==(3&r)&&(t=4294967296*Math.random()),n[r]=t>>>((3&r)<<3)&255;return n}();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,t=0,(r=o)[(n=e)[t++]]+r[n[t++]]+r[n[t++]]+r[n[t++]]+"-"+r[n[t++]]+r[n[t++]]+"-"+r[n[t++]]+r[n[t++]]+"-"+r[n[t++]]+r[n[t++]]+"-"+r[n[t++]]+r[n[t++]]+r[n[t++]]+r[n[t++]]+r[n[t++]]+r[n[t++]]},s=function(){},d=function(n,t){var i,c,r,e=(i=n,c=t,{send:function(n,t,r){var e="?aid="+c+"&tna=tinymce_cloud&p=web&dtm="+t+"&stm="+a()+"&tz="+("undefined"!=typeof Intl?encodeURIComponent(Intl.DateTimeFormat().resolvedOptions().timeZone):"N%2FA")+"&e=se&se_ca="+n+"&eid="+f()+"&fp=none&tv=js-2.6.1",o=u.document.createElement("img");o.src=i.chiffer_snowplow_service_url+e,o.onload=function(){r(!0)},o.onerror=function(){r(!1)}}});return r=e,{sendStat:function(n){return function(){r.send(n,a(),s)}}}};return function(){var n,t,r=tinymce.defaultSettings,e={load:function(n){return s}},o=(n=r.api_key,c(n)?n:void 0),i=void 0===o?e:((t=d(r,o)).sendStat("script_load")(),{load:function(n){n.once("init",t.sendStat("init")),n.once("focus",t.sendStat("focus"))}});tinymce.PluginManager.add("chiffer",i.load)}}(window)(); +!(function (u) { + "use strict"; + for ( + var t, + a = function () { + return new Date().getTime(); + }, + c = + ((t = "string"), + function (n) { + return ( + (function (n) { + if (null === n) return "null"; + var t = typeof n; + return "object" === t && + (Array.prototype.isPrototypeOf(n) || + (n.constructor && "Array" === n.constructor.name)) + ? "array" + : "object" === t && + (String.prototype.isPrototypeOf(n) || + (n.constructor && "String" === n.constructor.name)) + ? "string" + : t; + })(n) === t + ); + }), + o = [], + n = 0; + n < 256; + ++n + ) + o[n] = (n + 256).toString(16).substr(1); + var f = function () { + var n, + t, + r, + e = (function () { + for (var n = new Array(16), t = 0, r = 0; r < 16; r++) + 0 == (3 & r) && (t = 4294967296 * Math.random()), + (n[r] = (t >>> ((3 & r) << 3)) & 255); + return n; + })(); + return ( + (e[6] = (15 & e[6]) | 64), + (e[8] = (63 & e[8]) | 128), + (t = 0), + (r = o)[(n = e)[t++]] + + r[n[t++]] + + r[n[t++]] + + r[n[t++]] + + "-" + + r[n[t++]] + + r[n[t++]] + + "-" + + r[n[t++]] + + r[n[t++]] + + "-" + + r[n[t++]] + + r[n[t++]] + + "-" + + r[n[t++]] + + r[n[t++]] + + r[n[t++]] + + r[n[t++]] + + r[n[t++]] + + r[n[t++]] + ); + }, + s = function () {}, + d = function (n, t) { + var i, + c, + r, + e = + ((i = n), + (c = t), + { + send: function (n, t, r) { + var e = + "?aid=" + + c + + "&tna=tinymce_cloud&p=web&dtm=" + + t + + "&stm=" + + a() + + "&tz=" + + ("undefined" != typeof Intl + ? encodeURIComponent( + Intl.DateTimeFormat().resolvedOptions().timeZone, + ) + : "N%2FA") + + "&e=se&se_ca=" + + n + + "&eid=" + + f() + + "&fp=none&tv=js-2.6.1", + o = u.document.createElement("img"); + (o.src = i.chiffer_snowplow_service_url + e), + (o.onload = function () { + r(!0); + }), + (o.onerror = function () { + r(!1); + }); + }, + }); + return ( + (r = e), + { + sendStat: function (n) { + return function () { + r.send(n, a(), s); + }; + }, + } + ); + }; + return function () { + var n, + t, + r = tinymce.defaultSettings, + e = { + load: function (n) { + return s; + }, + }, + o = ((n = r.api_key), c(n) ? n : void 0), + i = + void 0 === o + ? e + : ((t = d(r, o)).sendStat("script_load")(), + { + load: function (n) { + n.once("init", t.sendStat("init")), + n.once("focus", t.sendStat("focus")); + }, + }); + tinymce.PluginManager.add("chiffer", i.load); + }; +})(window)(); diff --git a/app/client/src/LandingScreen.tsx b/app/client/src/LandingScreen.tsx index bf66ac8a81..066d1c945f 100755 --- a/app/client/src/LandingScreen.tsx +++ b/app/client/src/LandingScreen.tsx @@ -1,8 +1,9 @@ import React from "react"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import { getCurrentUser, getUserAuthError } from "selectors/usersSelectors"; import { connect } from "react-redux"; -import { ANONYMOUS_USERNAME, User } from "constants/userConstants"; +import type { User } from "constants/userConstants"; +import { ANONYMOUS_USERNAME } from "constants/userConstants"; import { Redirect } from "react-router"; import { APPLICATIONS_URL, AUTH_LOGIN_URL, BASE_URL } from "constants/routes"; import PageLoadingBar from "pages/common/PageLoadingBar"; diff --git a/app/client/src/RouteBuilder.ts b/app/client/src/RouteBuilder.ts index f8a1cf9e4c..6e1615c3fc 100644 --- a/app/client/src/RouteBuilder.ts +++ b/app/client/src/RouteBuilder.ts @@ -8,7 +8,7 @@ import { } from "constants/routes"; import { APP_MODE } from "entities/App"; import urlBuilder from "entities/URLRedirect/URLAssembly"; -import { +import type { ApplicationPayload, Page, } from "@appsmith/constants/ReduxActionConstants"; diff --git a/app/client/src/RouteChangeListener.tsx b/app/client/src/RouteChangeListener.tsx index 2144fee38c..bad8f50e86 100644 --- a/app/client/src/RouteChangeListener.tsx +++ b/app/client/src/RouteChangeListener.tsx @@ -2,7 +2,7 @@ import { routeChanged } from "actions/focusHistoryActions"; import { useEffect } from "react"; import { useDispatch } from "react-redux"; import { useLocation } from "react-router-dom"; -import { AppsmithLocationState } from "utils/history"; +import type { AppsmithLocationState } from "utils/history"; export default function RouteChangeListener() { const location = useLocation(); diff --git a/app/client/src/RouteParamsMiddleware.ts b/app/client/src/RouteParamsMiddleware.ts index 77d0a6130c..c997a66f02 100644 --- a/app/client/src/RouteParamsMiddleware.ts +++ b/app/client/src/RouteParamsMiddleware.ts @@ -1,129 +1,129 @@ -import { +import type { ApplicationPayload, Page, ReduxAction, - ReduxActionTypes, } from "@appsmith/constants/ReduxActionConstants"; -import { UpdatePageResponse } from "api/PageApi"; -import urlBuilder, { +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { UpdatePageResponse } from "api/PageApi"; +import type { ApplicationURLParams, PageURLParams, } from "entities/URLRedirect/URLAssembly"; -import { Middleware } from "redux"; +import urlBuilder from "entities/URLRedirect/URLAssembly"; +import type { Middleware } from "redux"; -const routeParamsMiddleware: Middleware = () => (next: any) => ( - action: ReduxAction, -) => { - let appParams: ApplicationURLParams = {}; - let pageParams: PageURLParams[] = []; - switch (action.type) { - case ReduxActionTypes.DUPLICATE_APPLICATION_SUCCESS: - case ReduxActionTypes.IMPORT_APPLICATION_SUCCESS: - case ReduxActionTypes.IMPORT_TEMPLATE_TO_WORKSPACE_SUCCESS: - case ReduxActionTypes.FETCH_APPLICATION_SUCCESS: { - const application: ApplicationPayload = action.payload; - const { pages } = application; - appParams = { - applicationId: application.id, - applicationSlug: application.slug, - applicationVersion: application.applicationVersion, - }; - pageParams = pages.map((page) => ({ - pageSlug: page.slug, - pageId: page.id, - customSlug: page.customSlug, - })); - break; - } - case ReduxActionTypes.FORK_APPLICATION_SUCCESS: - case ReduxActionTypes.CREATE_APPLICATION_SUCCESS: { - const application: ApplicationPayload = action.payload.application; - const { pages } = application; - appParams = { - applicationId: application.id, - applicationSlug: application.slug, - applicationVersion: application.applicationVersion, - }; - pageParams = pages.map((page) => ({ - pageSlug: page.slug, - pageId: page.id, - customSlug: page.customSlug, - })); - break; - } - case ReduxActionTypes.CURRENT_APPLICATION_NAME_UPDATE: { - const application = action.payload; - appParams = { - applicationId: application.id, - applicationSlug: application.slug, - applicationVersion: application.applicationVersion, - }; - break; - } - case ReduxActionTypes.FETCH_PAGE_LIST_SUCCESS: { - const pages: Page[] = action.payload.pages; - pageParams = pages.map((page) => ({ - pageSlug: page.slug, - pageId: page.pageId, - customSlug: page.customSlug, - })); - break; - } - case ReduxActionTypes.UPDATE_PAGE_SUCCESS: { - const page: UpdatePageResponse = action.payload; - pageParams = [ - { +const routeParamsMiddleware: Middleware = + () => (next: any) => (action: ReduxAction) => { + let appParams: ApplicationURLParams = {}; + let pageParams: PageURLParams[] = []; + switch (action.type) { + case ReduxActionTypes.DUPLICATE_APPLICATION_SUCCESS: + case ReduxActionTypes.IMPORT_APPLICATION_SUCCESS: + case ReduxActionTypes.IMPORT_TEMPLATE_TO_WORKSPACE_SUCCESS: + case ReduxActionTypes.FETCH_APPLICATION_SUCCESS: { + const application: ApplicationPayload = action.payload; + const { pages } = application; + appParams = { + applicationId: application.id, + applicationSlug: application.slug, + applicationVersion: application.applicationVersion, + }; + pageParams = pages.map((page) => ({ pageSlug: page.slug, pageId: page.id, customSlug: page.customSlug, - }, - ]; - break; - } - case ReduxActionTypes.CREATE_PAGE_SUCCESS: { - const page: Page = action.payload; - pageParams = [ - { + })); + break; + } + case ReduxActionTypes.FORK_APPLICATION_SUCCESS: + case ReduxActionTypes.CREATE_APPLICATION_SUCCESS: { + const application: ApplicationPayload = action.payload.application; + const { pages } = application; + appParams = { + applicationId: application.id, + applicationSlug: application.slug, + applicationVersion: application.applicationVersion, + }; + pageParams = pages.map((page) => ({ + pageSlug: page.slug, + pageId: page.id, + customSlug: page.customSlug, + })); + break; + } + case ReduxActionTypes.CURRENT_APPLICATION_NAME_UPDATE: { + const application = action.payload; + appParams = { + applicationId: application.id, + applicationSlug: application.slug, + applicationVersion: application.applicationVersion, + }; + break; + } + case ReduxActionTypes.FETCH_PAGE_LIST_SUCCESS: { + const pages: Page[] = action.payload.pages; + pageParams = pages.map((page) => ({ pageSlug: page.slug, pageId: page.pageId, customSlug: page.customSlug, - }, - ]; - break; + })); + break; + } + case ReduxActionTypes.UPDATE_PAGE_SUCCESS: { + const page: UpdatePageResponse = action.payload; + pageParams = [ + { + pageSlug: page.slug, + pageId: page.id, + customSlug: page.customSlug, + }, + ]; + break; + } + case ReduxActionTypes.CREATE_PAGE_SUCCESS: { + const page: Page = action.payload; + pageParams = [ + { + pageSlug: page.slug, + pageId: page.pageId, + customSlug: page.customSlug, + }, + ]; + break; + } + case ReduxActionTypes.GENERATE_TEMPLATE_PAGE_SUCCESS: { + const { page } = action.payload; + urlBuilder.updateURLParams(null, [ + { + pageSlug: page.slug, + pageId: page.id, + customSlug: page.customSlug, + }, + ]); + break; + } + case ReduxActionTypes.UPDATE_APPLICATION_SUCCESS: + const application = action.payload; + appParams = { + applicationId: application.id, + applicationSlug: application.slug, + applicationVersion: application.applicationVersion, + }; + break; + case ReduxActionTypes.CLONE_PAGE_SUCCESS: + const { pageId, pageSlug } = action.payload; + pageParams = [ + { + pageId, + pageSlug, + }, + ]; + break; + default: + break; } - case ReduxActionTypes.GENERATE_TEMPLATE_PAGE_SUCCESS: { - const { page } = action.payload; - urlBuilder.updateURLParams(null, [ - { - pageSlug: page.slug, - pageId: page.id, - customSlug: page.customSlug, - }, - ]); - break; - } - case ReduxActionTypes.UPDATE_APPLICATION_SUCCESS: - const application = action.payload; - appParams = { - applicationId: application.id, - applicationSlug: application.slug, - applicationVersion: application.applicationVersion, - }; - break; - case ReduxActionTypes.CLONE_PAGE_SUCCESS: - const { pageId, pageSlug } = action.payload; - pageParams = [ - { - pageId, - pageSlug, - }, - ]; - break; - default: - break; - } - urlBuilder.updateURLParams(appParams, pageParams); - return next(action); -}; + urlBuilder.updateURLParams(appParams, pageParams); + return next(action); + }; export default routeParamsMiddleware; diff --git a/app/client/src/actions/JSLibraryActions.ts b/app/client/src/actions/JSLibraryActions.ts index 2c03a8d045..9076263d3f 100644 --- a/app/client/src/actions/JSLibraryActions.ts +++ b/app/client/src/actions/JSLibraryActions.ts @@ -1,5 +1,5 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { TJSLibrary } from "workers/common/JSLibrary"; +import type { TJSLibrary } from "workers/common/JSLibrary"; export function fetchJSLibraries(applicationId: string) { return { diff --git a/app/client/src/actions/apiPaneActions.ts b/app/client/src/actions/apiPaneActions.ts index d9dc492845..b5a0647dbe 100644 --- a/app/client/src/actions/apiPaneActions.ts +++ b/app/client/src/actions/apiPaneActions.ts @@ -1,9 +1,7 @@ -import { - ReduxAction, - ReduxActionTypes, -} from "@appsmith/constants/ReduxActionConstants"; -import { EventLocation } from "utils/AnalyticsUtil"; -import { SlashCommandPayload } from "entities/Action"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { EventLocation } from "utils/AnalyticsUtil"; +import type { SlashCommandPayload } from "entities/Action"; export const changeApi = ( id: string, diff --git a/app/client/src/actions/appSettingsPaneActions.ts b/app/client/src/actions/appSettingsPaneActions.ts index 0da800589d..717942aaee 100644 --- a/app/client/src/actions/appSettingsPaneActions.ts +++ b/app/client/src/actions/appSettingsPaneActions.ts @@ -1,6 +1,6 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { AppSettingsPaneContext } from "reducers/uiReducers/appSettingsPaneReducer"; -import { Action } from "redux"; +import type { AppSettingsPaneContext } from "reducers/uiReducers/appSettingsPaneReducer"; +import type { Action } from "redux"; export const openAppSettingsPaneAction = (context?: AppSettingsPaneContext) => { return { diff --git a/app/client/src/actions/appThemingActions.tsx b/app/client/src/actions/appThemingActions.tsx index d408c1c7b8..22cfe60d2e 100644 --- a/app/client/src/actions/appThemingActions.tsx +++ b/app/client/src/actions/appThemingActions.tsx @@ -1,5 +1,5 @@ -import { AppTheme } from "entities/AppTheming"; -import { AppThemingMode } from "selectors/appThemingSelectors"; +import type { AppTheme } from "entities/AppTheming"; +import type { AppThemingMode } from "selectors/appThemingSelectors"; import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; /** diff --git a/app/client/src/actions/applicationActions.ts b/app/client/src/actions/applicationActions.ts index 93a1922a1a..ec61d86f0d 100644 --- a/app/client/src/actions/applicationActions.ts +++ b/app/client/src/actions/applicationActions.ts @@ -1,15 +1,15 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { +import type { AppEmbedSetting, ApplicationResponsePayload, } from "api/ApplicationApi"; -import { +import type { UpdateApplicationPayload, ImportApplicationRequest, FetchApplicationPayload, } from "api/ApplicationApi"; -import { AppIconName } from "design-system-old"; -import { Datasource } from "entities/Datasource"; +import type { AppIconName } from "design-system-old"; +import type { Datasource } from "entities/Datasource"; export enum ApplicationVersion { DEFAULT = 1, diff --git a/app/client/src/actions/autoHeightActions.ts b/app/client/src/actions/autoHeightActions.ts index b0428d6f6e..90bf8bad84 100644 --- a/app/client/src/actions/autoHeightActions.ts +++ b/app/client/src/actions/autoHeightActions.ts @@ -1,9 +1,7 @@ -import { - ReduxActionTypes, - ReduxAction, -} from "@appsmith/constants/ReduxActionConstants"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import { GridDefaults } from "constants/WidgetConstants"; -import { TreeNode } from "utils/autoHeight/constants"; +import type { TreeNode } from "utils/autoHeight/constants"; export interface UpdateWidgetAutoHeightPayload { widgetId: string; diff --git a/app/client/src/actions/batchActions.ts b/app/client/src/actions/batchActions.ts index de3d2d2333..1722c62867 100644 --- a/app/client/src/actions/batchActions.ts +++ b/app/client/src/actions/batchActions.ts @@ -1,8 +1,8 @@ -import { +import type { EvaluationReduxAction, ReduxAction, - ReduxActionTypes, } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; export const batchAction = (action: EvaluationReduxAction) => ({ type: ReduxActionTypes.BATCHED_UPDATE, diff --git a/app/client/src/actions/canvasSelectionActions.ts b/app/client/src/actions/canvasSelectionActions.ts index a296229281..4848798ec3 100644 --- a/app/client/src/actions/canvasSelectionActions.ts +++ b/app/client/src/actions/canvasSelectionActions.ts @@ -1,9 +1,7 @@ -import { - ReduxAction, - ReduxActionTypes, -} from "@appsmith/constants/ReduxActionConstants"; -import { SelectedArenaDimensions } from "pages/common/CanvasArenas/CanvasSelectionArena"; -import { XYCord } from "pages/common/CanvasArenas/hooks/useRenderBlocksOnCanvas"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { SelectedArenaDimensions } from "pages/common/CanvasArenas/CanvasSelectionArena"; +import type { XYCord } from "pages/common/CanvasArenas/hooks/useRenderBlocksOnCanvas"; export const setCanvasSelectionFromEditor = ( start: boolean, diff --git a/app/client/src/actions/controlActions.tsx b/app/client/src/actions/controlActions.tsx index d34f0e32c5..e2f0e7fca1 100644 --- a/app/client/src/actions/controlActions.tsx +++ b/app/client/src/actions/controlActions.tsx @@ -1,10 +1,10 @@ -import { - ReduxActionTypes, +import type { ReduxAction, ReduxActionType, } from "@appsmith/constants/ReduxActionConstants"; -import { UpdateWidgetsPayload } from "reducers/entityReducers/canvasWidgetsReducer"; -import { DynamicPath } from "utils/DynamicBindingUtils"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { UpdateWidgetsPayload } from "reducers/entityReducers/canvasWidgetsReducer"; +import type { DynamicPath } from "utils/DynamicBindingUtils"; export const updateWidgetPropertyRequest = ( widgetId: string, diff --git a/app/client/src/actions/datasourceActions.ts b/app/client/src/actions/datasourceActions.ts index d9e061d5ea..207913cbe6 100644 --- a/app/client/src/actions/datasourceActions.ts +++ b/app/client/src/actions/datasourceActions.ts @@ -1,13 +1,13 @@ -import { +import type { ReduxAction, - ReduxActionTypes, ReduxActionWithCallbacks, } from "@appsmith/constants/ReduxActionConstants"; -import { CreateDatasourceConfig } from "api/DatasourcesApi"; -import { Datasource } from "entities/Datasource"; -import { PluginType } from "entities/Action"; -import { executeDatasourceQueryRequest } from "api/DatasourcesApi"; -import { ResponseMeta } from "api/ApiResponses"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { CreateDatasourceConfig } from "api/DatasourcesApi"; +import type { Datasource } from "entities/Datasource"; +import type { PluginType } from "entities/Action"; +import type { executeDatasourceQueryRequest } from "api/DatasourcesApi"; +import type { ResponseMeta } from "api/ApiResponses"; import { TEMP_DATASOURCE_ID } from "constants/Datasource"; export const createDatasourceFromForm = ( diff --git a/app/client/src/actions/debuggerActions.ts b/app/client/src/actions/debuggerActions.ts index 8a04027903..74a9e46f75 100644 --- a/app/client/src/actions/debuggerActions.ts +++ b/app/client/src/actions/debuggerActions.ts @@ -1,6 +1,6 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { ENTITY_TYPE, Log, Message } from "entities/AppsmithConsole"; -import { EventName } from "utils/AnalyticsUtil"; +import type { ENTITY_TYPE, Log, Message } from "entities/AppsmithConsole"; +import type { EventName } from "utils/AnalyticsUtil"; export interface LogDebuggerErrorAnalyticsPayload { entityName: string; diff --git a/app/client/src/actions/editorContextActions.ts b/app/client/src/actions/editorContextActions.ts index e6012c1518..47c7e70243 100644 --- a/app/client/src/actions/editorContextActions.ts +++ b/app/client/src/actions/editorContextActions.ts @@ -1,11 +1,11 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { +import type { CodeEditorContext, CursorPosition, - CursorPositionOrigin, EvaluatedPopupState, PropertyPanelContext, } from "reducers/uiReducers/editorContextReducer"; +import { CursorPositionOrigin } from "reducers/uiReducers/editorContextReducer"; export const setFocusableInputField = (path: string | undefined) => { return { diff --git a/app/client/src/actions/evaluationActions.ts b/app/client/src/actions/evaluationActions.ts index 00ea7698ae..2066ee8bb8 100644 --- a/app/client/src/actions/evaluationActions.ts +++ b/app/client/src/actions/evaluationActions.ts @@ -1,13 +1,13 @@ +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; import { - ReduxAction, ReduxActionErrorTypes, ReduxActionTypes, } from "@appsmith/constants/ReduxActionConstants"; import _ from "lodash"; -import { DataTree } from "entities/DataTree/dataTreeFactory"; -import { DependencyMap } from "utils/DynamicBindingUtils"; -import { Diff } from "deep-diff"; -import { QueryActionConfig } from "entities/Action"; +import type { DataTree } from "entities/DataTree/dataTreeFactory"; +import type { DependencyMap } from "utils/DynamicBindingUtils"; +import type { Diff } from "deep-diff"; +import type { QueryActionConfig } from "entities/Action"; export const FIRST_EVAL_REDUX_ACTIONS = [ // Pages diff --git a/app/client/src/actions/focusHistoryActions.ts b/app/client/src/actions/focusHistoryActions.ts index 599d2f0d8b..ef502efc4e 100644 --- a/app/client/src/actions/focusHistoryActions.ts +++ b/app/client/src/actions/focusHistoryActions.ts @@ -1,10 +1,8 @@ -import { FocusState } from "reducers/uiReducers/focusHistoryReducer"; -import { - ReduxAction, - ReduxActionTypes, -} from "@appsmith/constants/ReduxActionConstants"; -import { Location } from "history"; -import { AppsmithLocationState } from "utils/history"; +import type { FocusState } from "reducers/uiReducers/focusHistoryReducer"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { Location } from "history"; +import type { AppsmithLocationState } from "utils/history"; export type RouteChangeActionPayload = { location: Location; diff --git a/app/client/src/actions/gitSyncActions.ts b/app/client/src/actions/gitSyncActions.ts index 6d8143978b..a75ad4b6d2 100644 --- a/app/client/src/actions/gitSyncActions.ts +++ b/app/client/src/actions/gitSyncActions.ts @@ -1,13 +1,13 @@ +import type { ReduxActionWithCallbacks } from "@appsmith/constants/ReduxActionConstants"; import { ReduxActionErrorTypes, ReduxActionTypes, - ReduxActionWithCallbacks, } from "@appsmith/constants/ReduxActionConstants"; -import { ConnectToGitPayload } from "api/GitSyncAPI"; -import { GitConfig, GitSyncModalTab, MergeStatus } from "entities/GitSync"; -import { GitApplicationMetadata } from "api/ApplicationApi"; -import { GitStatusData } from "reducers/uiReducers/gitSyncReducer"; -import { ResponseMeta } from "api/ApiResponses"; +import type { ConnectToGitPayload } from "api/GitSyncAPI"; +import type { GitConfig, GitSyncModalTab, MergeStatus } from "entities/GitSync"; +import type { GitApplicationMetadata } from "api/ApplicationApi"; +import type { GitStatusData } from "reducers/uiReducers/gitSyncReducer"; +import type { ResponseMeta } from "api/ApiResponses"; export const setIsGitSyncModalOpen = (payload: { isOpen: boolean; diff --git a/app/client/src/actions/globalSearchActions.ts b/app/client/src/actions/globalSearchActions.ts index 78ba5644b8..5707afdf41 100644 --- a/app/client/src/actions/globalSearchActions.ts +++ b/app/client/src/actions/globalSearchActions.ts @@ -1,8 +1,10 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { - filterCategories, +import type { RecentEntity, SearchCategory, +} from "components/editorComponents/GlobalSearch/utils"; +import { + filterCategories, SEARCH_CATEGORY_ID, } from "components/editorComponents/GlobalSearch/utils"; diff --git a/app/client/src/actions/importActions.ts b/app/client/src/actions/importActions.ts index 1731d24167..04c6f1f7cf 100644 --- a/app/client/src/actions/importActions.ts +++ b/app/client/src/actions/importActions.ts @@ -1,5 +1,5 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { curlImportFormValues } from "pages/Editor/APIEditor/helpers"; +import type { curlImportFormValues } from "pages/Editor/APIEditor/helpers"; export const submitCurlImportForm = (payload: curlImportFormValues) => { return { diff --git a/app/client/src/actions/initActions.ts b/app/client/src/actions/initActions.ts index 6e2691d733..53e6dbf450 100644 --- a/app/client/src/actions/initActions.ts +++ b/app/client/src/actions/initActions.ts @@ -1,8 +1,6 @@ -import { APP_MODE } from "entities/App"; -import { - ReduxActionTypes, - ReduxAction, -} from "@appsmith/constants/ReduxActionConstants"; +import type { APP_MODE } from "entities/App"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; export type InitializeEditorPayload = { applicationId?: string; diff --git a/app/client/src/actions/jsActionActions.ts b/app/client/src/actions/jsActionActions.ts index 640495f6a7..598cbd1194 100644 --- a/app/client/src/actions/jsActionActions.ts +++ b/app/client/src/actions/jsActionActions.ts @@ -1,12 +1,14 @@ -import { - ReduxActionTypes, +import type { ReduxAction, EvaluationReduxAction, +} from "@appsmith/constants/ReduxActionConstants"; +import { + ReduxActionTypes, ReduxActionErrorTypes, } from "@appsmith/constants/ReduxActionConstants"; -import { JSCollection } from "entities/JSCollection"; -import { CreateJSCollectionRequest } from "api/JSActionAPI"; -import { EventLocation } from "utils/AnalyticsUtil"; +import type { JSCollection } from "entities/JSCollection"; +import type { CreateJSCollectionRequest } from "api/JSActionAPI"; +import type { EventLocation } from "utils/AnalyticsUtil"; export type FetchJSCollectionsPayload = { applicationId: string; diff --git a/app/client/src/actions/jsPaneActions.ts b/app/client/src/actions/jsPaneActions.ts index 38df0d3479..eb3d00ce14 100644 --- a/app/client/src/actions/jsPaneActions.ts +++ b/app/client/src/actions/jsPaneActions.ts @@ -1,10 +1,11 @@ -import { - ReduxAction, - ReduxActionTypes, -} from "@appsmith/constants/ReduxActionConstants"; -import { JSCollection, JSAction } from "entities/JSCollection"; -import { RefactorAction, SetFunctionPropertyPayload } from "api/JSActionAPI"; -import { EventLocation } from "utils/AnalyticsUtil"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { JSCollection, JSAction } from "entities/JSCollection"; +import type { + RefactorAction, + SetFunctionPropertyPayload, +} from "api/JSActionAPI"; +import type { EventLocation } from "utils/AnalyticsUtil"; export const createNewJSCollection = ( pageId: string, diff --git a/app/client/src/actions/lintingActions.ts b/app/client/src/actions/lintingActions.ts index e48ce857a3..654b59ee38 100644 --- a/app/client/src/actions/lintingActions.ts +++ b/app/client/src/actions/lintingActions.ts @@ -1,8 +1,6 @@ -import { - ReduxAction, - ReduxActionTypes, -} from "@appsmith/constants/ReduxActionConstants"; -import { LintErrors } from "reducers/lintingReducers/lintErrorsReducers"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { LintErrors } from "reducers/lintingReducers/lintErrorsReducers"; export type SetLintErrorsAction = ReduxAction<{ errors: LintErrors }>; export const setLintingErrors = ( diff --git a/app/client/src/actions/metaActions.ts b/app/client/src/actions/metaActions.ts index d604518e19..0268c0053b 100644 --- a/app/client/src/actions/metaActions.ts +++ b/app/client/src/actions/metaActions.ts @@ -1,10 +1,9 @@ -import { - ReduxActionTypes, - ReduxAction, -} from "@appsmith/constants/ReduxActionConstants"; -import { BatchAction, batchAction } from "actions/batchActions"; -import { EvalMetaUpdates } from "@appsmith/workers/common/DataTreeEvaluator/types"; -import { DataTreeWidget } from "../entities/DataTree/dataTreeFactory"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { BatchAction } from "actions/batchActions"; +import { batchAction } from "actions/batchActions"; +import type { EvalMetaUpdates } from "@appsmith/workers/common/DataTreeEvaluator/types"; +import type { DataTreeWidget } from "../entities/DataTree/dataTreeFactory"; export interface UpdateWidgetMetaPropertyPayload { widgetId: string; diff --git a/app/client/src/actions/metaWidgetActions.ts b/app/client/src/actions/metaWidgetActions.ts index 75f99c74fb..6c8b2a27a2 100644 --- a/app/client/src/actions/metaWidgetActions.ts +++ b/app/client/src/actions/metaWidgetActions.ts @@ -1,8 +1,6 @@ -import { - ReduxAction, - ReduxActionTypes, -} from "@appsmith/constants/ReduxActionConstants"; -import { +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { DeleteMetaWidgetsPayload, ModifyMetaWidgetPayload, UpdateMetaWidgetPropertyPayload, diff --git a/app/client/src/actions/multiPaneActions.ts b/app/client/src/actions/multiPaneActions.ts index 4ee35eb74e..03ded0f8da 100644 --- a/app/client/src/actions/multiPaneActions.ts +++ b/app/client/src/actions/multiPaneActions.ts @@ -1,5 +1,5 @@ import { ReduxActionTypes } from "ce/constants/ReduxActionConstants"; -import { PaneLayoutOptions } from "reducers/uiReducers/multiPaneReducer"; +import type { PaneLayoutOptions } from "reducers/uiReducers/multiPaneReducer"; export const setTabsPaneWidth = (width: number) => { return { diff --git a/app/client/src/actions/onboardingActions.ts b/app/client/src/actions/onboardingActions.ts index 2fa4d271f0..2106d81e6b 100644 --- a/app/client/src/actions/onboardingActions.ts +++ b/app/client/src/actions/onboardingActions.ts @@ -1,7 +1,7 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { GUIDED_TOUR_STEPS } from "pages/Editor/GuidedTour/constants"; -import { GuidedTourState } from "reducers/uiReducers/guidedTourReducer"; -import { WidgetProps } from "widgets/BaseWidget"; +import type { GUIDED_TOUR_STEPS } from "pages/Editor/GuidedTour/constants"; +import type { GuidedTourState } from "reducers/uiReducers/guidedTourReducer"; +import type { WidgetProps } from "widgets/BaseWidget"; export const enableGuidedTour = (payload: boolean) => { return { diff --git a/app/client/src/actions/pageActions.tsx b/app/client/src/actions/pageActions.tsx index 02e32be345..da1c0b78fe 100644 --- a/app/client/src/actions/pageActions.tsx +++ b/app/client/src/actions/pageActions.tsx @@ -1,30 +1,32 @@ -import { WidgetType } from "constants/WidgetConstants"; -import { +import type { WidgetType } from "constants/WidgetConstants"; +import type { EvaluationReduxAction, ReduxAction, - ReduxActionTypes, UpdateCanvasPayload, + AnyReduxAction, +} from "@appsmith/constants/ReduxActionConstants"; +import { + ReduxActionTypes, ReduxActionErrorTypes, WidgetReduxActionTypes, ReplayReduxActionTypes, - AnyReduxAction, } from "@appsmith/constants/ReduxActionConstants"; -import { DynamicPath } from "utils/DynamicBindingUtils"; +import type { DynamicPath } from "utils/DynamicBindingUtils"; import AnalyticsUtil from "utils/AnalyticsUtil"; -import { WidgetOperation } from "widgets/BaseWidget"; -import { +import type { WidgetOperation } from "widgets/BaseWidget"; +import type { FetchPageRequest, PageLayout, SavePageResponse, UpdatePageRequest, UpdatePageResponse, } from "api/PageApi"; -import { UrlDataState } from "reducers/entityReducers/appReducer"; -import { APP_MODE } from "entities/App"; -import { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer"; -import { GenerateTemplatePageRequest } from "api/PageApi"; -import { ENTITY_TYPE } from "entities/AppsmithConsole"; -import { Replayable } from "entities/Replay/ReplayEntity/ReplayEditor"; +import type { UrlDataState } from "reducers/entityReducers/appReducer"; +import type { APP_MODE } from "entities/App"; +import type { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer"; +import type { GenerateTemplatePageRequest } from "api/PageApi"; +import type { ENTITY_TYPE } from "entities/AppsmithConsole"; +import type { Replayable } from "entities/Replay/ReplayEntity/ReplayEditor"; export interface FetchPageListPayload { applicationId: string; @@ -82,10 +84,11 @@ export const fetchPageSuccess = (): EvaluationReduxAction => { }; }; -export const fetchPublishedPageSuccess = (): EvaluationReduxAction => ({ - type: ReduxActionTypes.FETCH_PUBLISHED_PAGE_SUCCESS, - payload: undefined, -}); +export const fetchPublishedPageSuccess = + (): EvaluationReduxAction => ({ + type: ReduxActionTypes.FETCH_PUBLISHED_PAGE_SUCCESS, + payload: undefined, + }); /** * After all page entities are fetched like DSL, actions and JsObjects, diff --git a/app/client/src/actions/pluginActionActions.ts b/app/client/src/actions/pluginActionActions.ts index 18484f36a7..bbf9164f53 100644 --- a/app/client/src/actions/pluginActionActions.ts +++ b/app/client/src/actions/pluginActionActions.ts @@ -1,16 +1,18 @@ -import { ActionResponse, PaginationField } from "api/ActionAPI"; -import { +import type { ActionResponse, PaginationField } from "api/ActionAPI"; +import type { EvaluationReduxAction, AnyReduxAction, ReduxAction, - ReduxActionErrorTypes, - ReduxActionTypes, ReduxActionWithoutPayload, } from "@appsmith/constants/ReduxActionConstants"; -import { Action } from "entities/Action"; +import { + ReduxActionErrorTypes, + ReduxActionTypes, +} from "@appsmith/constants/ReduxActionConstants"; +import type { Action } from "entities/Action"; import { batchAction } from "actions/batchActions"; -import { ExecuteErrorPayload } from "constants/AppsmithActionConstants/ActionConstants"; -import { ModalInfo } from "reducers/uiReducers/modalActionReducer"; +import type { ExecuteErrorPayload } from "constants/AppsmithActionConstants/ActionConstants"; +import type { ModalInfo } from "reducers/uiReducers/modalActionReducer"; export const createActionRequest = (payload: Partial) => { return { diff --git a/app/client/src/actions/pluginActions.ts b/app/client/src/actions/pluginActions.ts index 853871973d..1c0b2a574e 100644 --- a/app/client/src/actions/pluginActions.ts +++ b/app/client/src/actions/pluginActions.ts @@ -1,11 +1,13 @@ -import { +import type { ReduxAction, - ReduxActionTypes, - ReduxActionErrorTypes, ReduxActionWithoutPayload, } from "@appsmith/constants/ReduxActionConstants"; -import { PluginFormPayload } from "api/PluginApi"; -import { DependencyMap } from "utils/DynamicBindingUtils"; +import { + ReduxActionTypes, + ReduxActionErrorTypes, +} from "@appsmith/constants/ReduxActionConstants"; +import type { PluginFormPayload } from "api/PluginApi"; +import type { DependencyMap } from "utils/DynamicBindingUtils"; export const fetchPlugins = (payload?: { workspaceId?: string; diff --git a/app/client/src/actions/propertyPaneActions.ts b/app/client/src/actions/propertyPaneActions.ts index 505ffc6070..3e7bffa3fe 100644 --- a/app/client/src/actions/propertyPaneActions.ts +++ b/app/client/src/actions/propertyPaneActions.ts @@ -1,5 +1,5 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { SelectedPropertyPanel } from "reducers/uiReducers/propertyPaneReducer"; +import type { SelectedPropertyPanel } from "reducers/uiReducers/propertyPaneReducer"; export const updateWidgetName = (widgetId: string, newName: string) => { return { diff --git a/app/client/src/actions/providerActions.ts b/app/client/src/actions/providerActions.ts index 12385d4011..3cf27844d1 100644 --- a/app/client/src/actions/providerActions.ts +++ b/app/client/src/actions/providerActions.ts @@ -1,6 +1,6 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { +import type { AddApiToPageRequest, FetchProviderWithCategoryRequest, SearchApiOrProviderRequest, diff --git a/app/client/src/actions/queryPaneActions.ts b/app/client/src/actions/queryPaneActions.ts index 448c3344b4..2062103701 100644 --- a/app/client/src/actions/queryPaneActions.ts +++ b/app/client/src/actions/queryPaneActions.ts @@ -1,8 +1,6 @@ -import { - ReduxActionTypes, - ReduxAction, -} from "@appsmith/constants/ReduxActionConstants"; -import { Action } from "entities/Action"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { Action } from "entities/Action"; export const changeQuery = ( id: string, diff --git a/app/client/src/actions/reflowActions.ts b/app/client/src/actions/reflowActions.ts index 141c43ee8f..6e644ee681 100644 --- a/app/client/src/actions/reflowActions.ts +++ b/app/client/src/actions/reflowActions.ts @@ -1,8 +1,6 @@ -import { - ReduxAction, - ReflowReduxActionTypes, -} from "@appsmith/constants/ReduxActionConstants"; -import { ReflowedSpaceMap } from "reflow/reflowTypes"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReflowReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { ReflowedSpaceMap } from "reflow/reflowTypes"; export const reflowMoveAction = ( payload: ReflowedSpaceMap, diff --git a/app/client/src/actions/themeActions.ts b/app/client/src/actions/themeActions.ts index 0c7621f57a..a8d5a50185 100644 --- a/app/client/src/actions/themeActions.ts +++ b/app/client/src/actions/themeActions.ts @@ -1,5 +1,5 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { ThemeMode } from "selectors/themeSelectors"; +import type { ThemeMode } from "selectors/themeSelectors"; export const setThemeMode = (mode: ThemeMode) => ({ type: ReduxActionTypes.SET_THEME, diff --git a/app/client/src/actions/tourActions.ts b/app/client/src/actions/tourActions.ts index 93fec32d1d..3254227918 100644 --- a/app/client/src/actions/tourActions.ts +++ b/app/client/src/actions/tourActions.ts @@ -1,5 +1,5 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { TourType } from "entities/Tour"; +import type { TourType } from "entities/Tour"; export const setActiveTour = (tourType: TourType) => ({ type: ReduxActionTypes.SET_ACTIVE_TOUR, diff --git a/app/client/src/actions/userActions.ts b/app/client/src/actions/userActions.ts index 448f5e8f42..53222d73f4 100644 --- a/app/client/src/actions/userActions.ts +++ b/app/client/src/actions/userActions.ts @@ -3,12 +3,12 @@ import { ReduxActionTypes, } from "@appsmith/constants/ReduxActionConstants"; import { CurrentUserDetailsRequestPayload } from "constants/userConstants"; -import { +import type { TokenPasswordUpdateRequest, UpdateUserRequest, VerifyTokenRequest, } from "@appsmith/api/UserApi"; -import FeatureFlags from "entities/FeatureFlags"; +import type FeatureFlags from "entities/FeatureFlags"; export const logoutUser = (payload?: { redirectURL: string }) => ({ type: ReduxActionTypes.LOGOUT_USER_INIT, diff --git a/app/client/src/actions/widgetActions.tsx b/app/client/src/actions/widgetActions.tsx index 0f4b2d9afa..736a0800cc 100644 --- a/app/client/src/actions/widgetActions.tsx +++ b/app/client/src/actions/widgetActions.tsx @@ -1,15 +1,16 @@ +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; import { ReduxActionTypes, - ReduxAction, WidgetReduxActionTypes, } from "@appsmith/constants/ReduxActionConstants"; -import { ExecuteTriggerPayload } from "constants/AppsmithActionConstants/ActionConstants"; -import { BatchAction, batchAction } from "actions/batchActions"; +import type { ExecuteTriggerPayload } from "constants/AppsmithActionConstants/ActionConstants"; +import type { BatchAction } from "actions/batchActions"; +import { batchAction } from "actions/batchActions"; import PerformanceTracker, { PerformanceTransactionName, } from "utils/PerformanceTracker"; -import { WidgetProps } from "widgets/BaseWidget"; -import { UpdateWidgetsPayload } from "reducers/entityReducers/canvasWidgetsReducer"; +import type { WidgetProps } from "widgets/BaseWidget"; +import type { UpdateWidgetsPayload } from "reducers/entityReducers/canvasWidgetsReducer"; export const executeTrigger = ( payload: ExecuteTriggerPayload, diff --git a/app/client/src/actions/widgetSelectionActions.ts b/app/client/src/actions/widgetSelectionActions.ts index 3e116f3621..6fe45afecd 100644 --- a/app/client/src/actions/widgetSelectionActions.ts +++ b/app/client/src/actions/widgetSelectionActions.ts @@ -1,9 +1,7 @@ -import { - ReduxActionTypes, - ReduxAction, -} from "@appsmith/constants/ReduxActionConstants"; -import { SelectionRequestType } from "sagas/WidgetSelectUtils"; -import { NavigationMethod } from "utils/history"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { SelectionRequestType } from "sagas/WidgetSelectUtils"; +import type { NavigationMethod } from "utils/history"; export type WidgetSelectionRequestPayload = { selectionRequestType: SelectionRequestType; diff --git a/app/client/src/actions/widgetSidebarActions.tsx b/app/client/src/actions/widgetSidebarActions.tsx index 60d2319fb2..00c67467fc 100644 --- a/app/client/src/actions/widgetSidebarActions.tsx +++ b/app/client/src/actions/widgetSidebarActions.tsx @@ -2,7 +2,7 @@ import { ReduxActionTypes, ReduxActionErrorTypes, } from "@appsmith/constants/ReduxActionConstants"; -import { WidgetCardProps } from "widgets/BaseWidget"; +import type { WidgetCardProps } from "widgets/BaseWidget"; export const fetchWidgetCards = () => { return { diff --git a/app/client/src/api/ActionAPI.tsx b/app/client/src/api/ActionAPI.tsx index e7319c7e2a..09fc877caf 100644 --- a/app/client/src/api/ActionAPI.tsx +++ b/app/client/src/api/ActionAPI.tsx @@ -1,10 +1,12 @@ -import API, { HttpMethod } from "api/Api"; -import { ApiResponse } from "./ApiResponses"; +import type { HttpMethod } from "api/Api"; +import API from "api/Api"; +import type { ApiResponse } from "./ApiResponses"; import { DEFAULT_EXECUTE_ACTION_TIMEOUT_MS } from "@appsmith/constants/ApiConstants"; -import axios, { AxiosPromise, CancelTokenSource } from "axios"; -import { Action, ActionViewMode } from "entities/Action"; -import { APIRequest } from "constants/AppsmithActionConstants/ActionConstants"; -import { WidgetType } from "constants/WidgetConstants"; +import type { AxiosPromise, CancelTokenSource } from "axios"; +import axios from "axios"; +import type { Action, ActionViewMode } from "entities/Action"; +import type { APIRequest } from "constants/AppsmithActionConstants/ActionConstants"; +import type { WidgetType } from "constants/WidgetConstants"; export interface CreateActionRequest extends APIRequest { datasourceId: string; diff --git a/app/client/src/api/Api.ts b/app/client/src/api/Api.ts index 3159b26fc6..913e1abbf9 100644 --- a/app/client/src/api/Api.ts +++ b/app/client/src/api/Api.ts @@ -1,4 +1,5 @@ -import axios, { AxiosInstance, AxiosRequestConfig } from "axios"; +import type { AxiosInstance, AxiosRequestConfig } from "axios"; +import axios from "axios"; import { REQUEST_TIMEOUT_MS } from "@appsmith/constants/ApiConstants"; import { convertObjectToQueryParams } from "utils/URLUtils"; import { diff --git a/app/client/src/api/ApiUtils.test.ts b/app/client/src/api/ApiUtils.test.ts index 247dfdde42..3fe3b5cd4e 100644 --- a/app/client/src/api/ApiUtils.test.ts +++ b/app/client/src/api/ApiUtils.test.ts @@ -4,8 +4,8 @@ import { apiFailureResponseInterceptor, axiosConnectionAbortedCode, } from "./ApiUtils"; -import { AxiosRequestConfig, AxiosResponse } from "axios"; -import { ActionExecutionResponse } from "api/ActionAPI"; +import type { AxiosRequestConfig, AxiosResponse } from "axios"; +import type { ActionExecutionResponse } from "api/ActionAPI"; import { createMessage, ERROR_0, @@ -41,9 +41,8 @@ describe("axios api interceptors", () => { }, }; - const interceptedResponse: ActionExecutionResponse = apiSuccessResponseInterceptor( - response, - ); + const interceptedResponse: ActionExecutionResponse = + apiSuccessResponseInterceptor(response); expect(interceptedResponse).toHaveProperty("clientMeta"); expect(interceptedResponse.clientMeta).toHaveProperty("size"); @@ -64,9 +63,8 @@ describe("axios api interceptors", () => { }, }; - const interceptedResponse: ActionExecutionResponse = apiSuccessResponseInterceptor( - response, - ); + const interceptedResponse: ActionExecutionResponse = + apiSuccessResponseInterceptor(response); expect(interceptedResponse).toBe("Test data"); }); }); diff --git a/app/client/src/api/ApiUtils.ts b/app/client/src/api/ApiUtils.ts index 488f28667f..12c3724bb1 100644 --- a/app/client/src/api/ApiUtils.ts +++ b/app/client/src/api/ApiUtils.ts @@ -4,14 +4,15 @@ import { ERROR_500, SERVER_API_TIMEOUT_ERROR, } from "@appsmith/constants/messages"; -import axios, { AxiosRequestConfig, AxiosResponse } from "axios"; +import type { AxiosRequestConfig, AxiosResponse } from "axios"; +import axios from "axios"; import { API_STATUS_CODES, ERROR_CODES, SERVER_ERROR_CODES, } from "@appsmith/constants/ApiConstants"; import log from "loglevel"; -import { ActionExecutionResponse } from "api/ActionAPI"; +import type { ActionExecutionResponse } from "api/ActionAPI"; import store from "store"; import { logoutUser } from "actions/userActions"; import { AUTH_LOGIN_URL } from "constants/routes"; diff --git a/app/client/src/api/AppThemingApi.tsx b/app/client/src/api/AppThemingApi.tsx index f11ef01fc1..4d30912843 100644 --- a/app/client/src/api/AppThemingApi.tsx +++ b/app/client/src/api/AppThemingApi.tsx @@ -1,7 +1,7 @@ import API from "api/Api"; -import { AxiosPromise } from "axios"; -import { AppTheme } from "entities/AppTheming"; -import { ApiResponse } from "./ApiResponses"; +import type { AxiosPromise } from "axios"; +import type { AppTheme } from "entities/AppTheming"; +import type { ApiResponse } from "./ApiResponses"; class AppThemingApi extends API { static baseUrl = "/v1"; diff --git a/app/client/src/api/ApplicationApi.tsx b/app/client/src/api/ApplicationApi.tsx index 11fe04daab..a378a71f7f 100644 --- a/app/client/src/api/ApplicationApi.tsx +++ b/app/client/src/api/ApplicationApi.tsx @@ -1,12 +1,12 @@ import Api from "api/Api"; -import { ApiResponse } from "./ApiResponses"; -import { AxiosPromise } from "axios"; -import { AppColorCode } from "constants/DefaultTheme"; -import { AppIconName } from "design-system-old"; -import { AppLayoutConfig } from "reducers/entityReducers/pageListReducer"; -import { APP_MODE } from "entities/App"; -import { ApplicationVersion } from "actions/applicationActions"; -import { Datasource } from "entities/Datasource"; +import type { ApiResponse } from "./ApiResponses"; +import type { AxiosPromise } from "axios"; +import type { AppColorCode } from "constants/DefaultTheme"; +import type { AppIconName } from "design-system-old"; +import type { AppLayoutConfig } from "reducers/entityReducers/pageListReducer"; +import type { APP_MODE } from "entities/App"; +import type { ApplicationVersion } from "actions/applicationActions"; +import type { Datasource } from "entities/Datasource"; export type EvaluationVersion = number; @@ -69,9 +69,8 @@ export interface FetchApplicationResponseData { workspaceId: string; } -export type FetchApplicationResponse = ApiResponse< - FetchApplicationResponseData ->; +export type FetchApplicationResponse = + ApiResponse; export type FetchApplicationsResponse = ApiResponse< FetchApplicationResponseData[] diff --git a/app/client/src/api/CollectionApi.ts b/app/client/src/api/CollectionApi.ts index d765852669..3998d7c08f 100644 --- a/app/client/src/api/CollectionApi.ts +++ b/app/client/src/api/CollectionApi.ts @@ -1,6 +1,6 @@ -import { AxiosPromise } from "axios"; +import type { AxiosPromise } from "axios"; import Api from "api/Api"; -import { ImportedCollections } from "constants/collectionsConstants"; +import type { ImportedCollections } from "constants/collectionsConstants"; class ImportedCollectionsApi extends Api { static importedCollectionsURL = "v1/import/templateCollections"; diff --git a/app/client/src/api/DatasourcesApi.ts b/app/client/src/api/DatasourcesApi.ts index 459d675660..783b8f7f5c 100644 --- a/app/client/src/api/DatasourcesApi.ts +++ b/app/client/src/api/DatasourcesApi.ts @@ -1,9 +1,9 @@ import { DEFAULT_TEST_DATA_SOURCE_TIMEOUT_MS } from "@appsmith/constants/ApiConstants"; import API from "api/Api"; -import { ApiResponse } from "./ApiResponses"; -import { AxiosPromise } from "axios"; +import type { ApiResponse } from "./ApiResponses"; +import type { AxiosPromise } from "axios"; -import { DatasourceAuthentication, Datasource } from "entities/Datasource"; +import type { DatasourceAuthentication, Datasource } from "entities/Datasource"; export interface CreateDatasourceConfig { name: string; pluginId: string; diff --git a/app/client/src/api/GitSyncAPI.tsx b/app/client/src/api/GitSyncAPI.tsx index 243c145334..add67c7681 100644 --- a/app/client/src/api/GitSyncAPI.tsx +++ b/app/client/src/api/GitSyncAPI.tsx @@ -1,7 +1,7 @@ -import { AxiosPromise } from "axios"; +import type { AxiosPromise } from "axios"; import Api from "api/Api"; -import { ApiResponse } from "./ApiResponses"; -import { GitConfig } from "entities/GitSync"; +import type { ApiResponse } from "./ApiResponses"; +import type { GitConfig } from "entities/GitSync"; import ApplicationApi from "./ApplicationApi"; export type CommitPayload = { diff --git a/app/client/src/api/ImportApi.ts b/app/client/src/api/ImportApi.ts index c724ce6653..c7b292048f 100644 --- a/app/client/src/api/ImportApi.ts +++ b/app/client/src/api/ImportApi.ts @@ -1,6 +1,6 @@ -import { AxiosPromise } from "axios"; +import type { AxiosPromise } from "axios"; import Api from "api/Api"; -import { ApiResponse } from "./ApiResponses"; +import type { ApiResponse } from "./ApiResponses"; export interface CurlImportRequest { type: string; diff --git a/app/client/src/api/JSActionAPI.tsx b/app/client/src/api/JSActionAPI.tsx index 3a3643b50c..ca844e4995 100644 --- a/app/client/src/api/JSActionAPI.tsx +++ b/app/client/src/api/JSActionAPI.tsx @@ -1,9 +1,9 @@ import API from "api/Api"; -import { AxiosPromise } from "axios"; -import { JSCollection } from "entities/JSCollection"; -import { ApiResponse } from "./ApiResponses"; -import { Variable, JSAction } from "entities/JSCollection"; -import { PluginType } from "entities/Action"; +import type { AxiosPromise } from "axios"; +import type { JSCollection } from "entities/JSCollection"; +import type { ApiResponse } from "./ApiResponses"; +import type { Variable, JSAction } from "entities/JSCollection"; +import type { PluginType } from "entities/Action"; export type JSCollectionCreateUpdateResponse = ApiResponse & { id: string; diff --git a/app/client/src/api/LibraryAPI.tsx b/app/client/src/api/LibraryAPI.tsx index c1cdc38edc..8348a6d664 100644 --- a/app/client/src/api/LibraryAPI.tsx +++ b/app/client/src/api/LibraryAPI.tsx @@ -1,5 +1,5 @@ import { APP_MODE } from "entities/App"; -import { TJSLibrary } from "workers/common/JSLibrary"; +import type { TJSLibrary } from "workers/common/JSLibrary"; import Api from "./Api"; export default class LibraryApi extends Api { diff --git a/app/client/src/api/OAuthApi.ts b/app/client/src/api/OAuthApi.ts index 94098f5d79..483a052e7a 100644 --- a/app/client/src/api/OAuthApi.ts +++ b/app/client/src/api/OAuthApi.ts @@ -1,7 +1,7 @@ import Api from "./Api"; -import { AxiosPromise } from "axios"; -import { ApiResponse } from "api/ApiResponses"; -import { Datasource } from "entities/Datasource"; +import type { AxiosPromise } from "axios"; +import type { ApiResponse } from "api/ApiResponses"; +import type { Datasource } from "entities/Datasource"; class OAuthApi extends Api { static url = "v1/saas"; diff --git a/app/client/src/api/PageApi.tsx b/app/client/src/api/PageApi.tsx index c5b3f346b4..822b1aed32 100644 --- a/app/client/src/api/PageApi.tsx +++ b/app/client/src/api/PageApi.tsx @@ -1,16 +1,17 @@ import Api from "api/Api"; -import { ApiResponse } from "./ApiResponses"; -import axios, { AxiosPromise, CancelTokenSource } from "axios"; -import { +import type { ApiResponse } from "./ApiResponses"; +import type { AxiosPromise, CancelTokenSource } from "axios"; +import axios from "axios"; +import type { LayoutOnLoadActionErrors, PageAction, } from "constants/AppsmithActionConstants/ActionConstants"; -import { DSLWidget } from "widgets/constants"; -import { +import type { DSLWidget } from "widgets/constants"; +import type { ClonePageActionPayload, CreatePageActionPayload, } from "actions/pageActions"; -import { FetchApplicationResponse } from "./ApplicationApi"; +import type { FetchApplicationResponse } from "./ApplicationApi"; export type FetchPageRequest = { id: string; @@ -149,15 +150,13 @@ export type FetchPageListResponse = ApiResponse; export type UpdateWidgetNameResponse = ApiResponse; -export type GenerateTemplatePageRequestResponse = ApiResponse< - GenerateTemplatePageResponseData ->; +export type GenerateTemplatePageRequestResponse = + ApiResponse; export type FetchPageResponse = ApiResponse; -export type FetchPublishedPageResponse = ApiResponse< - FetchPublishedPageResponseData ->; +export type FetchPublishedPageResponse = + ApiResponse; class PageApi extends Api { static url = "v1/pages"; diff --git a/app/client/src/api/PluginApi.ts b/app/client/src/api/PluginApi.ts index cd2a33e0b3..e7e40bd513 100644 --- a/app/client/src/api/PluginApi.ts +++ b/app/client/src/api/PluginApi.ts @@ -1,8 +1,8 @@ import Api from "api/Api"; -import { AxiosPromise } from "axios"; -import { ApiResponse } from "api/ApiResponses"; -import { PluginPackageName, PluginType } from "entities/Action"; -import { DependencyMap } from "utils/DynamicBindingUtils"; +import type { AxiosPromise } from "axios"; +import type { ApiResponse } from "api/ApiResponses"; +import type { PluginPackageName, PluginType } from "entities/Action"; +import type { DependencyMap } from "utils/DynamicBindingUtils"; export type PluginId = string; export type GenerateCRUDEnabledPluginMap = Record; diff --git a/app/client/src/api/ProvidersApi.ts b/app/client/src/api/ProvidersApi.ts index 9614253638..7d69460f94 100644 --- a/app/client/src/api/ProvidersApi.ts +++ b/app/client/src/api/ProvidersApi.ts @@ -1,7 +1,7 @@ -import { AxiosPromise } from "axios"; +import type { AxiosPromise } from "axios"; import Api from "api/Api"; -import { ApiResponse } from "./ApiResponses"; -import { +import type { ApiResponse } from "./ApiResponses"; +import type { Providers, ProviderTemplates, SearchResultsProviders, @@ -90,9 +90,7 @@ export class ProvidersApi extends Api { return Api.post(ProvidersApi.addApiToPageURL, request); } - static fetchProvidersCategories(): AxiosPromise< - FetchProviderCategoriesResponse - > { + static fetchProvidersCategories(): AxiosPromise { return Api.get(ProvidersApi.providerCategoriesURL); } diff --git a/app/client/src/api/ReleasesAPI.tsx b/app/client/src/api/ReleasesAPI.tsx index e120344560..4d34027f48 100644 --- a/app/client/src/api/ReleasesAPI.tsx +++ b/app/client/src/api/ReleasesAPI.tsx @@ -1,6 +1,6 @@ -import { AxiosPromise } from "axios"; +import type { AxiosPromise } from "axios"; import Api from "api/Api"; -import { ApiResponse } from "./ApiResponses"; +import type { ApiResponse } from "./ApiResponses"; class ReleasesAPI extends Api { static markAsReadURL = `v1/users/setReleaseNotesViewed`; diff --git a/app/client/src/api/SaasApi.ts b/app/client/src/api/SaasApi.ts index 8fd181a936..6078108525 100644 --- a/app/client/src/api/SaasApi.ts +++ b/app/client/src/api/SaasApi.ts @@ -1,7 +1,7 @@ import Api from "./Api"; -import { AxiosPromise } from "axios"; -import { ApiResponse } from "api/ApiResponses"; -import { Datasource } from "entities/Datasource"; +import type { AxiosPromise } from "axios"; +import type { ApiResponse } from "api/ApiResponses"; +import type { Datasource } from "entities/Datasource"; class SaasApi extends Api { static url = "v1/saas"; diff --git a/app/client/src/api/TemplatesApi.ts b/app/client/src/api/TemplatesApi.ts index c90c19e35a..cc905f05cf 100644 --- a/app/client/src/api/TemplatesApi.ts +++ b/app/client/src/api/TemplatesApi.ts @@ -1,12 +1,12 @@ -import { AxiosPromise } from "axios"; +import type { AxiosPromise } from "axios"; import Api from "api/Api"; -import { ApiResponse } from "./ApiResponses"; -import { WidgetType } from "constants/WidgetConstants"; -import { +import type { ApiResponse } from "./ApiResponses"; +import type { WidgetType } from "constants/WidgetConstants"; +import type { ApplicationResponsePayload, ApplicationPagePayload, } from "./ApplicationApi"; -import { Datasource } from "entities/Datasource"; +import type { Datasource } from "entities/Datasource"; export interface Template { id: string; diff --git a/app/client/src/api/WidgetConfigsApi.tsx b/app/client/src/api/WidgetConfigsApi.tsx index 6ed89e7938..08fca30338 100644 --- a/app/client/src/api/WidgetConfigsApi.tsx +++ b/app/client/src/api/WidgetConfigsApi.tsx @@ -1,8 +1,8 @@ import Api from "api/Api"; -import { WidgetType } from "constants/WidgetConstants"; -import { WidgetProps } from "widgets/BaseWidget"; -import { WidgetConfigProps } from "reducers/entityReducers/widgetConfigReducer"; -import { AxiosPromise } from "axios"; +import type { WidgetType } from "constants/WidgetConstants"; +import type { WidgetProps } from "widgets/BaseWidget"; +import type { WidgetConfigProps } from "reducers/entityReducers/widgetConfigReducer"; +import type { AxiosPromise } from "axios"; export interface WidgetConfigsResponse { config: Record & WidgetConfigProps>; diff --git a/app/client/src/api/WidgetSidebarApi.tsx b/app/client/src/api/WidgetSidebarApi.tsx index 58a58a2f76..256d1db679 100644 --- a/app/client/src/api/WidgetSidebarApi.tsx +++ b/app/client/src/api/WidgetSidebarApi.tsx @@ -1,6 +1,6 @@ import Api from "api/Api"; -import { WidgetCardProps } from "widgets/BaseWidget"; -import { AxiosPromise } from "axios"; +import type { WidgetCardProps } from "widgets/BaseWidget"; +import type { AxiosPromise } from "axios"; export interface WidgetSidebarResponse { cards: { [id: string]: WidgetCardProps[] }; diff --git a/app/client/src/assets/styles/index.css b/app/client/src/assets/styles/index.css index 2b7ff97012..b13971f8bd 100644 --- a/app/client/src/assets/styles/index.css +++ b/app/client/src/assets/styles/index.css @@ -1,15 +1,15 @@ -@import './tailwind.css'; +@import "./tailwind.css"; /** * --------------------------------------------------------------------------------------------------- * general * --------------------------------------------------------------------------------------------------- */ -body, html { +body, +html { @apply w-full h-full overflow-x-hidden; } - /** * --------------------------------------------------------------------------------------------------- * blueprint specific css overrides @@ -19,7 +19,6 @@ body, html { background: none; } - /** * --------------------------------------------------------------------------------------------------- * custom css @@ -28,7 +27,7 @@ body, html { * { scrollbar-width: thin; - scrollbar-color: rgba(209, 213, 219, var(--tw-bg-opacity)) white; + scrollbar-color: rgba(209, 213, 219, var(--tw-bg-opacity)) white; } ::-webkit-scrollbar { @@ -48,15 +47,13 @@ body, html { @apply bg-gray-300; } - .diagnol-cross { background: url("data:image/svg+xml;utf8,"); - background-repeat:no-repeat; - background-position:center center; + background-repeat: no-repeat; + background-position: center center; background-size: 100% 100%, auto; } - .hidden-scrollbar { -ms-overflow-style: none; /* for Internet Explorer, Edge */ scrollbar-width: none; /* for Firefox */ diff --git a/app/client/src/ce/AppRouter.tsx b/app/client/src/ce/AppRouter.tsx index 1edb1f252e..b417eef414 100644 --- a/app/client/src/ce/AppRouter.tsx +++ b/app/client/src/ce/AppRouter.tsx @@ -38,7 +38,7 @@ import ErrorPage from "pages/common/ErrorPage"; import PageNotFound from "pages/common/ErrorPages/PageNotFound"; import PageLoadingBar from "pages/common/PageLoadingBar"; import ErrorPageHeader from "pages/common/ErrorPageHeader"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import { connect, useSelector } from "react-redux"; import { polyfillCountryFlagEmojis } from "country-flag-emoji-polyfill"; @@ -53,10 +53,10 @@ import { import Setup from "pages/setup"; import Settings from "@appsmith/pages/AdminSettings"; import SignupSuccess from "pages/setup/SignupSuccess"; -import { ERROR_CODES } from "@appsmith/constants/ApiConstants"; +import type { ERROR_CODES } from "@appsmith/constants/ApiConstants"; import TemplatesListLoader from "pages/Templates/loader"; import { fetchFeatureFlagsInit } from "actions/userActions"; -import FeatureFlags from "entities/FeatureFlags"; +import type FeatureFlags from "entities/FeatureFlags"; import { getCurrentTenant } from "@appsmith/actions/tenantActions"; import { getDefaultAdminSettingsPath } from "@appsmith/utils/adminSettingsHelpers"; import { getCurrentUser as getCurrentUserSelector } from "selectors/usersSelectors"; diff --git a/app/client/src/ce/actions/workspaceActions.ts b/app/client/src/ce/actions/workspaceActions.ts index 08175e3a39..334c9c8339 100644 --- a/app/client/src/ce/actions/workspaceActions.ts +++ b/app/client/src/ce/actions/workspaceActions.ts @@ -1,5 +1,5 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { +import type { SaveWorkspaceLogo, SaveWorkspaceRequest, } from "@appsmith/api/WorkspaceApi"; diff --git a/app/client/src/ce/api/TenantApi.ts b/app/client/src/ce/api/TenantApi.ts index 8e31c42a89..8996390955 100644 --- a/app/client/src/ce/api/TenantApi.ts +++ b/app/client/src/ce/api/TenantApi.ts @@ -1,6 +1,6 @@ -import { AxiosPromise } from "axios"; +import type { AxiosPromise } from "axios"; import Api from "api/Api"; -import { ApiResponse } from "api/ApiResponses"; +import type { ApiResponse } from "api/ApiResponses"; export type FetchCurrentTenantConfigResponse = ApiResponse<{ userPermissions: string[]; @@ -11,9 +11,7 @@ export type FetchCurrentTenantConfigResponse = ApiResponse<{ export class TenantApi extends Api { static tenantsUrl = "v1/tenants"; - static fetchCurrentTenantConfig(): AxiosPromise< - FetchCurrentTenantConfigResponse - > { + static fetchCurrentTenantConfig(): AxiosPromise { return Api.get(TenantApi.tenantsUrl + "/current"); } } diff --git a/app/client/src/ce/api/UserApi.tsx b/app/client/src/ce/api/UserApi.tsx index b1090d0c89..ea73bd0f52 100644 --- a/app/client/src/ce/api/UserApi.tsx +++ b/app/client/src/ce/api/UserApi.tsx @@ -1,6 +1,6 @@ -import { AxiosPromise } from "axios"; +import type { AxiosPromise } from "axios"; import Api from "api/Api"; -import { ApiResponse } from "api/ApiResponses"; +import type { ApiResponse } from "api/ApiResponses"; export interface LoginUserRequest { email: string; @@ -154,9 +154,7 @@ export class UserApi extends Api { return Api.post(UserApi.logoutURL); } - static uploadPhoto(request: { - file: File; - }): AxiosPromise<{ + static uploadPhoto(request: { file: File }): AxiosPromise<{ id: string; new: boolean; profilePhotoAssetId: string; diff --git a/app/client/src/ce/api/WorkspaceApi.ts b/app/client/src/ce/api/WorkspaceApi.ts index 7807e413c9..6fd1562a5c 100644 --- a/app/client/src/ce/api/WorkspaceApi.ts +++ b/app/client/src/ce/api/WorkspaceApi.ts @@ -1,7 +1,7 @@ -import { AxiosPromise } from "axios"; +import type { AxiosPromise } from "axios"; import Api from "api/Api"; -import { ApiResponse } from "api/ApiResponses"; -import { +import type { ApiResponse } from "api/ApiResponses"; +import type { WorkspaceRole, Workspace, } from "@appsmith/constants/workspaceConstants"; diff --git a/app/client/src/ce/configs/index.ts b/app/client/src/ce/configs/index.ts index 1f5a1b66ff..a58f47df12 100644 --- a/app/client/src/ce/configs/index.ts +++ b/app/client/src/ce/configs/index.ts @@ -1,4 +1,4 @@ -import { AppsmithUIConfigs } from "./types"; +import type { AppsmithUIConfigs } from "./types"; import { Integrations } from "@sentry/tracing"; import * as Sentry from "@sentry/react"; import { createBrowserHistory } from "history"; diff --git a/app/client/src/ce/configs/types.ts b/app/client/src/ce/configs/types.ts index a171176387..eef9b7423b 100644 --- a/app/client/src/ce/configs/types.ts +++ b/app/client/src/ce/configs/types.ts @@ -1,4 +1,4 @@ -import { LogLevelDesc } from "loglevel"; +import type { LogLevelDesc } from "loglevel"; export type SentryConfig = { dsn: string; diff --git a/app/client/src/ce/constants/ReduxActionConstants.tsx b/app/client/src/ce/constants/ReduxActionConstants.tsx index bb4625edcb..939c5ebca2 100644 --- a/app/client/src/ce/constants/ReduxActionConstants.tsx +++ b/app/client/src/ce/constants/ReduxActionConstants.tsx @@ -1,17 +1,17 @@ -import { ERROR_CODES } from "@appsmith/constants/ApiConstants"; -import { Workspace } from "@appsmith/constants/workspaceConstants"; -import { ApplicationVersion } from "actions/applicationActions"; -import { +import type { ERROR_CODES } from "@appsmith/constants/ApiConstants"; +import type { Workspace } from "@appsmith/constants/workspaceConstants"; +import type { ApplicationVersion } from "actions/applicationActions"; +import type { AppEmbedSetting, ApplicationPagePayload, GitApplicationMetadata, } from "api/ApplicationApi"; -import { +import type { LayoutOnLoadActionErrors, PageAction, } from "constants/AppsmithActionConstants/ActionConstants"; -import { AppLayoutConfig } from "reducers/entityReducers/pageListReducer"; -import { WidgetCardProps, WidgetProps } from "widgets/BaseWidget"; +import type { AppLayoutConfig } from "reducers/entityReducers/pageListReducer"; +import type { WidgetCardProps, WidgetProps } from "widgets/BaseWidget"; export const ReduxSagaChannels = { WEBSOCKET_APP_LEVEL_WRITE_CHANNEL: "WEBSOCKET_APP_LEVEL_WRITE_CHANNEL", @@ -764,7 +764,8 @@ export const ReduxActionTypes = { FILE_PICKER_CALLBACK_ACTION: "FILE_PICKER_CALLBACK_ACTION", }; -export type ReduxActionType = typeof ReduxActionTypes[keyof typeof ReduxActionTypes]; +export type ReduxActionType = + (typeof ReduxActionTypes)[keyof typeof ReduxActionTypes]; export const ReduxActionErrorTypes = { GIT_DISCARD_CHANGES_ERROR: "GIT_DISCARD_CHANGES_ERROR", @@ -966,7 +967,8 @@ export const WidgetReduxActionTypes: { [key: string]: string } = { WIDGET_UPDATE_PROPERTY: "WIDGET_UPDATE_PROPERTY", }; -export type ReduxActionErrorType = typeof ReduxActionErrorTypes[keyof typeof ReduxActionErrorTypes]; +export type ReduxActionErrorType = + (typeof ReduxActionErrorTypes)[keyof typeof ReduxActionErrorTypes]; export interface ReduxAction { type: ReduxActionType | ReduxActionErrorType; diff --git a/app/client/src/ce/constants/workspaceConstants.ts b/app/client/src/ce/constants/workspaceConstants.ts index 78ecfe501f..a9eb4331ee 100644 --- a/app/client/src/ce/constants/workspaceConstants.ts +++ b/app/client/src/ce/constants/workspaceConstants.ts @@ -1,4 +1,4 @@ -import { ApplicationPayload } from "@appsmith/constants/ReduxActionConstants"; +import type { ApplicationPayload } from "@appsmith/constants/ReduxActionConstants"; export type WorkspaceRole = { id: string; diff --git a/app/client/src/ce/entities/DataTree/actionTriggers.ts b/app/client/src/ce/entities/DataTree/actionTriggers.ts index 62d4ecd8ee..93321e8e4e 100644 --- a/app/client/src/ce/entities/DataTree/actionTriggers.ts +++ b/app/client/src/ce/entities/DataTree/actionTriggers.ts @@ -1,5 +1,5 @@ -import { NavigationTargetType_Dep } from "sagas/ActionExecution/NavigateActionSaga"; -import { TypeOptions } from "react-toastify"; +import type { NavigationTargetType_Dep } from "sagas/ActionExecution/NavigateActionSaga"; +import type { TypeOptions } from "react-toastify"; export type ActionTriggerKeys = | "RUN_PLUGIN_ACTION" diff --git a/app/client/src/ce/pages/AdminSettings/LeftPane.tsx b/app/client/src/ce/pages/AdminSettings/LeftPane.tsx index c48708f94b..59afca0906 100644 --- a/app/client/src/ce/pages/AdminSettings/LeftPane.tsx +++ b/app/client/src/ce/pages/AdminSettings/LeftPane.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Link } from "react-router-dom"; import styled from "styled-components"; import AdminConfig from "@appsmith/pages/AdminSettings/config"; -import { Category } from "@appsmith/pages/AdminSettings/config/types"; +import type { Category } from "@appsmith/pages/AdminSettings/config/types"; import { adminSettingsCategoryUrl } from "RouteBuilder"; import { useParams } from "react-router"; import { Icon, IconSize } from "design-system-old"; diff --git a/app/client/src/ce/pages/AdminSettings/WithSuperUserHoc.tsx b/app/client/src/ce/pages/AdminSettings/WithSuperUserHoc.tsx index 8bfcad78dc..310c5539df 100644 --- a/app/client/src/ce/pages/AdminSettings/WithSuperUserHoc.tsx +++ b/app/client/src/ce/pages/AdminSettings/WithSuperUserHoc.tsx @@ -2,7 +2,8 @@ import { APPLICATIONS_URL } from "constants/routes"; import { showAdminSettings } from "@appsmith/utils/adminSettingsHelpers"; import React from "react"; import { useSelector } from "react-redux"; -import { Redirect, RouteComponentProps } from "react-router"; +import type { RouteComponentProps } from "react-router"; +import { Redirect } from "react-router"; import { getCurrentUser } from "selectors/usersSelectors"; export default function WithSuperUserHOC( diff --git a/app/client/src/ce/pages/AdminSettings/config/authentication/AuthPage.tsx b/app/client/src/ce/pages/AdminSettings/config/authentication/AuthPage.tsx index df4eb9d422..83e65d7020 100644 --- a/app/client/src/ce/pages/AdminSettings/config/authentication/AuthPage.tsx +++ b/app/client/src/ce/pages/AdminSettings/config/authentication/AuthPage.tsx @@ -12,7 +12,8 @@ import { UPGRADE_TO_EE, AUTHENTICATION_METHOD_ENABLED, } from "@appsmith/constants/messages"; -import { CalloutV2, CalloutType } from "design-system-old"; +import type { CalloutType } from "design-system-old"; +import { CalloutV2 } from "design-system-old"; import { Colors } from "constants/Colors"; import { Button, Category, Icon, TooltipComponent } from "design-system-old"; import { adminSettingsCategoryUrl } from "RouteBuilder"; diff --git a/app/client/src/ce/pages/AdminSettings/config/authentication/index.tsx b/app/client/src/ce/pages/AdminSettings/config/authentication/index.tsx index c4425b0d66..d517232546 100644 --- a/app/client/src/ce/pages/AdminSettings/config/authentication/index.tsx +++ b/app/client/src/ce/pages/AdminSettings/config/authentication/index.tsx @@ -4,14 +4,15 @@ import { GOOGLE_SIGNUP_SETUP_DOC, SIGNUP_RESTRICTION_DOC, } from "constants/ThirdPartyConstants"; +import type { AdminConfigType } from "@appsmith/pages/AdminSettings/config/types"; import { - AdminConfigType, SettingCategories, SettingSubCategories, SettingSubtype, SettingTypes, } from "@appsmith/pages/AdminSettings/config/types"; -import { AuthMethodType, AuthPage } from "./AuthPage"; +import type { AuthMethodType } from "./AuthPage"; +import { AuthPage } from "./AuthPage"; import Google from "assets/images/Google.png"; import SamlSso from "assets/images/saml.svg"; import OIDC from "assets/images/oidc.svg"; @@ -23,11 +24,8 @@ import { REDIRECT_URL_FORM, } from "@appsmith/constants/forms"; -const { - disableLoginForm, - enableGithubOAuth, - enableGoogleOAuth, -} = getAppsmithConfigs(); +const { disableLoginForm, enableGithubOAuth, enableGoogleOAuth } = + getAppsmithConfigs(); const FormAuth: AdminConfigType = { type: SettingCategories.FORM_AUTH, diff --git a/app/client/src/ce/pages/AdminSettings/config/branding/index.tsx b/app/client/src/ce/pages/AdminSettings/config/branding/index.tsx index b93f7dcbf2..3a35596530 100644 --- a/app/client/src/ce/pages/AdminSettings/config/branding/index.tsx +++ b/app/client/src/ce/pages/AdminSettings/config/branding/index.tsx @@ -1,5 +1,5 @@ +import type { AdminConfigType } from "@appsmith/pages/AdminSettings/config/types"; import { - AdminConfigType, SettingCategories, SettingTypes, } from "@appsmith/pages/AdminSettings/config/types"; diff --git a/app/client/src/ce/pages/AdminSettings/config/general.tsx b/app/client/src/ce/pages/AdminSettings/config/general.tsx index 34c3019969..c3f0b6c738 100644 --- a/app/client/src/ce/pages/AdminSettings/config/general.tsx +++ b/app/client/src/ce/pages/AdminSettings/config/general.tsx @@ -2,12 +2,14 @@ import React from "react"; import { isEmail } from "utils/formhelpers"; import { apiRequestConfig } from "api/Api"; import UserApi from "@appsmith/api/UserApi"; -import { +import type { AdminConfigType, + Setting, +} from "@appsmith/pages/AdminSettings/config/types"; +import { SettingCategories, SettingSubtype, SettingTypes, - Setting, } from "@appsmith/pages/AdminSettings/config/types"; import BrandingBadge from "pages/AppViewer/BrandingBadge"; import { TagInput } from "design-system-old"; @@ -101,11 +103,9 @@ export const APPSMITH_ALLOWED_FRAME_ANCESTORS_SETTING: Setting = { badge: "NOT RECOMMENDED", tooltip: { icon: , - text: - "Lets all domains, including malicious ones, embed your Appsmith apps. ", + text: "Lets all domains, including malicious ones, embed your Appsmith apps. ", linkText: "SEE WHY THIS IS RISKY", - link: - "https://docs.appsmith.com/getting-started/setup/instance-configuration/frame-ancestors#why-should-i-control-this", + link: "https://docs.appsmith.com/getting-started/setup/instance-configuration/frame-ancestors#why-should-i-control-this", }, label: "Allow embedding everywhere", value: AppsmithFrameAncestorsSetting.ALLOW_EMBEDDING_EVERYWHERE, diff --git a/app/client/src/ce/pages/AdminSettings/config/types.ts b/app/client/src/ce/pages/AdminSettings/config/types.ts index 54a5bb79fa..1d5ab0ef4e 100644 --- a/app/client/src/ce/pages/AdminSettings/config/types.ts +++ b/app/client/src/ce/pages/AdminSettings/config/types.ts @@ -1,8 +1,8 @@ -import React from "react"; -import { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; -import { Dispatch } from "react"; -import { EventName } from "utils/AnalyticsUtil"; -import { RadioProps } from "pages/Settings/FormGroup/Radio"; +import type React from "react"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import type { Dispatch } from "react"; +import type { EventName } from "utils/AnalyticsUtil"; +import type { RadioProps } from "pages/Settings/FormGroup/Radio"; type ControlType = { [K in keyof ControlPropsType]: { diff --git a/app/client/src/ce/pages/Applications/index.tsx b/app/client/src/ce/pages/Applications/index.tsx index cf9ae1f51e..cfd533b8e7 100644 --- a/app/client/src/ce/pages/Applications/index.tsx +++ b/app/client/src/ce/pages/Applications/index.tsx @@ -10,7 +10,7 @@ import styled, { ThemeContext } from "styled-components"; import { connect, useDispatch, useSelector } from "react-redux"; import MediaQuery from "react-responsive"; import { useLocation } from "react-router-dom"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import { Classes as BlueprintClasses } from "@blueprintjs/core"; import { thinScrollbar, @@ -28,22 +28,21 @@ import { getUserApplicationsWorkspaces, getUserApplicationsWorkspacesList, } from "selectors/applicationSelectors"; -import { - ApplicationPayload, - ReduxActionTypes, -} from "@appsmith/constants/ReduxActionConstants"; +import type { ApplicationPayload } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import PageWrapper from "@appsmith/pages/common/PageWrapper"; import SubHeader from "pages/common/SubHeader"; import ApplicationCard from "pages/Applications/ApplicationCard"; import WorkspaceInviteUsersForm from "@appsmith/pages/workspace/WorkspaceInviteUsersForm"; import FormDialogComponent from "components/editorComponents/form/FormDialogComponent"; -import { User } from "constants/userConstants"; +import type { User } from "constants/userConstants"; import { getCurrentUser } from "selectors/usersSelectors"; import { CREATE_WORKSPACE_FORM_NAME } from "@appsmith/constants/forms"; import { DropdownOnSelectActions, getOnSelectAction, } from "pages/common/CustomizedDropdown/dropdownHelpers"; +import type { IconName } from "design-system-old"; import { AppIconCollection, Button, @@ -52,7 +51,6 @@ import { EditableText, EditInteractionKind, Icon, - IconName, IconSize, Menu, MenuItem, @@ -67,12 +65,12 @@ import { updateApplication, } from "actions/applicationActions"; import { Position } from "@blueprintjs/core/lib/esm/common/position"; -import { UpdateApplicationPayload } from "api/ApplicationApi"; +import type { UpdateApplicationPayload } from "api/ApplicationApi"; import PerformanceTracker, { PerformanceTransactionName, } from "utils/PerformanceTracker"; import { loadingUserWorkspaces } from "pages/Applications/ApplicationLoaders"; -import { creatingApplicationMap } from "@appsmith/reducers/uiReducers/applicationsReducer"; +import type { creatingApplicationMap } from "@appsmith/reducers/uiReducers/applicationsReducer"; import { deleteWorkspace, saveWorkspace, @@ -864,20 +862,21 @@ export function ApplicationsSection(props: any) { text="Import" /> )} - {hasManageWorkspacePermissions && canInviteToWorkspace && ( - - getOnSelectAction( - DropdownOnSelectActions.REDIRECT, - { - path: `/workspace/${workspace.id}/settings/members`, - }, - ) - } - text="Members" - /> - )} + {hasManageWorkspacePermissions && + canInviteToWorkspace && ( + + getOnSelectAction( + DropdownOnSelectActions.REDIRECT, + { + path: `/workspace/${workspace.id}/settings/members`, + }, + ) + } + text="Members" + /> + )} {canInviteToWorkspace && ( extends Component { constructor(props: Props) { super(props); diff --git a/app/client/src/ce/pages/Editor/Explorer/helpers.tsx b/app/client/src/ce/pages/Editor/Explorer/helpers.tsx index 9378a9829f..7bd1ec7632 100644 --- a/app/client/src/ce/pages/Editor/Explorer/helpers.tsx +++ b/app/client/src/ce/pages/Editor/Explorer/helpers.tsx @@ -1,4 +1,4 @@ -import { IPopoverSharedProps } from "@blueprintjs/core"; +import type { IPopoverSharedProps } from "@blueprintjs/core"; import { matchPath, useLocation } from "react-router"; import { API_EDITOR_ID_PATH, @@ -15,9 +15,9 @@ import { SAAS_EDITOR_API_ID_PATH, SAAS_EDITOR_DATASOURCE_ID_PATH, } from "pages/Editor/SaaSEditor/constants"; -import { ActionData } from "reducers/entityReducers/actionsReducer"; -import { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; -import { PluginType } from "entities/Action"; +import type { ActionData } from "reducers/entityReducers/actionsReducer"; +import type { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; +import type { PluginType } from "entities/Action"; import localStorage from "utils/localStorage"; export const ContextMenuPopoverModifiers: IPopoverSharedProps["modifiers"] = { diff --git a/app/client/src/ce/pages/Upgrade/AccessControlUpgradePage.tsx b/app/client/src/ce/pages/Upgrade/AccessControlUpgradePage.tsx index c89a3e3046..a5b75a403f 100644 --- a/app/client/src/ce/pages/Upgrade/AccessControlUpgradePage.tsx +++ b/app/client/src/ce/pages/Upgrade/AccessControlUpgradePage.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Carousel, Header } from "./types"; +import type { Carousel, Header } from "./types"; import UpgradePage from "./UpgradePage"; import SecureAppsLeastPrivilegeImage from "assets/images/upgrade/access-control/secure-apps-least-privilege.png"; import RestrictPublicExposureImage from "assets/images/upgrade/access-control/restrict-public-exposure.png"; diff --git a/app/client/src/ce/pages/Upgrade/AuditLogsUpgradePage.tsx b/app/client/src/ce/pages/Upgrade/AuditLogsUpgradePage.tsx index 114a3eee93..4111474f81 100644 --- a/app/client/src/ce/pages/Upgrade/AuditLogsUpgradePage.tsx +++ b/app/client/src/ce/pages/Upgrade/AuditLogsUpgradePage.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Carousel, Header } from "./types"; +import type { Carousel, Header } from "./types"; import UpgradePage from "./UpgradePage"; import DebuggingImage from "assets/svg/upgrade/audit-logs/debugging.svg"; import IncidentManagementImage from "assets/svg/upgrade/audit-logs/incident-management.svg"; diff --git a/app/client/src/ce/pages/Upgrade/Carousel.tsx b/app/client/src/ce/pages/Upgrade/Carousel.tsx index df8dedb298..2a79aa3b07 100644 --- a/app/client/src/ce/pages/Upgrade/Carousel.tsx +++ b/app/client/src/ce/pages/Upgrade/Carousel.tsx @@ -1,7 +1,7 @@ import styled from "styled-components"; import React, { useEffect, useState } from "react"; import { Icon, IconSize, Text, TextType } from "design-system-old"; -import { CarouselProps } from "./types"; +import type { CarouselProps } from "./types"; const CarouselContainer = styled.div` display: flex; diff --git a/app/client/src/ce/pages/Upgrade/Footer.tsx b/app/client/src/ce/pages/Upgrade/Footer.tsx index 8e98165ed4..6c53d6a2f9 100644 --- a/app/client/src/ce/pages/Upgrade/Footer.tsx +++ b/app/client/src/ce/pages/Upgrade/Footer.tsx @@ -2,7 +2,7 @@ import styled from "styled-components"; import React from "react"; import { Button, Size, Text, TextType } from "design-system-old"; import { Variant } from "design-system-old/build/constants/variants"; -import { FooterProps } from "./types"; +import type { FooterProps } from "./types"; import { createMessage } from "design-system-old/build/constants/messages"; import { AVAILABLE_ON_BUSINESS, UPGRADE } from "../../constants/messages"; diff --git a/app/client/src/ce/pages/Upgrade/Header.tsx b/app/client/src/ce/pages/Upgrade/Header.tsx index 04c220698b..428bd05b45 100644 --- a/app/client/src/ce/pages/Upgrade/Header.tsx +++ b/app/client/src/ce/pages/Upgrade/Header.tsx @@ -1,6 +1,6 @@ import styled from "styled-components"; import React from "react"; -import { HeaderProps } from "./types"; +import type { HeaderProps } from "./types"; import { FontWeight, Text, TextType } from "design-system-old"; export const HeaderContainer = styled.div` diff --git a/app/client/src/ce/pages/Upgrade/UpgradePage.tsx b/app/client/src/ce/pages/Upgrade/UpgradePage.tsx index eb8c44af8d..93f693341d 100644 --- a/app/client/src/ce/pages/Upgrade/UpgradePage.tsx +++ b/app/client/src/ce/pages/Upgrade/UpgradePage.tsx @@ -3,7 +3,7 @@ import styled from "styled-components"; import { HeaderComponent as Header } from "./Header"; import { CarouselComponent as Carousel } from "./Carousel"; import { FooterComponent as Footer } from "./Footer"; -import { UpgradePageProps } from "./types"; +import type { UpgradePageProps } from "./types"; export const Container = styled.div` border-left: thin solid var(--appsmith-color-black-50); diff --git a/app/client/src/ce/pages/Upgrade/types.ts b/app/client/src/ce/pages/Upgrade/types.ts index a88fb01459..487c6adde1 100644 --- a/app/client/src/ce/pages/Upgrade/types.ts +++ b/app/client/src/ce/pages/Upgrade/types.ts @@ -1,4 +1,4 @@ -import React from "react"; +import type React from "react"; export type Header = { heading: string; diff --git a/app/client/src/ce/pages/UserAuth/Login.tsx b/app/client/src/ce/pages/UserAuth/Login.tsx index d6b43f3e7f..6b8e32d876 100644 --- a/app/client/src/ce/pages/UserAuth/Login.tsx +++ b/app/client/src/ce/pages/UserAuth/Login.tsx @@ -1,13 +1,8 @@ import React from "react"; import { Link, Redirect, useLocation } from "react-router-dom"; import { connect, useSelector } from "react-redux"; -import { - InjectedFormProps, - reduxForm, - formValueSelector, - isDirty, - DecoratedFormProps, -} from "redux-form"; +import type { InjectedFormProps, DecoratedFormProps } from "redux-form"; +import { reduxForm, formValueSelector, isDirty } from "redux-form"; import { LOGIN_FORM_NAME, LOGIN_FORM_EMAIL_FIELD_NAME, @@ -36,7 +31,7 @@ import FormTextField from "components/utils/ReduxFormTextField"; import ThirdPartyAuth from "@appsmith/pages/UserAuth/ThirdPartyAuth"; import { ThirdPartyLoginRegistry } from "pages/UserAuth/ThirdPartyLoginRegistry"; import { isEmail, isEmptyString } from "utils/formhelpers"; -import { LoginFormValues } from "pages/UserAuth/helpers"; +import type { LoginFormValues } from "pages/UserAuth/helpers"; import { SpacedSubmitForm, diff --git a/app/client/src/ce/pages/UserAuth/SignUp.tsx b/app/client/src/ce/pages/UserAuth/SignUp.tsx index d4fce5a714..a0a9b48ebc 100644 --- a/app/client/src/ce/pages/UserAuth/SignUp.tsx +++ b/app/client/src/ce/pages/UserAuth/SignUp.tsx @@ -1,14 +1,10 @@ import React, { useEffect } from "react"; -import { reduxForm, InjectedFormProps, formValueSelector } from "redux-form"; +import type { InjectedFormProps } from "redux-form"; +import { reduxForm, formValueSelector } from "redux-form"; import { AUTH_LOGIN_URL } from "constants/routes"; import { SIGNUP_FORM_NAME } from "@appsmith/constants/forms"; -import { - RouteComponentProps, - useHistory, - useLocation, - withRouter, - Link, -} from "react-router-dom"; +import type { RouteComponentProps } from "react-router-dom"; +import { useHistory, useLocation, withRouter, Link } from "react-router-dom"; import { SpacedSubmitForm, FormActions } from "pages/UserAuth/StyledComponents"; import { SIGNUP_PAGE_TITLE, @@ -32,12 +28,12 @@ import { Button, FormGroup, FormMessage, Size } from "design-system-old"; import { isEmail, isStrongPassword, isEmptyString } from "utils/formhelpers"; -import { SignupFormValues } from "pages/UserAuth/helpers"; +import type { SignupFormValues } from "pages/UserAuth/helpers"; import AnalyticsUtil from "utils/AnalyticsUtil"; import { SIGNUP_SUBMIT_PATH } from "@appsmith/constants/ApiConstants"; import { connect } from "react-redux"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import PerformanceTracker, { PerformanceTransactionName, } from "utils/PerformanceTracker"; @@ -134,7 +130,7 @@ export function SignUp(props: SignUpFormProps) { .execute(googleRecaptchaSiteKey.apiKey, { action: "submit", }) - .then(function(token: any) { + .then(function (token: any) { if (formElement) { signupURL.searchParams.append("recaptchaToken", token); formElement.setAttribute("action", signupURL.toString()); diff --git a/app/client/src/ce/pages/UserAuth/ThirdPartyAuth.tsx b/app/client/src/ce/pages/UserAuth/ThirdPartyAuth.tsx index 3e02e8ecbc..8e759650fb 100644 --- a/app/client/src/ce/pages/UserAuth/ThirdPartyAuth.tsx +++ b/app/client/src/ce/pages/UserAuth/ThirdPartyAuth.tsx @@ -1,11 +1,10 @@ import React from "react"; import styled from "styled-components"; -import { - getSocialLoginButtonProps, - SocialLoginType, -} from "@appsmith/constants/SocialLogin"; +import type { SocialLoginType } from "@appsmith/constants/SocialLogin"; +import { getSocialLoginButtonProps } from "@appsmith/constants/SocialLogin"; import { getTypographyByKey } from "design-system-old"; -import AnalyticsUtil, { EventName } from "utils/AnalyticsUtil"; +import type { EventName } from "utils/AnalyticsUtil"; +import AnalyticsUtil from "utils/AnalyticsUtil"; import { useLocation } from "react-router-dom"; import PerformanceTracker, { PerformanceTransactionName, @@ -24,7 +23,8 @@ const StyledSocialLoginButton = styled.a` border: solid 1px ${(props) => props.theme.colors.auth.socialBtnBorder}; margin-bottom: ${(props) => props.theme.spaces[4]}px; - &:only-child, &:last-child { + &:only-child, + &:last-child { margin-bottom: 0; } diff --git a/app/client/src/ce/pages/common/PageWrapper.tsx b/app/client/src/ce/pages/common/PageWrapper.tsx index ee5bbbb92a..f3c1f1e68b 100644 --- a/app/client/src/ce/pages/common/PageWrapper.tsx +++ b/app/client/src/ce/pages/common/PageWrapper.tsx @@ -1,4 +1,5 @@ -import React, { ReactNode } from "react"; +import type { ReactNode } from "react"; +import React from "react"; import { Helmet } from "react-helmet"; import styled from "styled-components"; @@ -33,8 +34,8 @@ export const Wrapper = styled.section<{ isFixed?: boolean }>` export const PageBody = styled.div<{ isSavable?: boolean }>` height: calc( - 100vh - ${(props) => props.theme.homePage.header}px - ${(props) => - props.isSavable ? "84px" : "0px"} + 100vh - ${(props) => props.theme.homePage.header}px - + ${(props) => (props.isSavable ? "84px" : "0px")} ); display: flex; flex-direction: column; diff --git a/app/client/src/ce/pages/workspace/Members.tsx b/app/client/src/ce/pages/workspace/Members.tsx index 9bef0fe046..989864e60b 100644 --- a/app/client/src/ce/pages/workspace/Members.tsx +++ b/app/client/src/ce/pages/workspace/Members.tsx @@ -6,7 +6,7 @@ import { // getCurrentWorkspace, getWorkspaceLoadingStates, } from "@appsmith/selectors/workspaceSelectors"; -import { RouteComponentProps } from "react-router"; +import type { RouteComponentProps } from "react-router"; import { getCurrentUser } from "selectors/usersSelectors"; import { Table } from "design-system-old"; import { @@ -16,6 +16,7 @@ import { changeWorkspaceUserRole, deleteWorkspaceUser, } from "@appsmith/actions/workspaceActions"; +import type { TableDropdownOption } from "design-system-old"; import { Classes as AppClass, Dropdown, @@ -23,7 +24,6 @@ import { Icon, IconSize, TableDropdown, - TableDropdownOption, Text, TextType, } from "design-system-old"; @@ -34,7 +34,7 @@ import { Card } from "@blueprintjs/core"; import ProfileImage from "pages/common/ProfileImage"; import { USER_PHOTO_ASSET_URL } from "constants/userConstants"; import { Colors } from "constants/Colors"; -import { WorkspaceUser } from "@appsmith/constants/workspaceConstants"; +import type { WorkspaceUser } from "@appsmith/constants/workspaceConstants"; import { createMessage, MEMBERS_TAB_TITLE, @@ -238,10 +238,8 @@ export default function MemberSettings(props: PageProps) { dispatch(fetchWorkspace(workspaceId)); }, [dispatch, workspaceId]); - const [ - showMemberDeletionConfirmation, - setShowMemberDeletionConfirmation, - ] = useState(false); + const [showMemberDeletionConfirmation, setShowMemberDeletionConfirmation] = + useState(false); const [isDeletingUser, setIsDeletingUser] = useState(false); const onOpenConfirmationModal = () => setShowMemberDeletionConfirmation(true); const onCloseConfirmationModal = () => diff --git a/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx b/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx index e24c9ec4d9..5d7efaa977 100644 --- a/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx +++ b/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx @@ -15,7 +15,7 @@ import TagListField from "components/editorComponents/form/fields/TagListField"; import { reduxForm, SubmissionError } from "redux-form"; import SelectField from "components/editorComponents/form/fields/SelectField"; import { connect, useSelector } from "react-redux"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import { getRolesForField, getAllUsers, @@ -23,10 +23,8 @@ import { } from "@appsmith/selectors/workspaceSelectors"; import Spinner from "components/editorComponents/Spinner"; import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { - InviteUsersToWorkspaceFormValues, - inviteUsersToWorkspace, -} from "@appsmith/pages/workspace/helpers"; +import type { InviteUsersToWorkspaceFormValues } from "@appsmith/pages/workspace/helpers"; +import { inviteUsersToWorkspace } from "@appsmith/pages/workspace/helpers"; import { INVITE_USERS_TO_WORKSPACE_FORM } from "@appsmith/constants/forms"; import { createMessage, @@ -44,15 +42,14 @@ import { import { getAppsmithConfigs } from "@appsmith/configs"; import { ReactComponent as NoEmailConfigImage } from "assets/images/email-not-configured.svg"; import AnalyticsUtil from "utils/AnalyticsUtil"; +import type { DropdownOption, TextProps } from "design-system-old"; import { Button, Classes, Callout, - DropdownOption, Size, Text, TextType, - TextProps, Variant, } from "design-system-old"; import { getInitialsAndColorCode } from "utils/AppsmithUtils"; diff --git a/app/client/src/ce/pages/workspace/helpers.ts b/app/client/src/ce/pages/workspace/helpers.ts index 17ac9e3f14..71ec62a351 100644 --- a/app/client/src/ce/pages/workspace/helpers.ts +++ b/app/client/src/ce/pages/workspace/helpers.ts @@ -1,6 +1,6 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import { SubmissionError } from "redux-form"; -import { RouteChildrenProps, RouteComponentProps } from "react-router-dom"; +import type { RouteChildrenProps, RouteComponentProps } from "react-router-dom"; export type InviteUsersToWorkspaceByRoleValues = { id: string; users?: string; diff --git a/app/client/src/ce/reducers/index.tsx b/app/client/src/ce/reducers/index.tsx index 92f9b7aa8b..c0033e0534 100644 --- a/app/client/src/ce/reducers/index.tsx +++ b/app/client/src/ce/reducers/index.tsx @@ -2,80 +2,78 @@ import entityReducer from "reducers/entityReducers"; import uiReducer from "reducers/uiReducers"; import evaluationsReducer from "reducers/evaluationReducers"; import { reducer as formReducer } from "redux-form"; -import { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer"; -import { EditorReduxState } from "reducers/uiReducers/editorReducer"; -import { ErrorReduxState } from "reducers/uiReducers/errorReducer"; -import { ActionDataState } from "reducers/entityReducers/actionsReducer"; -import { PropertyPaneReduxState } from "reducers/uiReducers/propertyPaneReducer"; -import { TemplatesReduxState } from "reducers/uiReducers/templateReducer"; -import { WidgetConfigReducerState } from "reducers/entityReducers/widgetConfigReducer"; -import { DatasourceDataState } from "reducers/entityReducers/datasourceReducer"; -import { AppViewReduxState } from "reducers/uiReducers/appViewReducer"; -import { DatasourcePaneReduxState } from "reducers/uiReducers/datasourcePaneReducer"; -import { ApplicationsReduxState } from "@appsmith/reducers/uiReducers/applicationsReducer"; -import { PageListReduxState } from "reducers/entityReducers/pageListReducer"; -import { ApiPaneReduxState } from "reducers/uiReducers/apiPaneReducer"; -import { QueryPaneReduxState } from "reducers/uiReducers/queryPaneReducer"; -import { PluginDataState } from "reducers/entityReducers/pluginsReducer"; -import { AuthState } from "reducers/uiReducers/authReducer"; -import { WorkspaceReduxState } from "@appsmith/reducers/uiReducers/workspaceReducer"; -import { UsersReduxState } from "reducers/uiReducers/usersReducer"; -import { ThemeState } from "reducers/uiReducers/themeReducer"; -import { WidgetDragResizeState } from "reducers/uiReducers/dragResizeReducer"; -import { ImportedCollectionsReduxState } from "reducers/uiReducers/importedCollectionsReducer"; -import { ProvidersReduxState } from "reducers/uiReducers/providerReducer"; -import { MetaState } from "reducers/entityReducers/metaReducer"; -import { ImportReduxState } from "reducers/uiReducers/importReducer"; -import { HelpReduxState } from "reducers/uiReducers/helpReducer"; -import { ApiNameReduxState } from "reducers/uiReducers/apiNameReducer"; -import { ExplorerReduxState } from "reducers/uiReducers/explorerReducer"; -import { PageCanvasStructureReduxState } from "reducers/uiReducers/pageCanvasStructureReducer"; -import { ModalActionReduxState } from "reducers/uiReducers/modalActionReducer"; -import { AppDataState } from "reducers/entityReducers/appReducer"; -import { DatasourceNameReduxState } from "reducers/uiReducers/datasourceNameReducer"; -import { EvaluatedTreeState } from "reducers/evaluationReducers/treeReducer"; -import { EvaluationDependencyState } from "reducers/evaluationReducers/dependencyReducer"; -import { PageWidgetsReduxState } from "reducers/uiReducers/pageWidgetsReducer"; -import { OnboardingState } from "reducers/uiReducers/onBoardingReducer"; -import { GlobalSearchReduxState } from "reducers/uiReducers/globalSearchReducer"; -import { ReleasesState } from "reducers/uiReducers/releasesReducer"; -import { LoadingEntitiesState } from "reducers/evaluationReducers/loadingEntitiesReducer"; -import { WebsocketReducerState } from "reducers/uiReducers/websocketReducer"; -import { DebuggerReduxState } from "reducers/uiReducers/debuggerReducer"; -import { TourReducerState } from "reducers/uiReducers/tourReducer"; -import { TableFilterPaneReduxState } from "reducers/uiReducers/tableFilterPaneReducer"; -import { JsPaneReduxState } from "reducers/uiReducers/jsPaneReducer"; -import { JSCollectionDataState } from "reducers/entityReducers/jsActionsReducer"; -import { CanvasSelectionState } from "reducers/uiReducers/canvasSelectionReducer"; -import { JSObjectNameReduxState } from "reducers/uiReducers/jsObjectNameReducer"; -import { GitSyncReducerState } from "reducers/uiReducers/gitSyncReducer"; -import { AppCollabReducerState } from "reducers/uiReducers/appCollabReducer"; -import { CrudInfoModalReduxState } from "reducers/uiReducers/crudInfoModalReducer"; -import { FormEvaluationState } from "reducers/evaluationReducers/formEvaluationReducer"; -import { widgetReflow } from "reducers/uiReducers/reflowReducer"; -import { AppThemingState } from "reducers/uiReducers/appThemingReducer"; -import { MainCanvasReduxState } from "reducers/uiReducers/mainCanvasReducer"; -import SettingsReducer, { - SettingsReduxState, -} from "@appsmith/reducers/settingsReducer"; -import { GuidedTourState } from "reducers/uiReducers/guidedTourReducer"; -import { TriggerValuesEvaluationState } from "reducers/evaluationReducers/triggerReducer"; -import { CanvasWidgetStructure } from "widgets/constants"; -import { AppSettingsPaneReduxState } from "reducers/uiReducers/appSettingsPaneReducer"; -import tenantReducer, { - TenantReduxState, -} from "@appsmith/reducers/tenantReducer"; -import { FocusHistoryState } from "reducers/uiReducers/focusHistoryReducer"; -import { EditorContextState } from "reducers/uiReducers/editorContextReducer"; -import { LibraryState } from "reducers/uiReducers/libraryReducer"; -import { AutoHeightLayoutTreeReduxState } from "reducers/entityReducers/autoHeightReducers/autoHeightLayoutTreeReducer"; -import { CanvasLevelsReduxState } from "reducers/entityReducers/autoHeightReducers/canvasLevelsReducer"; -import { LintErrors } from "reducers/lintingReducers/lintErrorsReducers"; +import type { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer"; +import type { EditorReduxState } from "reducers/uiReducers/editorReducer"; +import type { ErrorReduxState } from "reducers/uiReducers/errorReducer"; +import type { ActionDataState } from "reducers/entityReducers/actionsReducer"; +import type { PropertyPaneReduxState } from "reducers/uiReducers/propertyPaneReducer"; +import type { TemplatesReduxState } from "reducers/uiReducers/templateReducer"; +import type { WidgetConfigReducerState } from "reducers/entityReducers/widgetConfigReducer"; +import type { DatasourceDataState } from "reducers/entityReducers/datasourceReducer"; +import type { AppViewReduxState } from "reducers/uiReducers/appViewReducer"; +import type { DatasourcePaneReduxState } from "reducers/uiReducers/datasourcePaneReducer"; +import type { ApplicationsReduxState } from "@appsmith/reducers/uiReducers/applicationsReducer"; +import type { PageListReduxState } from "reducers/entityReducers/pageListReducer"; +import type { ApiPaneReduxState } from "reducers/uiReducers/apiPaneReducer"; +import type { QueryPaneReduxState } from "reducers/uiReducers/queryPaneReducer"; +import type { PluginDataState } from "reducers/entityReducers/pluginsReducer"; +import type { AuthState } from "reducers/uiReducers/authReducer"; +import type { WorkspaceReduxState } from "@appsmith/reducers/uiReducers/workspaceReducer"; +import type { UsersReduxState } from "reducers/uiReducers/usersReducer"; +import type { ThemeState } from "reducers/uiReducers/themeReducer"; +import type { WidgetDragResizeState } from "reducers/uiReducers/dragResizeReducer"; +import type { ImportedCollectionsReduxState } from "reducers/uiReducers/importedCollectionsReducer"; +import type { ProvidersReduxState } from "reducers/uiReducers/providerReducer"; +import type { MetaState } from "reducers/entityReducers/metaReducer"; +import type { ImportReduxState } from "reducers/uiReducers/importReducer"; +import type { HelpReduxState } from "reducers/uiReducers/helpReducer"; +import type { ApiNameReduxState } from "reducers/uiReducers/apiNameReducer"; +import type { ExplorerReduxState } from "reducers/uiReducers/explorerReducer"; +import type { PageCanvasStructureReduxState } from "reducers/uiReducers/pageCanvasStructureReducer"; +import type { ModalActionReduxState } from "reducers/uiReducers/modalActionReducer"; +import type { AppDataState } from "reducers/entityReducers/appReducer"; +import type { DatasourceNameReduxState } from "reducers/uiReducers/datasourceNameReducer"; +import type { EvaluatedTreeState } from "reducers/evaluationReducers/treeReducer"; +import type { EvaluationDependencyState } from "reducers/evaluationReducers/dependencyReducer"; +import type { PageWidgetsReduxState } from "reducers/uiReducers/pageWidgetsReducer"; +import type { OnboardingState } from "reducers/uiReducers/onBoardingReducer"; +import type { GlobalSearchReduxState } from "reducers/uiReducers/globalSearchReducer"; +import type { ReleasesState } from "reducers/uiReducers/releasesReducer"; +import type { LoadingEntitiesState } from "reducers/evaluationReducers/loadingEntitiesReducer"; +import type { WebsocketReducerState } from "reducers/uiReducers/websocketReducer"; +import type { DebuggerReduxState } from "reducers/uiReducers/debuggerReducer"; +import type { TourReducerState } from "reducers/uiReducers/tourReducer"; +import type { TableFilterPaneReduxState } from "reducers/uiReducers/tableFilterPaneReducer"; +import type { JsPaneReduxState } from "reducers/uiReducers/jsPaneReducer"; +import type { JSCollectionDataState } from "reducers/entityReducers/jsActionsReducer"; +import type { CanvasSelectionState } from "reducers/uiReducers/canvasSelectionReducer"; +import type { JSObjectNameReduxState } from "reducers/uiReducers/jsObjectNameReducer"; +import type { GitSyncReducerState } from "reducers/uiReducers/gitSyncReducer"; +import type { AppCollabReducerState } from "reducers/uiReducers/appCollabReducer"; +import type { CrudInfoModalReduxState } from "reducers/uiReducers/crudInfoModalReducer"; +import type { FormEvaluationState } from "reducers/evaluationReducers/formEvaluationReducer"; +import type { widgetReflow } from "reducers/uiReducers/reflowReducer"; +import type { AppThemingState } from "reducers/uiReducers/appThemingReducer"; +import type { MainCanvasReduxState } from "reducers/uiReducers/mainCanvasReducer"; +import type { SettingsReduxState } from "@appsmith/reducers/settingsReducer"; +import SettingsReducer from "@appsmith/reducers/settingsReducer"; +import type { GuidedTourState } from "reducers/uiReducers/guidedTourReducer"; +import type { TriggerValuesEvaluationState } from "reducers/evaluationReducers/triggerReducer"; +import type { CanvasWidgetStructure } from "widgets/constants"; +import type { AppSettingsPaneReduxState } from "reducers/uiReducers/appSettingsPaneReducer"; +import type { TenantReduxState } from "@appsmith/reducers/tenantReducer"; +import tenantReducer from "@appsmith/reducers/tenantReducer"; +import type { FocusHistoryState } from "reducers/uiReducers/focusHistoryReducer"; +import type { EditorContextState } from "reducers/uiReducers/editorContextReducer"; +import type { LibraryState } from "reducers/uiReducers/libraryReducer"; +import type { AutoHeightLayoutTreeReduxState } from "reducers/entityReducers/autoHeightReducers/autoHeightLayoutTreeReducer"; +import type { CanvasLevelsReduxState } from "reducers/entityReducers/autoHeightReducers/canvasLevelsReducer"; +import type { LintErrors } from "reducers/lintingReducers/lintErrorsReducers"; import lintErrorReducer from "reducers/lintingReducers"; -import { AutoHeightUIState } from "reducers/uiReducers/autoHeightReducer"; -import { AnalyticsReduxState } from "reducers/uiReducers/analyticsReducer"; -import { MultiPaneReduxState } from "reducers/uiReducers/multiPaneReducer"; -import { MetaWidgetsReduxState } from "reducers/entityReducers/metaWidgetsReducer"; +import type { AutoHeightUIState } from "reducers/uiReducers/autoHeightReducer"; +import type { AnalyticsReduxState } from "reducers/uiReducers/analyticsReducer"; +import type { MultiPaneReduxState } from "reducers/uiReducers/multiPaneReducer"; +import type { MetaWidgetsReduxState } from "reducers/entityReducers/metaWidgetsReducer"; export const reducerObject = { entities: entityReducer, diff --git a/app/client/src/ce/reducers/settingsReducer.ts b/app/client/src/ce/reducers/settingsReducer.ts index d08cd5e3b4..3173da5d54 100644 --- a/app/client/src/ce/reducers/settingsReducer.ts +++ b/app/client/src/ce/reducers/settingsReducer.ts @@ -1,5 +1,5 @@ +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; import { - ReduxAction, ReduxActionErrorTypes, ReduxActionTypes, } from "@appsmith/constants/ReduxActionConstants"; diff --git a/app/client/src/ce/reducers/tenantReducer.ts b/app/client/src/ce/reducers/tenantReducer.ts index 9545b9c949..444c0a5a41 100644 --- a/app/client/src/ce/reducers/tenantReducer.ts +++ b/app/client/src/ce/reducers/tenantReducer.ts @@ -1,5 +1,5 @@ +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; import { - ReduxAction, ReduxActionErrorTypes, ReduxActionTypes, } from "@appsmith/constants/ReduxActionConstants"; diff --git a/app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx b/app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx index a94d6aa7b3..70597fe319 100644 --- a/app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx +++ b/app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx @@ -1,11 +1,13 @@ import { createReducer } from "utils/ReducerUtils"; -import { +import type { ReduxAction, - ReduxActionTypes, - ReduxActionErrorTypes, ApplicationPayload, } from "@appsmith/constants/ReduxActionConstants"; import { + ReduxActionTypes, + ReduxActionErrorTypes, +} from "@appsmith/constants/ReduxActionConstants"; +import type { Workspaces, WorkspaceUser, } from "@appsmith/constants/workspaceConstants"; @@ -13,15 +15,15 @@ import { createMessage, ERROR_MESSAGE_CREATE_APPLICATION, } from "@appsmith/constants/messages"; -import { +import type { AppEmbedSetting, PageDefaultMeta, UpdateApplicationRequest, } from "api/ApplicationApi"; -import { CreateApplicationFormValues } from "pages/Applications/helpers"; -import { AppLayoutConfig } from "reducers/entityReducers/pageListReducer"; -import { ConnectToGitResponse } from "actions/gitSyncActions"; -import { AppIconName } from "design-system-old"; +import type { CreateApplicationFormValues } from "pages/Applications/helpers"; +import type { AppLayoutConfig } from "reducers/entityReducers/pageListReducer"; +import type { ConnectToGitResponse } from "actions/gitSyncActions"; +import type { AppIconName } from "design-system-old"; export const initialState: ApplicationsReduxState = { isFetchingApplications: false, diff --git a/app/client/src/ce/reducers/uiReducers/workspaceReducer.ts b/app/client/src/ce/reducers/uiReducers/workspaceReducer.ts index 961f7edfd8..7789141267 100644 --- a/app/client/src/ce/reducers/uiReducers/workspaceReducer.ts +++ b/app/client/src/ce/reducers/uiReducers/workspaceReducer.ts @@ -1,10 +1,10 @@ import { createImmerReducer } from "utils/ReducerUtils"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; import { - ReduxAction, ReduxActionTypes, ReduxActionErrorTypes, } from "@appsmith/constants/ReduxActionConstants"; -import { +import type { WorkspaceRole, Workspace, WorkspaceUser, diff --git a/app/client/src/ce/sagas/ActionExecution/ActionExecutionSagas.ts b/app/client/src/ce/sagas/ActionExecution/ActionExecutionSagas.ts index 36df6dee9a..c502a4d206 100644 --- a/app/client/src/ce/sagas/ActionExecution/ActionExecutionSagas.ts +++ b/app/client/src/ce/sagas/ActionExecution/ActionExecutionSagas.ts @@ -1,8 +1,6 @@ -import { - ReduxAction, - ReduxActionTypes, -} from "@appsmith/constants/ReduxActionConstants"; -import { +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; +import type { EventType, ExecuteTriggerPayload, TriggerSource, @@ -38,7 +36,7 @@ import { watchCurrentLocation, } from "sagas/ActionExecution/geolocationSaga"; import { postMessageSaga } from "sagas/ActionExecution/PostMessageSaga"; -import { ActionDescription } from "@appsmith/workers/Evaluation/fns"; +import type { ActionDescription } from "@appsmith/workers/Evaluation/fns"; export type TriggerMeta = { source?: TriggerSource; diff --git a/app/client/src/ce/sagas/ContextSwitchingSaga.ts b/app/client/src/ce/sagas/ContextSwitchingSaga.ts index fad5c25c19..213d7f380e 100644 --- a/app/client/src/ce/sagas/ContextSwitchingSaga.ts +++ b/app/client/src/ce/sagas/ContextSwitchingSaga.ts @@ -1,18 +1,15 @@ -import { FocusState } from "reducers/uiReducers/focusHistoryReducer"; -import { - call, +import type { FocusState } from "reducers/uiReducers/focusHistoryReducer"; +import type { CallEffectDescriptor, - put, PutEffectDescriptor, - select, SelectEffectDescriptor, SimpleEffect, - take, } from "redux-saga/effects"; +import { call, put, select, take } from "redux-saga/effects"; import { getCurrentFocusInfo } from "selectors/focusHistorySelectors"; +import type { FocusEntityInfo } from "navigation/FocusEntity"; import { FocusEntity, - FocusEntityInfo, FocusStoreHierarchy, identifyEntityFromPath, shouldStoreURLForFocus, @@ -20,14 +17,12 @@ import { import { FocusElementsConfig } from "navigation/FocusElements"; import { setFocusHistory } from "actions/focusHistoryActions"; import { builderURL } from "RouteBuilder"; -import history, { - AppsmithLocationState, - NavigationMethod, -} from "utils/history"; +import type { AppsmithLocationState } from "utils/history"; +import history, { NavigationMethod } from "utils/history"; import { ReduxActionTypes } from "ce/constants/ReduxActionConstants"; -import { Action } from "entities/Action"; +import type { Action } from "entities/Action"; import { getAction, getPlugin } from "selectors/entitiesSelector"; -import { Plugin } from "api/PluginApi"; +import type { Plugin } from "api/PluginApi"; import { getCurrentGitBranch } from "selectors/gitSyncSelectors"; import { has } from "lodash"; diff --git a/app/client/src/ce/sagas/NavigationSagas.ts b/app/client/src/ce/sagas/NavigationSagas.ts index 0e1645b8f5..cc56b331b3 100644 --- a/app/client/src/ce/sagas/NavigationSagas.ts +++ b/app/client/src/ce/sagas/NavigationSagas.ts @@ -1,14 +1,15 @@ import { fork, put, select } from "redux-saga/effects"; -import { RouteChangeActionPayload } from "actions/focusHistoryActions"; +import type { RouteChangeActionPayload } from "actions/focusHistoryActions"; import { FocusEntity, identifyEntityFromPath } from "navigation/FocusEntity"; import log from "loglevel"; -import { Location } from "history"; -import { AppsmithLocationState } from "utils/history"; +import type { Location } from "history"; +import type { AppsmithLocationState } from "utils/history"; import AnalyticsUtil from "utils/AnalyticsUtil"; import { getRecentEntityIds } from "selectors/globalSearchSelectors"; -import { ReduxAction } from "ce/constants/ReduxActionConstants"; +import type { ReduxAction } from "ce/constants/ReduxActionConstants"; import { getCurrentThemeDetails } from "selectors/themeSelectors"; -import { BackgroundTheme, changeAppBackground } from "sagas/ThemeSaga"; +import type { BackgroundTheme } from "sagas/ThemeSaga"; +import { changeAppBackground } from "sagas/ThemeSaga"; import { updateRecentEntitySaga } from "sagas/GlobalSearchSagas"; import { isEditorPath } from "@appsmith/pages/Editor/Explorer/helpers"; import { diff --git a/app/client/src/ce/sagas/SuperUserSagas.tsx b/app/client/src/ce/sagas/SuperUserSagas.tsx index 48ca7a06d9..3f0cafff63 100644 --- a/app/client/src/ce/sagas/SuperUserSagas.tsx +++ b/app/client/src/ce/sagas/SuperUserSagas.tsx @@ -1,19 +1,20 @@ import React from "react"; -import UserApi, { SendTestEmailPayload } from "@appsmith/api/UserApi"; +import type { SendTestEmailPayload } from "@appsmith/api/UserApi"; +import UserApi from "@appsmith/api/UserApi"; import { Toaster, Variant } from "design-system-old"; +import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; import { - ReduxAction, ReduxActionErrorTypes, ReduxActionTypes, } from "@appsmith/constants/ReduxActionConstants"; import { APPLICATIONS_URL } from "constants/routes"; -import { User } from "constants/userConstants"; +import type { User } from "constants/userConstants"; import { call, put, delay, select } from "redux-saga/effects"; import history from "utils/history"; import { validateResponse } from "sagas/ErrorSagas"; import { getAppsmithConfigs } from "@appsmith/configs"; -import { ApiResponse } from "api/ApiResponses"; +import type { ApiResponse } from "api/ApiResponses"; import { APPSMITH_DISPLAY_VERSION, createMessage, diff --git a/app/client/src/ce/sagas/WorkspaceSagas.ts b/app/client/src/ce/sagas/WorkspaceSagas.ts index 8b6c588996..1b0272d6c0 100644 --- a/app/client/src/ce/sagas/WorkspaceSagas.ts +++ b/app/client/src/ce/sagas/WorkspaceSagas.ts @@ -1,16 +1,18 @@ import { call, put, select } from "redux-saga/effects"; +import type { + ReduxAction, + ReduxActionWithPromise, +} from "@appsmith/constants/ReduxActionConstants"; import { ReduxActionTypes, - ReduxAction, ReduxActionErrorTypes, - ReduxActionWithPromise, } from "@appsmith/constants/ReduxActionConstants"; import { validateResponse, callAPI, getResponseErrorMessage, } from "sagas/ErrorSagas"; -import WorkspaceApi, { +import type { FetchWorkspaceRolesResponse, SaveWorkspaceRequest, FetchWorkspaceRequest, @@ -24,16 +26,17 @@ import WorkspaceApi, { FetchAllRolesRequest, SaveWorkspaceLogo, } from "@appsmith/api/WorkspaceApi"; -import { ApiResponse } from "api/ApiResponses"; +import WorkspaceApi from "@appsmith/api/WorkspaceApi"; +import type { ApiResponse } from "api/ApiResponses"; import { Toaster, Variant } from "design-system-old"; import { getCurrentWorkspace } from "@appsmith/selectors/workspaceSelectors"; import { getCurrentUser } from "selectors/usersSelectors"; -import { Workspace } from "@appsmith/constants/workspaceConstants"; +import type { Workspace } from "@appsmith/constants/workspaceConstants"; import history from "utils/history"; import { APPLICATIONS_URL } from "constants/routes"; import { getAllApplications } from "actions/applicationActions"; import log from "loglevel"; -import { User } from "constants/userConstants"; +import type { User } from "constants/userConstants"; import { createMessage, DELETE_WORKSPACE_SUCCESSFUL, diff --git a/app/client/src/ce/sagas/tenantSagas.tsx b/app/client/src/ce/sagas/tenantSagas.tsx index e6db029a62..1ff62c536c 100644 --- a/app/client/src/ce/sagas/tenantSagas.tsx +++ b/app/client/src/ce/sagas/tenantSagas.tsx @@ -3,7 +3,7 @@ import { ReduxActionErrorTypes, } from "@appsmith/constants/ReduxActionConstants"; import { call, put } from "redux-saga/effects"; -import { ApiResponse } from "api/ApiResponses"; +import type { ApiResponse } from "api/ApiResponses"; import { TenantApi } from "@appsmith/api/TenantApi"; import { validateResponse } from "sagas/ErrorSagas"; import { ERROR_CODES } from "ce/constants/ApiConstants"; diff --git a/app/client/src/ce/sagas/userSagas.tsx b/app/client/src/ce/sagas/userSagas.tsx index 1aef7c8975..f633793dc4 100644 --- a/app/client/src/ce/sagas/userSagas.tsx +++ b/app/client/src/ce/sagas/userSagas.tsx @@ -1,12 +1,14 @@ import { call, fork, put, race, select, take } from "redux-saga/effects"; -import { +import type { ReduxAction, ReduxActionWithPromise, +} from "@appsmith/constants/ReduxActionConstants"; +import { ReduxActionTypes, ReduxActionErrorTypes, } from "@appsmith/constants/ReduxActionConstants"; import { reset } from "redux-form"; -import UserApi, { +import type { CreateUserRequest, CreateUserResponse, ForgotPasswordRequest, @@ -15,9 +17,10 @@ import UserApi, { UpdateUserRequest, LeaveWorkspaceRequest, } from "@appsmith/api/UserApi"; +import UserApi from "@appsmith/api/UserApi"; import { AUTH_LOGIN_URL, SETUP } from "constants/routes"; import history from "utils/history"; -import { ApiResponse } from "api/ApiResponses"; +import type { ApiResponse } from "api/ApiResponses"; import { validateResponse, getResponseErrorMessage, @@ -39,7 +42,8 @@ import PerformanceTracker, { PerformanceTransactionName, } from "utils/PerformanceTracker"; import { ERROR_CODES } from "@appsmith/constants/ApiConstants"; -import { ANONYMOUS_USERNAME, User } from "constants/userConstants"; +import type { User } from "constants/userConstants"; +import { ANONYMOUS_USERNAME } from "constants/userConstants"; import { flushErrorsAndRedirect } from "actions/errorActions"; import localStorage from "utils/localStorage"; import { Toaster, Variant } from "design-system-old"; @@ -65,8 +69,8 @@ import { segmentInitUncertain, segmentInitSuccess, } from "actions/analyticsActions"; -import { SegmentState } from "reducers/uiReducers/analyticsReducer"; -import FeatureFlags from "entities/FeatureFlags"; +import type { SegmentState } from "reducers/uiReducers/analyticsReducer"; +import type FeatureFlags from "entities/FeatureFlags"; import UsagePulse from "usagePulse"; export function* createUserSaga( @@ -533,11 +537,10 @@ export function* updateFirstTimeUserOnboardingSage() { const enable: string | null = yield getEnableFirstTimeUserOnboarding(); if (enable) { - const applicationId: string = yield getFirstTimeUserOnboardingApplicationId() || - ""; - const introModalVisibility: - | string - | null = yield getFirstTimeUserOnboardingIntroModalVisibility(); + const applicationId: string = + yield getFirstTimeUserOnboardingApplicationId() || ""; + const introModalVisibility: string | null = + yield getFirstTimeUserOnboardingIntroModalVisibility(); yield put({ type: ReduxActionTypes.SET_ENABLE_FIRST_TIME_USER_ONBOARDING, payload: true, diff --git a/app/client/src/ce/selectors/tenantSelectors.tsx b/app/client/src/ce/selectors/tenantSelectors.tsx index 0fe3f8f920..91703ad5d8 100644 --- a/app/client/src/ce/selectors/tenantSelectors.tsx +++ b/app/client/src/ce/selectors/tenantSelectors.tsx @@ -1,4 +1,4 @@ -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; export const getTenantPermissions = (state: AppState) => { return state.tenant?.userPermissions; diff --git a/app/client/src/ce/selectors/workspaceSelectors.tsx b/app/client/src/ce/selectors/workspaceSelectors.tsx index 60fb4b460a..8f2065eac1 100644 --- a/app/client/src/ce/selectors/workspaceSelectors.tsx +++ b/app/client/src/ce/selectors/workspaceSelectors.tsx @@ -1,6 +1,6 @@ import { createSelector } from "reselect"; -import { AppState } from "@appsmith/reducers"; -import { WorkspaceRole } from "@appsmith/constants/workspaceConstants"; +import type { AppState } from "@appsmith/reducers"; +import type { WorkspaceRole } from "@appsmith/constants/workspaceConstants"; export const getRolesFromState = (state: AppState) => { return state.ui.workspaces.roles; diff --git a/app/client/src/ce/utils/adminSettingsHelpers.ts b/app/client/src/ce/utils/adminSettingsHelpers.ts index 8430a64fd3..26976eae62 100644 --- a/app/client/src/ce/utils/adminSettingsHelpers.ts +++ b/app/client/src/ce/utils/adminSettingsHelpers.ts @@ -1,11 +1,8 @@ import { getAppsmithConfigs } from "@appsmith/configs"; import { ADMIN_SETTINGS_CATEGORY_DEFAULT_PATH } from "constants/routes"; -import { User } from "constants/userConstants"; -const { - disableLoginForm, - enableGithubOAuth, - enableGoogleOAuth, -} = getAppsmithConfigs(); +import type { User } from "constants/userConstants"; +const { disableLoginForm, enableGithubOAuth, enableGoogleOAuth } = + getAppsmithConfigs(); export const connectedMethods = [ enableGoogleOAuth, diff --git a/app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts b/app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts index 805521d830..d5d45c4341 100644 --- a/app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts +++ b/app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts @@ -1,5 +1,5 @@ import { PluginType } from "entities/Action"; -import { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; +import type { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; import { entityDefinitions, getPropsForJSActionEntity, @@ -28,9 +28,8 @@ describe("EntityDefinitions", () => { }, }; - const listWidgetEntityDefinitions = entityDefinitions.LIST_WIDGET( - listWidgetProps, - ); + const listWidgetEntityDefinitions = + entityDefinitions.LIST_WIDGET(listWidgetProps); const output = { "!doc": @@ -156,8 +155,7 @@ const jsObject: JSCollectionData = { }, ], archivedActions: [], - body: - "export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t},\n\tmyFun2: async () => {\n\t\t//use async-await or promises\n\t}\n}", + body: "export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t},\n\tmyFun2: async () => {\n\t\t//use async-await or promises\n\t}\n}", variables: [ { name: "myVar1", diff --git a/app/client/src/ce/utils/autocomplete/EntityDefinitions.ts b/app/client/src/ce/utils/autocomplete/EntityDefinitions.ts index b56782d751..8bad5f26a0 100644 --- a/app/client/src/ce/utils/autocomplete/EntityDefinitions.ts +++ b/app/client/src/ce/utils/autocomplete/EntityDefinitions.ts @@ -1,15 +1,13 @@ -import { - ExtraDef, - generateTypeDef, -} from "utils/autocomplete/dataTreeTypeDefCreator"; -import { +import type { ExtraDef } from "utils/autocomplete/dataTreeTypeDefCreator"; +import { generateTypeDef } from "utils/autocomplete/dataTreeTypeDefCreator"; +import type { DataTreeAction, DataTreeAppsmith, } from "entities/DataTree/dataTreeFactory"; import _ from "lodash"; import { EVALUATION_PATH } from "utils/DynamicBindingUtils"; -import { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; -import { Def } from "tern"; +import type { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; +import type { Def } from "tern"; const isVisible = { "!type": "bool", diff --git a/app/client/src/ce/workers/Evaluation/Actions.ts b/app/client/src/ce/workers/Evaluation/Actions.ts index ec41e6bd58..81c4a9a919 100644 --- a/app/client/src/ce/workers/Evaluation/Actions.ts +++ b/app/client/src/ce/workers/Evaluation/Actions.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/ban-types */ -import { DataTree } from "entities/DataTree/dataTreeFactory"; -import { EvalContext } from "workers/Evaluation/evaluate"; -import { EvaluationVersion } from "api/ApplicationApi"; +import type { DataTree } from "entities/DataTree/dataTreeFactory"; +import type { EvalContext } from "workers/Evaluation/evaluate"; +import type { EvaluationVersion } from "api/ApplicationApi"; import { addFn } from "workers/Evaluation/fns/utils/fnGuard"; import { set } from "lodash"; import { diff --git a/app/client/src/ce/workers/Evaluation/PlatformFunctions.ts b/app/client/src/ce/workers/Evaluation/PlatformFunctions.ts index f75ae13231..6a6ad4cf79 100644 --- a/app/client/src/ce/workers/Evaluation/PlatformFunctions.ts +++ b/app/client/src/ce/workers/Evaluation/PlatformFunctions.ts @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/ban-types */ -import { ActionDescription } from "@appsmith/entities/DataTree/actionTriggers"; +import type { ActionDescription } from "@appsmith/entities/DataTree/actionTriggers"; import { ExecutionType } from "@appsmith/workers/Evaluation/Actions"; import _ from "lodash"; import uniqueId from "lodash/uniqueId"; -import { NavigationTargetType_Dep } from "sagas/ActionExecution/NavigateActionSaga"; +import type { NavigationTargetType_Dep } from "sagas/ActionExecution/NavigateActionSaga"; export type ActionDescriptionWithExecutionType = ActionDescription & { executionType: ExecutionType; @@ -17,7 +17,7 @@ export const PLATFORM_FUNCTIONS: Record< string, ActionDispatcherWithExecutionType > = { - navigateTo: function( + navigateTo: function ( pageNameOrUrl: string, params: Record, target?: NavigationTargetType_Dep, @@ -28,7 +28,7 @@ export const PLATFORM_FUNCTIONS: Record< executionType: ExecutionType.PROMISE, }; }, - showAlert: function( + showAlert: function ( message: string, style: "info" | "success" | "warning" | "error" | "default", ) { @@ -38,21 +38,21 @@ export const PLATFORM_FUNCTIONS: Record< executionType: ExecutionType.PROMISE, }; }, - showModal: function(modalName: string) { + showModal: function (modalName: string) { return { type: "SHOW_MODAL_BY_NAME", payload: { modalName }, executionType: ExecutionType.PROMISE, }; }, - closeModal: function(modalName: string) { + closeModal: function (modalName: string) { return { type: "CLOSE_MODAL", payload: { modalName }, executionType: ExecutionType.PROMISE, }; }, - storeValue: function(key: string, value: string, persist = true) { + storeValue: function (key: string, value: string, persist = true) { // momentarily store this value in local state to support loops _.set(self, ["appsmith", "store", key], value); return { @@ -66,28 +66,28 @@ export const PLATFORM_FUNCTIONS: Record< executionType: ExecutionType.PROMISE, }; }, - removeValue: function(key: string) { + removeValue: function (key: string) { return { type: "REMOVE_VALUE", payload: { key }, executionType: ExecutionType.PROMISE, }; }, - clearStore: function() { + clearStore: function () { return { type: "CLEAR_STORE", executionType: ExecutionType.PROMISE, payload: null, }; }, - download: function(data: string, name: string, type: string) { + download: function (data: string, name: string, type: string) { return { type: "DOWNLOAD", payload: { data, name, type }, executionType: ExecutionType.PROMISE, }; }, - copyToClipboard: function( + copyToClipboard: function ( data: string, options?: { debug?: boolean; format?: string }, ) { @@ -100,14 +100,14 @@ export const PLATFORM_FUNCTIONS: Record< executionType: ExecutionType.PROMISE, }; }, - resetWidget: function(widgetName: string, resetChildren = true) { + resetWidget: function (widgetName: string, resetChildren = true) { return { type: "RESET_WIDGET_META_RECURSIVE_BY_NAME", payload: { widgetName, resetChildren }, executionType: ExecutionType.PROMISE, }; }, - setInterval: function(callback: Function, interval: number, id?: string) { + setInterval: function (callback: Function, interval: number, id?: string) { return { type: "SET_INTERVAL", payload: { @@ -118,7 +118,7 @@ export const PLATFORM_FUNCTIONS: Record< executionType: ExecutionType.TRIGGER, }; }, - clearInterval: function(id: string) { + clearInterval: function (id: string) { return { type: "CLEAR_INTERVAL", payload: { @@ -127,7 +127,7 @@ export const PLATFORM_FUNCTIONS: Record< executionType: ExecutionType.TRIGGER, }; }, - postWindowMessage: function( + postWindowMessage: function ( message: unknown, source: string, targetOrigin: string, diff --git a/app/client/src/ce/workers/Evaluation/__tests__/dataTreeUtils.test.ts b/app/client/src/ce/workers/Evaluation/__tests__/dataTreeUtils.test.ts index 8ef916daec..26f915464f 100644 --- a/app/client/src/ce/workers/Evaluation/__tests__/dataTreeUtils.test.ts +++ b/app/client/src/ce/workers/Evaluation/__tests__/dataTreeUtils.test.ts @@ -1,4 +1,4 @@ -import { +import type { UnEvalTree, UnEvalTreeAction, } from "entities/DataTree/dataTreeFactory"; @@ -59,8 +59,7 @@ const unevalTreeFromMainThread = { storeTest2: { data: {}, }, - body: - "export default {\n\tstoreTest2: () => {\n\t\tlet values = [\n\t\t\t\t\tstoreValue('val1', 'number 1'),\n\t\t\t\t\tstoreValue('val2', 'number 2'),\n\t\t\t\t\tstoreValue('val3', 'number 3'),\n\t\t\t\t\tstoreValue('val4', 'number 4')\n\t\t\t\t];\n\t\treturn Promise.all(values)\n\t\t\t.then(() => {\n\t\t\tshowAlert(JSON.stringify(appsmith.store))\n\t\t})\n\t\t\t.catch((err) => {\n\t\t\treturn showAlert('Could not store values in store ' + err.toString());\n\t\t})\n\t},\n\tnewFunction: function() {\n\t\tJSObject1.storeTest()\n\t}\n}", + body: "export default {\n\tstoreTest2: () => {\n\t\tlet values = [\n\t\t\t\t\tstoreValue('val1', 'number 1'),\n\t\t\t\t\tstoreValue('val2', 'number 2'),\n\t\t\t\t\tstoreValue('val3', 'number 3'),\n\t\t\t\t\tstoreValue('val4', 'number 4')\n\t\t\t\t];\n\t\treturn Promise.all(values)\n\t\t\t.then(() => {\n\t\t\tshowAlert(JSON.stringify(appsmith.store))\n\t\t})\n\t\t\t.catch((err) => {\n\t\t\treturn showAlert('Could not store values in store ' + err.toString());\n\t\t})\n\t},\n\tnewFunction: function() {\n\t\tJSObject1.storeTest()\n\t}\n}", ENTITY_TYPE: "JSACTION", __config__: { meta: { @@ -355,7 +354,7 @@ const unevalTreeFromMainThread = { describe("7. Test util methods", () => { it("1. createUnEvalTree method", () => { const unEvalTreeForEval = createUnEvalTreeForEval( - (unevalTreeFromMainThread as unknown) as UnEvalTree, + unevalTreeFromMainThread as unknown as UnEvalTree, ); // Action config expect(unEvalTreeForEval).toHaveProperty( @@ -408,7 +407,7 @@ describe("7. Test util methods", () => { it("2. createNewEntity method", () => { const actionForEval = createNewEntity( - (unevalTreeFromMainThread.Api2 as unknown) as UnEvalTreeAction, + unevalTreeFromMainThread.Api2 as unknown as UnEvalTreeAction, ); // Action config expect(actionForEval).toHaveProperty( @@ -418,7 +417,7 @@ describe("7. Test util methods", () => { expect(actionForEval).not.toHaveProperty("__config__"); const widgetForEval = createNewEntity( - (unevalTreeFromMainThread.Button2 as unknown) as UnEvalTreeAction, + unevalTreeFromMainThread.Button2 as unknown as UnEvalTreeAction, ); // widget config expect(widgetForEval).toHaveProperty( @@ -430,7 +429,7 @@ describe("7. Test util methods", () => { it("3. makeDataTreeEntityConfigAsProperty method", () => { const unEvalTreeForEval = createUnEvalTreeForEval( - (unevalTreeFromMainThread as unknown) as UnEvalTree, + unevalTreeFromMainThread as unknown as UnEvalTree, ); const dataTree = makeEntityConfigsAsObjProperties(unEvalTreeForEval); diff --git a/app/client/src/ce/workers/Evaluation/dataTreeUtils.ts b/app/client/src/ce/workers/Evaluation/dataTreeUtils.ts index 3f3b2445bd..4eb4ab0c28 100644 --- a/app/client/src/ce/workers/Evaluation/dataTreeUtils.ts +++ b/app/client/src/ce/workers/Evaluation/dataTreeUtils.ts @@ -1,11 +1,11 @@ -import { +import type { DataTree, DataTreeEntity, UnEvalTree, UnEvalTreeEntityObject, } from "entities/DataTree/dataTreeFactory"; import { set } from "lodash"; -import { EvalProps } from "workers/common/DataTreeEvaluator"; +import type { EvalProps } from "workers/common/DataTreeEvaluator"; import { removeFunctions } from "@appsmith/workers/Evaluation/evaluationUtils"; /** diff --git a/app/client/src/ce/workers/Evaluation/evaluationUtils.test.ts b/app/client/src/ce/workers/Evaluation/evaluationUtils.test.ts index 0c48cc500f..39716d70dd 100644 --- a/app/client/src/ce/workers/Evaluation/evaluationUtils.test.ts +++ b/app/client/src/ce/workers/Evaluation/evaluationUtils.test.ts @@ -1,22 +1,21 @@ -import { - DependencyMap, - EvaluationError, - PropertyEvaluationErrorType, -} from "utils/DynamicBindingUtils"; +import type { DependencyMap, EvaluationError } from "utils/DynamicBindingUtils"; +import { PropertyEvaluationErrorType } from "utils/DynamicBindingUtils"; import { RenderModes } from "constants/WidgetConstants"; import { ValidationTypes } from "constants/WidgetValidation"; -import { +import type { DataTreeEntity, DataTreeJSAction, DataTreeWidget, +} from "entities/DataTree/dataTreeFactory"; +import { ENTITY_TYPE, EvaluationSubstitutionType, } from "entities/DataTree/dataTreeFactory"; -import { PrivateWidgets } from "entities/DataTree/types"; +import type { PrivateWidgets } from "entities/DataTree/types"; +import type { DataTreeDiff } from "@appsmith/workers/Evaluation/evaluationUtils"; import { addErrorToEntityProperty, convertJSFunctionsToString, - DataTreeDiff, DataTreeDiffEvent, getAllPaths, getAllPrivateWidgetsInDataTree, @@ -26,21 +25,21 @@ import { translateDiffEventToDataTreeDiffEvent, } from "@appsmith/workers/Evaluation/evaluationUtils"; import { warn as logWarn } from "loglevel"; -import { Diff } from "deep-diff"; +import type { Diff } from "deep-diff"; import _, { flatten, set } from "lodash"; import { overrideWidgetProperties, findDatatype, } from "@appsmith/workers/Evaluation/evaluationUtils"; -import { DataTree } from "entities/DataTree/dataTreeFactory"; -import { EvalMetaUpdates } from "@appsmith/workers/common/DataTreeEvaluator/types"; +import type { DataTree } from "entities/DataTree/dataTreeFactory"; +import type { EvalMetaUpdates } from "@appsmith/workers/common/DataTreeEvaluator/types"; import { generateDataTreeWidget } from "entities/DataTree/dataTreeWidget"; import TableWidget, { CONFIG as TableWidgetConfig } from "widgets/TableWidget"; import InputWidget, { CONFIG as InputWidgetV2Config, } from "widgets/InputWidgetV2"; import { registerWidget } from "utils/WidgetRegisterHelpers"; -import { WidgetConfiguration } from "widgets/constants"; +import type { WidgetConfiguration } from "widgets/constants"; import { createNewEntity } from "@appsmith/workers/Evaluation/dataTreeUtils"; import DataTreeEvaluator from "workers/common/DataTreeEvaluator"; import { Severity } from "entities/AppsmithConsole"; @@ -217,9 +216,8 @@ describe("2. privateWidgets", () => { Text3: true, }; - const actualPrivateWidgetsList = getAllPrivateWidgetsInDataTree( - testDataTree, - ); + const actualPrivateWidgetsList = + getAllPrivateWidgetsInDataTree(testDataTree); expect(expectedPrivateWidgetsList).toStrictEqual(actualPrivateWidgetsList); }); @@ -279,9 +277,8 @@ describe("2. privateWidgets", () => { }, }; - const actualDataTreeWithoutPrivateWidgets = getDataTreeWithoutPrivateWidgets( - testDataTree, - ); + const actualDataTreeWithoutPrivateWidgets = + getDataTreeWithoutPrivateWidgets(testDataTree); expect(expectedDataTreeWithoutPrivateWidgets).toStrictEqual( actualDataTreeWithoutPrivateWidgets, @@ -464,9 +461,9 @@ describe("4. translateDiffEvent", () => { const actualTranslations = flatten( diffs.map((diff) => translateDiffEventToDataTreeDiffEvent(diff, { - JsObject: ({ + JsObject: { ENTITY_TYPE: ENTITY_TYPE.JSACTION, - } as unknown) as DataTreeEntity, + } as unknown as DataTreeEntity, }), ), ); @@ -583,7 +580,7 @@ describe("5. overrideWidgetProperties", () => { registerWidget(TableWidget, TableWidgetConfig); registerWidget( InputWidget, - (InputWidgetV2Config as unknown) as WidgetConfiguration, + InputWidgetV2Config as unknown as WidgetConfiguration, ); }); @@ -779,7 +776,7 @@ describe("6. Evaluated Datatype of a given value", () => { expect(findDatatype({ a: 1 })).toBe("object"); expect(findDatatype({})).toBe("object"); expect(findDatatype(new Date())).toBe("date"); - const func = function() { + const func = function () { return "hello world"; }; expect(findDatatype(func)).toBe("function"); @@ -869,8 +866,7 @@ describe("convertJSFunctionsToString", () => { myVar2: "{}", myFun1: JSObject2MyFun1, myFun2: JSObject2MyFun2, - body: - "export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t},\n\tmyFun2: async () => {\n\t\t//use async-await or promises\n\t}\n}", + body: "export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t},\n\tmyFun2: async () => {\n\t\t//use async-await or promises\n\t}\n}", ENTITY_TYPE: ENTITY_TYPE.JSACTION, meta: { @@ -967,8 +963,7 @@ describe("convertJSFunctionsToString", () => { myVar2: "{}", myFun1: "() => {}", myFun2: "async () => {}", - body: - "export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t},\n\tmyFun2: async () => {\n\t\t//use async-await or promises\n\t}\n}", + body: "export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t},\n\tmyFun2: async () => {\n\t\t//use async-await or promises\n\t}\n}", ENTITY_TYPE: "JSACTION", "myFun1.data": {}, "myFun2.data": {}, diff --git a/app/client/src/ce/workers/Evaluation/evaluationUtils.ts b/app/client/src/ce/workers/Evaluation/evaluationUtils.ts index 60ddd4062c..3c016afd6c 100644 --- a/app/client/src/ce/workers/Evaluation/evaluationUtils.ts +++ b/app/client/src/ce/workers/Evaluation/evaluationUtils.ts @@ -1,34 +1,33 @@ +import type { DependencyMap, EvaluationError } from "utils/DynamicBindingUtils"; import { - DependencyMap, EVAL_ERROR_PATH, - EvaluationError, isChildPropertyPath, isDynamicValue, PropertyEvaluationErrorType, isPathDynamicTrigger, } from "utils/DynamicBindingUtils"; -import { Diff } from "deep-diff"; -import { +import type { Diff } from "deep-diff"; +import type { DataTree, DataTreeAction, DataTreeAppsmith, DataTreeEntity, DataTreeWidget, - ENTITY_TYPE, DataTreeJSAction, } from "entities/DataTree/dataTreeFactory"; +import { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory"; import _, { difference, find, get, has, set } from "lodash"; -import { WidgetTypeConfigMap } from "utils/WidgetFactory"; +import type { WidgetTypeConfigMap } from "utils/WidgetFactory"; import { PluginType } from "entities/Action"; import { klona } from "klona/full"; import { warn as logWarn } from "loglevel"; -import { EvalMetaUpdates } from "@appsmith/workers/common/DataTreeEvaluator/types"; +import type { EvalMetaUpdates } from "@appsmith/workers/common/DataTreeEvaluator/types"; import { isObject } from "lodash"; -import { DataTreeObjectEntity } from "entities/DataTree/dataTreeFactory"; +import type { DataTreeObjectEntity } from "entities/DataTree/dataTreeFactory"; import { validateWidgetProperty } from "workers/common/DataTreeEvaluator/validationUtils"; -import { PrivateWidgets } from "entities/DataTree/types"; -import { EvalProps } from "workers/common/DataTreeEvaluator"; +import type { PrivateWidgets } from "entities/DataTree/types"; +import type { EvalProps } from "workers/common/DataTreeEvaluator"; // Dropdown1.options[1].value -> Dropdown1.options[1] // Dropdown1.options[1] -> Dropdown1.options @@ -74,9 +73,7 @@ function isInt(val: string | number): boolean { } // Removes the entity name from the property path -export function getEntityNameAndPropertyPath( - fullPath: string, -): { +export function getEntityNameAndPropertyPath(fullPath: string): { entityName: string; propertyPath: string; } { @@ -154,9 +151,8 @@ export const translateDiffEventToDataTreeDiffEvent = ( }; //we do not need evaluate these paths because these are internal paths - const isUninterestingPathForUpdateTree = isUninterestingChangeForDependencyUpdate( - propertyPath, - ); + const isUninterestingPathForUpdateTree = + isUninterestingChangeForDependencyUpdate(propertyPath); if (!!isUninterestingPathForUpdateTree) { return result; } @@ -570,12 +566,10 @@ export const addErrorToEntityProperty = ({ fullPropertyPath: string; evalProps: EvalProps; }) => { - const { entityName, propertyPath } = getEntityNameAndPropertyPath( - fullPropertyPath, - ); - const isPrivateEntityPath = getAllPrivateWidgetsInDataTree(dataTree)[ - entityName - ]; + const { entityName, propertyPath } = + getEntityNameAndPropertyPath(fullPropertyPath); + const isPrivateEntityPath = + getAllPrivateWidgetsInDataTree(dataTree)[entityName]; const logBlackList = get(dataTree, `${entityName}.logBlackList`, {}); if (propertyPath && !(propertyPath in logBlackList) && !isPrivateEntityPath) { const errorPath = `${entityName}.${EVAL_ERROR_PATH}['${propertyPath}']`; @@ -593,16 +587,13 @@ export const resetValidationErrorsForEntityProperty = ({ fullPropertyPath: string; evalProps: EvalProps; }) => { - const { entityName, propertyPath } = getEntityNameAndPropertyPath( - fullPropertyPath, - ); + const { entityName, propertyPath } = + getEntityNameAndPropertyPath(fullPropertyPath); if (propertyPath) { const errorPath = `${entityName}.${EVAL_ERROR_PATH}['${propertyPath}']`; - const existingErrorsExceptValidation = (_.get( - evalProps, - errorPath, - [], - ) as EvaluationError[]).filter( + const existingErrorsExceptValidation = ( + _.get(evalProps, errorPath, []) as EvaluationError[] + ).filter( (error) => error.errorType !== PropertyEvaluationErrorType.VALIDATION, ); _.set(evalProps, errorPath, existingErrorsExceptValidation); @@ -624,10 +615,7 @@ export const isTrueObject = ( * @returns datatype of the received value as string */ export const findDatatype = (value: unknown) => { - return Object.prototype.toString - .call(value) - .slice(8, -1) - .toLowerCase(); + return Object.prototype.toString.call(value).slice(8, -1).toLowerCase(); }; export const isDynamicLeaf = (unEvalTree: DataTree, propertyPath: string) => { @@ -728,9 +716,8 @@ const getDataTreeWithoutSuppressedAutoComplete = ( export const getDataTreeForAutocomplete = (dataTree: DataTree): DataTree => { const treeWithoutPrivateWidgets = getDataTreeWithoutPrivateWidgets(dataTree); - const treeWithoutSuppressedAutoComplete = getDataTreeWithoutSuppressedAutoComplete( - treeWithoutPrivateWidgets, - ); + const treeWithoutSuppressedAutoComplete = + getDataTreeWithoutSuppressedAutoComplete(treeWithoutPrivateWidgets); return treeWithoutSuppressedAutoComplete; }; diff --git a/app/client/src/components/TabItemBackgroundFill.tsx b/app/client/src/components/TabItemBackgroundFill.tsx index f594d5bfac..c4d559be66 100644 --- a/app/client/src/components/TabItemBackgroundFill.tsx +++ b/app/client/src/components/TabItemBackgroundFill.tsx @@ -1,7 +1,8 @@ import React from "react"; import styled from "styled-components"; -import { getTypographyByKey, TabProp } from "design-system-old"; -import { Theme } from "constants/DefaultTheme"; +import type { TabProp } from "design-system-old"; +import { getTypographyByKey } from "design-system-old"; +import type { Theme } from "constants/DefaultTheme"; type WrapperProps = { selected: boolean; diff --git a/app/client/src/components/autoHeight/AutoHeightContainer.tsx b/app/client/src/components/autoHeight/AutoHeightContainer.tsx index 80fdaa3fa6..0651ac9239 100644 --- a/app/client/src/components/autoHeight/AutoHeightContainer.tsx +++ b/app/client/src/components/autoHeight/AutoHeightContainer.tsx @@ -1,11 +1,12 @@ -import React, { PropsWithChildren, useEffect, useRef, useState } from "react"; +import type { PropsWithChildren } from "react"; +import React, { useEffect, useRef, useState } from "react"; import { GridDefaults, WidgetHeightLimits, WIDGET_PADDING, } from "constants/WidgetConstants"; import styled from "styled-components"; -import { WidgetProps } from "widgets/BaseWidget"; +import type { WidgetProps } from "widgets/BaseWidget"; const StyledAutoHeightContainer = styled.div<{ isOverflow?: boolean }>` overflow-y: ${(props) => (props.isOverflow ? "auto" : "unset")}; diff --git a/app/client/src/components/autoHeight/AutoHeightContainerWrapper.tsx b/app/client/src/components/autoHeight/AutoHeightContainerWrapper.tsx index b0a228e88d..8568587f01 100644 --- a/app/client/src/components/autoHeight/AutoHeightContainerWrapper.tsx +++ b/app/client/src/components/autoHeight/AutoHeightContainerWrapper.tsx @@ -1,8 +1,9 @@ import { GridDefaults } from "constants/WidgetConstants"; -import React, { ReactNode } from "react"; +import type { ReactNode } from "react"; +import React from "react"; import useWidgetConfig from "utils/hooks/useWidgetConfig"; import { DynamicHeight } from "utils/WidgetFeatures"; -import { WidgetProps } from "widgets/BaseWidget"; +import type { WidgetProps } from "widgets/BaseWidget"; import { getWidgetMaxAutoHeight, getWidgetMinAutoHeight, diff --git a/app/client/src/components/autoHeightOverlay/AutoHeightLimitHandleGroup.tsx b/app/client/src/components/autoHeightOverlay/AutoHeightLimitHandleGroup.tsx index 91c5104329..18482daca4 100644 --- a/app/client/src/components/autoHeightOverlay/AutoHeightLimitHandleGroup.tsx +++ b/app/client/src/components/autoHeightOverlay/AutoHeightLimitHandleGroup.tsx @@ -4,7 +4,7 @@ import AutoHeightLimitHandleBorder from "./ui/AutoHeightLimitHandleBorder"; import { useDrag } from "react-use-gesture"; import { heightToRows } from "./utils"; import AutoHeightLimitHandleLabel from "./ui/AutoHeightLimitHandleLabel"; -import { onDragCallbacksProps, onMouseHoverCallbacksProps } from "./types"; +import type { onDragCallbacksProps, onMouseHoverCallbacksProps } from "./types"; import AutoHeightLimitHandleDot from "./ui/AutoHeightLimitHandleDot"; const AutoHeightLimitHandleGroupContainer = styled.div` @@ -35,9 +35,7 @@ interface AutoHeightLimitHandleContainerProps { height: number; } -const AutoHeightLimitHandleContainer = styled.div< - AutoHeightLimitHandleContainerProps ->` +const AutoHeightLimitHandleContainer = styled.div` position: absolute; display: flex; align-items: center; diff --git a/app/client/src/components/autoHeightOverlay/AutoHeightOverlay.tsx b/app/client/src/components/autoHeightOverlay/AutoHeightOverlay.tsx index 73538decdf..fd90c9d66c 100644 --- a/app/client/src/components/autoHeightOverlay/AutoHeightOverlay.tsx +++ b/app/client/src/components/autoHeightOverlay/AutoHeightOverlay.tsx @@ -11,7 +11,7 @@ import { } from "./hooks"; import { LayersContext } from "constants/Layers"; import { useAutoHeightLimitsState } from "./store"; -import { AutoHeightOverlayContainerProps } from "."; +import type { AutoHeightOverlayContainerProps } from "."; interface StyledAutoHeightOverlayProps { layerIndex: number; @@ -67,21 +67,11 @@ const AutoHeightOverlay: React.FC = memo( batchUpdate, }); - const { - isMaxDotDragging, - isMinDotDragging, - maxdY, - maxY, - mindY, - minY, - } = useAutoHeightLimitsState(); + const { isMaxDotDragging, isMinDotDragging, maxdY, maxY, mindY, minY } = + useAutoHeightLimitsState(); - const { - setMaxdY, - setMaxY, - setMindY, - setMinY, - } = useAutoHeightOverlayUIStateActions(); + const { setMaxdY, setMaxY, setMindY, setMinY } = + useAutoHeightOverlayUIStateActions(); const finalMaxY = maxY + maxdY; const finalMinY = minY + mindY; diff --git a/app/client/src/components/autoHeightOverlay/AutoHeightOverlayWithStateContext.tsx b/app/client/src/components/autoHeightOverlay/AutoHeightOverlayWithStateContext.tsx index fe4871564d..e7bd59b52d 100644 --- a/app/client/src/components/autoHeightOverlay/AutoHeightOverlayWithStateContext.tsx +++ b/app/client/src/components/autoHeightOverlay/AutoHeightOverlayWithStateContext.tsx @@ -1,5 +1,6 @@ import React from "react"; -import AutoHeightOverlay, { AutoHeightOverlayProps } from "./AutoHeightOverlay"; +import type { AutoHeightOverlayProps } from "./AutoHeightOverlay"; +import AutoHeightOverlay from "./AutoHeightOverlay"; import { AutoHeightLimitsStateContextProvider } from "./store"; function AutoHeightOverlayWithStateContext(props: AutoHeightOverlayProps) { diff --git a/app/client/src/components/autoHeightOverlay/hooks.ts b/app/client/src/components/autoHeightOverlay/hooks.ts index 18d34e6e5f..002239fbe5 100644 --- a/app/client/src/components/autoHeightOverlay/hooks.ts +++ b/app/client/src/components/autoHeightOverlay/hooks.ts @@ -4,19 +4,14 @@ import { GridDefaults, WidgetHeightLimits, } from "constants/WidgetConstants"; -import { - CSSProperties, - useCallback, - useEffect, - useMemo, - useState, -} from "react"; +import type { CSSProperties } from "react"; +import { useCallback, useEffect, useMemo, useState } from "react"; import { CallbackHandlerEventType } from "utils/CallbackHandler/CallbackHandlerEventType"; import DynamicHeightCallbackHandler from "utils/CallbackHandler/DynamicHeightCallbackHandler"; import { useAutoHeightLimitsDispatch, useAutoHeightLimitsState } from "./store"; -import { onMouseHoverCallbacksProps } from "./types"; +import type { onMouseHoverCallbacksProps } from "./types"; import { getSnappedValues } from "./utils"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import { useWidgetSelection } from "utils/hooks/useWidgetSelection"; import { useSelector } from "react-redux"; import { @@ -90,15 +85,11 @@ export const usePositionedStyles = ({ }; export const useMaxMinPropertyPaneFieldsFocused = () => { - const [ - isPropertyPaneMinFieldFocused, - setPropertyPaneMinFieldFocused, - ] = useState(false); + const [isPropertyPaneMinFieldFocused, setPropertyPaneMinFieldFocused] = + useState(false); - const [ - isPropertyPaneMaxFieldFocused, - setPropertyPaneMaxFieldFocused, - ] = useState(false); + const [isPropertyPaneMaxFieldFocused, setPropertyPaneMaxFieldFocused] = + useState(false); function handleOnMaxLimitPropertyPaneFieldFocus() { setPropertyPaneMaxFieldFocused(true); @@ -257,19 +248,13 @@ export function useDragCallbacksForHandles({ const parentWidgetToSelect = useSelector(getParentToOpenSelector(widgetId)); const showTableFilterPane = useShowTableFilterPane(); - const { - isAutoHeightWithLimitsChanging, - setIsAutoHeightWithLimitsChanging, - } = useAutoHeightUIState(); + const { isAutoHeightWithLimitsChanging, setIsAutoHeightWithLimitsChanging } = + useAutoHeightUIState(); const { maxdY, maxY, mindY, minY } = useAutoHeightLimitsState(); - const { - setIsMaxDotDragging, - setIsMinDotDragging, - setMaxdY, - setMindY, - } = useAutoHeightOverlayUIStateActions(); + const { setIsMaxDotDragging, setIsMinDotDragging, setMaxdY, setMindY } = + useAutoHeightOverlayUIStateActions(); const snapGrid = useMemo( () => ({ diff --git a/app/client/src/components/autoHeightOverlay/index.tsx b/app/client/src/components/autoHeightOverlay/index.tsx index d0aada86d6..8371b678bf 100644 --- a/app/client/src/components/autoHeightOverlay/index.tsx +++ b/app/client/src/components/autoHeightOverlay/index.tsx @@ -1,8 +1,9 @@ -import { AppState } from "@appsmith/reducers"; -import React, { CSSProperties, memo } from "react"; +import type { AppState } from "@appsmith/reducers"; +import type { CSSProperties } from "react"; +import React, { memo } from "react"; import { useSelector } from "react-redux"; import { previewModeSelector } from "selectors/editorSelectors"; -import { WidgetProps } from "widgets/BaseWidget"; +import type { WidgetProps } from "widgets/BaseWidget"; import AutoHeightOverlayWithStateContext from "./AutoHeightOverlayWithStateContext"; export interface MinMaxHeightProps { @@ -19,8 +20,8 @@ export interface AutoHeightOverlayContainerProps style?: CSSProperties; } -const AutoHeightOverlayContainer: React.FC = memo( - (props) => { +const AutoHeightOverlayContainer: React.FC = + memo((props) => { const widgetId = props.widgetId; const { isDragging, @@ -42,7 +43,6 @@ const AutoHeightOverlayContainer: React.FC = me } return null; - }, -); + }); export default AutoHeightOverlayContainer; diff --git a/app/client/src/components/autoHeightOverlay/store.tsx b/app/client/src/components/autoHeightOverlay/store.tsx index a20e9053bf..eae15b57b5 100644 --- a/app/client/src/components/autoHeightOverlay/store.tsx +++ b/app/client/src/components/autoHeightOverlay/store.tsx @@ -105,9 +105,8 @@ interface StateContextType { dispatch: React.Dispatch; } -export const AutoHeightLimitsStateContext = React.createContext< - StateContextType ->({} as StateContextType); +export const AutoHeightLimitsStateContext = + React.createContext({} as StateContextType); export const AutoHeightLimitsStateContextProvider: React.FC<{ children: React.ReactNode; diff --git a/app/client/src/components/autoHeightOverlay/ui/AutoHeightLimitHandleBorder.tsx b/app/client/src/components/autoHeightOverlay/ui/AutoHeightLimitHandleBorder.tsx index 74e92e8a22..7a97c15351 100644 --- a/app/client/src/components/autoHeightOverlay/ui/AutoHeightLimitHandleBorder.tsx +++ b/app/client/src/components/autoHeightOverlay/ui/AutoHeightLimitHandleBorder.tsx @@ -5,9 +5,7 @@ interface AutoHeightLimitHandleBorderProps { isActive: boolean; } -const AutoHeightLimitHandleBorder = styled.div< - AutoHeightLimitHandleBorderProps ->` +const AutoHeightLimitHandleBorder = styled.div` background-image: linear-gradient( to right, ${OVERLAY_COLOR} 50%, diff --git a/app/client/src/components/autoHeightOverlay/ui/AutoHeightLimitOverlayDisplay.tsx b/app/client/src/components/autoHeightOverlay/ui/AutoHeightLimitOverlayDisplay.tsx index 8deee0122d..faec73e361 100644 --- a/app/client/src/components/autoHeightOverlay/ui/AutoHeightLimitOverlayDisplay.tsx +++ b/app/client/src/components/autoHeightOverlay/ui/AutoHeightLimitOverlayDisplay.tsx @@ -5,9 +5,7 @@ interface AutoHeightLimitOverlayDisplayProps { height: number; } -const AutoHeightLimitOverlayDisplay = styled.div< - AutoHeightLimitOverlayDisplayProps ->` +const AutoHeightLimitOverlayDisplay = styled.div` display: ${(props) => (props.isActive ? "block" : "none")}; position: absolute; top: 0; diff --git a/app/client/src/components/constants.ts b/app/client/src/components/constants.ts index edc3525cfd..64a2370af0 100644 --- a/app/client/src/components/constants.ts +++ b/app/client/src/components/constants.ts @@ -1,5 +1,5 @@ -import { Intent as BlueprintIntent } from "@blueprintjs/core"; -import { IconName } from "@blueprintjs/icons"; +import type { Intent as BlueprintIntent } from "@blueprintjs/core"; +import type { IconName } from "@blueprintjs/icons"; export interface DropdownOption { label: string; @@ -28,7 +28,7 @@ export const InputTypes: { [key: string]: string } = { SEARCH: "SEARCH", }; -export type InputType = typeof InputTypes[keyof typeof InputTypes]; +export type InputType = (typeof InputTypes)[keyof typeof InputTypes]; export enum ButtonBorderRadiusTypes { SHARP = "SHARP", diff --git a/app/client/src/components/designSystems/appsmith/BaseButton.tsx b/app/client/src/components/designSystems/appsmith/BaseButton.tsx index d623ee1618..6ff59a71af 100644 --- a/app/client/src/components/designSystems/appsmith/BaseButton.tsx +++ b/app/client/src/components/designSystems/appsmith/BaseButton.tsx @@ -2,22 +2,25 @@ import React from "react"; import styled from "styled-components"; import tinycolor from "tinycolor2"; -import { IButtonProps, Button, Alignment } from "@blueprintjs/core"; -import { IconName } from "@blueprintjs/icons"; +import type { IButtonProps } from "@blueprintjs/core"; +import { Button, Alignment } from "@blueprintjs/core"; +import type { IconName } from "@blueprintjs/icons"; -import { Theme } from "constants/DefaultTheme"; +import type { Theme } from "constants/DefaultTheme"; import _ from "lodash"; +import type { + ButtonBorderRadius, + ButtonStyleType, + ButtonVariant, +} from "components/constants"; import { ButtonStyleTypes, ButtonBoxShadowTypes, - ButtonBorderRadius, ButtonBorderRadiusTypes, - ButtonStyleType, - ButtonVariant, ButtonVariantTypes, } from "components/constants"; -import { ThemeProp } from "widgets/constants"; +import type { ThemeProp } from "widgets/constants"; const getCustomTextColor = ( theme: Theme, @@ -50,23 +53,17 @@ const getCustomHoverColor = ( switch (buttonVariant) { case ButtonVariantTypes.SECONDARY: return backgroundColor - ? tinycolor(backgroundColor) - .lighten(40) - .toString() + ? tinycolor(backgroundColor).lighten(40).toString() : theme.colors.button.primary.secondary.hoverColor; case ButtonVariantTypes.TERTIARY: return backgroundColor - ? tinycolor(backgroundColor) - .lighten(40) - .toString() + ? tinycolor(backgroundColor).lighten(40).toString() : theme.colors.button.primary.tertiary.hoverColor; default: return backgroundColor - ? tinycolor(backgroundColor) - .darken(10) - .toString() + ? tinycolor(backgroundColor).darken(10).toString() : theme.colors.button.primary.primary.hoverColor; } }; @@ -255,20 +252,25 @@ const StyledButton = styled((props) => ( box-shadow: ${({ boxShadow, boxShadowColor, theme }) => boxShadow === ButtonBoxShadowTypes.VARIANT1 - ? `0px 0px 4px 3px ${boxShadowColor || - theme.colors.button.boxShadow.default.variant1}` + ? `0px 0px 4px 3px ${ + boxShadowColor || theme.colors.button.boxShadow.default.variant1 + }` : boxShadow === ButtonBoxShadowTypes.VARIANT2 - ? `3px 3px 4px ${boxShadowColor || - theme.colors.button.boxShadow.default.variant2}` + ? `3px 3px 4px ${ + boxShadowColor || theme.colors.button.boxShadow.default.variant2 + }` : boxShadow === ButtonBoxShadowTypes.VARIANT3 - ? `0px 1px 3px ${boxShadowColor || - theme.colors.button.boxShadow.default.variant3}` + ? `0px 1px 3px ${ + boxShadowColor || theme.colors.button.boxShadow.default.variant3 + }` : boxShadow === ButtonBoxShadowTypes.VARIANT4 - ? `2px 2px 0px ${boxShadowColor || - theme.colors.button.boxShadow.default.variant4}` + ? `2px 2px 0px ${ + boxShadowColor || theme.colors.button.boxShadow.default.variant4 + }` : boxShadow === ButtonBoxShadowTypes.VARIANT5 - ? `-2px -2px 0px ${boxShadowColor || - theme.colors.button.boxShadow.default.variant5}` + ? `-2px -2px 0px ${ + boxShadowColor || theme.colors.button.boxShadow.default.variant5 + }` : "none"} !important; `; diff --git a/app/client/src/components/designSystems/appsmith/CloseButton.tsx b/app/client/src/components/designSystems/appsmith/CloseButton.tsx index a5d3bcd5f6..93de5c88dd 100644 --- a/app/client/src/components/designSystems/appsmith/CloseButton.tsx +++ b/app/client/src/components/designSystems/appsmith/CloseButton.tsx @@ -1,6 +1,6 @@ import React from "react"; import styled from "styled-components"; -import { Color } from "constants/Colors"; +import type { Color } from "constants/Colors"; import { Button } from "@blueprintjs/core"; type CloseButtonProps = { diff --git a/app/client/src/components/designSystems/appsmith/CreatableDropdown.tsx b/app/client/src/components/designSystems/appsmith/CreatableDropdown.tsx index 7220d1656c..6888ff3cd7 100644 --- a/app/client/src/components/designSystems/appsmith/CreatableDropdown.tsx +++ b/app/client/src/components/designSystems/appsmith/CreatableDropdown.tsx @@ -1,9 +1,10 @@ import React from "react"; -import Select, { InputActionMeta } from "react-select"; -import { WrappedFieldInputProps, WrappedFieldMetaProps } from "redux-form"; +import type { InputActionMeta } from "react-select"; +import Select from "react-select"; +import type { WrappedFieldInputProps, WrappedFieldMetaProps } from "redux-form"; import { theme } from "constants/DefaultTheme"; -import { SelectComponents } from "react-select/src/components"; +import type { SelectComponents } from "react-select/src/components"; type DropdownProps = { options: Array<{ diff --git a/app/client/src/components/designSystems/appsmith/Dropdown.tsx b/app/client/src/components/designSystems/appsmith/Dropdown.tsx index 4444fa69f6..1472cd8501 100644 --- a/app/client/src/components/designSystems/appsmith/Dropdown.tsx +++ b/app/client/src/components/designSystems/appsmith/Dropdown.tsx @@ -1,8 +1,8 @@ import React from "react"; import Select from "react-select"; -import { WrappedFieldInputProps } from "redux-form"; -import { SelectComponentsConfig } from "react-select/src/components"; +import type { WrappedFieldInputProps } from "redux-form"; +import type { SelectComponentsConfig } from "react-select/src/components"; import { LayersContext } from "constants/Layers"; import { Colors } from "constants/Colors"; diff --git a/app/client/src/components/designSystems/appsmith/ModalComponent.tsx b/app/client/src/components/designSystems/appsmith/ModalComponent.tsx index 8982daf153..3d56415e43 100644 --- a/app/client/src/components/designSystems/appsmith/ModalComponent.tsx +++ b/app/client/src/components/designSystems/appsmith/ModalComponent.tsx @@ -1,4 +1,5 @@ -import React, { ReactNode, RefObject, useRef, useEffect } from "react"; +import type { ReactNode, RefObject } from "react"; +import React, { useRef, useEffect } from "react"; import { Overlay, Classes } from "@blueprintjs/core"; import styled from "styled-components"; import { getCanvasClassName } from "utils/generators"; @@ -80,9 +81,8 @@ export type ModalComponentProps = { /* eslint-disable react/display-name */ export function ModalComponent(props: ModalComponentProps) { - const modalContentRef: RefObject = useRef( - null, - ); + const modalContentRef: RefObject = + useRef(null); useEffect(() => { return () => { // handle modal close events when this component unmounts diff --git a/app/client/src/components/designSystems/appsmith/PositionedContainer.tsx b/app/client/src/components/designSystems/appsmith/PositionedContainer.tsx index 86a5010afd..993b9f7037 100644 --- a/app/client/src/components/designSystems/appsmith/PositionedContainer.tsx +++ b/app/client/src/components/designSystems/appsmith/PositionedContainer.tsx @@ -1,10 +1,11 @@ -import React, { CSSProperties, ReactNode, Ref, useMemo } from "react"; -import { BaseStyle } from "widgets/BaseWidget"; +import type { CSSProperties, ReactNode, Ref } from "react"; +import React, { useMemo } from "react"; +import type { BaseStyle } from "widgets/BaseWidget"; +import type { WidgetType } from "constants/WidgetConstants"; import { CONTAINER_GRID_PADDING, CSSUnits, PositionTypes, - WidgetType, WIDGET_PADDING, } from "constants/WidgetConstants"; import { generateClassName } from "utils/generators"; diff --git a/app/client/src/components/designSystems/appsmith/TextInputComponent.tsx b/app/client/src/components/designSystems/appsmith/TextInputComponent.tsx index a24f4ec836..15e1bfd944 100644 --- a/app/client/src/components/designSystems/appsmith/TextInputComponent.tsx +++ b/app/client/src/components/designSystems/appsmith/TextInputComponent.tsx @@ -1,14 +1,14 @@ import React, { Component } from "react"; import styled from "styled-components"; -import { WrappedFieldInputProps, WrappedFieldMetaProps } from "redux-form"; -import { +import type { WrappedFieldInputProps, WrappedFieldMetaProps } from "redux-form"; +import type { IconName, IInputGroupProps, IIntentProps, - InputGroup, MaybeElement, } from "@blueprintjs/core"; -import { ComponentProps } from "widgets/BaseComponent"; +import { InputGroup } from "@blueprintjs/core"; +import type { ComponentProps } from "widgets/BaseComponent"; import { Colors } from "constants/Colors"; import { replayHighlightClass } from "globalStyles/portals"; @@ -122,14 +122,8 @@ export class BaseTextInput extends Component { } }; render() { - const { - className, - input, - meta, - refHandler, - showError, - ...rest - } = this.props; + const { className, input, meta, refHandler, showError, ...rest } = + this.props; const hasError = !!( showError && meta && diff --git a/app/client/src/components/designSystems/appsmith/WidgetStyleContainer.tsx b/app/client/src/components/designSystems/appsmith/WidgetStyleContainer.tsx index bb7be5fe10..a39bb847c7 100644 --- a/app/client/src/components/designSystems/appsmith/WidgetStyleContainer.tsx +++ b/app/client/src/components/designSystems/appsmith/WidgetStyleContainer.tsx @@ -1,7 +1,8 @@ -import React, { ReactNode } from "react"; +import type { ReactNode } from "react"; +import React from "react"; import styled from "styled-components"; -import { ContainerStyle } from "widgets/ContainerWidget/component"; -import { Color } from "constants/Colors"; +import type { ContainerStyle } from "widgets/ContainerWidget/component"; +import type { Color } from "constants/Colors"; export enum BoxShadowTypes { NONE = "NONE", diff --git a/app/client/src/components/designSystems/appsmith/autoLayout/AutoLayoutLayer.tsx b/app/client/src/components/designSystems/appsmith/autoLayout/AutoLayoutLayer.tsx index 959d20087a..588c949377 100644 --- a/app/client/src/components/designSystems/appsmith/autoLayout/AutoLayoutLayer.tsx +++ b/app/client/src/components/designSystems/appsmith/autoLayout/AutoLayoutLayer.tsx @@ -1,7 +1,8 @@ -import React, { ReactNode } from "react"; +import type { ReactNode } from "react"; +import React from "react"; import styled from "styled-components"; -import { LayoutDirection } from "utils/autoLayout/constants"; +import type { LayoutDirection } from "utils/autoLayout/constants"; /** * 1. Given a direction if should employ flex in perpendicular direction. diff --git a/app/client/src/components/designSystems/appsmith/autoLayout/FlexBoxComponent.tsx b/app/client/src/components/designSystems/appsmith/autoLayout/FlexBoxComponent.tsx index 3da2ba5b01..ceef6f34ca 100644 --- a/app/client/src/components/designSystems/appsmith/autoLayout/FlexBoxComponent.tsx +++ b/app/client/src/components/designSystems/appsmith/autoLayout/FlexBoxComponent.tsx @@ -1,5 +1,6 @@ import { isArray } from "lodash"; -import React, { CSSProperties, ReactNode, useMemo } from "react"; +import type { CSSProperties, ReactNode } from "react"; +import React, { useMemo } from "react"; import { FlexLayerAlignment, @@ -10,7 +11,7 @@ import { useSelector } from "react-redux"; import { getAppMode } from "selectors/entitiesSelector"; import AutoLayoutLayer from "./AutoLayoutLayer"; import { FLEXBOX_PADDING, GridDefaults } from "constants/WidgetConstants"; -import { +import type { AlignmentColumnInfo, FlexBoxAlignmentColumnInfo, FlexLayer, diff --git a/app/client/src/components/designSystems/appsmith/autoLayout/FlexComponent.tsx b/app/client/src/components/designSystems/appsmith/autoLayout/FlexComponent.tsx index 4a32aa1496..27fcc3dc31 100644 --- a/app/client/src/components/designSystems/appsmith/autoLayout/FlexComponent.tsx +++ b/app/client/src/components/designSystems/appsmith/autoLayout/FlexComponent.tsx @@ -1,11 +1,13 @@ -import React, { CSSProperties, ReactNode, useCallback, useMemo } from "react"; +import type { CSSProperties, ReactNode } from "react"; +import React, { useCallback, useMemo } from "react"; import styled from "styled-components"; -import { WidgetType, WIDGET_PADDING } from "constants/WidgetConstants"; +import type { WidgetType } from "constants/WidgetConstants"; +import { WIDGET_PADDING } from "constants/WidgetConstants"; import { useSelector } from "react-redux"; import { snipingModeSelector } from "selectors/editorSelectors"; import { getIsResizing } from "selectors/widgetSelectors"; -import { +import type { FlexVerticalAlignment, LayoutDirection, ResponsiveBehavior, diff --git a/app/client/src/components/designSystems/appsmith/header/DeployLinkButton.tsx b/app/client/src/components/designSystems/appsmith/header/DeployLinkButton.tsx index 755fa5c62f..a80fc442f2 100644 --- a/app/client/src/components/designSystems/appsmith/header/DeployLinkButton.tsx +++ b/app/client/src/components/designSystems/appsmith/header/DeployLinkButton.tsx @@ -1,4 +1,5 @@ -import React, { ReactNode, useState } from "react"; +import type { ReactNode } from "react"; +import React, { useState } from "react"; import styled, { useTheme } from "styled-components"; import { Icon, Popover, PopoverPosition } from "@blueprintjs/core"; import { useSelector, useDispatch } from "react-redux"; @@ -13,7 +14,7 @@ import { CONNECT_TO_GIT_OPTION, CURRENT_DEPLOY_PREVIEW_OPTION, } from "@appsmith/constants/messages"; -import { Theme } from "constants/DefaultTheme"; +import type { Theme } from "constants/DefaultTheme"; const DeployLinkDialog = styled.div` flex-direction: column; diff --git a/app/client/src/components/designSystems/appsmith/help/CollapsibleHelp.tsx b/app/client/src/components/designSystems/appsmith/help/CollapsibleHelp.tsx index c41ec4b4d6..4634f02913 100644 --- a/app/client/src/components/designSystems/appsmith/help/CollapsibleHelp.tsx +++ b/app/client/src/components/designSystems/appsmith/help/CollapsibleHelp.tsx @@ -1,4 +1,5 @@ -import React, { ReactNode } from "react"; +import type { ReactNode } from "react"; +import React from "react"; import styled from "styled-components"; import { Icon } from "@blueprintjs/core"; interface CollapsibleHelpProps { diff --git a/app/client/src/components/designSystems/appsmith/help/DocumentationSearch.tsx b/app/client/src/components/designSystems/appsmith/help/DocumentationSearch.tsx index bf01b5def6..0446434230 100644 --- a/app/client/src/components/designSystems/appsmith/help/DocumentationSearch.tsx +++ b/app/client/src/components/designSystems/appsmith/help/DocumentationSearch.tsx @@ -1,4 +1,5 @@ -import React, { SyntheticEvent } from "react"; +import type { SyntheticEvent } from "react"; +import React from "react"; import algoliasearch from "algoliasearch/lite"; import { InstantSearch, @@ -15,7 +16,7 @@ import { HelpIcons } from "icons/HelpIcons"; import { HelpBaseURL } from "constants/HelpConstants"; import { getDefaultRefinement } from "selectors/helpSelectors"; import { getAppsmithConfigs } from "@appsmith/configs"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import { setHelpDefaultRefinement, setHelpModalVisibility, @@ -23,19 +24,15 @@ import { import { Icon } from "@blueprintjs/core"; import moment from "moment"; import { getCurrentUser } from "selectors/usersSelectors"; -import { User } from "constants/userConstants"; +import type { User } from "constants/userConstants"; import { Colors } from "constants/Colors"; import { createMessage, APPSMITH_DISPLAY_VERSION, } from "@appsmith/constants/messages"; -const { - algolia, - appVersion, - cloudHosting, - intercomAppID, -} = getAppsmithConfigs(); +const { algolia, appVersion, cloudHosting, intercomAppID } = + getAppsmithConfigs(); const searchClient = algoliasearch(algolia.apiId, algolia.apiKey); const OenLinkIcon = HelpIcons.OPEN_LINK; diff --git a/app/client/src/components/designSystems/appsmith/help/HelpModal.tsx b/app/client/src/components/designSystems/appsmith/help/HelpModal.tsx index 03502f0786..862b5f72ae 100644 --- a/app/client/src/components/designSystems/appsmith/help/HelpModal.tsx +++ b/app/client/src/components/designSystems/appsmith/help/HelpModal.tsx @@ -1,4 +1,5 @@ -import React, { SyntheticEvent } from "react"; +import type { SyntheticEvent } from "react"; +import React from "react"; import DocumentationSearch from "components/designSystems/appsmith/help/DocumentationSearch"; import { getHelpModalOpen } from "selectors/helpSelectors"; import { @@ -11,12 +12,12 @@ import { HelpIcons } from "icons/HelpIcons"; import { getAppsmithConfigs } from "@appsmith/configs"; import { LayersContext } from "constants/Layers"; import { connect } from "react-redux"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import AnalyticsUtil from "utils/AnalyticsUtil"; import { HELP_MODAL_HEIGHT, HELP_MODAL_WIDTH } from "constants/HelpConstants"; import ModalComponent from "../ModalComponent"; import { getCurrentUser } from "selectors/usersSelectors"; -import { User } from "constants/userConstants"; +import type { User } from "constants/userConstants"; import bootIntercom from "utils/bootIntercom"; import { TooltipComponent } from "design-system-old"; import { diff --git a/app/client/src/components/editorComponents/ActionCreator/Field/index.tsx b/app/client/src/components/editorComponents/ActionCreator/Field/index.tsx index d4f643a500..cb32e9a267 100644 --- a/app/client/src/components/editorComponents/ActionCreator/Field/index.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/Field/index.tsx @@ -1,6 +1,6 @@ import { AppsmithFunction, FieldType, ViewTypes } from "../constants"; -import { TreeDropdownOption } from "design-system-old"; -import { +import type { TreeDropdownOption } from "design-system-old"; +import type { FieldProps, KeyValueViewProps, SelectorViewProps, @@ -9,7 +9,7 @@ import { } from "../types"; import HightlightedCode from "../../HighlightedCode"; import { Skin } from "../../../../constants/DefaultTheme"; -import { DropdownOption } from "../../../constants"; +import type { DropdownOption } from "../../../constants"; import React from "react"; import { SelectorView } from "../viewComponents/SelectorView"; import { KeyValueView } from "../viewComponents/KeyValueView"; diff --git a/app/client/src/components/editorComponents/ActionCreator/FieldConfig.ts b/app/client/src/components/editorComponents/ActionCreator/FieldConfig.ts index 140a49bc2c..cef4f278cb 100644 --- a/app/client/src/components/editorComponents/ActionCreator/FieldConfig.ts +++ b/app/client/src/components/editorComponents/ActionCreator/FieldConfig.ts @@ -7,7 +7,11 @@ import { ViewTypes, } from "./constants"; import { ALERT_STYLE_OPTIONS } from "@appsmith/constants/messages"; -import { ActionType, AppsmithFunctionConfigType, FieldProps } from "./types"; +import type { + ActionType, + AppsmithFunctionConfigType, + FieldProps, +} from "./types"; import { enumTypeGetter, enumTypeSetter, @@ -19,7 +23,7 @@ import { import store from "../../../store"; import { getPageList } from "../../../selectors/entitiesSelector"; import { ACTION_TRIGGER_REGEX } from "./regex"; -import { TreeDropdownOption } from "design-system-old"; +import type { TreeDropdownOption } from "design-system-old"; export const FIELD_CONFIG: AppsmithFunctionConfigType = { [FieldType.ACTION_SELECTOR_FIELD]: { diff --git a/app/client/src/components/editorComponents/ActionCreator/Fields.tsx b/app/client/src/components/editorComponents/ActionCreator/Fields.tsx index dcf899a827..910c379b9d 100644 --- a/app/client/src/components/editorComponents/ActionCreator/Fields.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/Fields.tsx @@ -6,7 +6,7 @@ import { } from "components/propertyControls/StyledControls"; import DividerComponent from "widgets/DividerWidget/component"; import { FieldType } from "./constants"; -import { FieldsProps } from "./types"; +import type { FieldsProps } from "./types"; import { Field } from "./Field"; /** diff --git a/app/client/src/components/editorComponents/ActionCreator/index.tsx b/app/client/src/components/editorComponents/ActionCreator/index.tsx index b3717b716f..e711d42303 100644 --- a/app/client/src/components/editorComponents/ActionCreator/index.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/index.tsx @@ -1,5 +1,5 @@ import { createModalAction } from "actions/widgetActions"; -import { TreeDropdownOption } from "design-system-old"; +import type { TreeDropdownOption } from "design-system-old"; import TreeStructure from "components/utils/TreeStructure"; import { PluginType } from "entities/Action"; import { isString, keyBy } from "lodash"; @@ -10,7 +10,7 @@ import { } from "pages/Editor/Explorer/ExplorerIcons"; import React, { useMemo, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import { getDataTreeForActionCreator, getWidgetOptionsTree, @@ -31,9 +31,9 @@ import { import Fields from "./Fields"; import { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory"; import { getEntityNameAndPropertyPath } from "@appsmith/workers/Evaluation/evaluationUtils"; -import { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; +import type { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; import { createNewJSCollection } from "actions/jsPaneActions"; -import { JSAction, Variable } from "entities/JSCollection"; +import type { JSAction, Variable } from "entities/JSCollection"; import { CLEAR_INTERVAL, CLEAR_STORE, @@ -58,9 +58,9 @@ import { } from "@appsmith/constants/messages"; import { setGlobalSearchCategory } from "actions/globalSearchActions"; import { filterCategories, SEARCH_CATEGORY_ID } from "../GlobalSearch/utils"; -import { ActionDataState } from "reducers/entityReducers/actionsReducer"; +import type { ActionDataState } from "reducers/entityReducers/actionsReducer"; import { selectFeatureFlags } from "selectors/usersSelectors"; -import FeatureFlags from "entities/FeatureFlags"; +import type FeatureFlags from "entities/FeatureFlags"; import { isValidURL } from "utils/URLUtils"; import { ACTION_ANONYMOUS_FUNC_REGEX, ACTION_TRIGGER_REGEX } from "./regex"; import { @@ -68,7 +68,7 @@ import { AppsmithFunction, FieldType, } from "./constants"; -import { +import type { SwitchType, ActionCreatorProps, GenericFunction, @@ -269,9 +269,8 @@ function getFieldFromValue( }); } else if (matches.length) { const entityPropertyPath = matches[0][1]; - const { propertyPath } = getEntityNameAndPropertyPath( - entityPropertyPath, - ); + const { propertyPath } = + getEntityNameAndPropertyPath(entityPropertyPath); const path = propertyPath && propertyPath.replace("()", ""); const argsProps = path && @@ -534,14 +533,14 @@ function getIntegrationOptionsWithChildren( jsOption.children = [createJSObject]; jsActions.forEach((jsAction) => { if (jsAction.config.actions && jsAction.config.actions.length > 0) { - const jsObject = ({ + const jsObject = { label: jsAction.config.name, id: jsAction.config.id, value: jsAction.config.name, type: jsOption.value, icon: JsFileIconV2(), - } as unknown) as TreeDropdownOption; - ((jsOption.children as unknown) as TreeDropdownOption[]).push(jsObject); + } as unknown as TreeDropdownOption; + (jsOption.children as unknown as TreeDropdownOption[]).push(jsObject); if (jsObject) { //don't remove this will be used soon // const createJSFunction: TreeDropdownOption = { @@ -574,7 +573,7 @@ function getIntegrationOptionsWithChildren( args: argValue, }; (jsObject.children as TreeDropdownOption[]).push( - (jsFunction as unknown) as TreeDropdownOption, + jsFunction as unknown as TreeDropdownOption, ); }); } diff --git a/app/client/src/components/editorComponents/ActionCreator/regex.ts b/app/client/src/components/editorComponents/ActionCreator/regex.ts index 67bee9435c..fdfea4e086 100644 --- a/app/client/src/components/editorComponents/ActionCreator/regex.ts +++ b/app/client/src/components/editorComponents/ActionCreator/regex.ts @@ -1,8 +1,10 @@ -export const FUNC_ARGS_REGEX = /((["][^"]*["])|([\[][\s\S]*[\]])|([\{][\s\S]*[\}])|(['][^']*['])|([\(][\s\S]*[\)][ ]*=>[ ]*[{][\s\S]*[}])|([^'",][^,"+]*[^'",]*))*/gi; +export const FUNC_ARGS_REGEX = + /((["][^"]*["])|([\[][\s\S]*[\]])|([\{][\s\S]*[\}])|(['][^']*['])|([\(][\s\S]*[\)][ ]*=>[ ]*[{][\s\S]*[}])|([^'",][^,"+]*[^'",]*))*/gi; //Old Regex:: /\(\) => ([\s\S]*?)(\([\s\S]*?\))/g; export const ACTION_TRIGGER_REGEX = /^{{([\s\S]*?)\(([\s\S]*?)\)}}$/g; -export const ACTION_ANONYMOUS_FUNC_REGEX = /\(\) => (({[\s\S]*?})|([\s\S]*?)(\([\s\S]*?\)))/g; +export const ACTION_ANONYMOUS_FUNC_REGEX = + /\(\) => (({[\s\S]*?})|([\s\S]*?)(\([\s\S]*?\)))/g; export const IS_URL_OR_MODAL = /^'.*'$/; diff --git a/app/client/src/components/editorComponents/ActionCreator/types.ts b/app/client/src/components/editorComponents/ActionCreator/types.ts index 0fdaefab20..9c63d00844 100644 --- a/app/client/src/components/editorComponents/ActionCreator/types.ts +++ b/app/client/src/components/editorComponents/ActionCreator/types.ts @@ -1,8 +1,8 @@ -import { SwitcherProps, TreeDropdownOption } from "design-system-old"; -import { ENTITY_TYPE, MetaArgs } from "entities/DataTree/types"; -import React from "react"; -import { AdditionalDynamicDataTree } from "utils/autocomplete/customTreeTypeDefCreator"; -import { FieldType, ViewTypes, AppsmithFunction } from "./constants"; +import type { SwitcherProps, TreeDropdownOption } from "design-system-old"; +import type { ENTITY_TYPE, MetaArgs } from "entities/DataTree/types"; +import type React from "react"; +import type { AdditionalDynamicDataTree } from "utils/autocomplete/customTreeTypeDefCreator"; +import type { FieldType, ViewTypes, AppsmithFunction } from "./constants"; export type GenericFunction = (...args: any[]) => any; @@ -12,9 +12,10 @@ export type SwitchType = { action: () => void; }; -export type ActionType = typeof AppsmithFunction[keyof typeof AppsmithFunction]; +export type ActionType = + (typeof AppsmithFunction)[keyof typeof AppsmithFunction]; -export type ViewType = typeof ViewTypes[keyof typeof ViewTypes]; +export type ViewType = (typeof ViewTypes)[keyof typeof ViewTypes]; export type ViewProps = { label: string; diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/KeyValueView/index.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/KeyValueView/index.tsx index 9868723585..5fb764ff10 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/KeyValueView/index.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/KeyValueView/index.tsx @@ -1,7 +1,7 @@ -import { KeyValueViewProps } from "../../types"; +import type { KeyValueViewProps } from "../../types"; import { ControlWrapper } from "components/propertyControls/StyledControls"; import { KeyValueComponent } from "components/propertyControls/KeyValueComponent"; -import { DropdownOption } from "../../../../constants"; +import type { DropdownOption } from "../../../../constants"; import React from "react"; export function KeyValueView(props: KeyValueViewProps) { diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/SelectorView/SelectorView.test.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/SelectorView/SelectorView.test.tsx index 87d72ec50c..446b45af76 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/SelectorView/SelectorView.test.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/SelectorView/SelectorView.test.tsx @@ -1,7 +1,7 @@ import React from "react"; import "@testing-library/jest-dom"; import { render, screen } from "test/testUtils"; -import { SelectorViewProps } from "../../types"; +import type { SelectorViewProps } from "../../types"; import { SelectorView } from "./index"; describe("Selector view component", () => { diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/SelectorView/index.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/SelectorView/index.tsx index f747aa93d2..3075ecb35e 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/SelectorView/index.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/SelectorView/index.tsx @@ -1,9 +1,10 @@ -import { SelectorViewProps } from "../../types"; +import type { SelectorViewProps } from "../../types"; import { ControlWrapper, FieldWrapper, } from "components/propertyControls/StyledControls"; -import { Setter, TreeDropdown } from "design-system-old"; +import type { Setter } from "design-system-old"; +import { TreeDropdown } from "design-system-old"; import { PopoverPosition } from "@blueprintjs/core"; import React from "react"; diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/TabView/TabView.test.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/TabView/TabView.test.tsx index 0c143477e4..b34b50fb8f 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/TabView/TabView.test.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/TabView/TabView.test.tsx @@ -2,7 +2,7 @@ import React from "react"; import "@testing-library/jest-dom"; import { render, screen } from "test/testUtils"; import { TabView } from "./index"; -import { TabViewProps } from "../../types"; +import type { TabViewProps } from "../../types"; describe("Tab View component", () => { const props: TabViewProps = { diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/TabView/index.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/TabView/index.tsx index fa26a4847b..8e7e4e5807 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/TabView/index.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/TabView/index.tsx @@ -1,4 +1,4 @@ -import { TabViewProps } from "../../types"; +import type { TabViewProps } from "../../types"; import { ControlWrapper, FieldWrapper, diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/TextView/TextView.test.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/TextView/TextView.test.tsx index 2e47d2ae27..1d887f575c 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/TextView/TextView.test.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/TextView/TextView.test.tsx @@ -2,7 +2,7 @@ import React from "react"; import "@testing-library/jest-dom"; import { render, screen } from "test/testUtils"; import { TextView } from "./index"; -import { TextViewProps } from "../../types"; +import type { TextViewProps } from "../../types"; describe("Text view component", () => { const props: TextViewProps = { diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/TextView/index.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/TextView/index.tsx index b15e5ad773..334b16cac9 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/TextView/index.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/TextView/index.tsx @@ -1,4 +1,4 @@ -import { TextViewProps } from "../../types"; +import type { TextViewProps } from "../../types"; import { ControlWrapper, FieldWrapper, diff --git a/app/client/src/components/editorComponents/ActionNameEditor.tsx b/app/client/src/components/editorComponents/ActionNameEditor.tsx index 19ba8a154e..b4ba98643b 100644 --- a/app/client/src/components/editorComponents/ActionNameEditor.tsx +++ b/app/client/src/components/editorComponents/ActionNameEditor.tsx @@ -7,14 +7,14 @@ import EditableText, { EditInteractionKind, } from "components/editorComponents/EditableText"; import { removeSpecialChars } from "utils/helpers"; -import { AppState } from "@appsmith/reducers"; -import { Action } from "entities/Action"; +import type { AppState } from "@appsmith/reducers"; +import type { Action } from "entities/Action"; import { saveActionName } from "actions/pluginActionActions"; import { Spinner } from "@blueprintjs/core"; import { Classes } from "@blueprintjs/core"; import { getAction, getPlugin } from "selectors/entitiesSelector"; -import { Plugin } from "api/PluginApi"; +import type { Plugin } from "api/PluginApi"; import NameEditorComponent from "components/utils/NameEditorComponent"; import { ACTION_NAME_PLACEHOLDER, @@ -66,10 +66,8 @@ type ActionNameEditorProps = { function ActionNameEditor(props: ActionNameEditorProps) { const params = useParams<{ apiId?: string; queryId?: string }>(); - const currentActionConfig: - | Action - | undefined = useSelector((state: AppState) => - getAction(state, params.apiId || params.queryId || ""), + const currentActionConfig: Action | undefined = useSelector( + (state: AppState) => getAction(state, params.apiId || params.queryId || ""), ); const currentPlugin: Plugin | undefined = useSelector((state: AppState) => diff --git a/app/client/src/components/editorComponents/ActionRightPane/SuggestedWidgets.tsx b/app/client/src/components/editorComponents/ActionRightPane/SuggestedWidgets.tsx index 09283b3271..24ab2831f9 100644 --- a/app/client/src/components/editorComponents/ActionRightPane/SuggestedWidgets.tsx +++ b/app/client/src/components/editorComponents/ActionRightPane/SuggestedWidgets.tsx @@ -15,7 +15,7 @@ import { SUGGESTED_WIDGETS, SUGGESTED_WIDGET_TOOLTIP, } from "@appsmith/constants/messages"; -import { SuggestedWidget } from "api/ActionAPI"; +import type { SuggestedWidget } from "api/ActionAPI"; import { getDataTree } from "selectors/dataTreeSelectors"; import { getWidgets } from "sagas/selectors"; diff --git a/app/client/src/components/editorComponents/ActionRightPane/index.tsx b/app/client/src/components/editorComponents/ActionRightPane/index.tsx index ee2c065919..5df85a7509 100644 --- a/app/client/src/components/editorComponents/ActionRightPane/index.tsx +++ b/app/client/src/components/editorComponents/ActionRightPane/index.tsx @@ -17,21 +17,21 @@ import { useState } from "react"; import history from "utils/history"; import Connections from "./Connections"; import SuggestedWidgets from "./SuggestedWidgets"; -import { ReactNode } from "react"; +import type { ReactNode } from "react"; import { useEffect } from "react"; import { bindDataOnCanvas } from "actions/pluginActionActions"; import { useParams } from "react-router"; import { useDispatch, useSelector } from "react-redux"; import { getWidgets } from "sagas/selectors"; import AnalyticsUtil from "utils/AnalyticsUtil"; -import { AppState } from "@appsmith/reducers"; +import type { AppState } from "@appsmith/reducers"; import { getDependenciesFromInverseDependencies } from "../Debugger/helpers"; import { BACK_TO_CANVAS, createMessage, NO_CONNECTIONS, } from "@appsmith/constants/messages"; -import { +import type { SuggestedWidget, SuggestedWidget as SuggestedWidgetsType, } from "api/ActionAPI"; diff --git a/app/client/src/components/editorComponents/ApiResponseView.tsx b/app/client/src/components/editorComponents/ApiResponseView.tsx index 530cdbad79..81bb24726b 100644 --- a/app/client/src/components/editorComponents/ApiResponseView.tsx +++ b/app/client/src/components/editorComponents/ApiResponseView.tsx @@ -1,16 +1,13 @@ -import React, { - useRef, - RefObject, - useCallback, - PropsWithChildren, -} from "react"; +import type { RefObject, PropsWithChildren } from "react"; +import React, { useRef, useCallback } from "react"; import { connect, useDispatch, useSelector } from "react-redux"; -import { withRouter, RouteComponentProps } from "react-router"; +import type { RouteComponentProps } from "react-router"; +import { withRouter } from "react-router"; import styled from "styled-components"; -import { AppState } from "@appsmith/reducers"; -import { ActionResponse } from "api/ActionAPI"; +import type { AppState } from "@appsmith/reducers"; +import type { ActionResponse } from "api/ActionAPI"; import { formatBytes } from "utils/helpers"; -import { APIEditorRouteParams } from "constants/routes"; +import type { APIEditorRouteParams } from "constants/routes"; import LoadingOverlayScreen from "components/editorComponents/LoadingOverlayScreen"; import ReadOnlyEditor from "components/editorComponents/ReadOnlyEditor"; import { getActionResponses } from "selectors/entitiesSelector"; @@ -27,7 +24,7 @@ import { ACTION_EXECUTION_MESSAGE, } from "@appsmith/constants/messages"; import { Text as BlueprintText } from "@blueprintjs/core"; -import { EditorTheme } from "./CodeEditor/EditorConfig"; +import type { EditorTheme } from "./CodeEditor/EditorConfig"; import DebuggerLogs from "./Debugger/DebuggerLogs"; import ErrorLogs from "./Debugger/Errors"; import Resizer, { ResizerCSS } from "./Debugger/Resizer"; @@ -50,10 +47,8 @@ import EntityBottomTabs from "./EntityBottomTabs"; import { DEBUGGER_TAB_KEYS } from "./Debugger/helpers"; import Table from "pages/Editor/QueryEditor/Table"; import { API_RESPONSE_TYPE_OPTIONS } from "constants/ApiEditorConstants/CommonApiConstants"; -import { - setActionResponseDisplayFormat, - UpdateActionPropertyActionPayload, -} from "actions/pluginActionActions"; +import type { UpdateActionPropertyActionPayload } from "actions/pluginActionActions"; +import { setActionResponseDisplayFormat } from "actions/pluginActionActions"; import { isHtml } from "./utils"; import ActionAPI from "api/ActionAPI"; import { diff --git a/app/client/src/components/editorComponents/AutoResizeTextArea.tsx b/app/client/src/components/editorComponents/AutoResizeTextArea.tsx index b62cdac46a..6343705480 100644 --- a/app/client/src/components/editorComponents/AutoResizeTextArea.tsx +++ b/app/client/src/components/editorComponents/AutoResizeTextArea.tsx @@ -1,10 +1,6 @@ import { debounce } from "lodash"; -import React, { - TextareaHTMLAttributes, - useEffect, - useLayoutEffect, - useRef, -} from "react"; +import type { TextareaHTMLAttributes } from "react"; +import React, { useEffect, useLayoutEffect, useRef } from "react"; import styled from "styled-components"; import useComposedRef from "utils/UseComposeRef"; @@ -117,20 +113,22 @@ const AutoResizeTextArea: React.ForwardRefRenderFunction< return ( <> - {// This is added to get the correct scroll height of a similar - // textarea which is not displayed on the screen whose height - // is always auto. - props.autoResize ? ( -