From 8ece953c22be0611ac1a26b99413c5e692bff2a3 Mon Sep 17 00:00:00 2001 From: Akash Date: Tue, 20 Aug 2024 22:28:04 +0530 Subject: [PATCH] added rollup test Signed-off-by: Akash --- .github/workflows/rollup-test.yml | 23 + out/Config.js | 148 -- out/Config.js.map | 1 - out/OneClickInstall.js | 19 - out/OneClickInstall.js.map | 1 - out/Record.js | 195 --- out/Record.js.map | 1 - out/SidebarProvider.js | 407 ----- out/SidebarProvider.js.map | 1 - out/SignIn.js | 90 - out/SignIn.js.map | 1 - out/Test.js | 324 ---- out/Test.js.map | 1 - out/Utils.js | 13 - out/Utils.js.map | 1 - out/compiled/Config.css | 3 - out/compiled/Config.css.map | 12 - out/compiled/Config.js | 1007 ----------- out/compiled/Config.js.map | 1 - out/compiled/KeployHome.css | 3 - out/compiled/KeployHome.css.map | 12 - out/compiled/KeployHome.js | 2590 ----------------------------- out/compiled/KeployHome.js.map | 1 - out/compiled/Testresults.css | 3 - out/compiled/Testresults.css.map | 12 - out/compiled/Testresults.js | 863 ---------- out/compiled/Testresults.js.map | 1 - out/execShell.js | 53 - out/execShell.js.map | 1 - out/extension.js | 119 -- out/extension.js.map | 1 - out/test/extension.test.js | 38 - out/test/extension.test.js.map | 1 - out/updateKeploy.js | 161 -- out/updateKeploy.js.map | 1 - out/version.js | 56 - out/version.js.map | 1 - 37 files changed, 23 insertions(+), 6143 deletions(-) create mode 100644 .github/workflows/rollup-test.yml delete mode 100644 out/Config.js delete mode 100644 out/Config.js.map delete mode 100644 out/OneClickInstall.js delete mode 100644 out/OneClickInstall.js.map delete mode 100644 out/Record.js delete mode 100644 out/Record.js.map delete mode 100644 out/SidebarProvider.js delete mode 100644 out/SidebarProvider.js.map delete mode 100644 out/SignIn.js delete mode 100644 out/SignIn.js.map delete mode 100644 out/Test.js delete mode 100644 out/Test.js.map delete mode 100644 out/Utils.js delete mode 100644 out/Utils.js.map delete mode 100644 out/compiled/Config.css delete mode 100644 out/compiled/Config.css.map delete mode 100644 out/compiled/Config.js delete mode 100644 out/compiled/Config.js.map delete mode 100644 out/compiled/KeployHome.css delete mode 100644 out/compiled/KeployHome.css.map delete mode 100644 out/compiled/KeployHome.js delete mode 100644 out/compiled/KeployHome.js.map delete mode 100644 out/compiled/Testresults.css delete mode 100644 out/compiled/Testresults.css.map delete mode 100644 out/compiled/Testresults.js delete mode 100644 out/compiled/Testresults.js.map delete mode 100644 out/execShell.js delete mode 100644 out/execShell.js.map delete mode 100644 out/extension.js delete mode 100644 out/extension.js.map delete mode 100644 out/test/extension.test.js delete mode 100644 out/test/extension.test.js.map delete mode 100644 out/updateKeploy.js delete mode 100644 out/updateKeploy.js.map delete mode 100644 out/version.js delete mode 100644 out/version.js.map diff --git a/.github/workflows/rollup-test.yml b/.github/workflows/rollup-test.yml new file mode 100644 index 0000000..9cd6c67 --- /dev/null +++ b/.github/workflows/rollup-test.yml @@ -0,0 +1,23 @@ +name: Rollup Test + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: npm install + + - name: Run Rollup + run: npm run rollup + + - name: List contents of out/compiled directory + run: ls -R out/compiled \ No newline at end of file diff --git a/out/Config.js b/out/Config.js deleted file mode 100644 index 4b43038..0000000 --- a/out/Config.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handleInitializeKeployConfigFile = exports.handleOpenKeployConfigFile = void 0; -const vscode = __importStar(require("vscode")); -const fs_1 = require("fs"); -function handleOpenKeployConfigFile(webview) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const folderPath = (_a = vscode.workspace.workspaceFolders) === null || _a === void 0 ? void 0 : _a[0].uri.fsPath; - const configFilePath = folderPath + '/keploy.yml'; - // Function to check if the config file exists - const checkConfigExists = () => { - return (0, fs_1.existsSync)(configFilePath); - }; - // Function to open the config file in the editor - const openConfigFile = () => { - vscode.workspace.openTextDocument(configFilePath).then(doc => { - vscode.window.showTextDocument(doc, { preview: false }); - }); - }; - // Check if the config file exists - if (checkConfigExists()) { - openConfigFile(); - return; - } - // Create a terminal and execute 'keploy config --generate' - const terminal = vscode.window.createTerminal('Keploy Config Generator'); - terminal.sendText('keploy config --generate; exit 0'); - terminal.show(); - // Polling function to check if the config file is created - const checkFileExists = () => { - return new Promise((resolve) => { - const interval = setInterval(() => { - if (checkConfigExists()) { - clearInterval(interval); - resolve(true); - } - }, 2000); // Check every 2 seconds - }); - }; - // Wait for the config file to be created - const fileExists = yield checkFileExists(); - if (!fileExists) { - // webview.postMessage({ type: '', value: 'KeployHome' }); - webview.postMessage({ type: 'configNotFound', value: 'Config file could not be generated.' }); - } - }); -} -exports.handleOpenKeployConfigFile = handleOpenKeployConfigFile; -function handleInitializeKeployConfigFile(webview, path, command) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - console.log('Initializing config file'); - const folderPath = (_a = vscode.workspace.workspaceFolders) === null || _a === void 0 ? void 0 : _a[0].uri.fsPath; - const configFilePath = `${folderPath}/keploy.yml`; - if (path === '') { - path = "./"; - } - // Initialize the config file with the provided path and command - const initContent = ` -path: "${path}" -appId: "" -command: "${command}" -port: 0 -proxyPort: 16789 -dnsPort: 26789 -debug: false -disableANSI: false -disableTele: false -inDocker: false -generateGithubActions: true -containerName: "" -networkName: "" -buildDelay: 30 -test: - selectedTests: {} - globalNoise: - global: {} - test-sets: {} - delay: 5 - apiTimeout: 5 - coverage: false - goCoverage: false - coverageReportPath: "" - ignoreOrdering: true - mongoPassword: "default@123" - language: "" - removeUnusedMocks: false -record: - recordTimer: 0s - filters: [] -configPath: "" -bypassRules: [] -cmdType: "native" -enableTesting: false -fallbackOnMiss: false -keployContainer: "keploy-v2" -keployNetwork: "keploy-network" - -# This config file has been initialized - `; - const finalContent = `${initContent.trim()} - -# Visit https://keploy.io/docs/running-keploy/configuration-file/ to learn about using Keploy through the configuration file. - `; - // Write the content to the config file - yield vscode.workspace.fs.writeFile(vscode.Uri.file(configFilePath), Buffer.from(finalContent)); - // Open the config file in the editor - vscode.workspace.openTextDocument(configFilePath).then(doc => { - vscode.window.showTextDocument(doc, { preview: false }); - }); - webview.postMessage({ type: 'navigateToHome', value: 'KeployHome' }); - }); -} -exports.handleInitializeKeployConfigFile = handleInitializeKeployConfigFile; -//# sourceMappingURL=Config.js.map \ No newline at end of file diff --git a/out/Config.js.map b/out/Config.js.map deleted file mode 100644 index 888da6e..0000000 --- a/out/Config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Config.js","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;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AAO,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;;CACtE;AAnED,4EAmEC"} \ No newline at end of file diff --git a/out/OneClickInstall.js b/out/OneClickInstall.js deleted file mode 100644 index 3b3051f..0000000 --- a/out/OneClickInstall.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const child_process_1 = require("child_process"); -function executeKeployOneClickCommand() { - const command = 'curl --silent -O -L https://keploy.io/install.sh && bash install.sh'; - (0, child_process_1.exec)(command, (error, stdout, stderr) => { - if (error) { - console.error(`Error executing command: ${error.message}`); - return; - } - if (stderr) { - console.error(`Command execution returned an error: ${stderr}`); - return; - } - console.log(`Command executed successfully: ${stdout}`); - }); -} -exports.default = executeKeployOneClickCommand; -//# sourceMappingURL=OneClickInstall.js.map \ No newline at end of file diff --git a/out/OneClickInstall.js.map b/out/OneClickInstall.js.map deleted file mode 100644 index 718a024..0000000 --- a/out/OneClickInstall.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OneClickInstall.js","sourceRoot":"","sources":["../src/OneClickInstall.ts"],"names":[],"mappings":";;AAAA,iDAAqC;AAErC,SAAwB,4BAA4B;IAChD,MAAM,OAAO,GAAG,qEAAqE,CAAC;IAEtF,IAAA,oBAAI,EAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;QACpC,IAAI,KAAK,EAAE;YACP,OAAO,CAAC,KAAK,CAAC,4BAA4B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3D,OAAO;SACV;QAED,IAAI,MAAM,EAAE;YACR,OAAO,CAAC,KAAK,CAAC,wCAAwC,MAAM,EAAE,CAAC,CAAC;YAChE,OAAO;SACV;QAED,OAAO,CAAC,GAAG,CAAC,kCAAkC,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACP,CAAC;AAhBD,+CAgBC"} \ No newline at end of file diff --git a/out/Record.js b/out/Record.js deleted file mode 100644 index 537146b..0000000 --- a/out/Record.js +++ /dev/null @@ -1,195 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.startRecording = exports.stopRecording = exports.displayRecordedTestCases = void 0; -const vscode = __importStar(require("vscode")); -const fs_1 = require("fs"); -const child_process = __importStar(require("child_process")); -function extractTestSetName(logContent) { - // Define the regular expression pattern to find the test set name - const regex = /Keploy has captured test cases for the user's application\.\s*{"path": ".*\/(test-set-\d+)\/tests"/; - // Execute the regular expression on the log content - const match = regex.exec(logContent); - // Check if a match was found and return the test set name, otherwise return null - return match ? match[1] : null; -} -function displayRecordedTestCases(logfilePath, webview) { - return __awaiter(this, void 0, void 0, function* () { - console.log('Displaying Recorded test cases'); - let logData; - try { - try { - logData = (0, fs_1.readFileSync)(logfilePath, 'utf8'); - } - catch (error) { - (0, fs_1.appendFile)(logfilePath, "", function (err) { - if (err) { - console.log("err here" + err); - } - }); - logData = (0, fs_1.readFileSync)(logfilePath, 'utf8'); - } - const testSetName = extractTestSetName(logData); - // Split the log data into lines - const logLines = logData.split('\n'); - // Filter out the lines containing the desired information - const capturedTestLines = logLines.filter(line => line.includes('🟠 Keploy has captured test cases')); - // Display the captured test cases in your frontend - if (capturedTestLines.length === 0) { - webview.postMessage({ - type: 'testcaserecorded', - value: 'Test Case has been recorded', - textContent: "No test cases captured. Please try again.", - noTestCases: true - }); - return; - } - capturedTestLines.forEach(testLine => { - const testCaseInfo = JSON.parse(testLine.substring(testLine.indexOf('{'))); - const textContent = `"${testCaseInfo['testcase name']}"`; - const path = testCaseInfo.path + '/' + testCaseInfo['testcase name'] + '.yaml'; - webview.postMessage({ - type: 'testcaserecorded', - value: 'Test Case has been recorded', - textContent: textContent, - path: path, - testSetName: testSetName - }); - }); - } - catch (error) { - console.log(error); - webview.postMessage({ - type: 'testcaserecorded', - value: 'Test Case has been recorded', - textContent: error, - error: true - }); - vscode.window.showErrorMessage('Error occurred Keploy Record: ' + error); - throw error; - } - }); -} -exports.displayRecordedTestCases = displayRecordedTestCases; -function stopRecording() { - var _a; - return __awaiter(this, void 0, void 0, function* () { - try { - (_a = vscode.window.activeTerminal) === null || _a === void 0 ? void 0 : _a.sendText('\x03', true); - //set timeout for 5 seconds - setTimeout(() => { - var _a; - (_a = vscode.window.activeTerminal) === null || _a === void 0 ? void 0 : _a.dispose(); - }, 5000); - return; - } - catch (error) { - console.log(error); - throw error; - } - }); -} -exports.stopRecording = stopRecording; -function startRecording(wslscriptPath, wsllogfilePath, bashScriptPath, zshScriptPath, logfilePath, webview) { - return __awaiter(this, void 0, void 0, function* () { - try { - return new Promise((resolve, reject) => { - try { - let terminalPath; - let currentShell = ''; - if (process.platform === 'win32') { - terminalPath = 'wsl.exe'; - } - else { - terminalPath = '/bin/bash'; - // Get the default shell for the current user - currentShell = process.env.SHELL || ''; - if (!currentShell) { - // Fallback method if process.env.SHELL is not set - currentShell = child_process.execSync('echo $SHELL', { encoding: 'utf8' }).trim(); - } - console.log(`Current default shell: ${currentShell}`); - //uncomment the below line if you want to use the default shell (for zsh test) - // terminalPath = currentShell; - } - console.log(`Terminal path: ${terminalPath}`); - const terminal = vscode.window.createTerminal({ - name: 'Keploy Terminal', - shellPath: terminalPath, - }); - terminal.show(); - if (process.platform === 'win32') { - const recordCmd = `${wslscriptPath} "${wsllogfilePath}" ;exit 0`; - terminal.sendText(recordCmd); - } - else { - let recordCmd; - if (currentShell.includes('zsh')) { - // Use a Zsh-specific script if needed - //replace bashScriptPath with zshScriptPath for zsh - recordCmd = `"${bashScriptPath}" "${logfilePath}" `; - } - else { - // Default to Bash script - recordCmd = `"${bashScriptPath}" "${logfilePath}" ;exit 0`; - } - console.log(recordCmd); - terminal.sendText(recordCmd); - } - // Listen for terminal close event - const disposable = vscode.window.onDidCloseTerminal(eventTerminal => { - console.log('Terminal closed'); - if (eventTerminal === terminal) { - disposable.dispose(); // Dispose the listener - displayRecordedTestCases(logfilePath, webview); // Call function when terminal is closed - resolve(); // Resolve the promise - } - }); - } - catch (error) { - console.log(error); - vscode.window.showErrorMessage('Error occurred Keploy Record: ' + error); - reject(error); - } - }); - } - catch (error) { - console.log(error); - vscode.window.showErrorMessage('Error occurred Keploy Record: ' + error); - throw error; - } - }); -} -exports.startRecording = startRecording; -//# sourceMappingURL=Record.js.map \ No newline at end of file diff --git a/out/Record.js.map b/out/Record.js.map deleted file mode 100644 index e957996..0000000 --- a/out/Record.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Record.js","sourceRoot":"","sources":["../src/Record.ts"],"names":[],"mappings":";;;;;;;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AAC;YACnB,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,gCAAgC,GAAG,KAAK,CAAC,CAAC;YACzE,MAAM,KAAK,CAAC;SACf;IACL,CAAC;CAAA;AAnED,wCAmEC"} \ No newline at end of file diff --git a/out/SidebarProvider.js b/out/SidebarProvider.js deleted file mode 100644 index ad31adb..0000000 --- a/out/SidebarProvider.js +++ /dev/null @@ -1,407 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SidebarProvider = void 0; -const vscode = __importStar(require("vscode")); -// import context from "vscode"; -const Utils_1 = require("./Utils"); -// import { downloadAndUpdate , downloadAndInstallkeployary ,downloadAndUpdateDocker } from './updateKeploy'; -const Record_1 = require("./Record"); -const Test_1 = require("./Test"); -const fs_1 = require("fs"); -const Config_1 = require("./Config"); -const recordOptions = { - canSelectFolders: true, - canSelectMany: false, - openLabel: 'Select folder to record test cases for', - title: 'Select folder to record test cases for', -}; -const testOptions = { - canSelectFolders: true, - canSelectMany: false, - openLabel: 'Select folder to run test cases for', - title: 'Select folder to run test cases for', -}; -class SidebarProvider { - constructor(_extensionUri) { - this._extensionUri = _extensionUri; - } - postMessage(type, value) { - var _a; - console.log('postMessage'); - (_a = this._view) === null || _a === void 0 ? void 0 : _a.webview.postMessage({ type: type, value: value }); - } - resolveWebviewView(webviewView) { - var _a; - this._view = webviewView; - webviewView.webview.options = { - // Allow scripts in the webview - enableScripts: true, - localResourceRoots: [ - this._extensionUri, - vscode.Uri.joinPath(this._extensionUri, "out", "compiled"), - vscode.Uri.joinPath(this._extensionUri, "media"), - vscode.Uri.joinPath(this._extensionUri, "sidebar"), - vscode.Uri.joinPath(this._extensionUri, "scripts"), - ], - }; - let scriptUri = webviewView.webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "out", "compiled/Config.js")); - let compiledCSSUri = webviewView.webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "out", "compiled/Config.css")); - //if config file is already present then navigate to keploy page - const folderPath = (_a = vscode.workspace.workspaceFolders) === null || _a === void 0 ? void 0 : _a[0].uri.fsPath; - const configFilePath = folderPath + '/keploy.yml'; - if ((0, fs_1.existsSync)(configFilePath)) { - scriptUri = webviewView.webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "out", "compiled/KeployHome.js")); - compiledCSSUri = webviewView.webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "out", "compiled/KeployHome.css")); - } - webviewView.webview.html = this._getHtmlForWebview(webviewView.webview, compiledCSSUri, scriptUri); - webviewView.webview.onDidReceiveMessage((data) => __awaiter(this, void 0, void 0, function* () { - var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; - switch (data.type) { - case "onInfo": { - if (!data.value) { - return; - } - vscode.window.showInformationMessage(data.value); - break; - } - case "onError": { - if (!data.value) { - return; - } - vscode.window.showErrorMessage(data.value); - break; - } - // case "selectRecordFolder": { - // if (!data.value) { - // return; - // } try { - // console.log('Opening Record Dialogue Box...'); - // vscode.window.showOpenDialog(recordOptions).then(async fileUri => { - // if (fileUri && fileUri[0]) { - // console.log('Selected file: ' + fileUri[0].fsPath); - // this._view?.webview.postMessage({ type: 'recordfile', value: `${fileUri[0].fsPath}` }); - // } - // }); - // } catch (error) { - // this._view?.webview.postMessage({ type: 'error', value: `Failed to record ${error}` }); - // } - // break; - // } - case 'viewLogs': { - if (!data.value) { - return; - } - try { - console.log('Opening Logs...'); - const logfilePath = vscode.Uri.joinPath(this._extensionUri, "scripts", data.value); - //open in editor - vscode.workspace.openTextDocument(logfilePath).then(doc => { - vscode.window.showTextDocument(doc, { preview: false }); - }); - } - catch (error) { - (_b = this._view) === null || _b === void 0 ? void 0 : _b.webview.postMessage({ type: 'error', value: `Failed to open logs ${error}` }); - } - break; - } - case 'startRecordingCommand': { - if (!data.value) { - return; - } - try { - console.log('Start Recording button clicked'); - const bashScript = vscode.Uri.joinPath(this._extensionUri, "scripts", "bash", "keploy_record_script.sh"); - const zshScript = vscode.Uri.joinPath(this._extensionUri, "scripts", "zsh", "keploy_record_script.zsh"); - const logfilePath = vscode.Uri.joinPath(this._extensionUri, "scripts", "logs", "record_mode.log"); - let wslscriptPath = bashScript.fsPath; - let wsllogPath = logfilePath.fsPath; - if (process.platform === 'win32') { - //convert filepaths to windows format - wslscriptPath = wslscriptPath.replace(/\\/g, '/'); - wsllogPath = wsllogPath.replace(/\\/g, '/'); - //add /mnt/ to the start of the path - wslscriptPath = '/mnt/' + wslscriptPath; - wsllogPath = '/mnt/' + wsllogPath; - // remove : from the path - wslscriptPath = wslscriptPath.replace(/:/g, ''); - wsllogPath = wsllogPath.replace(/:/g, ''); - } - console.log("bashScript path" + wslscriptPath); - console.log(wsllogPath); - yield (0, Record_1.startRecording)(wslscriptPath, wsllogPath, bashScript.fsPath, zshScript.fsPath, logfilePath.fsPath, (_c = this._view) === null || _c === void 0 ? void 0 : _c.webview); - (_d = this._view) === null || _d === void 0 ? void 0 : _d.webview.postMessage({ type: 'success', value: 'Recording Started' }); - (_e = this._view) === null || _e === void 0 ? void 0 : _e.webview.postMessage({ type: 'writeRecord', value: 'Write Recorded test cases ', logfilePath: logfilePath.fsPath }); - } - catch (error) { - (_f = this._view) === null || _f === void 0 ? void 0 : _f.webview.postMessage({ type: 'error', value: `Failed to record ${error}` }); - } - break; - } - case 'stopRecordingCommand': { - if (!data.value) { - return; - } - try { - console.log("Stopping recording"); - yield (0, Record_1.stopRecording)(); - } - catch (error) { - (_g = this._view) === null || _g === void 0 ? void 0 : _g.webview.postMessage({ type: 'error', value: `Failed to Stop record ${error}` }); - } - break; - } - // case "selectTestFolder":{ - // if (!data.value) { - // return; - // } - // try { - // console.log('Opening Test Dialogue Box...'); - // vscode.window.showOpenDialog(testOptions).then(async fileUri => { - // if (fileUri && fileUri[0]) { - // console.log('Selected file: ' + fileUri[0].fsPath); - // this._view?.webview.postMessage({ type: 'testfile', value: `${fileUri[0].fsPath}` }); - // } - // }); - // } catch (error) { - // this._view?.webview.postMessage({ type: 'error', value: `Failed to test ${error}` }); - // } - // break; - // } - case 'startTestingCommand': { - if (!data.value) { - return; - } - try { - console.log('Start Testing button clicked'); - const bashScript = vscode.Uri.joinPath(this._extensionUri, "scripts", "bash", "keploy_test_script.sh"); - const zshScript = vscode.Uri.joinPath(this._extensionUri, "scripts", "zsh", "keploy_test_script.zsh"); - const logfilePath = vscode.Uri.joinPath(this._extensionUri, "scripts", "logs", "test_mode.log"); - let wslscriptPath = bashScript.fsPath; - let wsllogPath = logfilePath.fsPath; - if (process.platform === 'win32') { - //convert filepaths to windows format - wslscriptPath = wslscriptPath.replace(/\\/g, '/'); - wsllogPath = wsllogPath.replace(/\\/g, '/'); - //add /mnt/ to the start of the path - wslscriptPath = '/mnt/' + wslscriptPath; - wsllogPath = '/mnt/' + wsllogPath; - // remove : from the path - wslscriptPath = wslscriptPath.replace(/:/g, ''); - wsllogPath = wsllogPath.replace(/:/g, ''); - } - yield (0, Test_1.startTesting)(wslscriptPath, wsllogPath, bashScript.fsPath, zshScript.fsPath, logfilePath.fsPath, (_h = this._view) === null || _h === void 0 ? void 0 : _h.webview); - } - catch (error) { - (_j = this._view) === null || _j === void 0 ? void 0 : _j.webview.postMessage({ type: 'error', value: `Failed to test ${error}` }); - } - break; - } - case 'stopTestingCommand': { - if (!data.value) { - return; - } - try { - console.log("Stopping Testing"); - yield (0, Test_1.stopTesting)(); - } - catch (error) { - (_k = this._view) === null || _k === void 0 ? void 0 : _k.webview.postMessage({ type: 'error', value: `Failed to Stop Testing ${error}` }); - } - break; - } - case "navigate": { - if (!data.value) { - return; - } - try { - console.log('Navigate to ' + data.value); - const recordPageJs = webviewView.webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "out", `compiled/${data.value}.js`)); - const recordPageCss = webviewView.webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "out", `compiled/${data.value}.css`)); - webviewView.webview.html = this._getHtmlForWebview(webviewView.webview, recordPageCss, recordPageJs); - (_l = this._view) === null || _l === void 0 ? void 0 : _l.webview.postMessage({ type: 'openRecordPage', value: 'Record Page opened' }); - } - catch (error) { - (_m = this._view) === null || _m === void 0 ? void 0 : _m.webview.postMessage({ type: 'error', value: `Failed to open record page ${error}` }); - } - break; - } - case "openRecordedTestFile": { - if (!data.value) { - return; - } - try { - console.log('Opening Recorded Test File...' + data.value); - vscode.workspace.openTextDocument(data.value).then(doc => { - vscode.window.showTextDocument(doc, { preview: false }); - }); - } - catch (error) { - (_o = this._view) === null || _o === void 0 ? void 0 : _o.webview.postMessage({ type: 'error', value: `Failed to open recorded test file ${error}` }); - } - break; - } - case "viewCompleteSummary": { - if (!data.value) { - return; - } - try { - console.log('Opening Complete Summary...'); - const logfilePath = vscode.Uri.joinPath(this._extensionUri, "scripts", "logs", "test_mode.log"); - (0, Test_1.displayTestCases)(logfilePath.fsPath, (_p = this._view) === null || _p === void 0 ? void 0 : _p.webview, false, true); - } - catch (error) { - (_q = this._view) === null || _q === void 0 ? void 0 : _q.webview.postMessage({ type: 'error', value: `Failed to open complete summary ${error}` }); - } - break; - } - case "viewPreviousTestResults": { - if (!data.value) { - return; - } - try { - console.log('Opening Previous Test Results...'); - (0, Test_1.displayPreviousTestResults)((_r = this._view) === null || _r === void 0 ? void 0 : _r.webview); - } - catch (error) { - (_s = this._view) === null || _s === void 0 ? void 0 : _s.webview.postMessage({ type: 'error', value: `Failed to open previous test results ${error}` }); - } - break; - } - case "aggregatedTestResults": { - if (!data.value) { - return; - } - try { - console.log('Opening Aggregated Test Results...'); - (_t = this._view) === null || _t === void 0 ? void 0 : _t.webview.postMessage({ type: 'aggregatedTestResults', data: data.data, error: data.error, value: data.value }); - } - catch (error) { - (_u = this._view) === null || _u === void 0 ? void 0 : _u.webview.postMessage({ type: 'error', value: `Failed to open aggregated test results ${error}` }); - } - break; - } - case "openConfigFile": { - if (!data.value) { - return; - } - try { - console.log('Calling handleOpenKeployConfigFile' + data.value); - (0, Config_1.handleOpenKeployConfigFile)((_v = this._view) === null || _v === void 0 ? void 0 : _v.webview); - } - catch (error) { - console.log('Config file not found here in catch'); - (_w = this._view) === null || _w === void 0 ? void 0 : _w.webview.postMessage({ type: 'configNotFound', value: `Failed to open config file ${error}` }); - } - break; - } - case "initialiseConfig": { - if (!data.value) { - return; - } - try { - console.log('Initialising Config File...'); - (0, Config_1.handleInitializeKeployConfigFile)((_x = this._view) === null || _x === void 0 ? void 0 : _x.webview, data.path, data.command); - } - catch (error) { - (_y = this._view) === null || _y === void 0 ? void 0 : _y.webview.postMessage({ type: 'error', value: `Failed to initialise config file ${error}` }); - } - break; - } - // case "setupConfigFile" : { - // } - case "openTestFile": { - if (!data.value) { - return; - } - try { - console.log('Opening Test File...' + data.value); - vscode.workspace.openTextDocument(data.value).then(doc => { - vscode.window.showTextDocument(doc, { preview: false }); - }); - } - catch (error) { - (_z = this._view) === null || _z === void 0 ? void 0 : _z.webview.postMessage({ type: 'error', value: `Failed to open test file ${error}` }); - } - break; - } - } - })); - } - revive(panel) { - this._view = panel; - } - _getHtmlForWebview(webview, compiledCSSUri, scriptUri) { - const styleResetUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "media", "reset.css")); - const styleMainUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "sidebar", "sidebar.css")); - const scriptMainUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "sidebar", "sidebar.js")); - const styleVSCodeUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "media", "vscode.css")); - // Use a nonce to only allow a specific script to be run. - const nonce = (0, Utils_1.getNonce)(); - //read the global state to check if the user is signed in - // webview.postMessage({ type: 'displayPreviousTestResults', value: 'Displaying Previous Test Results' }); - // const logfilePath = vscode.Uri.joinPath(this._extensionUri, "scripts","logs", "test_mode.log"); - //call the function below after 3 seconds - // setTimeout(() => { - // displayTestCases(logfilePath.fsPath, webview , true , false); - // }, 3000); - // displayTestCases(logfilePath.fsPath, webview); - return ` - - - - - - - - - - - - - - - - - - - - `; - } -} -exports.SidebarProvider = SidebarProvider; -//# sourceMappingURL=SidebarProvider.js.map \ No newline at end of file diff --git a/out/SidebarProvider.js.map b/out/SidebarProvider.js.map deleted file mode 100644 index f822b0c..0000000 --- a/out/SidebarProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SidebarProvider.js","sourceRoot":"","sources":["../src/SidebarProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,gCAAgC;AAChC,mCAAmC;AACnC,8GAA8G;AAC9G,qCAA0D;AAC1D,iCAA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AC,CACjE,CAAC;QAEF,MAAM,cAAc,GAAG,OAAO,CAAC,YAAY,CACzC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,YAAY,CAAC,CAC/D,CAAC;QAEF,yDAAyD;QACzD,MAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAC;QACzB,yDAAyD;QAGzD,0GAA0G;QAC1G,mGAAmG;QACnG,yCAAyC;QACzC,qBAAqB;QACrB,mEAAmE;QACnE,YAAY;QACZ,iDAAiD;QAGjD,OAAO;;;;;;;;8GAQmG,OAAO,CAAC,SAChH,uBAAuB,KAAK;;;;;kBAKhB,aAAa;kBACb,cAAc;sBACV,YAAY;sBACZ,cAAc;;;;;uBAKb,KAAK,UAAU,SAAS;uCACR,KAAK,UAAU,aAAa;WACxD,CAAC;IACV,CAAC;CACF;AA1YD,0CA0YC"} \ No newline at end of file diff --git a/out/SignIn.js b/out/SignIn.js deleted file mode 100644 index f8e1625..0000000 --- a/out/SignIn.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const vscode = __importStar(require("vscode")); -const http = __importStar(require("http")); -const uuid_1 = require("uuid"); -function SignIn() { - return __awaiter(this, void 0, void 0, function* () { - const state = (0, uuid_1.v4)(); // Generate a unique state parameter for security - const redirectUri = `http://localhost:3000/callback`; // Change the port if needed - const authUrl = `https://app.keploy.io/signin?extension=true&state=${state}&redirect_uri=${encodeURIComponent(redirectUri)}`; - // Open the authentication URL in the default web browser - vscode.env.openExternal(vscode.Uri.parse(authUrl)); - // Create a local server to handle the callback - const server = http.createServer((req, res) => { - if (req.url.startsWith('/callback')) { - const url = new URL(req.url, `http://${req.headers.host}`); - const receivedState = url.searchParams.get('state'); - const code = url.searchParams.get('code'); - if (receivedState === state) { - // Here you would exchange the code for an access token - res.writeHead(200, { 'Content-Type': 'text/html' }); - res.end('

Authentication successful! You can close this window.

'); - // Exchange the code for an access token - fetchAccessToken(code).then((data) => { - console.log("API CALL WAS MADE WITH DUMMY DATA"); - return data; - }).catch((error) => { - console.error('Failed to fetch access token:', error); - }); - } - else { - res.writeHead(400, { 'Content-Type': 'text/html' }); - res.end('

State mismatch. Authentication failed.

'); - } - server.close(); - } - }).listen(3000); // Change the port if needed - }); -} -exports.default = SignIn; -function fetchAccessToken(code) { - return __awaiter(this, void 0, void 0, function* () { - // Exchange the authorization code for an access token - const response = yield fetch('https://app.keploy.io/token', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ code }) - }); - // Dummy data for demonstration - const data = { - accessToken: "1234567890" - }; - return data; - }); -} -//# sourceMappingURL=SignIn.js.map \ No newline at end of file diff --git a/out/SignIn.js.map b/out/SignIn.js.map deleted file mode 100644 index ec4faba..0000000 --- a/out/SignIn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SignIn.js","sourceRoot":"","sources":["../src/SignIn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,2CAA6B;AAC7B,+BAAoC;AAEpC,SAA8B,MAAM;;QAChC,MAAM,KAAK,GAAG,IAAA,SAAM,GAAE,CAAC,CAAC,iDAAiD;QACzE,MAAM,WAAW,GAAG,gCAAgC,CAAC,CAAC,4BAA4B;QAClF,MAAM,OAAO,GAAG,qDAAqD,KAAK,iBAAiB,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;QAE7H,yDAAyD;QACzD,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAEnD,+CAA+C;QAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,GAAS,EAAE,GAAS,EAAE,EAAE;YACtD,IAAI,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;gBACjC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC3D,MAAM,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACpD,MAAM,IAAI,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBAE1C,IAAI,aAAa,KAAK,KAAK,EAAE;oBACzB,uDAAuD;oBACvD,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC,CAAC;oBACpD,GAAG,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;oBAE1E,wCAAwC;oBACxC,gBAAgB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;wBACjD,OAAO,IAAI,CAAA;oBACf,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;wBACf,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;oBAC1D,CAAC,CAAC,CAAC;iBACN;qBAAM;oBACH,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC,CAAC;oBACpD,GAAG,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;iBAC9D;gBAED,MAAM,CAAC,KAAK,EAAE,CAAC;aAClB;QACL,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,4BAA4B;IACjD,CAAC;CAAA;AAnCD,yBAmCC;AAED,SAAe,gBAAgB,CAAC,IAAmB;;QAC/C,sDAAsD;QACtD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,6BAA6B,EAAE;YACxD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACL,cAAc,EAAE,kBAAkB;aACrC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC;SACjC,CAAC,CAAC;QAEH,+BAA+B;QAC/B,MAAM,IAAI,GAAG;YACT,WAAW,EAAE,YAAY;SAC5B,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CAAA"} \ No newline at end of file diff --git a/out/Test.js b/out/Test.js deleted file mode 100644 index 6ead45a..0000000 --- a/out/Test.js +++ /dev/null @@ -1,324 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.stopTesting = exports.startTesting = exports.displayPreviousTestResults = exports.displayTestCases = void 0; -const vscode = __importStar(require("vscode")); -const fs_1 = require("fs"); -const fs = __importStar(require("fs")); -const path = __importStar(require("path")); -// eslint-disable-next-line @typescript-eslint/naming-convention -const child_process = __importStar(require("child_process")); -const jsyaml = __importStar(require("js-yaml")); -function displayTestCases(logfilePath, webview, isHomePage, isCompleteSummary) { - return __awaiter(this, void 0, void 0, function* () { - console.log('Displaying test cases'); - let logData; - try { - try { - logData = (0, fs_1.readFileSync)(logfilePath, 'utf8'); - } - catch (error) { - (0, fs_1.appendFile)(logfilePath, "", function (err) { - if (err) { - console.log("err here " + err); - } - }); - logData = (0, fs_1.readFileSync)(logfilePath, 'utf8'); - } - // console.log(logData); - // Split the log data into lines - const logLines = logData.split('\n'); - // Filter out the lines containing the desired information - // Find the index of the line containing the start of the desired part - const startIndex = logLines.findIndex(line => line.includes('COMPLETE TESTRUN SUMMARY.')); - if (startIndex === -1) { - console.log('Start index not found'); - webview.postMessage({ - type: 'testResults', - value: 'Test Failed', - textSummary: "Error Replaying Test Cases. Please try again.", - error: true, - isHomePage: isHomePage, - isCompleteSummary: isCompleteSummary - }); - return; - } - // Find the index of the line containing the end of the desired part - const endIndex = logLines.findIndex((line, index) => index > startIndex && line.includes('<=========================================>')); - if (endIndex === -1) { - console.log('End index not found'); - webview.postMessage({ - type: 'testResults', - value: 'Test Failed', - textSummary: "Error Replaying Test Cases. Please try again.", - error: true, - isHomePage: isHomePage, - isCompleteSummary: isCompleteSummary - }); - return; - } - // Extract the desired part - const testSummary = logLines.slice(startIndex, endIndex + 1).join('\n'); - // Display the captured test cases in your frontend - if (testSummary.length === 0) { - webview.postMessage({ - type: 'testResults', - value: 'Test Failed', - textSummary: "Error Replaying Test Cases. Please try again.", - error: true, - isHomePage: isHomePage, - isCompleteSummary: isCompleteSummary - }); - return; - } - //remove ansi escape codes - const ansiRegex = /[\u001B\u009B][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; - const cleanSummary = testSummary.replace(ansiRegex, ''); - console.log(cleanSummary); - const testSummaryList = cleanSummary.split('\n'); - console.log(testSummaryList); - //remove last line of summary which is pattern - testSummaryList.pop(); - //remove first line of summary which is header - testSummaryList.shift(); - if (isCompleteSummary) { - //remove fist 7 lines of summary - console.log("testSummaryList before splice", testSummaryList, "isCompleteSummary", isCompleteSummary); - testSummaryList.splice(0, 6); - console.log("testSummaryList", testSummaryList, "isCompleteSummary", isCompleteSummary); - testSummaryList.forEach((line, index) => { - webview.postMessage({ - type: 'testResults', - value: 'Test Summary Generated', - textSummary: line, - isHomePage: false, - isCompleteSummary: isCompleteSummary - }); - }); - } - else { - //send first three lines of summary - testSummaryList.forEach((line, index) => { - if (index > 2) { - return; - } - webview.postMessage({ - type: 'testResults', - value: 'Test Summary Generated', - textSummary: line, - isHomePage: isHomePage, - isCompleteSummary: isCompleteSummary - }); - }); - } - } - catch (error) { - console.log(error); - vscode.window.showErrorMessage('Error occurred Keploy Test: ' + error); - throw error; - } - }); -} -exports.displayTestCases = displayTestCases; -function displayPreviousTestResults(webview) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - console.log('Displaying previous test results'); - try { - const reportsFolder = ((_a = vscode.workspace.workspaceFolders) === null || _a === void 0 ? void 0 : _a[0].uri.fsPath) + '/keploy/reports'; - if (!fs.existsSync(reportsFolder)) { - webview.postMessage({ - type: 'aggregatedTestResults', - data: { success: 0, failure: 0, total: 0 }, - error: true, - value: 'Run keploy test to generate test reports.' - }); - return; - } - const testRunDirs = fs.readdirSync(reportsFolder).filter(dir => fs.statSync(path.join(reportsFolder, dir)).isDirectory()); - if (testRunDirs.length === 0) { - webview.postMessage({ - type: 'aggregatedTestResults', - data: { success: 0, failure: 0, total: 0 }, - error: true, - value: 'Run keploy test to generate test reports.' - }); - return; - } - // Sort directories to find the latest test run by date in opposite order - testRunDirs.sort((a, b) => { - const aTime = fs.statSync(path.join(reportsFolder, a)).birthtime.getTime(); - const bTime = fs.statSync(path.join(reportsFolder, b)).birthtime.getTime(); - return bTime - aTime; - }); - // console.log('Test Run Dirs:', testRunDirs); - let totalSuccess = 0; - let totalFailure = 0; - let totalTests = 0; - const testResults = []; - for (const testRunDir of testRunDirs) { - const testRunPath = path.join(reportsFolder, testRunDir); - const testFiles = fs.readdirSync(testRunPath).filter(file => file.startsWith('test-set-') && file.endsWith('-report.yaml')); - for (const testFile of testFiles) { - const testFilePath = path.join(testRunPath, testFile); - const fileContents = fs.readFileSync(testFilePath, 'utf8'); - const report = jsyaml.load(fileContents); - totalSuccess += report.success; - totalFailure += report.failure; - totalTests += report.total; - if (report.tests) { - report.tests.forEach(test => { - testResults.push({ - date: new Date(test.resp.header.Date).toLocaleDateString('en-GB'), - method: test.req.method, - name: test.test_case_id, - report: test.name, - status: test.status, - testCasePath: testFilePath - }); - }); - } - } - } - const aggregatedResults = { - success: totalSuccess, - failure: totalFailure, - total: totalTests, - testResults - }; - console.log('Aggregated Results:', aggregatedResults); - // Send the aggregated results to the webview - webview.postMessage({ type: 'aggregatedTestResults', data: aggregatedResults }); - } - catch (error) { - console.log(error); - webview.postMessage({ - type: 'aggregatedTestResults', - data: { success: 0, failure: 0, total: 0 }, - error: true, - value: 'Run keploy test to generate test reports.' - }); - } - }); -} -exports.displayPreviousTestResults = displayPreviousTestResults; -function startTesting(wslscriptPath, wsllogfilePath, bashScriptPath, zshScriptPath, logfilePath, webview) { - return __awaiter(this, void 0, void 0, function* () { - try { - return new Promise((resolve, reject) => { - try { - let terminalPath; - let currentShell = ''; - if (process.platform === 'win32') { - terminalPath = 'wsl.exe'; - } - else { - terminalPath = '/bin/bash'; - // Get the default shell for the current user - currentShell = process.env.SHELL || ''; - if (!currentShell) { - // Fallback method if process.env.SHELL is not set - currentShell = child_process.execSync('echo $SHELL', { encoding: 'utf8' }).trim(); - } - console.log(`Current default shell: ${currentShell}`); - //uncomment the below line if you want to use the default shell (for zsh test) - // terminalPath = currentShell; - } - console.log(`Terminal path: ${terminalPath}`); - const terminal = vscode.window.createTerminal({ - name: 'Keploy Terminal', - shellPath: terminalPath, - }); - terminal.show(); - if (process.platform === 'win32') { - const testCmd = `${wslscriptPath} "${wsllogfilePath}" ;exit 0 `; - terminal.sendText(testCmd); - } - else { - let testCmd; - if (currentShell.includes('zsh')) { - // Use a Zsh-specific script if needed - console.log('Using Zsh script'); - //replace bashScriptPath with zshScriptPath for zsh - testCmd = `"${bashScriptPath}" "${logfilePath}"; exit 0`; - } - else { - // Default to Bash script - testCmd = `"${bashScriptPath}" "${logfilePath}" ; exit 0`; - } - // const exitCmd = 'exit'; - terminal.sendText(testCmd); - } - // terminal.sendText('exit', true); - // Listen for terminal close event - const disposable = vscode.window.onDidCloseTerminal(eventTerminal => { - console.log('Terminal closed'); - if (eventTerminal === terminal) { - disposable.dispose(); // Dispose the listener - displayTestCases(logfilePath, webview, false, false); // Call function when terminal is closed - resolve(); // Resolve the promise - } - }); - } - catch (error) { - console.log("error is " + error); - vscode.window.showErrorMessage('Error occurred Keploy Test: ' + error); - reject(error); - } - }); - } - catch (error) { - console.log(error); - vscode.window.showErrorMessage('Error occurred Keploy Test: ' + error); - throw error; - } - }); -} -exports.startTesting = startTesting; -function stopTesting() { - var _a, _b; - return __awaiter(this, void 0, void 0, function* () { - try { - (_a = vscode.window.activeTerminal) === null || _a === void 0 ? void 0 : _a.sendText('\x03', true); - (_b = vscode.window.activeTerminal) === null || _b === void 0 ? void 0 : _b.dispose(); - return; - } - catch (error) { - console.log(error); - throw error; - } - }); -} -exports.stopTesting = stopTesting; -//# sourceMappingURL=Test.js.map \ No newline at end of file diff --git a/out/Test.js.map b/out/Test.js.map deleted file mode 100644 index 3576a47..0000000 --- a/out/Test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Test.js","sourceRoot":"","sources":["../src/Test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,2BAA8C;AAC9C,uCAAyB;AACzB,2CAA6B;AAE7B,gEAAgE;AAChE,6DAA+C;AAE/C,gDAAkC;AAElC,SAAsB,gBAAgB,CAAC,WAAmB,EAAE,OAAY,EAAE,UAAmB,EAAE,iBAA0B;;QACrH,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QACrC,IAAI,OAAO,CAAC;QACZ,IAAI;YACA,IAAI;gBACA,OAAO,GAAG,IAAA,iBAAY,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;aAC/C;YACD,OAAO,KAAK,EAAE;gBACV,IAAA,eAAU,EAAC,WAAW,EAAE,EAAE,EAAE,UAAU,GAAG;oBACrC,IAAI,GAAG,EAAE;wBA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,CAAC,sBAAsB;yBACpC;oBACL,CAAC,CAAC,CAAC;iBAEN;gBAAC,OAAO,KAAK,EAAE;oBACZ,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC;oBACjC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,8BAA8B,GAAG,KAAK,CAAC,CAAC;oBACvE,MAAM,CAAC,KAAK,CAAC,CAAC;iBACjB;YACL,CAAC,CAAC,CAAC;SACN;QACD,OAAO,KAAK,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,8BAA8B,GAAG,KAAK,CAAC,CAAC;YACvE,MAAM,KAAK,CAAC;SACf;IACL,CAAC;CAAA;AAxED,oCAwEC;AAED,SAAsB,WAAW;;;QAC7B,IAAI;YACA,MAAA,MAAM,CAAC,MAAM,CAAC,cAAc,0CAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACrD,MAAA,MAAM,CAAC,MAAM,CAAC,cAAc,0CAAE,OAAO,EAAE,CAAC;YACxC,OAAQ;SACX;QACD,OAAO,KAAK,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,MAAM,KAAK,CAAC;SACf;;CACJ;AAVD,kCAUC"} \ No newline at end of file diff --git a/out/Utils.js b/out/Utils.js deleted file mode 100644 index a1d5933..0000000 --- a/out/Utils.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getNonce = void 0; -function getNonce() { - let text = ""; - const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - for (let i = 0; i < 32; i++) { - text += possible.charAt(Math.floor(Math.random() * possible.length)); - } - return text; -} -exports.getNonce = getNonce; -//# sourceMappingURL=Utils.js.map \ No newline at end of file diff --git a/out/Utils.js.map b/out/Utils.js.map deleted file mode 100644 index 1b56fba..0000000 --- a/out/Utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../src/Utils.ts"],"names":[],"mappings":";;;AAAA,SAAgB,QAAQ;IACpB,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,MAAM,QAAQ,GACZ,gEAAgE,CAAC;IACnE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;QAC3B,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;KACtE;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AARH,4BAQG"} \ No newline at end of file diff --git a/out/compiled/Config.css b/out/compiled/Config.css deleted file mode 100644 index 6eadb1e..0000000 --- a/out/compiled/Config.css +++ /dev/null @@ -1,3 +0,0 @@ -.container.svelte-rrj90q.svelte-rrj90q,.settings-container.svelte-rrj90q.svelte-rrj90q{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:left;height:100vh;padding:20px}.get-started.svelte-rrj90q.svelte-rrj90q{margin-top:50px;text-align:center;font-size:18px}.description.svelte-rrj90q.svelte-rrj90q{margin-top:10px;text-align:center;font-size:16px;max-width:300px}.button.svelte-rrj90q.svelte-rrj90q{margin-top:20px;padding:10px 20px;background-color:#FF914D;color:white;border:none;border-radius:20px;font-size:20px;cursor:pointer}.button.svelte-rrj90q.svelte-rrj90q:hover{background-color:#FF914D}.settings-item.svelte-rrj90q.svelte-rrj90q{display:flex;align-items:center;justify-content:space-between;width:300px;padding:10px;margin:10px 0;border-radius:10px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}.settings-item.svelte-rrj90q input.svelte-rrj90q{flex-grow:1}.heading.svelte-rrj90q.svelte-rrj90q{font-size:24px;margin-bottom:20px;text-align:center}.container-hide.svelte-rrj90q.svelte-rrj90q{display:none} - -/*# sourceMappingURL=Config.css.map */ \ No newline at end of file diff --git a/out/compiled/Config.css.map b/out/compiled/Config.css.map deleted file mode 100644 index d4f414f..0000000 --- a/out/compiled/Config.css.map +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": 3, - "file": "Config.css", - "sources": [ - "Config.svelte" - ], - "sourcesContent": [ - "\n\n\n\n
\n
\n \n
\n
\n
Get Started
\n
\n Integrate Keploy by installing the open-source agent locally. No code-changes required.\n
\n \n
\n\n
\n

Initialise Keploy Config File

\n
\n
\n \n
\n
\n
\n \n
\n \n
\n" - ], - "names": [], - "mappings": "AAYE,sCAAU,CAAE,+CAAoB,CAC9B,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,MAAM,CACtB,WAAW,CAAE,MAAM,CACnB,eAAe,CAAE,MAAM,CACvB,UAAU,CAAE,IAAI,CAChB,MAAM,CAAE,KAAK,CACb,OAAO,CAAE,IACX,CAEA,wCAAa,CACX,UAAU,CAAE,IAAI,CAChB,UAAU,CAAE,MAAM,CAClB,SAAS,CAAE,IACb,CAEA,wCAAa,CACX,UAAU,CAAE,IAAI,CAChB,UAAU,CAAE,MAAM,CAClB,SAAS,CAAE,IAAI,CACf,SAAS,CAAE,KACb,CAEA,mCAAQ,CACN,UAAU,CAAE,IAAI,CAChB,OAAO,CAAE,IAAI,CAAC,IAAI,CAClB,gBAAgB,CAAE,OAAO,CACzB,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,IAAI,CACZ,aAAa,CAAE,IAAI,CACnB,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,OACV,CAEA,mCAAO,MAAO,CACZ,gBAAgB,CAAE,OACpB,CAGA,0CAAe,CACb,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,MAAM,CACnB,eAAe,CAAE,aAAa,CAC9B,KAAK,CAAE,KAAK,CACZ,OAAO,CAAE,IAAI,CACb,MAAM,CAAE,IAAI,CAAC,CAAC,CACd,aAAa,CAAE,IAAI,CACnB,UAAU,CAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CACzC,CAGA,4BAAc,CAAC,mBAAM,CACnB,SAAS,CAAE,CACb,CAEA,oCAAS,CACP,SAAS,CAAE,IAAI,CACf,aAAa,CAAE,IAAI,CACnB,UAAU,CAAE,MACd,CAEA,2CAAgB,CACd,OAAO,CAAE,IACX" -} \ No newline at end of file diff --git a/out/compiled/Config.js b/out/compiled/Config.js deleted file mode 100644 index 0889b2b..0000000 --- a/out/compiled/Config.js +++ /dev/null @@ -1,1007 +0,0 @@ -var app = (function () { - 'use strict'; - - /** @returns {void} */ - function noop() {} - - /** @returns {void} */ - function add_location(element, file, line, column, char) { - element.__svelte_meta = { - loc: { file, line, column, char } - }; - } - - function run(fn) { - return fn(); - } - - function blank_object() { - return Object.create(null); - } - - /** - * @param {Function[]} fns - * @returns {void} - */ - function run_all(fns) { - fns.forEach(run); - } - - /** - * @param {any} thing - * @returns {thing is Function} - */ - function is_function(thing) { - return typeof thing === 'function'; - } - - /** @returns {boolean} */ - function safe_not_equal(a, b) { - return a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function'; - } - - /** @returns {boolean} */ - function is_empty(obj) { - return Object.keys(obj).length === 0; - } - - function null_to_empty(value) { - return value == null ? '' : value; - } - - /** - * @param {Node} target - * @param {Node} node - * @returns {void} - */ - function append(target, node) { - target.appendChild(node); - } - - /** - * @param {Node} target - * @param {Node} node - * @param {Node} [anchor] - * @returns {void} - */ - function insert(target, node, anchor) { - target.insertBefore(node, anchor || null); - } - - /** - * @param {Node} node - * @returns {void} - */ - function detach(node) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } - - /** - * @template {keyof HTMLElementTagNameMap} K - * @param {K} name - * @returns {HTMLElementTagNameMap[K]} - */ - function element(name) { - return document.createElement(name); - } - - /** - * @param {string} data - * @returns {Text} - */ - function text(data) { - return document.createTextNode(data); - } - - /** - * @returns {Text} */ - function space() { - return text(' '); - } - - /** - * @param {EventTarget} node - * @param {string} event - * @param {EventListenerOrEventListenerObject} handler - * @param {boolean | AddEventListenerOptions | EventListenerOptions} [options] - * @returns {() => void} - */ - function listen(node, event, handler, options) { - node.addEventListener(event, handler, options); - return () => node.removeEventListener(event, handler, options); - } - - /** - * @param {Element} node - * @param {string} attribute - * @param {string} [value] - * @returns {void} - */ - function attr(node, attribute, value) { - if (value == null) node.removeAttribute(attribute); - else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value); - } - - /** - * @param {Element} element - * @returns {ChildNode[]} - */ - function children(element) { - return Array.from(element.childNodes); - } - - /** - * @returns {void} */ - function set_input_value(input, value) { - input.value = value == null ? '' : value; - } - - /** - * @template T - * @param {string} type - * @param {T} [detail] - * @param {{ bubbles?: boolean, cancelable?: boolean }} [options] - * @returns {CustomEvent} - */ - function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) { - return new CustomEvent(type, { detail, bubbles, cancelable }); - } - - /** - * @typedef {Node & { - * claim_order?: number; - * hydrate_init?: true; - * actual_end_child?: NodeEx; - * childNodes: NodeListOf; - * }} NodeEx - */ - - /** @typedef {ChildNode & NodeEx} ChildNodeEx */ - - /** @typedef {NodeEx & { claim_order: number }} NodeEx2 */ - - /** - * @typedef {ChildNodeEx[] & { - * claim_info?: { - * last_index: number; - * total_claimed: number; - * }; - * }} ChildNodeArray - */ - - let current_component; - - /** @returns {void} */ - function set_current_component(component) { - current_component = component; - } - - const dirty_components = []; - const binding_callbacks = []; - - let render_callbacks = []; - - const flush_callbacks = []; - - const resolved_promise = /* @__PURE__ */ Promise.resolve(); - - let update_scheduled = false; - - /** @returns {void} */ - function schedule_update() { - if (!update_scheduled) { - update_scheduled = true; - resolved_promise.then(flush); - } - } - - /** @returns {void} */ - function add_render_callback(fn) { - render_callbacks.push(fn); - } - - // flush() calls callbacks in this order: - // 1. All beforeUpdate callbacks, in order: parents before children - // 2. All bind:this callbacks, in reverse order: children before parents. - // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT - // for afterUpdates called during the initial onMount, which are called in - // reverse order: children before parents. - // Since callbacks might update component values, which could trigger another - // call to flush(), the following steps guard against this: - // 1. During beforeUpdate, any updated components will be added to the - // dirty_components array and will cause a reentrant call to flush(). Because - // the flush index is kept outside the function, the reentrant call will pick - // up where the earlier call left off and go through all dirty components. The - // current_component value is saved and restored so that the reentrant call will - // not interfere with the "parent" flush() call. - // 2. bind:this callbacks cannot trigger new flush() calls. - // 3. During afterUpdate, any updated components will NOT have their afterUpdate - // callback called a second time; the seen_callbacks set, outside the flush() - // function, guarantees this behavior. - const seen_callbacks = new Set(); - - let flushidx = 0; // Do *not* move this inside the flush() function - - /** @returns {void} */ - function flush() { - // Do not reenter flush while dirty components are updated, as this can - // result in an infinite loop. Instead, let the inner flush handle it. - // Reentrancy is ok afterwards for bindings etc. - if (flushidx !== 0) { - return; - } - const saved_component = current_component; - do { - // first, call beforeUpdate functions - // and update components - try { - while (flushidx < dirty_components.length) { - const component = dirty_components[flushidx]; - flushidx++; - set_current_component(component); - update(component.$$); - } - } catch (e) { - // reset dirty state to not end up in a deadlocked state and then rethrow - dirty_components.length = 0; - flushidx = 0; - throw e; - } - set_current_component(null); - dirty_components.length = 0; - flushidx = 0; - while (binding_callbacks.length) binding_callbacks.pop()(); - // then, once components are updated, call - // afterUpdate functions. This may cause - // subsequent updates... - for (let i = 0; i < render_callbacks.length; i += 1) { - const callback = render_callbacks[i]; - if (!seen_callbacks.has(callback)) { - // ...so guard against infinite loops - seen_callbacks.add(callback); - callback(); - } - } - render_callbacks.length = 0; - } while (dirty_components.length); - while (flush_callbacks.length) { - flush_callbacks.pop()(); - } - update_scheduled = false; - seen_callbacks.clear(); - set_current_component(saved_component); - } - - /** @returns {void} */ - function update($$) { - if ($$.fragment !== null) { - $$.update(); - run_all($$.before_update); - const dirty = $$.dirty; - $$.dirty = [-1]; - $$.fragment && $$.fragment.p($$.ctx, dirty); - $$.after_update.forEach(add_render_callback); - } - } - - /** - * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`. - * @param {Function[]} fns - * @returns {void} - */ - function flush_render_callbacks(fns) { - const filtered = []; - const targets = []; - render_callbacks.forEach((c) => (fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c))); - targets.forEach((c) => c()); - render_callbacks = filtered; - } - - const outroing = new Set(); - - /** - * @param {import('./private.js').Fragment} block - * @param {0 | 1} [local] - * @returns {void} - */ - function transition_in(block, local) { - if (block && block.i) { - outroing.delete(block); - block.i(local); - } - } - - /** @typedef {1} INTRO */ - /** @typedef {0} OUTRO */ - /** @typedef {{ direction: 'in' | 'out' | 'both' }} TransitionOptions */ - /** @typedef {(node: Element, params: any, options: TransitionOptions) => import('../transition/public.js').TransitionConfig} TransitionFn */ - - /** - * @typedef {Object} Outro - * @property {number} r - * @property {Function[]} c - * @property {Object} p - */ - - /** - * @typedef {Object} PendingProgram - * @property {number} start - * @property {INTRO|OUTRO} b - * @property {Outro} [group] - */ - - /** - * @typedef {Object} Program - * @property {number} a - * @property {INTRO|OUTRO} b - * @property {1|-1} d - * @property {number} duration - * @property {number} start - * @property {number} end - * @property {Outro} [group] - */ - - /** @returns {void} */ - function mount_component(component, target, anchor) { - const { fragment, after_update } = component.$$; - fragment && fragment.m(target, anchor); - // onMount happens before the initial afterUpdate - add_render_callback(() => { - const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); - // if the component was destroyed immediately - // it will update the `$$.on_destroy` reference to `null`. - // the destructured on_destroy may still reference to the old array - if (component.$$.on_destroy) { - component.$$.on_destroy.push(...new_on_destroy); - } else { - // Edge case - component was destroyed immediately, - // most likely as a result of a binding initialising - run_all(new_on_destroy); - } - component.$$.on_mount = []; - }); - after_update.forEach(add_render_callback); - } - - /** @returns {void} */ - function destroy_component(component, detaching) { - const $$ = component.$$; - if ($$.fragment !== null) { - flush_render_callbacks($$.after_update); - run_all($$.on_destroy); - $$.fragment && $$.fragment.d(detaching); - // TODO null out other refs, including component.$$ (but need to - // preserve final state?) - $$.on_destroy = $$.fragment = null; - $$.ctx = []; - } - } - - /** @returns {void} */ - function make_dirty(component, i) { - if (component.$$.dirty[0] === -1) { - dirty_components.push(component); - schedule_update(); - component.$$.dirty.fill(0); - } - component.$$.dirty[(i / 31) | 0] |= 1 << i % 31; - } - - // TODO: Document the other params - /** - * @param {SvelteComponent} component - * @param {import('./public.js').ComponentConstructorOptions} options - * - * @param {import('./utils.js')['not_equal']} not_equal Used to compare props and state values. - * @param {(target: Element | ShadowRoot) => void} [append_styles] Function that appends styles to the DOM when the component is first initialised. - * This will be the `add_css` function from the compiled component. - * - * @returns {void} - */ - function init( - component, - options, - instance, - create_fragment, - not_equal, - props, - append_styles = null, - dirty = [-1] - ) { - const parent_component = current_component; - set_current_component(component); - /** @type {import('./private.js').T$$} */ - const $$ = (component.$$ = { - fragment: null, - ctx: [], - // state - props, - update: noop, - not_equal, - bound: blank_object(), - // lifecycle - on_mount: [], - on_destroy: [], - on_disconnect: [], - before_update: [], - after_update: [], - context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), - // everything else - callbacks: blank_object(), - dirty, - skip_bound: false, - root: options.target || parent_component.$$.root - }); - append_styles && append_styles($$.root); - let ready = false; - $$.ctx = instance - ? instance(component, options.props || {}, (i, ret, ...rest) => { - const value = rest.length ? rest[0] : ret; - if ($$.ctx && not_equal($$.ctx[i], ($$.ctx[i] = value))) { - if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); - if (ready) make_dirty(component, i); - } - return ret; - }) - : []; - $$.update(); - ready = true; - run_all($$.before_update); - // `false` as a special case of no DOM component - $$.fragment = create_fragment ? create_fragment($$.ctx) : false; - if (options.target) { - if (options.hydrate) { - // TODO: what is the correct type here? - // @ts-expect-error - const nodes = children(options.target); - $$.fragment && $$.fragment.l(nodes); - nodes.forEach(detach); - } else { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment.c(); - } - if (options.intro) transition_in(component.$$.fragment); - mount_component(component, options.target, options.anchor); - flush(); - } - set_current_component(parent_component); - } - - /** - * Base class for Svelte components. Used when dev=false. - * - * @template {Record} [Props=any] - * @template {Record} [Events=any] - */ - class SvelteComponent { - /** - * ### PRIVATE API - * - * Do not use, may change at any time - * - * @type {any} - */ - $$ = undefined; - /** - * ### PRIVATE API - * - * Do not use, may change at any time - * - * @type {any} - */ - $$set = undefined; - - /** @returns {void} */ - $destroy() { - destroy_component(this, 1); - this.$destroy = noop; - } - - /** - * @template {Extract} K - * @param {K} type - * @param {((e: Events[K]) => void) | null | undefined} callback - * @returns {() => void} - */ - $on(type, callback) { - if (!is_function(callback)) { - return noop; - } - const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); - callbacks.push(callback); - return () => { - const index = callbacks.indexOf(callback); - if (index !== -1) callbacks.splice(index, 1); - }; - } - - /** - * @param {Partial} props - * @returns {void} - */ - $set(props) { - if (this.$$set && !is_empty(props)) { - this.$$.skip_bound = true; - this.$$set(props); - this.$$.skip_bound = false; - } - } - } - - /** - * @typedef {Object} CustomElementPropDefinition - * @property {string} [attribute] - * @property {boolean} [reflect] - * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type] - */ - - // generated during release, do not modify - - /** - * The current version, as set in package.json. - * - * https://svelte.dev/docs/svelte-compiler#svelte-version - * @type {string} - */ - const VERSION = '4.2.17'; - const PUBLIC_VERSION = '4'; - - /** - * @template T - * @param {string} type - * @param {T} [detail] - * @returns {void} - */ - function dispatch_dev(type, detail) { - document.dispatchEvent(custom_event(type, { version: VERSION, ...detail }, { bubbles: true })); - } - - /** - * @param {Node} target - * @param {Node} node - * @returns {void} - */ - function append_dev(target, node) { - dispatch_dev('SvelteDOMInsert', { target, node }); - append(target, node); - } - - /** - * @param {Node} target - * @param {Node} node - * @param {Node} [anchor] - * @returns {void} - */ - function insert_dev(target, node, anchor) { - dispatch_dev('SvelteDOMInsert', { target, node, anchor }); - insert(target, node, anchor); - } - - /** - * @param {Node} node - * @returns {void} - */ - function detach_dev(node) { - dispatch_dev('SvelteDOMRemove', { node }); - detach(node); - } - - /** - * @param {Node} node - * @param {string} event - * @param {EventListenerOrEventListenerObject} handler - * @param {boolean | AddEventListenerOptions | EventListenerOptions} [options] - * @param {boolean} [has_prevent_default] - * @param {boolean} [has_stop_propagation] - * @param {boolean} [has_stop_immediate_propagation] - * @returns {() => void} - */ - function listen_dev( - node, - event, - handler, - options, - has_prevent_default, - has_stop_propagation, - has_stop_immediate_propagation - ) { - const modifiers = - options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : []; - if (has_prevent_default) modifiers.push('preventDefault'); - if (has_stop_propagation) modifiers.push('stopPropagation'); - if (has_stop_immediate_propagation) modifiers.push('stopImmediatePropagation'); - dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers }); - const dispose = listen(node, event, handler, options); - return () => { - dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers }); - dispose(); - }; - } - - /** - * @param {Element} node - * @param {string} attribute - * @param {string} [value] - * @returns {void} - */ - function attr_dev(node, attribute, value) { - attr(node, attribute, value); - if (value == null) dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute }); - else dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value }); - } - - /** - * @returns {void} */ - function validate_slots(name, slot, keys) { - for (const slot_key of Object.keys(slot)) { - if (!~keys.indexOf(slot_key)) { - console.warn(`<${name}> received an unexpected slot "${slot_key}".`); - } - } - } - - /** - * Base class for Svelte components with some minor dev-enhancements. Used when dev=true. - * - * Can be used to create strongly typed Svelte components. - * - * #### Example: - * - * You have component library on npm called `component-library`, from which - * you export a component called `MyComponent`. For Svelte+TypeScript users, - * you want to provide typings. Therefore you create a `index.d.ts`: - * ```ts - * import { SvelteComponent } from "svelte"; - * export class MyComponent extends SvelteComponent<{foo: string}> {} - * ``` - * Typing this makes it possible for IDEs like VS Code with the Svelte extension - * to provide intellisense and to use the component like this in a Svelte file - * with TypeScript: - * ```svelte - * - * - * ``` - * @template {Record} [Props=any] - * @template {Record} [Events=any] - * @template {Record} [Slots=any] - * @extends {SvelteComponent} - */ - class SvelteComponentDev extends SvelteComponent { - /** - * For type checking capabilities only. - * Does not exist at runtime. - * ### DO NOT USE! - * - * @type {Props} - */ - $$prop_def; - /** - * For type checking capabilities only. - * Does not exist at runtime. - * ### DO NOT USE! - * - * @type {Events} - */ - $$events_def; - /** - * For type checking capabilities only. - * Does not exist at runtime. - * ### DO NOT USE! - * - * @type {Slots} - */ - $$slot_def; - - /** @param {import('./public.js').ComponentConstructorOptions} options */ - constructor(options) { - if (!options || (!options.target && !options.$$inline)) { - throw new Error("'target' is a required option"); - } - super(); - } - - /** @returns {void} */ - $destroy() { - super.$destroy(); - this.$destroy = () => { - console.warn('Component was already destroyed'); // eslint-disable-line no-console - }; - } - - /** @returns {void} */ - $capture_state() {} - - /** @returns {void} */ - $inject_state() {} - } - - if (typeof window !== 'undefined') - // @ts-ignore - (window.__svelte || (window.__svelte = { v: new Set() })).v.add(PUBLIC_VERSION); - - /* webviews/components/Config.svelte generated by Svelte v4.2.17 */ - const file = "webviews/components/Config.svelte"; - - function create_fragment(ctx) { - let body; - let div0; - let t0; - let div4; - let div1; - let t1; - let div2; - let t3; - let div3; - let t5; - let button0; - let div4_class_value; - let t7; - let div9; - let h1; - let t9; - let div6; - let div5; - let t10; - let input0; - let t11; - let div8; - let div7; - let t12; - let input1; - let t13; - let button1; - let div9_class_value; - let mounted; - let dispose; - - const block = { - c: function create() { - body = element("body"); - div0 = element("div"); - t0 = space(); - div4 = element("div"); - div1 = element("div"); - div1.innerHTML = ``; - t1 = space(); - div2 = element("div"); - div2.textContent = "Get Started"; - t3 = space(); - div3 = element("div"); - div3.textContent = "Integrate Keploy by installing the open-source agent locally. No code-changes required."; - t5 = space(); - button0 = element("button"); - button0.textContent = "Setup Keploy Config"; - t7 = space(); - div9 = element("div"); - h1 = element("h1"); - h1.textContent = "Initialise Keploy Config File"; - t9 = space(); - div6 = element("div"); - div5 = element("div"); - div5.innerHTML = ``; - t10 = space(); - input0 = element("input"); - t11 = space(); - div8 = element("div"); - div7 = element("div"); - div7.innerHTML = ``; - t12 = space(); - input1 = element("input"); - t13 = space(); - button1 = element("button"); - button1.textContent = "Save Configuration"; - attr_dev(div0, "class", "keploylogo"); - add_location(div0, file, 78, 0, 1365); - attr_dev(div1, "class", "image-container"); - add_location(div1, file, 81, 2, 1463); - attr_dev(div2, "class", "get-started svelte-rrj90q"); - add_location(div2, file, 83, 2, 1504); - attr_dev(div3, "class", "description svelte-rrj90q"); - add_location(div3, file, 84, 2, 1549); - attr_dev(button0, "class", "button svelte-rrj90q"); - attr_dev(button0, "id", "setupConfig"); - add_location(button0, file, 87, 2, 1678); - attr_dev(div4, "class", div4_class_value = "" + (null_to_empty(/*showSettings*/ ctx[0] ? 'container-hide' : 'container') + " svelte-rrj90q")); - add_location(div4, file, 79, 0, 1396); - attr_dev(h1, "class", "heading svelte-rrj90q"); - add_location(h1, file, 91, 2, 1857); - attr_dev(div5, "class", "code-icon "); - attr_dev(div5, "alt", "Icon"); - add_location(div5, file, 93, 4, 1946); - attr_dev(input0, "type", "text"); - attr_dev(input0, "placeholder", "Enter Command to Run the Application"); - attr_dev(input0, "id", "configCommand"); - attr_dev(input0, "class", "svelte-rrj90q"); - add_location(input0, file, 94, 4, 1993); - attr_dev(div6, "class", "settings-item svelte-rrj90q"); - add_location(div6, file, 92, 2, 1914); - attr_dev(div7, "class", "code-icon "); - attr_dev(div7, "alt", "Icon"); - add_location(div7, file, 97, 4, 2150); - attr_dev(input1, "type", "text"); - attr_dev(input1, "placeholder", "Enter Application Path (default : './')"); - attr_dev(input1, "id", "configPath"); - attr_dev(input1, "class", "svelte-rrj90q"); - add_location(input1, file, 98, 4, 2197); - attr_dev(div8, "class", "settings-item svelte-rrj90q"); - add_location(div8, file, 96, 2, 2118); - attr_dev(button1, "class", "button svelte-rrj90q"); - attr_dev(button1, "id", "initialiseConfigButton"); - add_location(button1, file, 100, 2, 2317); - - attr_dev(div9, "class", div9_class_value = "" + (null_to_empty(/*showSettings*/ ctx[0] - ? 'settings-container' - : 'container-hide') + " svelte-rrj90q")); - - add_location(div9, file, 90, 0, 1784); - attr_dev(body, "class", "baloo-2-custom"); - add_location(body, file, 77, 0, 1335); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, body, anchor); - append_dev(body, div0); - append_dev(body, t0); - append_dev(body, div4); - append_dev(div4, div1); - append_dev(div4, t1); - append_dev(div4, div2); - append_dev(div4, t3); - append_dev(div4, div3); - append_dev(div4, t5); - append_dev(div4, button0); - append_dev(body, t7); - append_dev(body, div9); - append_dev(div9, h1); - append_dev(div9, t9); - append_dev(div9, div6); - append_dev(div6, div5); - append_dev(div6, t10); - append_dev(div6, input0); - set_input_value(input0, /*appCommand*/ ctx[1]); - append_dev(div9, t11); - append_dev(div9, div8); - append_dev(div8, div7); - append_dev(div8, t12); - append_dev(div8, input1); - set_input_value(input1, /*path*/ ctx[2]); - append_dev(div9, t13); - append_dev(div9, button1); - - if (!mounted) { - dispose = [ - listen_dev(button0, "click", /*handleSetupConfig*/ ctx[3], false, false, false, false), - listen_dev(input0, "input", /*input0_input_handler*/ ctx[4]), - listen_dev(input1, "input", /*input1_input_handler*/ ctx[5]) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*showSettings*/ 1 && div4_class_value !== (div4_class_value = "" + (null_to_empty(/*showSettings*/ ctx[0] ? 'container-hide' : 'container') + " svelte-rrj90q"))) { - attr_dev(div4, "class", div4_class_value); - } - - if (dirty & /*appCommand*/ 2 && input0.value !== /*appCommand*/ ctx[1]) { - set_input_value(input0, /*appCommand*/ ctx[1]); - } - - if (dirty & /*path*/ 4 && input1.value !== /*path*/ ctx[2]) { - set_input_value(input1, /*path*/ ctx[2]); - } - - if (dirty & /*showSettings*/ 1 && div9_class_value !== (div9_class_value = "" + (null_to_empty(/*showSettings*/ ctx[0] - ? 'settings-container' - : 'container-hide') + " svelte-rrj90q"))) { - attr_dev(div9, "class", div9_class_value); - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) { - detach_dev(body); - } - - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('Config', slots, []); - let showSettings = false; - let appCommand = ''; - let path = './'; - let passThroughPorts = ''; - - function handleSetupConfig() { - $$invalidate(0, showSettings = true); - } - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function input0_input_handler() { - appCommand = this.value; - $$invalidate(1, appCommand); - } - - function input1_input_handler() { - path = this.value; - $$invalidate(2, path); - } - - $$self.$capture_state = () => ({ - showSettings, - appCommand, - path, - passThroughPorts, - handleSetupConfig - }); - - $$self.$inject_state = $$props => { - if ('showSettings' in $$props) $$invalidate(0, showSettings = $$props.showSettings); - if ('appCommand' in $$props) $$invalidate(1, appCommand = $$props.appCommand); - if ('path' in $$props) $$invalidate(2, path = $$props.path); - if ('passThroughPorts' in $$props) passThroughPorts = $$props.passThroughPorts; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - showSettings, - appCommand, - path, - handleSetupConfig, - input0_input_handler, - input1_input_handler - ]; - } - - class Config extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance, create_fragment, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Config", - options, - id: create_fragment.name - }); - } - } - - const app = new Config({ - target: document.body, - }); - - return app; - -})(); -//# sourceMappingURL=Config.js.map diff --git a/out/compiled/Config.js.map b/out/compiled/Config.js.map deleted file mode 100644 index 362c689..0000000 --- a/out/compiled/Config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Config.js","sources":["../../node_modules/svelte/src/runtime/internal/utils.js","../../node_modules/svelte/src/runtime/internal/dom.js","../../node_modules/svelte/src/runtime/internal/lifecycle.js","../../node_modules/svelte/src/runtime/internal/scheduler.js","../../node_modules/svelte/src/runtime/internal/transitions.js","../../node_modules/svelte/src/runtime/internal/Component.js","../../node_modules/svelte/src/shared/version.js","../../node_modules/svelte/src/runtime/internal/dev.js","../../node_modules/svelte/src/runtime/internal/disclose-version/index.js","../../webviews/components/Config.svelte","../../webviews/pages/Config.ts"],"sourcesContent":["/** @returns {void} */\nexport function noop() {}\n\nexport const identity = (x) => x;\n\n/**\n * @template T\n * @template S\n * @param {T} tar\n * @param {S} src\n * @returns {T & S}\n */\nexport function assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn /** @type {T & S} */ (tar);\n}\n\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\n/**\n * @param {any} value\n * @returns {value is PromiseLike}\n */\nexport function is_promise(value) {\n\treturn (\n\t\t!!value &&\n\t\t(typeof value === 'object' || typeof value === 'function') &&\n\t\ttypeof (/** @type {any} */ (value).then) === 'function'\n\t);\n}\n\n/** @returns {void} */\nexport function add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nexport function run(fn) {\n\treturn fn();\n}\n\nexport function blank_object() {\n\treturn Object.create(null);\n}\n\n/**\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function run_all(fns) {\n\tfns.forEach(run);\n}\n\n/**\n * @param {any} thing\n * @returns {thing is Function}\n */\nexport function is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\n/** @returns {boolean} */\nexport function safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function';\n}\n\nlet src_url_equal_anchor;\n\n/**\n * @param {string} element_src\n * @param {string} url\n * @returns {boolean}\n */\nexport function src_url_equal(element_src, url) {\n\tif (element_src === url) return true;\n\tif (!src_url_equal_anchor) {\n\t\tsrc_url_equal_anchor = document.createElement('a');\n\t}\n\t// This is actually faster than doing URL(..).href\n\tsrc_url_equal_anchor.href = url;\n\treturn element_src === src_url_equal_anchor.href;\n}\n\n/** @param {string} srcset */\nfunction split_srcset(srcset) {\n\treturn srcset.split(',').map((src) => src.trim().split(' ').filter(Boolean));\n}\n\n/**\n * @param {HTMLSourceElement | HTMLImageElement} element_srcset\n * @param {string | undefined | null} srcset\n * @returns {boolean}\n */\nexport function srcset_url_equal(element_srcset, srcset) {\n\tconst element_urls = split_srcset(element_srcset.srcset);\n\tconst urls = split_srcset(srcset || '');\n\n\treturn (\n\t\turls.length === element_urls.length &&\n\t\turls.every(\n\t\t\t([url, width], i) =>\n\t\t\t\twidth === element_urls[i][1] &&\n\t\t\t\t// We need to test both ways because Vite will create an a full URL with\n\t\t\t\t// `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the\n\t\t\t\t// relative URLs inside srcset are not automatically resolved to absolute URLs by\n\t\t\t\t// browsers (in contrast to img.src). This means both SSR and DOM code could\n\t\t\t\t// contain relative or absolute URLs.\n\t\t\t\t(src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0]))\n\t\t)\n\t);\n}\n\n/** @returns {boolean} */\nexport function not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\n/** @returns {boolean} */\nexport function is_empty(obj) {\n\treturn Object.keys(obj).length === 0;\n}\n\n/** @returns {void} */\nexport function validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nexport function subscribe(store, ...callbacks) {\n\tif (store == null) {\n\t\tfor (const callback of callbacks) {\n\t\t\tcallback(undefined);\n\t\t}\n\t\treturn noop;\n\t}\n\tconst unsub = store.subscribe(...callbacks);\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n\n/**\n * Get the current value from a store by subscribing and immediately unsubscribing.\n *\n * https://svelte.dev/docs/svelte-store#get\n * @template T\n * @param {import('../store/public.js').Readable} store\n * @returns {T}\n */\nexport function get_store_value(store) {\n\tlet value;\n\tsubscribe(store, (_) => (value = _))();\n\treturn value;\n}\n\n/** @returns {void} */\nexport function component_subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(subscribe(store, callback));\n}\n\nexport function create_slot(definition, ctx, $$scope, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n\treturn definition[1] && fn ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) : $$scope.ctx;\n}\n\nexport function get_slot_changes(definition, $$scope, dirty, fn) {\n\tif (definition[2] && fn) {\n\t\tconst lets = definition[2](fn(dirty));\n\t\tif ($$scope.dirty === undefined) {\n\t\t\treturn lets;\n\t\t}\n\t\tif (typeof lets === 'object') {\n\t\t\tconst merged = [];\n\t\t\tconst len = Math.max($$scope.dirty.length, lets.length);\n\t\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\t\tmerged[i] = $$scope.dirty[i] | lets[i];\n\t\t\t}\n\t\t\treturn merged;\n\t\t}\n\t\treturn $$scope.dirty | lets;\n\t}\n\treturn $$scope.dirty;\n}\n\n/** @returns {void} */\nexport function update_slot_base(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tslot_changes,\n\tget_slot_context_fn\n) {\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\n/** @returns {void} */\nexport function update_slot(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tdirty,\n\tget_slot_changes_fn,\n\tget_slot_context_fn\n) {\n\tconst slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tupdate_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\n\n/** @returns {any[] | -1} */\nexport function get_all_dirty_from_scope($$scope) {\n\tif ($$scope.ctx.length > 32) {\n\t\tconst dirty = [];\n\t\tconst length = $$scope.ctx.length / 32;\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tdirty[i] = -1;\n\t\t}\n\t\treturn dirty;\n\t}\n\treturn -1;\n}\n\n/** @returns {{}} */\nexport function exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\n/** @returns {{}} */\nexport function compute_rest_props(props, keys) {\n\tconst rest = {};\n\tkeys = new Set(keys);\n\tfor (const k in props) if (!keys.has(k) && k[0] !== '$') rest[k] = props[k];\n\treturn rest;\n}\n\n/** @returns {{}} */\nexport function compute_slots(slots) {\n\tconst result = {};\n\tfor (const key in slots) {\n\t\tresult[key] = true;\n\t}\n\treturn result;\n}\n\n/** @returns {(this: any, ...args: any[]) => void} */\nexport function once(fn) {\n\tlet ran = false;\n\treturn function (...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\t\tfn.call(this, ...args);\n\t};\n}\n\nexport function null_to_empty(value) {\n\treturn value == null ? '' : value;\n}\n\nexport function set_store_value(store, ret, value) {\n\tstore.set(value);\n\treturn ret;\n}\n\nexport const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nexport function action_destroyer(action_result) {\n\treturn action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\n/** @param {number | string} value\n * @returns {[number, string]}\n */\nexport function split_css_unit(value) {\n\tconst split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n\treturn split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];\n}\n\nexport const contenteditable_truthy_values = ['', true, 1, 'true', 'contenteditable'];\n","import { contenteditable_truthy_values, has_prop } from './utils.js';\n\nimport { ResizeObserverSingleton } from './ResizeObserverSingleton.js';\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\n\n/**\n * @returns {void}\n */\nexport function start_hydrating() {\n\tis_hydrating = true;\n}\n\n/**\n * @returns {void}\n */\nexport function end_hydrating() {\n\tis_hydrating = false;\n}\n\n/**\n * @param {number} low\n * @param {number} high\n * @param {(index: number) => number} key\n * @param {number} value\n * @returns {number}\n */\nfunction upper_bound(low, high, key, value) {\n\t// Return first index of value larger than input value in the range [low, high)\n\twhile (low < high) {\n\t\tconst mid = low + ((high - low) >> 1);\n\t\tif (key(mid) <= value) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\thigh = mid;\n\t\t}\n\t}\n\treturn low;\n}\n\n/**\n * @param {NodeEx} target\n * @returns {void}\n */\nfunction init_hydrate(target) {\n\tif (target.hydrate_init) return;\n\ttarget.hydrate_init = true;\n\t// We know that all children have claim_order values since the unclaimed have been detached if target is not \n\n\tlet children = /** @type {ArrayLike} */ (target.childNodes);\n\t// If target is , there may be children without claim_order\n\tif (target.nodeName === 'HEAD') {\n\t\tconst my_children = [];\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tconst node = children[i];\n\t\t\tif (node.claim_order !== undefined) {\n\t\t\t\tmy_children.push(node);\n\t\t\t}\n\t\t}\n\t\tchildren = my_children;\n\t}\n\t/*\n\t * Reorder claimed children optimally.\n\t * We can reorder claimed children optimally by finding the longest subsequence of\n\t * nodes that are already claimed in order and only moving the rest. The longest\n\t * subsequence of nodes that are claimed in order can be found by\n\t * computing the longest increasing subsequence of .claim_order values.\n\t *\n\t * This algorithm is optimal in generating the least amount of reorder operations\n\t * possible.\n\t *\n\t * Proof:\n\t * We know that, given a set of reordering operations, the nodes that do not move\n\t * always form an increasing subsequence, since they do not move among each other\n\t * meaning that they must be already ordered among each other. Thus, the maximal\n\t * set of nodes that do not move form a longest increasing subsequence.\n\t */\n\t// Compute longest increasing subsequence\n\t// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n\tconst m = new Int32Array(children.length + 1);\n\t// Predecessor indices + 1\n\tconst p = new Int32Array(children.length);\n\tm[0] = -1;\n\tlet longest = 0;\n\tfor (let i = 0; i < children.length; i++) {\n\t\tconst current = children[i].claim_order;\n\t\t// Find the largest subsequence length such that it ends in a value less than our current value\n\t\t// upper_bound returns first greater value, so we subtract one\n\t\t// with fast path for when we are on the current longest subsequence\n\t\tconst seq_len =\n\t\t\t(longest > 0 && children[m[longest]].claim_order <= current\n\t\t\t\t? longest + 1\n\t\t\t\t: upper_bound(1, longest, (idx) => children[m[idx]].claim_order, current)) - 1;\n\t\tp[i] = m[seq_len] + 1;\n\t\tconst new_len = seq_len + 1;\n\t\t// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n\t\tm[new_len] = i;\n\t\tlongest = Math.max(new_len, longest);\n\t}\n\t// The longest increasing subsequence of nodes (initially reversed)\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst lis = [];\n\t// The rest of the nodes, nodes that will be moved\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst to_move = [];\n\tlet last = children.length - 1;\n\tfor (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n\t\tlis.push(children[cur - 1]);\n\t\tfor (; last >= cur; last--) {\n\t\t\tto_move.push(children[last]);\n\t\t}\n\t\tlast--;\n\t}\n\tfor (; last >= 0; last--) {\n\t\tto_move.push(children[last]);\n\t}\n\tlis.reverse();\n\t// We sort the nodes being moved to guarantee that their insertion order matches the claim order\n\tto_move.sort((a, b) => a.claim_order - b.claim_order);\n\t// Finally, we move the nodes\n\tfor (let i = 0, j = 0; i < to_move.length; i++) {\n\t\twhile (j < lis.length && to_move[i].claim_order >= lis[j].claim_order) {\n\t\t\tj++;\n\t\t}\n\t\tconst anchor = j < lis.length ? lis[j] : null;\n\t\ttarget.insertBefore(to_move[i], anchor);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @returns {void}\n */\nexport function append(target, node) {\n\ttarget.appendChild(node);\n}\n\n/**\n * @param {Node} target\n * @param {string} style_sheet_id\n * @param {string} styles\n * @returns {void}\n */\nexport function append_styles(target, style_sheet_id, styles) {\n\tconst append_styles_to = get_root_for_style(target);\n\tif (!append_styles_to.getElementById(style_sheet_id)) {\n\t\tconst style = element('style');\n\t\tstyle.id = style_sheet_id;\n\t\tstyle.textContent = styles;\n\t\tappend_stylesheet(append_styles_to, style);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {ShadowRoot | Document}\n */\nexport function get_root_for_style(node) {\n\tif (!node) return document;\n\tconst root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n\tif (root && /** @type {ShadowRoot} */ (root).host) {\n\t\treturn /** @type {ShadowRoot} */ (root);\n\t}\n\treturn node.ownerDocument;\n}\n\n/**\n * @param {Node} node\n * @returns {CSSStyleSheet}\n */\nexport function append_empty_stylesheet(node) {\n\tconst style_element = element('style');\n\t// For transitions to work without 'style-src: unsafe-inline' Content Security Policy,\n\t// these empty tags need to be allowed with a hash as a workaround until we move to the Web Animations API.\n\t// Using the hash for the empty string (for an empty tag) works in all browsers except Safari.\n\t// So as a workaround for the workaround, when we append empty style tags we set their content to /* empty */.\n\t// The hash 'sha256-9OlNO0DNEeaVzHL4RZwCLsBHA8WBQ8toBp/4F5XV2nc=' will then work even in Safari.\n\tstyle_element.textContent = '/* empty */';\n\tappend_stylesheet(get_root_for_style(node), style_element);\n\treturn style_element.sheet;\n}\n\n/**\n * @param {ShadowRoot | Document} node\n * @param {HTMLStyleElement} style\n * @returns {CSSStyleSheet}\n */\nfunction append_stylesheet(node, style) {\n\tappend(/** @type {Document} */ (node).head || node, style);\n\treturn style.sheet;\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @returns {void}\n */\nexport function append_hydration(target, node) {\n\tif (is_hydrating) {\n\t\tinit_hydrate(target);\n\t\tif (\n\t\t\ttarget.actual_end_child === undefined ||\n\t\t\t(target.actual_end_child !== null && target.actual_end_child.parentNode !== target)\n\t\t) {\n\t\t\ttarget.actual_end_child = target.firstChild;\n\t\t}\n\t\t// Skip nodes of undefined ordering\n\t\twhile (target.actual_end_child !== null && target.actual_end_child.claim_order === undefined) {\n\t\t\ttarget.actual_end_child = target.actual_end_child.nextSibling;\n\t\t}\n\t\tif (node !== target.actual_end_child) {\n\t\t\t// We only insert if the ordering of this node should be modified or the parent node is not target\n\t\t\tif (node.claim_order !== undefined || node.parentNode !== target) {\n\t\t\t\ttarget.insertBefore(node, target.actual_end_child);\n\t\t\t}\n\t\t} else {\n\t\t\ttarget.actual_end_child = node.nextSibling;\n\t\t}\n\t} else if (node.parentNode !== target || node.nextSibling !== null) {\n\t\ttarget.appendChild(node);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @param {Node} [anchor]\n * @returns {void}\n */\nexport function insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @param {NodeEx} [anchor]\n * @returns {void}\n */\nexport function insert_hydration(target, node, anchor) {\n\tif (is_hydrating && !anchor) {\n\t\tappend_hydration(target, node);\n\t} else if (node.parentNode !== target || node.nextSibling != anchor) {\n\t\ttarget.insertBefore(node, anchor || null);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {void}\n */\nexport function detach(node) {\n\tif (node.parentNode) {\n\t\tnode.parentNode.removeChild(node);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element(name) {\n\treturn document.createElement(name);\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @param {string} is\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element_is(name, is) {\n\treturn document.createElement(name, { is });\n}\n\n/**\n * @template T\n * @template {keyof T} K\n * @param {T} obj\n * @param {K[]} exclude\n * @returns {Pick>}\n */\nexport function object_without_properties(obj, exclude) {\n\tconst target = /** @type {Pick>} */ ({});\n\tfor (const k in obj) {\n\t\tif (\n\t\t\thas_prop(obj, k) &&\n\t\t\t// @ts-ignore\n\t\t\texclude.indexOf(k) === -1\n\t\t) {\n\t\t\t// @ts-ignore\n\t\t\ttarget[k] = obj[k];\n\t\t}\n\t}\n\treturn target;\n}\n\n/**\n * @template {keyof SVGElementTagNameMap} K\n * @param {K} name\n * @returns {SVGElement}\n */\nexport function svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n/**\n * @param {string} data\n * @returns {Text}\n */\nexport function text(data) {\n\treturn document.createTextNode(data);\n}\n\n/**\n * @returns {Text} */\nexport function space() {\n\treturn text(' ');\n}\n\n/**\n * @returns {Text} */\nexport function empty() {\n\treturn text('');\n}\n\n/**\n * @param {string} content\n * @returns {Comment}\n */\nexport function comment(content) {\n\treturn document.createComment(content);\n}\n\n/**\n * @param {EventTarget} node\n * @param {string} event\n * @param {EventListenerOrEventListenerObject} handler\n * @param {boolean | AddEventListenerOptions | EventListenerOptions} [options]\n * @returns {() => void}\n */\nexport function listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function prevent_default(fn) {\n\treturn function (event) {\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_immediate_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopImmediatePropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function self(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.target === this) fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function trusted(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.isTrusted) fn.call(this, event);\n\t};\n}\n\n/**\n * @param {Element} node\n * @param {string} attribute\n * @param {string} [value]\n * @returns {void}\n */\nexport function attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);\n}\n/**\n * List of attributes that should always be set through the attr method,\n * because updating them through the property setter doesn't work reliably.\n * In the example of `width`/`height`, the problem is that the setter only\n * accepts numeric values, but the attribute can also be set to a string like `50%`.\n * If this list becomes too big, rethink this approach.\n */\nconst always_set_through_set_attribute = ['width', 'height'];\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_attributes(node, attributes) {\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n\tfor (const key in attributes) {\n\t\tif (attributes[key] == null) {\n\t\t\tnode.removeAttribute(key);\n\t\t} else if (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key === '__value') {\n\t\t\t/** @type {any} */ (node).value = node[key] = attributes[key];\n\t\t} else if (\n\t\t\tdescriptors[key] &&\n\t\t\tdescriptors[key].set &&\n\t\t\talways_set_through_set_attribute.indexOf(key) === -1\n\t\t) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_svg_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tattr(node, key, attributes[key]);\n\t}\n}\n\n/**\n * @param {Record} data_map\n * @returns {void}\n */\nexport function set_custom_element_data_map(node, data_map) {\n\tObject.keys(data_map).forEach((key) => {\n\t\tset_custom_element_data(node, key, data_map[key]);\n\t});\n}\n\n/**\n * @returns {void} */\nexport function set_custom_element_data(node, prop, value) {\n\tconst lower = prop.toLowerCase(); // for backwards compatibility with existing behavior we do lowercase first\n\tif (lower in node) {\n\t\tnode[lower] = typeof node[lower] === 'boolean' && value === '' ? true : value;\n\t} else if (prop in node) {\n\t\tnode[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\n/**\n * @param {string} tag\n */\nexport function set_dynamic_element_data(tag) {\n\treturn /-/.test(tag) ? set_custom_element_data_map : set_attributes;\n}\n\n/**\n * @returns {void}\n */\nexport function xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\n/**\n * @param {HTMLElement} node\n * @returns {string}\n */\nexport function get_svelte_dataset(node) {\n\treturn node.dataset.svelteH;\n}\n\n/**\n * @returns {unknown[]} */\nexport function get_binding_group_value(group, __value, checked) {\n\tconst value = new Set();\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.add(group[i].__value);\n\t}\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\treturn Array.from(value);\n}\n\n/**\n * @param {HTMLInputElement[]} group\n * @returns {{ p(...inputs: HTMLInputElement[]): void; r(): void; }}\n */\nexport function init_binding_group(group) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\treturn {\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\t_inputs.forEach((input) => group.push(input));\n\t\t},\n\t\t/* remove */ r() {\n\t\t\t_inputs.forEach((input) => group.splice(group.indexOf(input), 1));\n\t\t}\n\t};\n}\n\n/**\n * @param {number[]} indexes\n * @returns {{ u(new_indexes: number[]): void; p(...inputs: HTMLInputElement[]): void; r: () => void; }}\n */\nexport function init_binding_group_dynamic(group, indexes) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _group = get_binding_group(group);\n\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\n\tfunction get_binding_group(group) {\n\t\tfor (let i = 0; i < indexes.length; i++) {\n\t\t\tgroup = group[indexes[i]] = group[indexes[i]] || [];\n\t\t}\n\t\treturn group;\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction push() {\n\t\t_inputs.forEach((input) => _group.push(input));\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction remove() {\n\t\t_inputs.forEach((input) => _group.splice(_group.indexOf(input), 1));\n\t}\n\treturn {\n\t\t/* update */ u(new_indexes) {\n\t\t\tindexes = new_indexes;\n\t\t\tconst new_group = get_binding_group(group);\n\t\t\tif (new_group !== _group) {\n\t\t\t\tremove();\n\t\t\t\t_group = new_group;\n\t\t\t\tpush();\n\t\t\t}\n\t\t},\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\tpush();\n\t\t},\n\t\t/* remove */ r: remove\n\t};\n}\n\n/** @returns {number} */\nexport function to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\n/** @returns {any[]} */\nexport function time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\n/**\n * @param {Element} element\n * @returns {ChildNode[]}\n */\nexport function children(element) {\n\treturn Array.from(element.childNodes);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {void}\n */\nfunction init_claim_info(nodes) {\n\tif (nodes.claim_info === undefined) {\n\t\tnodes.claim_info = { last_index: 0, total_claimed: 0 };\n\t}\n}\n\n/**\n * @template {ChildNodeEx} R\n * @param {ChildNodeArray} nodes\n * @param {(node: ChildNodeEx) => node is R} predicate\n * @param {(node: ChildNodeEx) => ChildNodeEx | undefined} process_node\n * @param {() => R} create_node\n * @param {boolean} dont_update_last_index\n * @returns {R}\n */\nfunction claim_node(nodes, predicate, process_node, create_node, dont_update_last_index = false) {\n\t// Try to find nodes in an order such that we lengthen the longest increasing subsequence\n\tinit_claim_info(nodes);\n\tconst result_node = (() => {\n\t\t// We first try to find an element after the previous one\n\t\tfor (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// Otherwise, we try to find one before\n\t\t// We iterate in reverse so that we don't go too far back\n\t\tfor (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t} else if (replacement === undefined) {\n\t\t\t\t\t// Since we spliced before the last_index, we decrease it\n\t\t\t\t\tnodes.claim_info.last_index--;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// If we can't find any matching node, we create a new one\n\t\treturn create_node();\n\t})();\n\tresult_node.claim_order = nodes.claim_info.total_claimed;\n\tnodes.claim_info.total_claimed += 1;\n\treturn result_node;\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @param {(name: string) => Element | SVGElement} create_element\n * @returns {Element | SVGElement}\n */\nfunction claim_element_base(nodes, name, attributes, create_element) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Element | SVGElement} */\n\t\t(node) => node.nodeName === name,\n\t\t/** @param {Element} node */\n\t\t(node) => {\n\t\t\tconst remove = [];\n\t\t\tfor (let j = 0; j < node.attributes.length; j++) {\n\t\t\t\tconst attribute = node.attributes[j];\n\t\t\t\tif (!attributes[attribute.name]) {\n\t\t\t\t\tremove.push(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tremove.forEach((v) => node.removeAttribute(v));\n\t\t\treturn undefined;\n\t\t},\n\t\t() => create_element(name)\n\t);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_svg_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, svg_element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Text}\n */\nexport function claim_text(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Text} */\n\t\t(node) => node.nodeType === 3,\n\t\t/** @param {Text} node */\n\t\t(node) => {\n\t\t\tconst data_str = '' + data;\n\t\t\tif (node.data.startsWith(data_str)) {\n\t\t\t\tif (node.data.length !== data_str.length) {\n\t\t\t\t\treturn node.splitText(data_str.length);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.data = data_str;\n\t\t\t}\n\t\t},\n\t\t() => text(data),\n\t\ttrue // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n\t);\n}\n\n/**\n * @returns {Text} */\nexport function claim_space(nodes) {\n\treturn claim_text(nodes, ' ');\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Comment}\n */\nexport function claim_comment(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Comment} */\n\t\t(node) => node.nodeType === 8,\n\t\t/** @param {Comment} node */\n\t\t(node) => {\n\t\t\tnode.data = '' + data;\n\t\t\treturn undefined;\n\t\t},\n\t\t() => comment(data),\n\t\ttrue\n\t);\n}\n\nfunction get_comment_idx(nodes, text, start) {\n\tfor (let i = start; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * @param {boolean} is_svg\n * @returns {HtmlTagHydration}\n */\nexport function claim_html_tag(nodes, is_svg) {\n\t// find html opening tag\n\tconst start_index = get_comment_idx(nodes, 'HTML_TAG_START', 0);\n\tconst end_index = get_comment_idx(nodes, 'HTML_TAG_END', start_index + 1);\n\tif (start_index === -1 || end_index === -1) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\n\tinit_claim_info(nodes);\n\tconst html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n\tdetach(html_tag_nodes[0]);\n\tdetach(html_tag_nodes[html_tag_nodes.length - 1]);\n\tconst claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n\tif (claimed_nodes.length === 0) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\tfor (const n of claimed_nodes) {\n\t\tn.claim_order = nodes.claim_info.total_claimed;\n\t\tnodes.claim_info.total_claimed += 1;\n\t}\n\treturn new HtmlTagHydration(is_svg, claimed_nodes);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data(text, data) {\n\tdata = '' + data;\n\tif (text.data === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data_contenteditable(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @param {string} attr_value\n * @returns {void}\n */\nexport function set_data_maybe_contenteditable(text, data, attr_value) {\n\tif (~contenteditable_truthy_values.indexOf(attr_value)) {\n\t\tset_data_contenteditable(text, data);\n\t} else {\n\t\tset_data(text, data);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_input_value(input, value) {\n\tinput.value = value == null ? '' : value;\n}\n\n/**\n * @returns {void} */\nexport function set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_style(node, key, value, important) {\n\tif (value == null) {\n\t\tnode.style.removeProperty(key);\n\t} else {\n\t\tnode.style.setProperty(key, value, important ? 'important' : '');\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_option(select, value, mounting) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n\tif (!mounting || value !== undefined) {\n\t\tselect.selectedIndex = -1; // no option should be selected\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nexport function select_value(select) {\n\tconst selected_option = select.querySelector(':checked');\n\treturn selected_option && selected_option.__value;\n}\n\nexport function select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), (option) => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\n\n/**\n * @type {boolean} */\nlet crossorigin;\n\n/**\n * @returns {boolean} */\nexport function is_crossorigin() {\n\tif (crossorigin === undefined) {\n\t\tcrossorigin = false;\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.parent) {\n\t\t\t\tvoid window.parent.document;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tcrossorigin = true;\n\t\t}\n\t}\n\treturn crossorigin;\n}\n\n/**\n * @param {HTMLElement} node\n * @param {() => void} fn\n * @returns {() => void}\n */\nexport function add_iframe_resize_listener(node, fn) {\n\tconst computed_style = getComputedStyle(node);\n\tif (computed_style.position === 'static') {\n\t\tnode.style.position = 'relative';\n\t}\n\tconst iframe = element('iframe');\n\tiframe.setAttribute(\n\t\t'style',\n\t\t'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n\t\t\t'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'\n\t);\n\tiframe.setAttribute('aria-hidden', 'true');\n\tiframe.tabIndex = -1;\n\tconst crossorigin = is_crossorigin();\n\n\t/**\n\t * @type {() => void}\n\t */\n\tlet unsubscribe;\n\tif (crossorigin) {\n\t\tiframe.src = \"data:text/html,\";\n\t\tunsubscribe = listen(\n\t\t\twindow,\n\t\t\t'message',\n\t\t\t/** @param {MessageEvent} event */ (event) => {\n\t\t\t\tif (event.source === iframe.contentWindow) fn();\n\t\t\t}\n\t\t);\n\t} else {\n\t\tiframe.src = 'about:blank';\n\t\tiframe.onload = () => {\n\t\t\tunsubscribe = listen(iframe.contentWindow, 'resize', fn);\n\t\t\t// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)\n\t\t\t// see https://github.com/sveltejs/svelte/issues/4233\n\t\t\tfn();\n\t\t};\n\t}\n\tappend(node, iframe);\n\treturn () => {\n\t\tif (crossorigin) {\n\t\t\tunsubscribe();\n\t\t} else if (unsubscribe && iframe.contentWindow) {\n\t\t\tunsubscribe();\n\t\t}\n\t\tdetach(iframe);\n\t};\n}\nexport const resize_observer_content_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'content-box'\n});\nexport const resize_observer_border_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'border-box'\n});\nexport const resize_observer_device_pixel_content_box = /* @__PURE__ */ new ResizeObserverSingleton(\n\t{ box: 'device-pixel-content-box' }\n);\nexport { ResizeObserverSingleton };\n\n/**\n * @returns {void} */\nexport function toggle_class(element, name, toggle) {\n\t// The `!!` is required because an `undefined` flag means flipping the current state.\n\telement.classList.toggle(name, !!toggle);\n}\n\n/**\n * @template T\n * @param {string} type\n * @param {T} [detail]\n * @param {{ bubbles?: boolean, cancelable?: boolean }} [options]\n * @returns {CustomEvent}\n */\nexport function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * @param {string} selector\n * @param {HTMLElement} parent\n * @returns {ChildNodeArray}\n */\nexport function query_selector_all(selector, parent = document.body) {\n\treturn Array.from(parent.querySelectorAll(selector));\n}\n\n/**\n * @param {string} nodeId\n * @param {HTMLElement} head\n * @returns {any[]}\n */\nexport function head_selector(nodeId, head) {\n\tconst result = [];\n\tlet started = 0;\n\tfor (const node of head.childNodes) {\n\t\tif (node.nodeType === 8 /* comment node */) {\n\t\t\tconst comment = node.textContent.trim();\n\t\t\tif (comment === `HEAD_${nodeId}_END`) {\n\t\t\t\tstarted -= 1;\n\t\t\t\tresult.push(node);\n\t\t\t} else if (comment === `HEAD_${nodeId}_START`) {\n\t\t\t\tstarted += 1;\n\t\t\t\tresult.push(node);\n\t\t\t}\n\t\t} else if (started > 0) {\n\t\t\tresult.push(node);\n\t\t}\n\t}\n\treturn result;\n}\n/** */\nexport class HtmlTag {\n\t/**\n\t * @private\n\t * @default false\n\t */\n\tis_svg = false;\n\t/** parent for creating node */\n\te = undefined;\n\t/** html tag nodes */\n\tn = undefined;\n\t/** target */\n\tt = undefined;\n\t/** anchor */\n\ta = undefined;\n\tconstructor(is_svg = false) {\n\t\tthis.is_svg = is_svg;\n\t\tthis.e = this.n = null;\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tc(html) {\n\t\tthis.h(html);\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @param {HTMLElement | SVGElement} target\n\t * @param {HTMLElement | SVGElement} anchor\n\t * @returns {void}\n\t */\n\tm(html, target, anchor = null) {\n\t\tif (!this.e) {\n\t\t\tif (this.is_svg)\n\t\t\t\tthis.e = svg_element(/** @type {keyof SVGElementTagNameMap} */ (target.nodeName));\n\t\t\t/** #7364 target for