From 1d58593aa2e11399a3f898cc152b72cefaa8af77 Mon Sep 17 00:00:00 2001 From: Sky Singh <114267538+Akash-Singh04@users.noreply.github.com> Date: Fri, 19 Jul 2024 12:02:13 +0530 Subject: [PATCH] feat: inital keploy vscode extension version (#5) * V2.1.0 release:Added Tests, CI workflow for releases and testing, Bug fixes Signed-off-by: Akash Singh --- Signed-off-by: Akash Singh Co-authored-by: Animesh Pathak --- .eslintrc.json | 30 + .gitattributes | 1 + .github/workflows/publish.yml | 29 + .github/workflows/release.yml | 85 + .github/workflows/test.yml | 29 + .gitignore | 5 + .vscode-test.mjs | 5 + .vscode/extensions.json | 8 + .vscode/launch.json | 21 + .vscode/settings.json | 11 + .vscode/tasks.json | 20 + .vscodeignore | 14 + CHANGELOG.md | 13 + README.md | 43 +- media/Animation .json | 1 + media/copy.svg | 30 + media/logo.png | Bin 0 -> 10577 bytes media/reset.css | 38 + media/vscode.css | 122 + 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 | 392 + out/SidebarProvider.js.map | 1 + out/SignIn.js | 90 + out/SignIn.js.map | 1 + out/Test.js | 321 + 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 | 996 + out/compiled/Config.js.map | 1 + out/compiled/KeployHome.css | 4 + out/compiled/KeployHome.css.map | 12 + out/compiled/KeployHome.js | 22682 +++++++++++++++++++++++ out/compiled/KeployHome.js.map | 1 + out/compiled/Testresults.css | 3 + out/compiled/Testresults.css.map | 12 + out/compiled/Testresults.js | 871 + out/compiled/Testresults.js.map | 1 + out/extension.js | 89 + out/extension.js.map | 1 + out/test/extension.test.js | 38 + out/test/extension.test.js.map | 1 + package-lock.json | 7261 ++++++++ package.json | 141 + postcss.config.js | 6 + rollup.config.js | 68 + scripts/keploy_record_script.log | 44 + scripts/keploy_record_script.sh | 89 + scripts/keploy_record_script.zsh | 53 + scripts/keploy_test_script.log | 43 + scripts/keploy_test_script.sh | 68 + scripts/keploy_test_script.zsh | 26 + sidebar/KeployIcon.png | Bin 0 -> 293999 bytes sidebar/code-icon.png | Bin 0 -> 12136 bytes sidebar/dropdown.png | Bin 0 -> 9823 bytes sidebar/history.png | Bin 0 -> 17074 bytes sidebar/replay.png | Bin 0 -> 14568 bytes sidebar/settings.png | Bin 0 -> 18640 bytes sidebar/sidebar.css | 331 + sidebar/sidebar.js | 665 + src/Config.ts | 120 + src/OneClickInstall.ts | 19 + src/Record.ts | 154 + src/SidebarProvider.ts | 399 + src/SignIn.ts | 58 + src/Test.ts | 382 + src/Utils.ts | 9 + src/extension.ts | 74 + src/test/extension.test.ts | 15 + tailwind.config.js | 9 + tsconfig.json | 24 + webviews/components/Config.svelte | 100 + webviews/components/KeployHome.svelte | 438 + webviews/components/Testresults.svelte | 63 + webviews/d.js | 4 + webviews/d.js.map | 1 + webviews/d.ts | 4 + webviews/pages/Config.ts | 7 + webviews/pages/KeployHome.ts | 7 + webviews/pages/Testresults.ts | 7 + webviews/tsconfig.json | 6 + 88 files changed, 37110 insertions(+), 2 deletions(-) create mode 100644 .eslintrc.json create mode 100644 .gitattributes create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 .vscode-test.mjs create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100644 .vscodeignore create mode 100644 CHANGELOG.md create mode 100644 media/Animation .json create mode 100644 media/copy.svg create mode 100644 media/logo.png create mode 100644 media/reset.css create mode 100644 media/vscode.css create mode 100644 out/Config.js create mode 100644 out/Config.js.map create mode 100644 out/OneClickInstall.js create mode 100644 out/OneClickInstall.js.map create mode 100644 out/Record.js create mode 100644 out/Record.js.map create mode 100644 out/SidebarProvider.js create mode 100644 out/SidebarProvider.js.map create mode 100644 out/SignIn.js create mode 100644 out/SignIn.js.map create mode 100644 out/Test.js create mode 100644 out/Test.js.map create mode 100644 out/Utils.js create mode 100644 out/Utils.js.map create mode 100644 out/compiled/Config.css create mode 100644 out/compiled/Config.css.map create mode 100644 out/compiled/Config.js create mode 100644 out/compiled/Config.js.map create mode 100644 out/compiled/KeployHome.css create mode 100644 out/compiled/KeployHome.css.map create mode 100644 out/compiled/KeployHome.js create mode 100644 out/compiled/KeployHome.js.map create mode 100644 out/compiled/Testresults.css create mode 100644 out/compiled/Testresults.css.map create mode 100644 out/compiled/Testresults.js create mode 100644 out/compiled/Testresults.js.map create mode 100644 out/extension.js create mode 100644 out/extension.js.map create mode 100644 out/test/extension.test.js create mode 100644 out/test/extension.test.js.map create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 postcss.config.js create mode 100644 rollup.config.js create mode 100644 scripts/keploy_record_script.log create mode 100755 scripts/keploy_record_script.sh create mode 100755 scripts/keploy_record_script.zsh create mode 100644 scripts/keploy_test_script.log create mode 100755 scripts/keploy_test_script.sh create mode 100755 scripts/keploy_test_script.zsh create mode 100644 sidebar/KeployIcon.png create mode 100644 sidebar/code-icon.png create mode 100644 sidebar/dropdown.png create mode 100644 sidebar/history.png create mode 100644 sidebar/replay.png create mode 100644 sidebar/settings.png create mode 100644 sidebar/sidebar.css create mode 100644 sidebar/sidebar.js create mode 100644 src/Config.ts create mode 100644 src/OneClickInstall.ts create mode 100644 src/Record.ts create mode 100644 src/SidebarProvider.ts create mode 100644 src/SignIn.ts create mode 100644 src/Test.ts create mode 100644 src/Utils.ts create mode 100644 src/extension.ts create mode 100644 src/test/extension.test.ts create mode 100644 tailwind.config.js create mode 100644 tsconfig.json create mode 100644 webviews/components/Config.svelte create mode 100644 webviews/components/KeployHome.svelte create mode 100644 webviews/components/Testresults.svelte create mode 100644 webviews/d.js create mode 100644 webviews/d.js.map create mode 100644 webviews/d.ts create mode 100644 webviews/pages/Config.ts create mode 100644 webviews/pages/KeployHome.ts create mode 100644 webviews/pages/Testresults.ts create mode 100644 webviews/tsconfig.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..86c86f3 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,30 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint" + ], + "rules": { + "@typescript-eslint/naming-convention": [ + "warn", + { + "selector": "import", + "format": [ "camelCase", "PascalCase" ] + } + ], + "@typescript-eslint/semi": "warn", + "curly": "warn", + "eqeqeq": "warn", + "no-throw-literal": "warn", + "semi": "off" + }, + "ignorePatterns": [ + "out", + "dist", + "**/*.d.ts" + ] +} \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..290aedf --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +out/** linguist-vendored \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9850d59 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Publish Extension + +on: + workflow_run: + workflows: ["Test VsCode Extension"] + types: + - completed + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Publish to Visual Studio Marketplace + uses: HaaLeo/publish-vscode-extension@v1 + with: + pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} + registryUrl: https://marketplace.visualstudio.com + skipDuplicate: true \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ff64450 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,85 @@ +name: Release + +on: + workflow_run: + workflows: ["Test VsCode Extension"] + types: + - completed + +jobs: + package: + name: Package + runs-on: ubuntu-latest + outputs: + packageName: ${{ steps.setup.outputs.packageName }} + tag: ${{ steps.setup-tag.outputs.tag }} + version: ${{ steps.setup-tag.outputs.version }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ steps.node_version.outputs.nvmrc }} + + - name: Install dependencies + run: npm i + + - name: Install vsce + run: npm install -g @vscode/vsce + + - name: Setup package path + id: setup + run: echo "::set-output name=packageName::$(node -e "console.log(require('./package.json').name + '-' + require('./package.json').version + '.vsix')")" + + - name: Package + env: + VSIX_PACKAGE_PATH: ${{ steps.setup.outputs.packageName }} + run: vsce package + + - uses: actions/upload-artifact@v2 + with: + name: ${{ steps.setup.outputs.packageName }} + path: ${{ steps.setup.outputs.packageName }} + + - name: Setup tag + id: setup-tag + run: | + version=$(node -p "require('./package.json').version") + majorVersion=$(echo $version | cut -d '.' -f 1) + echo "tag: release/$majorVersion" + echo "::set-output name=tag::release/$majorVersion" + echo "::set-output name=version::$version" + shell: bash + + publishGH: + name: Publish to GitHub releases + runs-on: ubuntu-latest + needs: package + if: startsWith(needs.package.outputs.tag, 'release/') && needs.package.outputs.tag != github.ref + steps: + - uses: actions/download-artifact@v2 + with: + name: ${{ needs.package.outputs.packageName }} + + - name: Commit tagger + uses: tvdias/github-tagger@v0.0.2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ needs.package.outputs.tag }} + + - name: Create Release + id: create-release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ needs.package.outputs.tag }} + release_name: Release ${{ needs.package.outputs.version }} + draft: false + prerelease: false + + - name: Upload assets to a Release + uses: AButler/upload-release-assets@v2.0 + with: + files: ${{ needs.package.outputs.packageName }} + release-tag: ${{ needs.package.outputs.tag }} + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5bb67db --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Test VsCode Extension + +on: + push: + branches: + - master + +jobs: + build: + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Node.js + uses: actions/setup-node@v2 + with: + node-version: 18.x + + - run: npm install + + - run: xvfb-run -a npm test + if: runner.os == 'Linux' + + - run: npm test + if: runner.os != 'Linux' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d1abc22 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +dist +node_modules +.vscode-test/ +intellijpublish.yml +*.log \ No newline at end of file diff --git a/.vscode-test.mjs b/.vscode-test.mjs new file mode 100644 index 0000000..b62ba25 --- /dev/null +++ b/.vscode-test.mjs @@ -0,0 +1,5 @@ +import { defineConfig } from '@vscode/test-cli'; + +export default defineConfig({ + files: 'out/test/**/*.test.js', +}); diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..186459d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "dbaeumer.vscode-eslint", + "ms-vscode.extension-test-runner" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8880465 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,21 @@ +// A launch configuration that compiles the extension and then opens it inside a new window +// Use IntelliSense to learn about possible attributes. +// Hover to view descriptions of existing attributes. +// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run Extension", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}" + ], + "outFiles": [ + "${workspaceFolder}/out/**/*.js" + ], + "preLaunchTask": "${defaultBuildTask}" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..afdab66 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "files.exclude": { + "out": false // set this to true to hide the "out" folder with the compiled JS files + }, + "search.exclude": { + "out": true // set this to false to include "out" folder in search results + }, + // Turn off tsc task auto detection since we have the necessary tasks as npm scripts + "typescript.tsc.autoDetect": "off" +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..3b17e53 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,20 @@ +// See https://go.microsoft.com/fwlink/?LinkId=733558 +// for the documentation about the tasks.json format +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "watch", + "problemMatcher": "$tsc-watch", + "isBackground": true, + "presentation": { + "reveal": "never" + }, + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} diff --git a/.vscodeignore b/.vscodeignore new file mode 100644 index 0000000..153cf4a --- /dev/null +++ b/.vscodeignore @@ -0,0 +1,14 @@ +.vscode/** +.vscode-test/** +.gitignore +.yarnrc +vsc-extension-quickstart.md +**/tsconfig.json +**/.eslintrc.json +**/*.map +**/*.ts +**/.vscode-test.* +!src/* +!.vscodeignore +!.out/* +!.scripts/* \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4a26dea --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Change Log + +All notable changes to the "Keploy" extension will be documented in this file. + + +## [1.0.0] + +First Release for Vs Code Extension. + +- Record and Replay tests. +- Support for GO, Java, Python, Node. +- Previous TestRun History, available. +- View and Edit Keploy Config File. \ No newline at end of file diff --git a/README.md b/README.md index 0ca94d8..b9ce3db 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,41 @@ -# vscode-extension -Keploy VsCode Extension +# Keploy VS Code Extension + +Keploy is a Visual Studio Code extension designed to help developers record and replay test cases directly within the IDE. + +> Note: This extension currently supports only Go, Node, Python and Java programming language. + +## Features + +### Record and Replay TestCases. +### View Previous TestRun Result. +### View and Edit Keploy Config File + + +## Installation + +1. Install the Keploy extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/). + +2. Keploy CLI is present : - `curl --silent -O -L https://keploy.io/install.sh && source install.sh` + + +## Contirbution Guide + +### Start in development mode + +1. Press `F5` to open a new window with your extension loaded. +2. Set breakpoints in your code inside `src/extension.ts` to debug your extension. +3. From the debug console, you can see the output or errors if any. + +### Make + +1. You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`. + +2. You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. + +3. `package.json` - this is the manifest file in which you declare your extension and command. + * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. + +4. `src/extension.ts` - this is the main file where you will provide the implementation of your command. + * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. + + * We pass the function containing the implementation of the command as the second parameter to `registerCommand`. \ No newline at end of file diff --git a/media/Animation .json b/media/Animation .json new file mode 100644 index 0000000..3ed6702 --- /dev/null +++ b/media/Animation .json @@ -0,0 +1 @@ +{"v":"5.7.6","fr":60,"ip":0,"op":241,"w":600,"h":600,"nm":"record button","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":".icon","cl":"icon","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":10,"s":[0]},{"t":30,"s":[100]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.92],"y":[0]},"t":60,"s":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":90,"s":[90]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.92],"y":[0]},"t":180,"s":[90]},{"t":210,"s":[180]}],"ix":10},"p":{"a":0,"k":[300,300,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Excite - Rectangle Path 1 - Si","np":8,"mn":"Pseudo/BNCA2506f0b33","ix":1,"en":1,"ef":[{"ty":7,"nm":"Enable","mn":"Pseudo/BNCA2506f0b33-0001","ix":1,"v":{"a":0,"k":1,"ix":1}},{"ty":6,"nm":"Properties","mn":"Pseudo/BNCA2506f0b33-0002","ix":2,"v":0},{"ty":0,"nm":"Overshoot","mn":"Pseudo/BNCA2506f0b33-0003","ix":3,"v":{"k":[{"s":[3],"t":0,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"s":[3],"t":240,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}}]}},{"ty":0,"nm":"Bounce","mn":"Pseudo/BNCA2506f0b33-0004","ix":4,"v":{"k":[{"s":[60],"t":0,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"s":[60],"t":240,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}}]}},{"ty":0,"nm":"Friction","mn":"Pseudo/BNCA2506f0b33-0005","ix":5,"v":{"k":[{"s":[80],"t":0,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"s":[80],"t":240,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}}]}},{"ty":6,"nm":"","mn":"Pseudo/BNCA2506f0b33-0006","ix":6,"v":0}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[{"s":[89,89],"t":10,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[90.162,90.162],"t":11,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[92.48,92.48],"t":12,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[95.327,95.327],"t":13,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[98.483,98.483],"t":14,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[101.841,101.841],"t":15,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[105.337,105.337],"t":16,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[108.929,108.929],"t":17,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[112.586,112.586],"t":18,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[116.283,116.283],"t":19,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[123.717,123.717],"t":21,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[127.414,127.414],"t":22,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[131.071,131.071],"t":23,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[134.663,134.663],"t":24,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[138.159,138.159],"t":25,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[141.517,141.517],"t":26,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[144.673,144.673],"t":27,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[147.52,147.52],"t":28,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[149.838,149.838],"t":29,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151,151],"t":30,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.124,151.124],"t":32,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151,151],"t":40,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.952,150.952],"t":61,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.804,150.804],"t":62,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.552,150.552],"t":63,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.191,150.191],"t":64,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[149.714,149.714],"t":65,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[149.115,149.115],"t":66,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[148.388,148.388],"t":67,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[147.525,147.525],"t":68,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[146.518,146.518],"t":69,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[145.357,145.357],"t":70,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[144.035,144.035],"t":71,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[142.539,142.539],"t":72,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[140.86,140.86],"t":73,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[138.983,138.983],"t":74,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[136.895,136.895],"t":75,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[134.583,134.583],"t":76,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[132.029,132.029],"t":77,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[129.219,129.219],"t":78,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[126.134,126.134],"t":79,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[122.76,122.76],"t":80,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[119.083,119.083],"t":81,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[115.095,115.095],"t":82,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[110.798,110.798],"t":83,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[106.213,106.213],"t":84,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[101.394,101.394],"t":85,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[96.443,96.443],"t":86,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[91.535,91.535],"t":87,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[86.931,86.931],"t":88,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[82.968,82.968],"t":89,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80,80],"t":90,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.481,79.481],"t":91,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.077,79.077],"t":92,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[78.811,78.811],"t":93,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[78.693,78.693],"t":94,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[78.714,78.714],"t":95,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[78.856,78.856],"t":96,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.09,79.09],"t":97,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.381,79.381],"t":98,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.696,79.696],"t":99,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80,80],"t":100,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.266,80.266],"t":101,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.474,80.474],"t":102,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.61,80.61],"t":103,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.587,80.587],"t":106,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.467,80.467],"t":107,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.318,80.318],"t":108,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.156,80.156],"t":109,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80,80],"t":110,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.863,79.863],"t":111,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.757,79.757],"t":112,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.687,79.687],"t":113,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.76,79.76],"t":117,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.837,79.837],"t":118,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.92,79.92],"t":119,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80,80],"t":120,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.07,80.07],"t":121,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.125,80.125],"t":122,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.084,80.084],"t":128,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.041,80.041],"t":129,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[79.964,79.964],"t":131,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.042,80.042],"t":143,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.048,80.048],"t":181,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.196,80.196],"t":182,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.448,80.448],"t":183,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[80.809,80.809],"t":184,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[81.286,81.286],"t":185,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[81.885,81.885],"t":186,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[82.612,82.612],"t":187,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[83.475,83.475],"t":188,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[84.482,84.482],"t":189,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[85.643,85.643],"t":190,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[86.965,86.965],"t":191,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[88.461,88.461],"t":192,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[90.14,90.14],"t":193,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[92.017,92.017],"t":194,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[94.105,94.105],"t":195,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[96.417,96.417],"t":196,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[98.971,98.971],"t":197,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[101.781,101.781],"t":198,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[104.866,104.866],"t":199,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[108.24,108.24],"t":200,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[111.917,111.917],"t":201,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[115.905,115.905],"t":202,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[120.202,120.202],"t":203,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[124.787,124.787],"t":204,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[129.606,129.606],"t":205,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[134.557,134.557],"t":206,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[139.465,139.465],"t":207,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[144.069,144.069],"t":208,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[148.032,148.032],"t":209,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151,151],"t":210,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.519,151.519],"t":211,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.923,151.923],"t":212,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[152.189,152.189],"t":213,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[152.144,152.144],"t":216,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.91,151.91],"t":217,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.619,151.619],"t":218,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.304,151.304],"t":219,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151,151],"t":220,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.734,150.734],"t":221,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.526,150.526],"t":222,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.39,150.39],"t":223,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.533,150.533],"t":227,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.682,150.682],"t":228,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.844,150.844],"t":229,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151,151],"t":230,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.137,151.137],"t":231,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.243,151.243],"t":232,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.163,151.163],"t":238,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[151.08,151.08],"t":239,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}}]},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.68],"y":[0]},"t":60,"s":[80]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":90,"s":[10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.68],"y":[0]},"t":180,"s":[10]},{"t":210,"s":[80]}],"ix":4},"nm":"#icon","mn":"ADBE Vector Shape - Rect","hd":false,"ln":"icon","_render":true},{"ty":"fl","c":{"a":0,"k":[1,0.4431,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false,"_render":true},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform","_render":true}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false,"_render":true}],"ip":0,"op":242,"st":60,"bm":0,"completed":true},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":20,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[300,300,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Excite - Rectangle Path 1 - Si","np":8,"mn":"Pseudo/BNCA2506f0b33","ix":1,"en":1,"ef":[{"ty":7,"nm":"Enable","mn":"Pseudo/BNCA2506f0b33-0001","ix":1,"v":{"a":0,"k":1,"ix":1}},{"ty":6,"nm":"Properties","mn":"Pseudo/BNCA2506f0b33-0002","ix":2,"v":0},{"ty":0,"nm":"Overshoot","mn":"Pseudo/BNCA2506f0b33-0003","ix":3,"v":{"k":[{"s":[3],"t":0,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"s":[3],"t":240,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}}]}},{"ty":0,"nm":"Bounce","mn":"Pseudo/BNCA2506f0b33-0004","ix":4,"v":{"k":[{"s":[60],"t":0,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"s":[60],"t":240,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}}]}},{"ty":0,"nm":"Friction","mn":"Pseudo/BNCA2506f0b33-0005","ix":5,"v":{"k":[{"s":[80],"t":0,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}},{"s":[80],"t":240,"i":{"x":[1],"y":[1]},"o":{"x":[0],"y":[0]}}]}},{"ty":6,"nm":"","mn":"Pseudo/BNCA2506f0b33-0006","ix":6,"v":0}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[{"s":[95,95],"t":0,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[96.319,96.319],"t":1,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[98.971,98.971],"t":2,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[102.252,102.252],"t":3,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[105.917,105.917],"t":4,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[109.849,109.849],"t":5,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[113.978,113.978],"t":6,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[118.26,118.26],"t":7,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[122.663,122.663],"t":8,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[127.166,127.166],"t":9,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[131.75,131.75],"t":10,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[136.402,136.402],"t":11,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[141.108,141.108],"t":12,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[145.859,145.859],"t":13,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[150.645,150.645],"t":14,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[155.452,155.452],"t":15,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[160.27,160.27],"t":16,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[165.08,165.08],"t":17,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[169.856,169.856],"t":18,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[174.545,174.545],"t":19,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179,179],"t":20,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.89,179.89],"t":21,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[180.583,180.583],"t":22,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[181.039,181.039],"t":23,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[181.206,181.206],"t":25,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[180.962,180.962],"t":26,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[180.562,180.562],"t":27,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[180.061,180.061],"t":28,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.522,179.522],"t":29,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179,179],"t":30,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.543,178.543],"t":31,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.187,178.187],"t":32,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[177.953,177.953],"t":33,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[177.993,177.993],"t":36,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.198,178.198],"t":37,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.455,178.455],"t":38,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.732,178.732],"t":39,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179,179],"t":40,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.235,179.235],"t":41,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.417,179.417],"t":42,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.28,179.28],"t":48,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.138,179.138],"t":49,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179,179],"t":50,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.88,178.88],"t":51,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.724,178.724],"t":53,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.856,178.856],"t":58,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179,179],"t":90,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[176.187,176.187],"t":91,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[174,174],"t":92,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[174.615,174.615],"t":93,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[175.709,175.709],"t":94,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[176.983,176.983],"t":95,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179,179],"t":96,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.277,179.277],"t":97,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.493,179.493],"t":98,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.635,179.635],"t":99,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.486,179.486],"t":103,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.331,179.331],"t":104,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.163,179.163],"t":105,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179,179],"t":106,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.858,178.858],"t":107,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.747,178.747],"t":108,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[178.917,178.917],"t":115,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"s":[179.073,179.073],"t":117,"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}}]},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":842,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false,"_render":true},{"ty":"st","c":{"a":0,"k":[0.9961,0.9608,0.7412,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false,"_render":true},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform","_render":true}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false,"_render":true}],"ip":0,"op":242,"st":60,"bm":0,"completed":true}],"markers":[],"__complete":true} \ No newline at end of file diff --git a/media/copy.svg b/media/copy.svg new file mode 100644 index 0000000..4bba61b --- /dev/null +++ b/media/copy.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/media/logo.png b/media/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..134ec31a459742a45b6187c61847e4dd0e811f21 GIT binary patch literal 10577 zcma)Cby!qU)4xl1H%cgtgrb1tQUb!#rF3_9BOMAzH-ge72um*^-6359(kx5Y65qb> z_y6~Nf1G=s`^-7>%*>s8<~MUDMomSY5RVQI002To1z8Q$Jn)}^gN1rl=~d?e04I&2 ztdy2d&S5TYfTlL=dR#F}d=w(olDwG4`$Dlm4a|axNzpLVuc6Kv9Xs~TuLmEKp|;LWM`=}!kg=hWzGh=)28pFDoE>MOZDBR&B_76A zoLH6%?TXV+W0W51dkL8Oz2LDjny4b#^{^My92E=N&wV zI(c4~V7z=5GY>4(^PA6PiS5v%Eb8e(GChEF%3@ zHRwH97-UnWbOc-<6sFLn5OK&QYA62J!PKvJNPowpREi{5eijmpEcu~2qwxs~jB~dH z%(bBfW}QnBvT4xqdLp2Uxi${3@M21-EJn2)dW(H=5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gw%%f6|dAm3;8s|gJJMKrs0+R1SxpJ{96ded$CO_Tq;C+&@hQEDbfs(YN)`?WBv z_*{3zIxFW#ZHWEm1v5OBj9?qxul)PAmYmVy<(ya0^47=uTX$lw`?M96s!B#yKB>6A z5m+$tmwWL2&;2Qew&__)mUK?s zR=~B^d~<}S==M*4q{e)fdkb5K`$dzx7RH;YX_QFK zt}_^}ND_hpgcu}OQe^FmItHqW$#Yg8iu-`D0YSQW!KXro2obY#p{Um!(czXMl^lbA z90R@HdnW#Q+qeACjDx6u8~TIzWh_p%5MGSKk}qugPj9?91K$Pul*G!rA!GMqxHZL- zuS$AY(Q(udZX28l7^l)^UYrM%x&n>twM+Z(^&7n9ULU25LpZb zh~sc-Yz=*$WjoK%x!IFv&tjqh*OT*NMq|5!`kC9hP~nTFr=*Igyyfpx!5x7|{Z=xt ziFw}Y)5V-p&KRF(Y+wTiYcMXjKf_rM1?ub^yGkVOpsom1QAy z1%-OgKT!&@Zz2ZIzen{(ST|9HX3{h^pzV)yj)!4h|25JTle}+;t6k6*)sa5q7yiGsN^$2u)*Chx1{5;v%}&`A7q&DHVHw{ z;FF+nlIIc8M2W?0_}4S|*o@U>_V=spSadg}6cE4qXk$Lo0J2HY#)gHV(oS1c1=Xh2 zNl-p58hiVk$0F&Tg{eLGtHNT?+M literal 0 HcmV?d00001 diff --git a/media/reset.css b/media/reset.css new file mode 100644 index 0000000..4996ea9 --- /dev/null +++ b/media/reset.css @@ -0,0 +1,38 @@ +html { + box-sizing: border-box; + font-size: 13px; + } + + *, + *:before, + *:after { + box-sizing: inherit; + } + + body, + h1, + h2, + h3, + h4, + h5, + h6, + p, + ol, + ul { + margin: 0; + padding: 0; + font-weight: normal; + } + + img { + max-width: 100%; + height: auto; + } + + html, + body { + height: 100%; + display: flex; + flex-direction: column; + } + \ No newline at end of file diff --git a/media/vscode.css b/media/vscode.css new file mode 100644 index 0000000..50ee62d --- /dev/null +++ b/media/vscode.css @@ -0,0 +1,122 @@ +:root { + --container-paddding: 20px; + --input-padding-vertical: 6px; + --input-padding-horizontal: 4px; + --input-margin-vertical: 4px; + --input-margin-horizontal: 0; + } + + body { + /* padding: 0 var(--container-paddding); */ + color: var(--vscode-foreground); + font-size: var(--vscode-font-size); + font-weight: var(--vscode-font-weight); + font-family: var(--vscode-font-family); + /* background-color: #090B10; */ + /* background-color: #141416; */ + background-color: var(--vscode-editor-background); + } + button , select { + background-color: var(--vscode-editor-background); + } + ol, + ul { + padding-left: var(--container-paddding); + } + + body > *, + form > * { + margin-block-start: var(--input-margin-vertical); + margin-block-end: var(--input-margin-vertical); + } + + *:focus { + outline-color: var(--vscode-focusBorder) !important; + } + + a { + color: var(--vscode-textLink-foreground); + } + + a:hover, + a:active { + color: var(--vscode-textLink-activeForeground); + } + + code { + font-size: var(--vscode-editor-font-size); + font-family: var(--vscode-editor-font-family); + } + + button , select { + border: none; + padding: var(--input-padding-vertical) var(--input-padding-horizontal); + width: 100%; + text-align: center; + outline: 1px solid transparent; + outline-offset: 2px !important; + color: var(--vscode-button-foreground); + background: var(--vscode-button-background); + } + + .secondaryDiv{ + background: var(--vscode-button-secondaryBackground); + padding: var(--input-padding-vertical) var(--input-padding-horizontal); + width: 100%; + text-align: center; + outline: 1px solid transparent; + outline-offset: 2px !important; + color: var(--vscode-button-secondaryForeground); + } + + /* span { + color: #1e1e1e; + color: #d4d4d4; + color: #9cdcfe; + color: #d19a66; + color: #dcdcaa; + color: #c586c0; + color: #d4d4d4; + color: #dcdcaa; + color: #b5cea8; + color: #ce9178; + color: #6a9955; + color: #d4d4d4; + color: #569cd6; + } */ + + button:hover , select:hover { + cursor: pointer; + background: var(--vscode-button-hoverBackground); + } + + button:focus { + outline-color: var(--vscode-focusBorder); + } + + button.secondary { + color: var(--vscode-button-secondaryForeground); + background: var(--vscode-button-secondaryBackground); + } + + button.secondary:hover { + background: var(--vscode-button-secondaryHoverBackground); + } + + input:not([type="checkbox"]), + textarea { + display: block; + width: 100%; + border: none; + font-family: var(--vscode-font-family); + padding: var(--input-padding-vertical) var(--input-padding-horizontal); + color: var(--vscode-input-foreground); + outline-color: var(--vscode-input-border); + background-color: var(--vscode-input-background); + } + + input::placeholder, + textarea::placeholder { + color: var(--vscode-input-placeholderForeground); + } + \ No newline at end of file diff --git a/out/Config.js b/out/Config.js new file mode 100644 index 0000000..509df8c --- /dev/null +++ b/out/Config.js @@ -0,0 +1,148 @@ +"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'); + 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 new file mode 100644 index 0000000..17f6c7f --- /dev/null +++ b/out/Config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Config.js","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,2BAA8C;AAE9C,SAAsB,0BAA0B,CAAC,OAAY;;;QAC3D,MAAM,UAAU,GAAG,MAAA,MAAM,CAAC,SAAS,CAAC,gBAAgB,0CAAG,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;QACrE,MAAM,cAAc,GAAG,UAAU,GAAG,aAAa,CAAC;QAElD,8CAA8C;QAC9C,MAAM,iBAAiB,GAAG,GAAG,EAAE;YAC7B,OAAO,IAAA,eAAU,EAAC,cAAc,CAAC,CAAC;QACpC,CAAC,CAAC;QAEF,iDAAiD;QACjD,MAAM,cAAc,GAAG,GAAG,EAAE;YAC1B,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBAC3D,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EA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AAE;YACf,IAAI,GAAG,IAAI,CAAC;SACb;QAED,gEAAgE;QAChE,MAAM,WAAW,GAAG;SACb,IAAI;;YAED,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsChB,CAAC;QAEF,MAAM,YAAY,GAAG,GAAG,WAAW,CAAC,IAAI,EAAE;;;GAGzC,CAAC;QAEF,uCAAuC;QACvC,MAAM,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAEhG,qCAAqC;QACrC,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YAC3D,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;QACH,OAAO,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 new file mode 100644 index 0000000..fd868ae --- /dev/null +++ b/out/OneClickInstall.js @@ -0,0 +1,19 @@ +"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'; + (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 new file mode 100644 index 0000000..1e0d913 --- /dev/null +++ b/out/OneClickInstall.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OneClickInstall.js","sourceRoot":"","sources":["../src/OneClickInstall.ts"],"names":[],"mappings":";;AAAA,iDAAqC;AAErC,SAAwB,4BAA4B;IAChD,MAAM,OAAO,GAAG,kDAAkD,CAAC;IAEnE,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 new file mode 100644 index 0000000..1bd2027 --- /dev/null +++ b/out/Record.js @@ -0,0 +1,195 @@ +"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 bashScriptPaht 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 new file mode 100644 index 0000000..e957996 --- /dev/null +++ b/out/Record.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Record.js","sourceRoot":"","sources":["../src/Record.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,2BAA+C;AAC/C,6DAA+C;AAG/C,SAAS,kBAAkB,CAAC,UAAkB;IAC1C,kEAAkE;IAClE,MAAM,KAAK,GAAG,oGAAoG,CAAC;IAEnH,oDAAoD;IACpD,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAErC,iFAAiF;IACjF,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjC,CAAC;AACH,SAAsB,wBAAwB,CAAC,WAAmB,EAAE,OAAY;;QAC5E,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;QAC/C,IAAI,OAAO,CAAC;QACZ,IAAI;YACA,IAAI;gBACA,OAAO,GAAG,IAAA,iBAAY,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;aAC/C;YACD,OAAO,KAA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AC,MAAM,CAAC,kBAAkB,CAAC,aAAa,CAAC,EAAE;wBAChE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;wBAC/B,IAAI,aAAa,KAAK,QAAQ,EAAE;4BAC5B,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,uBAAuB;4BAC7C,wBAAwB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,wCAAwC;4BACxF,OAAO,EAAE,CAAC,CAAC,sBAAsB;yBACpC;oBACL,CAAC,CAAC,CAAC;iBAEN;gBAAC,OAAO,KAAK,EAAE;oBACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;oBACnB,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,gCAAgC,GAAG,KAAK,CAAC,CAAC;oBACzE,MAAM,CAAC,KAAK,CAAC,CAAC;iBACjB;YACL,CAAC,CAAC,CAAC;SACN;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;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 new file mode 100644 index 0000000..3ab3968 --- /dev/null +++ b/out/SidebarProvider.js @@ -0,0 +1,392 @@ +"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, _0; + 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((fileUri) => __awaiter(this, void 0, void 0, function* () { + var _1; + if (fileUri && fileUri[0]) { + console.log('Selected file: ' + fileUri[0].fsPath); + (_1 = this._view) === null || _1 === void 0 ? void 0 : _1.webview.postMessage({ type: 'recordfile', value: `${fileUri[0].fsPath}` }); + } + })); + } + catch (error) { + (_b = this._view) === null || _b === void 0 ? void 0 : _b.webview.postMessage({ type: 'error', value: `Failed to record ${error}` }); + } + break; + } + case 'startRecordingCommand': { + if (!data.value) { + return; + } + try { + console.log('Start Recording button clicked'); + const bashScript = vscode.Uri.joinPath(this._extensionUri, "scripts", "keploy_record_script.sh"); + const zshScript = vscode.Uri.joinPath(this._extensionUri, "scripts", "keploy_record_script.zsh"); + const logfilePath = vscode.Uri.joinPath(this._extensionUri, "scripts", "keploy_record_script.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((fileUri) => __awaiter(this, void 0, void 0, function* () { + var _2; + if (fileUri && fileUri[0]) { + console.log('Selected file: ' + fileUri[0].fsPath); + (_2 = this._view) === null || _2 === void 0 ? void 0 : _2.webview.postMessage({ type: 'testfile', value: `${fileUri[0].fsPath}` }); + } + })); + } + catch (error) { + (_h = this._view) === null || _h === void 0 ? void 0 : _h.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", "keploy_test_script.sh"); + const zshScript = vscode.Uri.joinPath(this._extensionUri, "scripts", "keploy_test_script.zsh"); + const logfilePath = vscode.Uri.joinPath(this._extensionUri, "scripts", "keploy_test_script.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, (_j = this._view) === null || _j === void 0 ? void 0 : _j.webview); + } + catch (error) { + (_k = this._view) === null || _k === void 0 ? void 0 : _k.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) { + (_l = this._view) === null || _l === void 0 ? void 0 : _l.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); + (_m = this._view) === null || _m === void 0 ? void 0 : _m.webview.postMessage({ type: 'openRecordPage', value: 'Record Page opened' }); + } + catch (error) { + (_o = this._view) === null || _o === void 0 ? void 0 : _o.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) { + (_p = this._view) === null || _p === void 0 ? void 0 : _p.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", "keploy_test_script.log"); + (0, Test_1.displayTestCases)(logfilePath.fsPath, (_q = this._view) === null || _q === void 0 ? void 0 : _q.webview, false, true); + } + catch (error) { + (_r = this._view) === null || _r === void 0 ? void 0 : _r.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)((_s = this._view) === null || _s === void 0 ? void 0 : _s.webview); + } + catch (error) { + (_t = this._view) === null || _t === void 0 ? void 0 : _t.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...'); + (_u = this._view) === null || _u === void 0 ? void 0 : _u.webview.postMessage({ type: 'aggregatedTestResults', data: data.data, error: data.error, value: data.value }); + } + catch (error) { + (_v = this._view) === null || _v === void 0 ? void 0 : _v.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)((_w = this._view) === null || _w === void 0 ? void 0 : _w.webview); + } + catch (error) { + console.log('Config file not found here in catch'); + (_x = this._view) === null || _x === void 0 ? void 0 : _x.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)((_y = this._view) === null || _y === void 0 ? void 0 : _y.webview, data.path, data.command); + } + catch (error) { + (_z = this._view) === null || _z === void 0 ? void 0 : _z.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) { + (_0 = this._view) === null || _0 === void 0 ? void 0 : _0.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", "keploy_test_script.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 new file mode 100644 index 0000000..69db955 --- /dev/null +++ b/out/SidebarProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SidebarProvider.js","sourceRoot":"","sources":["../src/SidebarProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,gCAAgC;AAChC,mCAAmC;AACnC,8GAA8G;AAC9G,qCAA0D;AAC1D,iCAAqG;AACrG,2BAAgC;AAChC,qCAAwF;AAExF,MAAM,aAAa,GAA6B;IAC9C,gBAAgB,EAAE,IAAI;IACtB,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,wCAAwC;IACnD,KAAK,EAAE,wCAAwC;CAChD,CAAC;AAEF,MAAM,WAAW,GAA6B;IAC5C,gBAAgB,EAAE,IAAI;IACtB,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,qCAAqC;IAChD,KAAK,EAAE,qCAAqC;CAC7C,CAAC;AAGF,MAAa,eAAe;IAI1B,YAA6B,aAAyB;QAAzB,kBAAa,GAAb,aAAa,CAAY;IACrD,CAAC;IAEM,WAAW,CAAC,IAAS,EAAE,KAAU;;QACvC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAA,IAAI,CAAC,KAAK,0CAAE,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAChE,CAAC;IAEM,kBAAkB,CAAC,WAA+B;;QACvD,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC;QAEzB,WAAW,CAAC,OAAO,CAAC,OAAO,GAAG;YAC5B,+BAA+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AAK;;kBAEhB,aAAa;kBACb,cAAc;sBACV,YAAY;sBACZ,cAAc;;;;;uBAKb,KAAK,UAAU,SAAS;uCACR,KAAK,UAAU,aAAa;WACxD,CAAC;IACV,CAAC;CACF;AAtXD,0CAsXC"} \ No newline at end of file diff --git a/out/SignIn.js b/out/SignIn.js new file mode 100644 index 0000000..f8e1625 --- /dev/null +++ b/out/SignIn.js @@ -0,0 +1,90 @@ +"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 new file mode 100644 index 0000000..ec4faba --- /dev/null +++ b/out/SignIn.js.map @@ -0,0 +1 @@ +{"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,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C,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 new file mode 100644 index 0000000..aef84c7 --- /dev/null +++ b/out/Test.js @@ -0,0 +1,321 @@ +"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 + testSummaryList.splice(0, 7); + 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, + 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 new file mode 100644 index 0000000..672cab0 --- /dev/null +++ b/out/Test.js.map @@ -0,0 +1 @@ +{"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;wBAAE,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,CAAC;qBAAE;gBAChD,CAAC,CAAC,CAAC;gBACH,OAAO,GAAG,IAAA,iBAAY,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;aAC/C;YACD,wBAAwB;YACxB,gCAAgC;YAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACrC,0DAA0D;YAC1D,sEAAsE;YACtE,MAAM,UAAU,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC,CAAC;YAC1F,IAAI,UAAU,KAAK,CAAC,CAAC,EAAE;gBACnB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;gBACrC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AAO,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 new file mode 100644 index 0000000..a1d5933 --- /dev/null +++ b/out/Utils.js @@ -0,0 +1,13 @@ +"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 new file mode 100644 index 0000000..1b56fba --- /dev/null +++ b/out/Utils.js.map @@ -0,0 +1 @@ +{"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 new file mode 100644 index 0000000..3d647fa --- /dev/null +++ b/out/compiled/Config.css @@ -0,0 +1,3 @@ +.container.svelte-1s7k7n1.svelte-1s7k7n1,.settings-container.svelte-1s7k7n1.svelte-1s7k7n1{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:left;height:100vh;padding:20px}.get-started.svelte-1s7k7n1.svelte-1s7k7n1{margin-top:50px;text-align:center;font-size:18px}.description.svelte-1s7k7n1.svelte-1s7k7n1{margin-top:10px;text-align:center;font-size:14px;max-width:300px}.button.svelte-1s7k7n1.svelte-1s7k7n1{margin-top:20px;padding:10px 20px;background-color:#FF914D;color:white;border:none;border-radius:20px;font-size:16px;cursor:pointer}.button.svelte-1s7k7n1.svelte-1s7k7n1:hover{background-color:#FF914D}.settings-item.svelte-1s7k7n1.svelte-1s7k7n1{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-1s7k7n1 input.svelte-1s7k7n1{flex-grow:1}.heading.svelte-1s7k7n1.svelte-1s7k7n1{font-size:24px;margin-bottom:20px;text-align:center}.container-hide.svelte-1s7k7n1.svelte-1s7k7n1{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 new file mode 100644 index 0000000..42854bf --- /dev/null +++ b/out/compiled/Config.css.map @@ -0,0 +1,12 @@ +{ + "version": 3, + "file": "Config.css", + "sources": [ + "Config.svelte" + ], + "sourcesContent": [ + "\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,wCAAU,CAAE,iDAAoB,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,0CAAa,CACX,UAAU,CAAE,IAAI,CAChB,UAAU,CAAE,MAAM,CAClB,SAAS,CAAE,IACb,CAEA,0CAAa,CACX,UAAU,CAAE,IAAI,CAChB,UAAU,CAAE,MAAM,CAClB,SAAS,CAAE,IAAI,CACf,SAAS,CAAE,KACb,CAEA,qCAAQ,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,qCAAO,MAAO,CACZ,gBAAgB,CAAE,OACpB,CAGA,4CAAe,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,6BAAc,CAAC,oBAAM,CACnB,SAAS,CAAE,CACb,CAEA,sCAAS,CACP,SAAS,CAAE,IAAI,CACf,aAAa,CAAE,IAAI,CACnB,UAAU,CAAE,MACd,CAEA,6CAAgB,CACd,OAAO,CAAE,IACX" +} \ No newline at end of file diff --git a/out/compiled/Config.js b/out/compiled/Config.js new file mode 100644 index 0000000..81aef33 --- /dev/null +++ b/out/compiled/Config.js @@ -0,0 +1,996 @@ +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 div3; + let div0; + let t0; + let div1; + let t2; + let div2; + let t4; + let button0; + let div3_class_value; + let t6; + let div8; + let h1; + let t8; + let div5; + let div4; + let t9; + let input0; + let t10; + let div7; + let div6; + let t11; + let input1; + let t12; + let button1; + let div8_class_value; + let mounted; + let dispose; + + const block = { + c: function create() { + div3 = element("div"); + div0 = element("div"); + div0.innerHTML = ``; + t0 = space(); + div1 = element("div"); + div1.textContent = "Get Started"; + t2 = space(); + div2 = element("div"); + div2.textContent = "Integrate Keploy by installing the open-source agent locally. No code-changes required."; + t4 = space(); + button0 = element("button"); + button0.textContent = "Setup Keploy Config"; + t6 = space(); + div8 = element("div"); + h1 = element("h1"); + h1.textContent = "Initialise Keploy Config File"; + t8 = space(); + div5 = element("div"); + div4 = element("div"); + div4.innerHTML = ``; + t9 = space(); + input0 = element("input"); + t10 = space(); + div7 = element("div"); + div6 = element("div"); + div6.innerHTML = ``; + t11 = space(); + input1 = element("input"); + t12 = space(); + button1 = element("button"); + button1.textContent = "Save Configuration"; + attr_dev(div0, "class", "image-container"); + add_location(div0, file, 79, 2, 1399); + attr_dev(div1, "class", "get-started svelte-1s7k7n1"); + add_location(div1, file, 81, 2, 1440); + attr_dev(div2, "class", "description svelte-1s7k7n1"); + add_location(div2, file, 82, 2, 1485); + attr_dev(button0, "class", "button svelte-1s7k7n1"); + attr_dev(button0, "id", "setupConfig"); + add_location(button0, file, 85, 2, 1614); + attr_dev(div3, "class", div3_class_value = "" + (null_to_empty(/*showSettings*/ ctx[0] ? 'container-hide' : 'container') + " svelte-1s7k7n1")); + add_location(div3, file, 78, 0, 1335); + attr_dev(h1, "class", "heading svelte-1s7k7n1"); + add_location(h1, file, 89, 2, 1793); + attr_dev(div4, "class", "code-icon "); + attr_dev(div4, "alt", "Icon"); + add_location(div4, file, 91, 4, 1882); + attr_dev(input0, "type", "text"); + attr_dev(input0, "placeholder", "Enter App Command"); + attr_dev(input0, "id", "configCommand"); + attr_dev(input0, "class", "svelte-1s7k7n1"); + add_location(input0, file, 92, 4, 1929); + attr_dev(div5, "class", "settings-item svelte-1s7k7n1"); + add_location(div5, file, 90, 2, 1850); + attr_dev(div6, "class", "code-icon "); + attr_dev(div6, "alt", "Icon"); + add_location(div6, file, 95, 4, 2067); + attr_dev(input1, "type", "text"); + attr_dev(input1, "placeholder", "Enter Path (Default : './'"); + attr_dev(input1, "id", "configPath"); + attr_dev(input1, "class", "svelte-1s7k7n1"); + add_location(input1, file, 96, 4, 2114); + attr_dev(div7, "class", "settings-item svelte-1s7k7n1"); + add_location(div7, file, 94, 2, 2035); + attr_dev(button1, "class", "button svelte-1s7k7n1"); + attr_dev(button1, "id", "initialiseConfigButton"); + add_location(button1, file, 98, 2, 2221); + + attr_dev(div8, "class", div8_class_value = "" + (null_to_empty(/*showSettings*/ ctx[0] + ? 'settings-container' + : 'container-hide') + " svelte-1s7k7n1")); + + add_location(div8, file, 88, 0, 1720); + }, + 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, div3, anchor); + append_dev(div3, div0); + append_dev(div3, t0); + append_dev(div3, div1); + append_dev(div3, t2); + append_dev(div3, div2); + append_dev(div3, t4); + append_dev(div3, button0); + insert_dev(target, t6, anchor); + insert_dev(target, div8, anchor); + append_dev(div8, h1); + append_dev(div8, t8); + append_dev(div8, div5); + append_dev(div5, div4); + append_dev(div5, t9); + append_dev(div5, input0); + set_input_value(input0, /*appCommand*/ ctx[1]); + append_dev(div8, t10); + append_dev(div8, div7); + append_dev(div7, div6); + append_dev(div7, t11); + append_dev(div7, input1); + set_input_value(input1, /*noise*/ ctx[2]); + append_dev(div8, t12); + append_dev(div8, 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 && div3_class_value !== (div3_class_value = "" + (null_to_empty(/*showSettings*/ ctx[0] ? 'container-hide' : 'container') + " svelte-1s7k7n1"))) { + attr_dev(div3, "class", div3_class_value); + } + + if (dirty & /*appCommand*/ 2 && input0.value !== /*appCommand*/ ctx[1]) { + set_input_value(input0, /*appCommand*/ ctx[1]); + } + + if (dirty & /*noise*/ 4 && input1.value !== /*noise*/ ctx[2]) { + set_input_value(input1, /*noise*/ ctx[2]); + } + + if (dirty & /*showSettings*/ 1 && div8_class_value !== (div8_class_value = "" + (null_to_empty(/*showSettings*/ ctx[0] + ? 'settings-container' + : 'container-hide') + " svelte-1s7k7n1"))) { + attr_dev(div8, "class", div8_class_value); + } + }, + i: noop, + o: noop, + d: function destroy(detaching) { + if (detaching) { + detach_dev(div3); + detach_dev(t6); + detach_dev(div8); + } + + 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 noise = ''; + 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() { + noise = this.value; + $$invalidate(2, noise); + } + + $$self.$capture_state = () => ({ + showSettings, + appCommand, + noise, + 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 ('noise' in $$props) $$invalidate(2, noise = $$props.noise); + if ('passThroughPorts' in $$props) passThroughPorts = $$props.passThroughPorts; + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [ + showSettings, + appCommand, + noise, + 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 new file mode 100644 index 0000000..cd06613 --- /dev/null +++ b/out/compiled/Config.js.map @@ -0,0 +1 @@ +{"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