commit aeabddcf3ab3e1cb2a27bf9ca6034de159c1290b Author: bigjakk Date: Fri Apr 3 15:33:20 2026 -0700 initial commit diff --git a/.gitea/workflows/build-release.yml b/.gitea/workflows/build-release.yml new file mode 100644 index 0000000..4762072 --- /dev/null +++ b/.gitea/workflows/build-release.yml @@ -0,0 +1,138 @@ +name: Build and Release + +on: + push: + branches: + - main + +jobs: + build-and-release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check if version already released + id: version-check + env: + GITEA_TOKEN: ${{ secrets.DEST_GITEA_TOKEN }} + run: | + VERSION=$(grep '"version"' package.json | head -1 | sed 's/.*"version": *"\([^"]*\)".*/\1/') + TAG="v$VERSION" + echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" + echo "TAG=$TAG" >> "$GITHUB_OUTPUT" + + STATUS=$(curl -s -o /dev/null -w "%{http_code}" \ + "https://gitea.crjlab.net/api/v1/repos/bigjakk/krunker-civilian-client/releases/tags/$TAG" \ + -H "Authorization: token $GITEA_TOKEN") + + if [ "$STATUS" = "200" ]; then + echo "Release $TAG already exists, skipping build" + echo "SKIP=true" >> "$GITHUB_OUTPUT" + else + echo "No release for $TAG, proceeding with build" + echo "SKIP=false" >> "$GITHUB_OUTPUT" + fi + + - name: Setup Node.js + if: steps.version-check.outputs.SKIP == 'false' + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install system dependencies + if: steps.version-check.outputs.SKIP == 'false' + run: | + dpkg --add-architecture i386 + apt-get update -qq + apt-get install -y --no-install-recommends \ + wine wine32 wine64 \ + libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2t64 \ + libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 \ + libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 \ + libcairo2 libasound2t64 libgtk-3-0 + WINEDEBUG=-all wine wineboot --init || true + + - name: Install dependencies + if: steps.version-check.outputs.SKIP == 'false' + run: npm ci + + - name: Build source + if: steps.version-check.outputs.SKIP == 'false' + run: npm run build + + - name: Build Windows distributables + if: steps.version-check.outputs.SKIP == 'false' + env: + WINEDEBUG: "-all" + run: npx electron-builder --win -c.electronDist=node_modules/electron/dist-win --publish never + + - name: Build Linux distributables + if: steps.version-check.outputs.SKIP == 'false' + run: npx electron-builder --linux --publish never + + - name: Report build sizes + if: steps.version-check.outputs.SKIP == 'false' + run: | + echo "=== Build output sizes ===" + ls -lh out/*.exe out/*.AppImage out/*.deb 2>/dev/null || true + echo "=== Electron dist-win (patched Windows) ===" + du -sh node_modules/electron/dist-win/ 2>/dev/null || true + echo "=== Electron dist (stock Linux) ===" + du -sh node_modules/electron/dist/ 2>/dev/null || true + echo "=== Unpacked Windows build ===" + du -sh out/win-unpacked/ 2>/dev/null || true + du -sh out/win-unpacked/resources/ 2>/dev/null || true + du -sh out/win-unpacked/locales/ 2>/dev/null || true + + - name: Create release and upload assets + if: steps.version-check.outputs.SKIP == 'false' + env: + GITEA_TOKEN: ${{ secrets.DEST_GITEA_TOKEN }} + TAG: ${{ steps.version-check.outputs.TAG }} + run: | + GITEA_BASE="https://gitea.crjlab.net" + REPO="bigjakk/krunker-civilian-client" + + # Create tag + curl -s -X POST "$GITEA_BASE/api/v1/repos/$REPO/tags" \ + -H "Authorization: token $GITEA_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"tag_name\": \"$TAG\", \"message\": \"$TAG\", \"target\": \"$GITHUB_SHA\"}" + + # Create release + RESPONSE=$(curl -s -X POST "$GITEA_BASE/api/v1/repos/$REPO/releases" \ + -H "Authorization: token $GITEA_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"tag_name\": \"$TAG\", + \"name\": \"$TAG\", + \"body\": \"Automated build for $TAG\", + \"draft\": false, + \"prerelease\": false + }") + + RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id') + echo "Created release ID: $RELEASE_ID" + + if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then + echo "Failed to create release:" + echo "$RESPONSE" + exit 1 + fi + + # Upload all built artifacts + for file in out/*.exe out/*.AppImage out/*.deb; do + [ -f "$file" ] || continue + FILENAME=$(basename "$file") + SAFE_NAME=$(echo "$FILENAME" | tr ' ' '_') + echo "Uploading: $SAFE_NAME ($(du -h "$file" | cut -f1))" + + curl -s -X POST \ + "$GITEA_BASE/api/v1/repos/$REPO/releases/$RELEASE_ID/assets?name=$SAFE_NAME" \ + -H "Authorization: token $GITEA_TOKEN" \ + -F "attachment=@$file" \ + | jq -r '" -> \(.name) (\(.size) bytes)"' + done + + echo "All assets uploaded" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2305b7c --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +node_modules/ +dist/ +out/ +*.log +.env +.vscode/ +.idea/ +.claude/ +*.swp +*.swo +nul +CLAUDE.md +Screenshot* +Trace-* +*.cpuprofile +*.heapprofile +userscripts/ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..2312dc5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/README.md b/README.md new file mode 100644 index 0000000..0a01648 --- /dev/null +++ b/README.md @@ -0,0 +1,87 @@ +# Krunker Civilian Client + +> a high-performance krunker client with unlimited FPS, built on a custom-patched Electron + +**Download:** +[Windows (x64)](https://gitea.crjlab.net/bigjakk/Krunker-Civilian-Client/releases/latest) - +[Linux (AppImage)](https://gitea.crjlab.net/bigjakk/Krunker-Civilian-Client/releases/latest) + +## features + +- unlimited FPS with no aim freeze (custom Electron build, see [below](#custom-electron-build)) +- unobtrusive — all features can be disabled, no watermarks +- hides ads by default +- resource swapper (textures, sounds, models) +- CSS theme system (drop `.css` files in `swap/themes/`) +- custom loading screen backgrounds (`swap/backgrounds/`) +- customisable matchmaker with lobby scan animation + - filter by region, gamemode, map, player count, remaining time + - auto-join with server capacity verification +- tabbed hub/social pages with drag-and-drop reorder +- better chat — merged team/all chat with `[T]`/`[M]` prefixes +- chat history preservation (Krunker prunes old messages, this prevents it) +- real-time chat translator (Google Translate, 15+ languages) +- userscript support (Tampermonkey-style metadata, per-script settings) +- alt account manager with encrypted credential storage +- Discord RPC (gamemode, map, class, spectator status) +- raw input / unadjusted movement (Windows) +- show numeric ping in player list +- double ping display (Krunker shows half the real value) +- hardpoint enemy counter HUD +- cleaner menu mode (hides clutter) +- changelog popup on update +- configurable keybinds with visual rebinding dialog +- configurable ANGLE backend (D3D11, OpenGL, Vulkan, D3D9, D3D11on12) +- advanced Chromium flag settings (GPU rasterization, low latency, QUIC, and more) +- CPU throttling (game vs menu) and process priority control +- auto-updater +- maintained & open source + +## hotkeys + +All hotkeys are rebindable in settings. + +| Key | Action | +|-----|--------| +| `F4` | New match (triggers matchmaker if enabled) | +| `F5` | Reload page | +| `F6` | Open matchmaker | +| `F10` | Pause chat (freeze auto-scroll) | +| `F11` | Toggle fullscreen | +| `F12` | DevTools | +| `Ctrl+L` | Copy game link | +| `Ctrl+J` | Join game from clipboard | +| `Ctrl+T` | New tab (hub) | +| `Ctrl+W` | Close tab | +| `Ctrl+Tab` | Next tab | +| `Ctrl+Shift+Tab` | Previous tab | +| `Ctrl+Shift+T` | Reopen closed tab | +| `Ctrl+1-9` | Jump to tab | + +## userscripts + +Any `.js` file in the scripts folder will be loaded as a userscript if enabled in settings. Scripts support Tampermonkey-style metadata blocks (`@name`, `@author`, `@version`, `@desc`) and can define custom settings (boolean, number, select, color, keybind). + +> **Use userscripts at your own risk.** Do not write or use any userscripts which would give you a competitive advantage. + +## custom Electron build + +This client uses a custom-patched Electron 42 build to overcome the aim freezing issue present in modern Electron versions. The patched binary is downloaded automatically during `npm install`. + +For details on the patch and build instructions, see [Electron-Websocket-Fix](https://github.com/bigjakk/Electron-Websocket-Fix). + +## building from source + +1. Install [git](https://git-scm.com/downloads), [Node.js](https://nodejs.org/), and npm +2. Clone and install: + ```bash + git clone https://gitea.crjlab.net/bigjakk/Krunker-Civilian-Client.git + cd Krunker-Civilian-Client + npm install + ``` +3. Run: `npm start` or `npm run dev` (dev mode with sourcemaps) +4. Package: `npm run dist:win` or `npm run dist:linux` + +## credits + +- Built on ideas from [Crankshaft](https://github.com/KraXen72/crankshaft) by KraXen72 diff --git a/build/generate-icons.sh b/build/generate-icons.sh new file mode 100644 index 0000000..7162fa2 --- /dev/null +++ b/build/generate-icons.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Generate platform-specific icons from icon.svg +# Requires: imagemagick (convert) or inkscape + +# PNG for Linux (multiple sizes for best compatibility) +for size in 16 32 48 64 128 256 512; do + convert icon.svg -resize ${size}x${size} icon_${size}.png 2>/dev/null || \ + inkscape icon.svg -w $size -h $size -o icon_${size}.png 2>/dev/null +done + +# Copy 256px as the main Linux icon +cp icon_256.png icon.png + +# ICO for Windows (multi-resolution) +convert icon_16.png icon_32.png icon_48.png icon_64.png icon_128.png icon_256.png icon.ico 2>/dev/null + +echo "Icons generated. Place icon.png and icon.ico in the build/ directory." diff --git a/build/icon.ico b/build/icon.ico new file mode 100644 index 0000000..c842598 Binary files /dev/null and b/build/icon.ico differ diff --git a/build/icon.png b/build/icon.png new file mode 100644 index 0000000..07235b5 Binary files /dev/null and b/build/icon.png differ diff --git a/build/krunker-civilian-client.desktop b/build/krunker-civilian-client.desktop new file mode 100644 index 0000000..bade7d3 --- /dev/null +++ b/build/krunker-civilian-client.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Krunker Civilian Client +Comment=Cross-platform Krunker game client +Exec=krunker-civilian-client %U +Icon=krunker-civilian-client +Type=Application +Categories=Game;ActionGame; +Keywords=krunker;fps;game; +StartupWMClass=krunker-civilian-client +MimeType=x-scheme-handler/krunker; diff --git a/build/krunker.png b/build/krunker.png new file mode 100644 index 0000000..07235b5 Binary files /dev/null and b/build/krunker.png differ diff --git a/electron-build/BUILD.md b/electron-build/BUILD.md new file mode 100644 index 0000000..2278f4b --- /dev/null +++ b/electron-build/BUILD.md @@ -0,0 +1,193 @@ +# Building Patched Electron 42 (Input Priority Fix) + +This builds a custom Electron with a one-line Chromium patch that fixes input starvation ("aim freeze") when `--disable-frame-rate-limit` is active. Without this patch, uncapped frame rates cause 50-300ms input delays in GPU-intensive applications like browser FPS games. + +## The Problem + +Chromium's main thread scheduler gives input tasks `kHighestPriority`. At uncapped frame rates, the compositor floods the task queue and input events get starved — your mouse movements are delayed by up to 300ms, then snap to catch up. Chromium 87-93 had `ImplLatencyRecovery`/`MainLatencyRecovery` features that mitigated this, but they were removed in Chromium 94. + +## The Fix + +One line in `main_thread_scheduler_impl.cc` — demote input tasks from `kHighestPriority` to `kNormalPriority`, allowing the scheduler's anti-starvation logic to fairly interleave input and compositor work. + +## Prerequisites + +- **OS**: Windows 10/11 x64 (builds on Linux too, adjust paths accordingly) +- **Disk**: ~100 GB free (Chromium source + build artifacts) +- **RAM**: 16 GB minimum, 32 GB recommended +- **Visual Studio 2022** with "Desktop development with C++" workload and Windows 11 SDK +- **Git** and **Python 3.8+** on PATH + +## Step 1: Install depot_tools + +```powershell +cd C:\ +git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git +# Add C:\depot_tools to the FRONT of your system PATH +# Then open a NEW terminal +``` + +Verify: `gclient --version` should print a version. + +## Step 2: Check out Electron source + +```powershell +mkdir C:\electron && cd C:\electron + +# Create gclient config for Electron +gclient config --name "src/electron" --unmanaged https://github.com/nicedayzhu/electron.git@v42.0.0-nightly.20260227 +``` + +> **Note**: Replace the repo URL with your fork if you've pushed the patch there. The `@v42.0.0-nightly.20260227` pins the exact nightly tag. + +```powershell +# Sync all dependencies (~40-60 GB download, takes a while) +gclient sync --with_branch_heads --with_tags +``` + +## Step 3: Apply the patch + +```powershell +cd C:\electron\src + +# Apply the patch file +git apply --directory=. path\to\input-priority-fix.patch +``` + +Or make the edit manually — in `third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.cc`, find: + +```cpp +case MainThreadTaskQueue::QueueTraits::PrioritisationType::kInput: + return TaskPriority::kHighestPriority; +``` + +Change `kHighestPriority` to `kNormalPriority`. + +## Step 4: Configure the build + +### Release build (optimized, for distribution): + +```powershell +cd C:\electron\src + +# Create build directory +gn gen out/Release + +# Copy the release args +copy path\to\args.release.gn out\Release\args.gn + +# Regenerate build files with the new args +gn gen out/Release +``` + +Contents of `args.release.gn`: +```gn +import("//electron/build/args/release.gn") +is_official_build = true +use_remoteexec = false +use_reclient = false +``` + +### Testing build (faster compile, for development): + +```powershell +gn gen out/Testing +``` + +Write to `out/Testing/args.gn`: +```gn +import("//electron/build/args/testing.gn") +use_remoteexec = false +use_reclient = false +``` + +Then: `gn gen out/Testing` + +## Step 5: Build + +```powershell +cd C:\electron\src + +# Release build (~2-4 hours depending on CPU) +ninja -C out/Release electron + +# OR Testing build (~1-2 hours, less optimization) +ninja -C out/Testing electron +``` + +> **Tip**: Use `ninja -C out/Release electron -j N` to limit parallelism if you're running out of RAM (where N = number of parallel jobs, try RAM_GB / 2). + +## Step 6: Create distributable zip + +```powershell +cd C:\electron\src + +# Generate the electron dist zip +python3 electron/script/zip_manifests/create-dist-zip.py out/Release + +# Or use electron's strip-binaries + create-dist tooling: +ninja -C out/Release electron:dist_zip +``` + +The output zip will be at `out/Release/dist.zip` (or similar). This contains `electron.exe` and all required DLLs/resources. + +## Step 7: Verify + +Extract the zip and test with a minimal app: + +```powershell +# Create a test directory +mkdir test-app +``` + +Create `test-app/package.json`: +```json +{ "name": "test", "version": "1.0.0", "main": "main.js" } +``` + +Create `test-app/main.js`: +```js +const { app, BrowserWindow } = require('electron'); +app.commandLine.appendSwitch('disable-frame-rate-limit'); +app.commandLine.appendSwitch('disable-gpu-vsync'); +app.whenReady().then(() => { + const win = new BrowserWindow({ width: 1280, height: 720 }); + win.loadURL('https://krunker.io'); + win.webContents.on('did-finish-load', () => { + console.log('Electron:', process.versions.electron); + console.log('Chrome:', process.versions.chrome); + }); +}); +``` + +Run it: +```powershell +path\to\electron.exe test-app +``` + +If Krunker loads at uncapped FPS with no aim freeze, the build is good. + +## Using the patched Electron in a project + +To use this as the Electron binary in an npm project: + +```powershell +# Set environment variable to point to your custom build +set ELECTRON_OVERRIDE_DIST_PATH=C:\path\to\extracted\electron-dist + +# Then run your Electron app normally +npm start +``` + +Or replace the contents of `node_modules/electron/dist/` with the extracted zip contents. + +## Build time estimates + +| Build type | CPU | Approx. time | +|---|---|---| +| Testing | 8-core | ~1-2 hours | +| Testing | 16-core | ~30-60 min | +| Release | 8-core | ~3-5 hours | +| Release | 16-core | ~1.5-3 hours | + +Release builds are significantly slower due to LTO (Link-Time Optimization) which does a whole-program optimization pass. diff --git a/electron-build/args.release.gn b/electron-build/args.release.gn new file mode 100644 index 0000000..2a85579 --- /dev/null +++ b/electron-build/args.release.gn @@ -0,0 +1,8 @@ +import("//electron/build/args/release.gn") + +# Full optimization (LTO, minimal symbols, etc.) +is_official_build = true + +# Not using Google's remote build infrastructure +use_remoteexec = false +use_reclient = false diff --git a/electron-build/input-priority-fix.patch b/electron-build/input-priority-fix.patch new file mode 100644 index 0000000..9cce3cf --- /dev/null +++ b/electron-build/input-priority-fix.patch @@ -0,0 +1,29 @@ +From: Krunker Civilian Client +Subject: [PATCH] Fix input starvation when frame rate limit is disabled + +Chromium's main thread scheduler assigns kHighestPriority to input tasks, +which starves the compositor when --disable-frame-rate-limit is active. +At uncapped frame rates (300+ FPS), the compositor floods the task queue +and input events get delayed 50-300ms, causing "aim freeze" in games. + +Demoting input tasks to kNormalPriority allows the scheduler's built-in +anti-starvation logic to fairly interleave input and compositor work. + +Benchmarked via CDP Input.dispatchMouseEvent: +- p99 latency: 97ms -> 34ms +- Max latency: 308ms -> 38ms +- Events >50ms: 8.6% -> 0% +- Frames rendered: +21% +- Mouse events processed: +9% + +--- a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.cc ++++ b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.cc +@@ -2354,7 +2354,7 @@ + case MainThreadTaskQueue::QueueTraits::PrioritisationType::kCompositor: + return main_thread_only().compositor_priority; + case MainThreadTaskQueue::QueueTraits::PrioritisationType::kInput: +- return TaskPriority::kHighestPriority; ++ return TaskPriority::kNormalPriority; + case MainThreadTaskQueue::QueueTraits::PrioritisationType::kBestEffort: + return TaskPriority::kBestEffortPriority; + case MainThreadTaskQueue::QueueTraits::PrioritisationType::kRegular: diff --git a/electron-builder.yml b/electron-builder.yml new file mode 100644 index 0000000..4051a3a --- /dev/null +++ b/electron-builder.yml @@ -0,0 +1,71 @@ +appId: com.krunkercivilian.client +productName: Krunker Civilian Client +directories: + output: out + buildResources: build +files: + - dist/**/* + - node_modules/electron-store/**/* + - node_modules/conf/**/* + - node_modules/dot-prop/**/* + - node_modules/type-fest/**/* + - node_modules/pkg-up/**/* + - node_modules/find-up/**/* + - node_modules/locate-path/**/* + - node_modules/p-locate/**/* + - node_modules/p-limit/**/* + - node_modules/yocto-queue/**/* + - node_modules/path-exists/**/* + - node_modules/env-paths/**/* + - node_modules/json-schema-typed/**/* + - node_modules/ajv/**/* + - node_modules/ajv-formats/**/* + - node_modules/atomically/**/* + - node_modules/debounce-fn/**/* + - node_modules/mimic-fn/**/* + - node_modules/semver/**/* + - node_modules/onetime/**/* + - "!node_modules/**/*.ts" + - "!node_modules/**/*.map" +asar: true + +win: + target: + - target: nsis + arch: [x64] + - target: portable + arch: [x64] + icon: build/icon.ico + +nsis: + oneClick: false + allowToChangeInstallationDirectory: true + createDesktopShortcut: true + createStartMenuShortcut: true + shortcutName: Krunker Civilian Client + artifactName: "${productName}-${version}-Setup.${ext}" + +portable: + artifactName: "${productName}-${version}-Portable.${ext}" + +linux: + target: + - target: AppImage + arch: [x64] + - target: deb + arch: [x64] + icon: build/icon.png + category: Game + artifactName: "${productName}-${version}-linux-${arch}.${ext}" + desktop: + entry: + Name: Krunker Civilian Client + Comment: Cross-platform Krunker game client + Categories: Game;ActionGame; + Keywords: krunker;fps;game; + StartupWMClass: krunker-civilian-client + +publish: + provider: github + owner: krunker-civilian + repo: krunker-civilian-client diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..80e578b --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,19 @@ +import eslint from "@eslint/js"; +import tseslint from "typescript-eslint"; + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, + { + ignores: ["dist/", "out/", "scripts/"], + }, + { + rules: { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": [ + "error", + { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, + ], + }, + } +); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7f1186d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,7759 @@ +{ + "name": "krunker-civilian-client", + "version": "0.5.6", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "krunker-civilian-client", + "version": "0.5.6", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "electron-store": "^8.2.0" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/node": "^22.0.0", + "electron": "npm:electron-nightly@42.0.0-nightly.20260227", + "electron-builder": "^26.0.0", + "eslint": "^10.0.2", + "husky": "^9.1.7", + "lint-staged": "^16.3.1", + "rimraf": "^6.0.1", + "typescript": "^5.7.0", + "typescript-eslint": "^8.56.1", + "vite": "^6.0.0" + } + }, + "node_modules/@develar/schema-utils": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@develar/schema-utils/-/schema-utils-2.6.5.tgz", + "integrity": "sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.0", + "ajv-keywords": "^3.4.1" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/@electron/asar": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.4.1.tgz", + "integrity": "sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^5.0.0", + "glob": "^7.1.6", + "minimatch": "^3.0.4" + }, + "bin": { + "asar": "bin/asar.js" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/@electron/asar/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@electron/fuses": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@electron/fuses/-/fuses-1.8.0.tgz", + "integrity": "sha512-zx0EIq78WlY/lBb1uXlziZmDZI4ubcCXIMJ4uGjXzZW0nS19TjSPeXPAjzzTmKQlJUZm0SbmZhPKP7tuQ1SsEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.1", + "fs-extra": "^9.0.1", + "minimist": "^1.2.5" + }, + "bin": { + "electron-fuses": "dist/bin.js" + } + }, + "node_modules/@electron/fuses/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@electron/fuses/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@electron/fuses/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@electron/get": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.3.tgz", + "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "env-paths": "^2.2.0", + "fs-extra": "^8.1.0", + "got": "^11.8.5", + "progress": "^2.0.3", + "semver": "^6.2.0", + "sumchecker": "^3.0.1" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "global-agent": "^3.0.0" + } + }, + "node_modules/@electron/notarize": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.5.0.tgz", + "integrity": "sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "fs-extra": "^9.0.1", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@electron/notarize/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@electron/notarize/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@electron/notarize/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@electron/osx-sign": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.3.3.tgz", + "integrity": "sha512-KZ8mhXvWv2rIEgMbWZ4y33bDHyUKMXnx4M0sTyPNK/vcB81ImdeY9Ggdqy0SWbMDgmbqyQ+phgejh6V3R2QuSg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "compare-version": "^0.1.2", + "debug": "^4.3.4", + "fs-extra": "^10.0.0", + "isbinaryfile": "^4.0.8", + "minimist": "^1.2.6", + "plist": "^3.0.5" + }, + "bin": { + "electron-osx-flat": "bin/electron-osx-flat.js", + "electron-osx-sign": "bin/electron-osx-sign.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@electron/osx-sign/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@electron/osx-sign/node_modules/isbinaryfile": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "node_modules/@electron/osx-sign/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@electron/osx-sign/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@electron/rebuild": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-4.0.3.tgz", + "integrity": "sha512-u9vpTHRMkOYCs/1FLiSVAFZ7FbjsXK+bQuzviJZa+lG7BHZl1nz52/IcGvwa3sk80/fc3llutBkbCq10Vh8WQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@malept/cross-spawn-promise": "^2.0.0", + "debug": "^4.1.1", + "detect-libc": "^2.0.1", + "got": "^11.7.0", + "graceful-fs": "^4.2.11", + "node-abi": "^4.2.0", + "node-api-version": "^0.2.1", + "node-gyp": "^11.2.0", + "ora": "^5.1.0", + "read-binary-file-arch": "^1.0.6", + "semver": "^7.3.5", + "tar": "^7.5.6", + "yargs": "^17.0.1" + }, + "bin": { + "electron-rebuild": "lib/cli.js" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@electron/rebuild/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@electron/universal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-2.0.3.tgz", + "integrity": "sha512-Wn9sPYIVFRFl5HmwMJkARCCf7rqK/EurkfQ/rJZ14mHP3iYTjZSIOSVonEAnhWeAXwtw7zOekGRlc6yTtZ0t+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@electron/asar": "^3.3.1", + "@malept/cross-spawn-promise": "^2.0.0", + "debug": "^4.3.1", + "dir-compare": "^4.2.0", + "fs-extra": "^11.1.1", + "minimatch": "^9.0.3", + "plist": "^3.1.0" + }, + "engines": { + "node": ">=16.4" + } + }, + "node_modules/@electron/universal/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@electron/universal/node_modules/fs-extra": { + "version": "11.3.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.3.tgz", + "integrity": "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@electron/universal/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@electron/universal/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@electron/universal/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@electron/windows-sign": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@electron/windows-sign/-/windows-sign-1.2.2.tgz", + "integrity": "sha512-dfZeox66AvdPtb2lD8OsIIQh12Tp0GNCRUDfBHIKGpbmopZto2/A8nSpYYLoedPIHpqkeblZ/k8OV0Gy7PYuyQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "peer": true, + "dependencies": { + "cross-dirname": "^0.1.0", + "debug": "^4.3.4", + "fs-extra": "^11.1.1", + "minimist": "^1.2.8", + "postject": "^1.0.0-alpha.6" + }, + "bin": { + "electron-windows-sign": "bin/electron-windows-sign.js" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@electron/windows-sign/node_modules/fs-extra": { + "version": "11.3.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.3.tgz", + "integrity": "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@electron/windows-sign/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@electron/windows-sign/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.2.tgz", + "integrity": "sha512-YF+fE6LV4v5MGWRGj7G404/OZzGNepVF8fxk7jqmqo3lrza7a0uUcDnROGRBG1WFC1omYUS/Wp1f42i0M+3Q3A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.2", + "debug": "^4.3.1", + "minimatch": "^10.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.2.tgz", + "integrity": "sha512-a5MxrdDXEvqnIq+LisyCX6tQMPF/dSJpCfBgBauY+pNZ28yCtSsTvyTYrMhaI+LK26bVyCJfJkT0u8KIj2i1dQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.1.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.0.tgz", + "integrity": "sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.2.tgz", + "integrity": "sha512-HOy56KJt48Bx8KmJ+XGQNSUMT/6dZee/M54XyUyuvTvPXJmsERRvBchsUVx1UMe1WwIH49XLAczNC7V2INsuUw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.6.0.tgz", + "integrity": "sha512-bIZEUzOI1jkhviX2cp5vNyXQc6olzb2ohewQubuYlMXZ2Q/XjBO0x0XhGPvc9fjSIiUN0vw+0hq53BJ4eQSJKQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.1.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@malept/cross-spawn-promise": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz", + "integrity": "sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/malept" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund" + } + ], + "license": "Apache-2.0", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/@malept/flatpak-bundler": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@malept/flatpak-bundler/-/flatpak-bundler-0.4.0.tgz", + "integrity": "sha512-9QOtNffcOF/c1seMCDnjckb3R9WHcG34tky+FHpNKKCW0wc/scYLwMtO+ptyGUfMW0/b/n4qRiALlaFHc9Oj7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "fs-extra": "^9.0.0", + "lodash": "^4.17.15", + "tmp-promise": "^3.0.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@malept/flatpak-bundler/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@malept/flatpak-bundler/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@malept/flatpak-bundler/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@npmcli/agent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-3.0.0.tgz", + "integrity": "sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/agent/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@npmcli/fs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-4.0.0.tgz", + "integrity": "sha512-/xGlezI6xfGO9NwuJlnwz/K14qD1kCSAGtacBHnGzeAIuJGazcp45KP5NuyARXoKb7cwulAGWVsbeSxdG/cb0Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.57.1.tgz", + "integrity": "sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.57.1.tgz", + "integrity": "sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.57.1.tgz", + "integrity": "sha512-crNPrwJOrRxagUYeMn/DZwqN88SDmwaJ8Cvi/TN1HnWBU7GwknckyosC2gd0IqYRsHDEnXf328o9/HC6OkPgOg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.57.1.tgz", + "integrity": "sha512-Ji8g8ChVbKrhFtig5QBV7iMaJrGtpHelkB3lsaKzadFBe58gmjfGXAOfI5FV0lYMH8wiqsxKQ1C9B0YTRXVy4w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.57.1.tgz", + "integrity": "sha512-R+/WwhsjmwodAcz65guCGFRkMb4gKWTcIeLy60JJQbXrJ97BOXHxnkPFrP+YwFlaS0m+uWJTstrUA9o+UchFug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.57.1.tgz", + "integrity": "sha512-IEQTCHeiTOnAUC3IDQdzRAGj3jOAYNr9kBguI7MQAAZK3caezRrg0GxAb6Hchg4lxdZEI5Oq3iov/w/hnFWY9Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.57.1.tgz", + "integrity": "sha512-F8sWbhZ7tyuEfsmOxwc2giKDQzN3+kuBLPwwZGyVkLlKGdV1nvnNwYD0fKQ8+XS6hp9nY7B+ZeK01EBUE7aHaw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.57.1.tgz", + "integrity": "sha512-rGfNUfn0GIeXtBP1wL5MnzSj98+PZe/AXaGBCRmT0ts80lU5CATYGxXukeTX39XBKsxzFpEeK+Mrp9faXOlmrw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.57.1.tgz", + "integrity": "sha512-MMtej3YHWeg/0klK2Qodf3yrNzz6CGjo2UntLvk2RSPlhzgLvYEB3frRvbEF2wRKh1Z2fDIg9KRPe1fawv7C+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.57.1.tgz", + "integrity": "sha512-1a/qhaaOXhqXGpMFMET9VqwZakkljWHLmZOX48R0I/YLbhdxr1m4gtG1Hq7++VhVUmf+L3sTAf9op4JlhQ5u1Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.57.1.tgz", + "integrity": "sha512-QWO6RQTZ/cqYtJMtxhkRkidoNGXc7ERPbZN7dVW5SdURuLeVU7lwKMpo18XdcmpWYd0qsP1bwKPf7DNSUinhvA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.57.1.tgz", + "integrity": "sha512-xpObYIf+8gprgWaPP32xiN5RVTi/s5FCR+XMXSKmhfoJjrpRAjCuuqQXyxUa/eJTdAE6eJ+KDKaoEqjZQxh3Gw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.57.1.tgz", + "integrity": "sha512-4BrCgrpZo4hvzMDKRqEaW1zeecScDCR+2nZ86ATLhAoJ5FQ+lbHVD3ttKe74/c7tNT9c6F2viwB3ufwp01Oh2w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.57.1.tgz", + "integrity": "sha512-NOlUuzesGauESAyEYFSe3QTUguL+lvrN1HtwEEsU2rOwdUDeTMJdO5dUYl/2hKf9jWydJrO9OL/XSSf65R5+Xw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.57.1.tgz", + "integrity": "sha512-ptA88htVp0AwUUqhVghwDIKlvJMD/fmL/wrQj99PRHFRAG6Z5nbWoWG4o81Nt9FT+IuqUQi+L31ZKAFeJ5Is+A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.57.1.tgz", + "integrity": "sha512-S51t7aMMTNdmAMPpBg7OOsTdn4tySRQvklmL3RpDRyknk87+Sp3xaumlatU+ppQ+5raY7sSTcC2beGgvhENfuw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.57.1.tgz", + "integrity": "sha512-Bl00OFnVFkL82FHbEqy3k5CUCKH6OEJL54KCyx2oqsmZnFTR8IoNqBF+mjQVcRCT5sB6yOvK8A37LNm/kPJiZg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.57.1.tgz", + "integrity": "sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.57.1.tgz", + "integrity": "sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.57.1.tgz", + "integrity": "sha512-H+hXEv9gdVQuDTgnqD+SQffoWoc0Of59AStSzTEj/feWTBAnSfSD3+Dql1ZruJQxmykT/JVY0dE8Ka7z0DH1hw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.57.1.tgz", + "integrity": "sha512-4wYoDpNg6o/oPximyc/NG+mYUejZrCU2q+2w6YZqrAs2UcNUChIZXjtafAiiZSUc7On8v5NyNj34Kzj/Ltk6dQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.57.1.tgz", + "integrity": "sha512-O54mtsV/6LW3P8qdTcamQmuC990HDfR71lo44oZMZlXU4tzLrbvTii87Ni9opq60ds0YzuAlEr/GNwuNluZyMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.57.1.tgz", + "integrity": "sha512-P3dLS+IerxCT/7D2q2FYcRdWRl22dNbrbBEtxdWhXrfIMPP9lQhb5h4Du04mdl5Woq05jVCDPCMF7Ub0NAjIew==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.57.1.tgz", + "integrity": "sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.57.1.tgz", + "integrity": "sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "dev": true, + "license": "MIT", + "dependencies": { + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/fs-extra": { + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", + "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.19.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.13.tgz", + "integrity": "sha512-akNQMv0wW5uyRpD2v2IEyRSZiR+BeGuoB6L310EgGObO44HSMNT8z1xzio28V8qOrgYaopIDNA18YgdXd+qTiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/plist": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/plist/-/plist-3.0.5.tgz", + "integrity": "sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*", + "xmlbuilder": ">=11.0.1" + } + }, + "node_modules/@types/responselike": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/verror": { + "version": "1.10.11", + "resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.11.tgz", + "integrity": "sha512-RlDm9K7+o5stv0Co8i8ZRGxDbrTxhJtgjqjFyVh/tXQyl/rYtTKlnTvZ88oSTeYREWurwx20Js4kTuKCsFkUtg==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz", + "integrity": "sha512-Jz9ZztpB37dNC+HU2HI28Bs9QXpzCz+y/twHOwhyrIRdbuVDxSytJNDl6z/aAKlaRIwC7y8wJdkBv7FxYGgi0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.56.1", + "@typescript-eslint/type-utils": "8.56.1", + "@typescript-eslint/utils": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.56.1", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.56.1.tgz", + "integrity": "sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.56.1.tgz", + "integrity": "sha512-TAdqQTzHNNvlVFfR+hu2PDJrURiwKsUvxFn1M0h95BB8ah5jejas08jUWG4dBA68jDMI988IvtfdAI53JzEHOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.56.1", + "@typescript-eslint/types": "^8.56.1", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.56.1.tgz", + "integrity": "sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.56.1.tgz", + "integrity": "sha512-qOtCYzKEeyr3aR9f28mPJqBty7+DBqsdd63eO0yyDwc6vgThj2UjWfJIcsFeSucYydqcuudMOprZ+x1SpF3ZuQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.56.1.tgz", + "integrity": "sha512-yB/7dxi7MgTtGhZdaHCemf7PuwrHMenHjmzgUW1aJpO+bBU43OycnM3Wn+DdvDO/8zzA9HlhaJ0AUGuvri4oGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1", + "@typescript-eslint/utils": "8.56.1", + "debug": "^4.4.3", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz", + "integrity": "sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.1.tgz", + "integrity": "sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.56.1", + "@typescript-eslint/tsconfig-utils": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.56.1.tgz", + "integrity": "sha512-HPAVNIME3tABJ61siYlHzSWCGtOoeP2RTIaHXFMPqjrQKCGB9OgUVdiNgH7TJS2JNIQ5qQ4RsAUDuGaGme/KOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.1.tgz", + "integrity": "sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.1", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz", + "integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/7zip-bin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.2.0.tgz", + "integrity": "sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/abbrev": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz", + "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", + "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/ansi-escapes": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.3.0.tgz", + "integrity": "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/app-builder-bin": { + "version": "5.0.0-alpha.12", + "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-5.0.0-alpha.12.tgz", + "integrity": "sha512-j87o0j6LqPL3QRr8yid6c+Tt5gC7xNfYo6uQIQkorAC6MpeayVMZrEDzKmJJ/Hlv7EnOQpaRm53k6ktDYZyB6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/app-builder-lib": { + "version": "26.8.1", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-26.8.1.tgz", + "integrity": "sha512-p0Im/Dx5C4tmz8QEE1Yn4MkuPC8PrnlRneMhWJj7BBXQfNTJUshM/bp3lusdEsDbvvfJZpXWnYesgSLvwtM2Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@develar/schema-utils": "~2.6.5", + "@electron/asar": "3.4.1", + "@electron/fuses": "^1.8.0", + "@electron/get": "^3.0.0", + "@electron/notarize": "2.5.0", + "@electron/osx-sign": "1.3.3", + "@electron/rebuild": "^4.0.3", + "@electron/universal": "2.0.3", + "@malept/flatpak-bundler": "^0.4.0", + "@types/fs-extra": "9.0.13", + "async-exit-hook": "^2.0.1", + "builder-util": "26.8.1", + "builder-util-runtime": "9.5.1", + "chromium-pickle-js": "^0.2.0", + "ci-info": "4.3.1", + "debug": "^4.3.4", + "dotenv": "^16.4.5", + "dotenv-expand": "^11.0.6", + "ejs": "^3.1.8", + "electron-publish": "26.8.1", + "fs-extra": "^10.1.0", + "hosted-git-info": "^4.1.0", + "isbinaryfile": "^5.0.0", + "jiti": "^2.4.2", + "js-yaml": "^4.1.0", + "json5": "^2.2.3", + "lazy-val": "^1.0.5", + "minimatch": "^10.0.3", + "plist": "3.1.0", + "proper-lockfile": "^4.1.2", + "resedit": "^1.7.0", + "semver": "~7.7.3", + "tar": "^7.5.7", + "temp-file": "^3.4.0", + "tiny-async-pool": "1.3.0", + "which": "^5.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "dmg-builder": "26.8.1", + "electron-builder-squirrel-windows": "26.8.1" + } + }, + "node_modules/app-builder-lib/node_modules/@electron/get": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@electron/get/-/get-3.1.0.tgz", + "integrity": "sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "env-paths": "^2.2.0", + "fs-extra": "^8.1.0", + "got": "^11.8.5", + "progress": "^2.0.3", + "semver": "^6.2.0", + "sumchecker": "^3.0.1" + }, + "engines": { + "node": ">=14" + }, + "optionalDependencies": { + "global-agent": "^3.0.0" + } + }, + "node_modules/app-builder-lib/node_modules/@electron/get/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/app-builder-lib/node_modules/@electron/get/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/app-builder-lib/node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/app-builder-lib/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/app-builder-lib/node_modules/fs-extra/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/app-builder-lib/node_modules/fs-extra/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/app-builder-lib/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/async-exit-hook": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/async-exit-hook/-/async-exit-hook-2.0.1.tgz", + "integrity": "sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/atomically": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/atomically/-/atomically-1.7.0.tgz", + "integrity": "sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w==", + "license": "MIT", + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/boolean": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", + "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/builder-util": { + "version": "26.8.1", + "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-26.8.1.tgz", + "integrity": "sha512-pm1lTYbGyc90DHgCDO7eo8Rl4EqKLciayNbZqGziqnH9jrlKe8ZANGdityLZU+pJh16dfzjAx2xQq9McuIPEtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/debug": "^4.1.6", + "7zip-bin": "~5.2.0", + "app-builder-bin": "5.0.0-alpha.12", + "builder-util-runtime": "9.5.1", + "chalk": "^4.1.2", + "cross-spawn": "^7.0.6", + "debug": "^4.3.4", + "fs-extra": "^10.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "js-yaml": "^4.1.0", + "sanitize-filename": "^1.6.3", + "source-map-support": "^0.5.19", + "stat-mode": "^1.0.0", + "temp-file": "^3.4.0", + "tiny-async-pool": "1.3.0" + } + }, + "node_modules/builder-util-runtime": { + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.5.1.tgz", + "integrity": "sha512-qt41tMfgHTllhResqM5DcnHyDIWNgzHvuY2jDcYP9iaGpkWxTUzV6GQjDeLnlR1/DtdlcsWQbA7sByMpmJFTLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "sax": "^1.2.4" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/builder-util/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/builder-util/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/builder-util/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/cacache": { + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-19.0.1.tgz", + "integrity": "sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^4.0.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "tar": "^7.4.3", + "unique-filename": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/chromium-pickle-js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz", + "integrity": "sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/ci-info": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.4.0.tgz", + "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/compare-version": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz", + "integrity": "sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/conf": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/conf/-/conf-10.2.0.tgz", + "integrity": "sha512-8fLl9F04EJqjSqH+QjITQfJF8BrOVaYr1jewVgSRAEWePfxT0sku4w2hrGQ60BC/TNLGQ2pgxNlTbWQmMPFvXg==", + "license": "MIT", + "dependencies": { + "ajv": "^8.6.3", + "ajv-formats": "^2.1.1", + "atomically": "^1.7.0", + "debounce-fn": "^4.0.0", + "dot-prop": "^6.0.1", + "env-paths": "^2.2.1", + "json-schema-typed": "^7.0.3", + "onetime": "^5.1.2", + "pkg-up": "^3.1.0", + "semver": "^7.3.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conf/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/conf/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/conf/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/crc": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "buffer": "^5.1.0" + } + }, + "node_modules/cross-dirname": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cross-dirname/-/cross-dirname-0.1.0.tgz", + "integrity": "sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debounce-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/debounce-fn/-/debounce-fn-4.0.0.tgz", + "integrity": "sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ==", + "license": "MIT", + "dependencies": { + "mimic-fn": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/dir-compare": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-4.2.0.tgz", + "integrity": "sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimatch": "^3.0.5", + "p-limit": "^3.1.0 " + } + }, + "node_modules/dir-compare/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/dmg-builder": { + "version": "26.8.1", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-26.8.1.tgz", + "integrity": "sha512-glMJgnTreo8CFINujtAhCgN96QAqApDMZ8Vl1r8f0QT8QprvC1UCltV4CcWj20YoIyLZx6IUskaJZ0NV8fokcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "app-builder-lib": "26.8.1", + "builder-util": "26.8.1", + "fs-extra": "^10.1.0", + "iconv-lite": "^0.6.2", + "js-yaml": "^4.1.0" + }, + "optionalDependencies": { + "dmg-license": "^1.0.11" + } + }, + "node_modules/dmg-builder/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/dmg-builder/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/dmg-builder/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/dmg-license": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/dmg-license/-/dmg-license-1.0.11.tgz", + "integrity": "sha512-ZdzmqwKmECOWJpqefloC5OJy1+WZBBse5+MR88z9g9Zn4VY+WYUkAyojmhzJckH5YbbZGcYIuGAkY5/Ys5OM2Q==", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "@types/plist": "^3.0.1", + "@types/verror": "^1.10.3", + "ajv": "^6.10.0", + "crc": "^3.8.0", + "iconv-corefoundation": "^1.1.7", + "plist": "^3.0.4", + "smart-buffer": "^4.0.2", + "verror": "^1.10.0" + }, + "bin": { + "dmg-license": "bin/dmg-license.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dot-prop": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", + "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "license": "MIT", + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dotenv-expand": { + "version": "11.0.7", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz", + "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dotenv": "^16.4.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron": { + "name": "electron-nightly", + "version": "42.0.0-nightly.20260227", + "resolved": "https://registry.npmjs.org/electron-nightly/-/electron-nightly-42.0.0-nightly.20260227.tgz", + "integrity": "sha512-aZ0+csF80+4qwX20oxGiaaTV667l2RPcSvXceM3zxUGvMBP2Nc9nNumicPMBlslp85uAyx9qhG/0+FQ543f5oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@electron/get": "^2.0.0", + "@types/node": "^24.9.0", + "extract-zip": "^2.0.1" + }, + "bin": { + "electron": "cli.js", + "install-electron": "install.js" + }, + "engines": { + "node": ">= 12.20.55" + } + }, + "node_modules/electron-builder": { + "version": "26.8.1", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-26.8.1.tgz", + "integrity": "sha512-uWhx1r74NGpCagG0ULs/P9Nqv2nsoo+7eo4fLUOB8L8MdWltq9odW/uuLXMFCDGnPafknYLZgjNX0ZIFRzOQAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "app-builder-lib": "26.8.1", + "builder-util": "26.8.1", + "builder-util-runtime": "9.5.1", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "dmg-builder": "26.8.1", + "fs-extra": "^10.1.0", + "lazy-val": "^1.0.5", + "simple-update-notifier": "2.0.0", + "yargs": "^17.6.2" + }, + "bin": { + "electron-builder": "cli.js", + "install-app-deps": "install-app-deps.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/electron-builder-squirrel-windows": { + "version": "26.8.1", + "resolved": "https://registry.npmjs.org/electron-builder-squirrel-windows/-/electron-builder-squirrel-windows-26.8.1.tgz", + "integrity": "sha512-o288fIdgPLHA76eDrFADHPoo7VyGkDCYbLV1GzndaMSAVBoZrGvM9m2IehdcVMzdAZJ2eV9bgyissQXHv5tGzA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "app-builder-lib": "26.8.1", + "builder-util": "26.8.1", + "electron-winstaller": "5.4.0" + } + }, + "node_modules/electron-builder/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/electron-builder/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/electron-builder/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/electron-publish": { + "version": "26.8.1", + "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-26.8.1.tgz", + "integrity": "sha512-q+jrSTIh/Cv4eGZa7oVR+grEJo/FoLMYBAnSL5GCtqwUpr1T+VgKB/dn1pnzxIxqD8S/jP1yilT9VrwCqINR4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/fs-extra": "^9.0.11", + "builder-util": "26.8.1", + "builder-util-runtime": "9.5.1", + "chalk": "^4.1.2", + "form-data": "^4.0.5", + "fs-extra": "^10.1.0", + "lazy-val": "^1.0.5", + "mime": "^2.5.2" + } + }, + "node_modules/electron-publish/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/electron-publish/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/electron-publish/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/electron-store": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/electron-store/-/electron-store-8.2.0.tgz", + "integrity": "sha512-ukLL5Bevdil6oieAOXz3CMy+OgaItMiVBg701MNlG6W5RaC0AHN7rvlqTCmeb6O7jP0Qa1KKYTE0xV0xbhF4Hw==", + "license": "MIT", + "dependencies": { + "conf": "^10.2.0", + "type-fest": "^2.17.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/electron-winstaller": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/electron-winstaller/-/electron-winstaller-5.4.0.tgz", + "integrity": "sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@electron/asar": "^3.2.1", + "debug": "^4.1.1", + "fs-extra": "^7.0.1", + "lodash": "^4.17.21", + "temp": "^0.9.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "optionalDependencies": { + "@electron/windows-sign": "^1.1.2" + } + }, + "node_modules/electron-winstaller/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/electron/node_modules/@types/node": { + "version": "24.11.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.11.0.tgz", + "integrity": "sha512-fPxQqz4VTgPI/IQ+lj9r0h+fDR66bzoeMGHp8ASee+32OSGIkeASsoZuJixsQoVef1QJbeubcPBxKk22QVoWdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/electron/node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.0.2.tgz", + "integrity": "sha512-uYixubwmqJZH+KLVYIVKY1JQt7tysXhtj21WSvjcSmU5SVNzMus1bgLe+pAt816yQ8opKfheVVoPLqvVMGejYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.2", + "@eslint/config-helpers": "^0.5.2", + "@eslint/core": "^1.1.0", + "@eslint/plugin-kit": "^0.6.0", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.1", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.1.1", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.1", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.1.tgz", + "integrity": "sha512-GaUN0sWim5qc8KVErfPBWmc31LEsOkrUJbvJZV+xuL3u2phMUK4HIvXlWAakfC8W4nzlK+chPEAkYOYb5ZScIw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.1.1.tgz", + "integrity": "sha512-AVHPqQoZYc+RUM4/3Ly5udlZY/U4LS8pIG05jEjWM2lQMU/oaZ7qshzAl2YP1tfNmXfftH3ohurfwNAug+MnsQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/exponential-backoff": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz", + "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extsprintf": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", + "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "optional": true + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/filelist": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.6.tgz", + "integrity": "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz", + "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/global-agent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz", + "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "dependencies": { + "boolean": "^3.0.1", + "es6-error": "^4.1.1", + "matcher": "^3.0.0", + "roarr": "^2.15.3", + "semver": "^7.3.2", + "serialize-error": "^7.0.1" + }, + "engines": { + "node": ">=10.0" + } + }, + "node_modules/global-agent/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "optional": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/husky": { + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", + "dev": true, + "license": "MIT", + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, + "node_modules/iconv-corefoundation": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz", + "integrity": "sha512-T10qvkw0zz4wnm560lOEg0PovVqUXuOFhhHAkixw8/sycy7TJt7v/RrkEKEQnAw2viPSJu6iAkErxnzR0g8PpQ==", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "cli-truncate": "^2.1.0", + "node-addon-api": "^1.6.3" + }, + "engines": { + "node": "^8.11.2 || >=10" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isbinaryfile": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-5.0.7.tgz", + "integrity": "sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "node_modules/isexe": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz", + "integrity": "sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jake": { + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.6", + "filelist": "^1.0.4", + "picocolors": "^1.1.1" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-typed": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-7.0.3.tgz", + "integrity": "sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A==", + "license": "BSD-2-Clause" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "license": "ISC", + "optional": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/lazy-val": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.5.tgz", + "integrity": "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lint-staged": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.3.1.tgz", + "integrity": "sha512-bqvvquXzFBAlSbluugR4KXAe4XnO/QZcKVszpkBtqLWa2KEiVy8n6Xp38OeUbv/gOJOX4Vo9u5pFt/ADvbm42Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^14.0.3", + "listr2": "^9.0.5", + "micromatch": "^4.0.8", + "string-argv": "^0.3.2", + "tinyexec": "^1.0.2", + "yaml": "^2.8.2" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=20.17" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/commander": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", + "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/listr2": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-9.0.5.tgz", + "integrity": "sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli-truncate": "^5.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/listr2/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/listr2/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/listr2/node_modules/cli-truncate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.2.0.tgz", + "integrity": "sha512-xRwvIOMGrfOAnM1JYtqQImuaNtDEv9v6oIYAs4LIHwTiKee8uwvIi363igssOC0O5U04i4AlENs79LQLu9tEMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "^8.0.0", + "string-width": "^8.2.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/listr2/node_modules/is-fullwidth-code-point": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", + "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.3.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/slice-ansi": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-8.0.0.tgz", + "integrity": "sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.3", + "is-fullwidth-code-point": "^5.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/listr2/node_modules/string-width": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.0.tgz", + "integrity": "sha512-6hJPQ8N0V0P3SNmP6h2J99RLuzrWz2gvT7VnK5tKvrNqJoyS9W4/Fb8mo31UiPvy00z7DQXkP2hnKBVav76thw==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/listr2/node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "license": "MIT", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", + "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.3.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", + "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-fetch-happen": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz", + "integrity": "sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^3.0.0", + "cacache": "^19.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "ssri": "^12.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/matcher": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", + "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "escape-string-regexp": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", + "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimatch/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/minimatch/node_modules/brace-expansion": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-4.0.1.tgz", + "integrity": "sha512-j7U11C5HXigVuutxebFadoYBbd7VSdZWggSe64NVdvWNBqGAiXPL2QVCehjmw7lY1oF9gOllYbORh+hiNgfPgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^3.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-abi": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-4.26.0.tgz", + "integrity": "sha512-8QwIZqikRvDIkXS2S93LjzhsSPJuIbfaMETWH+Bx8oOT9Sa9UsUtBFQlc3gBNd1+QINjaTloitXr1W3dQLi9Iw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.6.3" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/node-abi/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", + "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/node-api-version": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-api-version/-/node-api-version-0.2.1.tgz", + "integrity": "sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + } + }, + "node_modules/node-api-version/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-11.5.0.tgz", + "integrity": "sha512-ra7Kvlhxn5V9Slyus0ygMa2h+UqExPqUIkfk7Pc8QTLT956JLSy51uWFwHtIYy0vI8cB4BDhc/S03+880My/LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^14.0.3", + "nopt": "^8.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "tar": "^7.4.3", + "tinyglobby": "^0.2.12", + "which": "^5.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/nopt": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", + "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "^3.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/onetime/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.4.tgz", + "integrity": "sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/pe-library": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pe-library/-/pe-library-0.4.1.tgz", + "integrity": "sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jet2jet" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-up": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "license": "MIT", + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/plist": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz", + "integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.8.8", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postject": { + "version": "1.0.0-alpha.6", + "resolved": "https://registry.npmjs.org/postject/-/postject-1.0.0-alpha.6.tgz", + "integrity": "sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "commander": "^9.4.0" + }, + "bin": { + "postject": "dist/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/postject/node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/proc-log": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-5.0.0.tgz", + "integrity": "sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-binary-file-arch": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/read-binary-file-arch/-/read-binary-file-arch-1.0.6.tgz", + "integrity": "sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "bin": { + "read-binary-file-arch": "cli.js" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resedit": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/resedit/-/resedit-1.7.2.tgz", + "integrity": "sha512-vHjcY2MlAITJhC0eRD/Vv8Vlgmu9Sd3LX9zZvtGzU5ZImdTN3+d6e/4mnTyV8vEbyf1sgNIrWxhWlrys52OkEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pe-library": "^0.4.1" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jet2jet" + } + }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/rimraf": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz", + "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^13.0.0", + "package-json-from-dist": "^1.0.1" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.1.tgz", + "integrity": "sha512-B7U/vJpE3DkJ5WXTgTpTRN63uV42DseiXXKMwG14LQBXmsdeIoHAPbU/MEo6II0k5ED74uc2ZGTC6MwHFQhF6w==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.1.2", + "minipass": "^7.1.2", + "path-scurry": "^2.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/lru-cache": { + "version": "11.2.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz", + "integrity": "sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/rimraf/node_modules/path-scurry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", + "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/roarr": { + "version": "2.15.4", + "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", + "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "dependencies": { + "boolean": "^3.0.1", + "detect-node": "^2.0.4", + "globalthis": "^1.0.1", + "json-stringify-safe": "^5.0.1", + "semver-compare": "^1.0.0", + "sprintf-js": "^1.1.2" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/rollup": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.57.1.tgz", + "integrity": "sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.57.1", + "@rollup/rollup-android-arm64": "4.57.1", + "@rollup/rollup-darwin-arm64": "4.57.1", + "@rollup/rollup-darwin-x64": "4.57.1", + "@rollup/rollup-freebsd-arm64": "4.57.1", + "@rollup/rollup-freebsd-x64": "4.57.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.57.1", + "@rollup/rollup-linux-arm-musleabihf": "4.57.1", + "@rollup/rollup-linux-arm64-gnu": "4.57.1", + "@rollup/rollup-linux-arm64-musl": "4.57.1", + "@rollup/rollup-linux-loong64-gnu": "4.57.1", + "@rollup/rollup-linux-loong64-musl": "4.57.1", + "@rollup/rollup-linux-ppc64-gnu": "4.57.1", + "@rollup/rollup-linux-ppc64-musl": "4.57.1", + "@rollup/rollup-linux-riscv64-gnu": "4.57.1", + "@rollup/rollup-linux-riscv64-musl": "4.57.1", + "@rollup/rollup-linux-s390x-gnu": "4.57.1", + "@rollup/rollup-linux-x64-gnu": "4.57.1", + "@rollup/rollup-linux-x64-musl": "4.57.1", + "@rollup/rollup-openbsd-x64": "4.57.1", + "@rollup/rollup-openharmony-arm64": "4.57.1", + "@rollup/rollup-win32-arm64-msvc": "4.57.1", + "@rollup/rollup-win32-ia32-msvc": "4.57.1", + "@rollup/rollup-win32-x64-gnu": "4.57.1", + "@rollup/rollup-win32-x64-msvc": "4.57.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sanitize-filename": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", + "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", + "dev": true, + "license": "WTFPL OR ISC", + "dependencies": { + "truncate-utf8-bytes": "^1.0.0" + } + }, + "node_modules/sax": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/serialize-error": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", + "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "type-fest": "^0.13.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/serialize-error/node_modules/type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "optional": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^10.0.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true + }, + "node_modules/ssri": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-12.0.0.tgz", + "integrity": "sha512-S7iGNosepx9RadX82oimUkvr0Ct7IjJbEbs4mJcTxst8um95J3sDYU1RBEOvdu6oL1Wek2ODI5i4MAw+dZ6cAQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/stat-mode": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-1.0.0.tgz", + "integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sumchecker": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz", + "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.1.0" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.9.tgz", + "integrity": "sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.1.0", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/temp": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz", + "integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "mkdirp": "^0.5.1", + "rimraf": "~2.6.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/temp-file": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.4.0.tgz", + "integrity": "sha512-C5tjlC/HCtVUOi3KWVokd4vHVViOmGjtLwIh4MuzPo/nMYTV/p1urt3RnMz2IWXDdKEGJH3k5+KPxtqRsUYGtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-exit-hook": "^2.0.1", + "fs-extra": "^10.0.0" + } + }, + "node_modules/temp-file/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/temp-file/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/temp-file/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/temp/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/tiny-async-pool": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tiny-async-pool/-/tiny-async-pool-1.3.0.tgz", + "integrity": "sha512-01EAw5EDrcVrdgyCLgoSPvqznC0sVxDSVeiOz09FUpjh71G79VCqneOr+xvt7T1r76CF6ZZfPjHorN2+d+3mqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^5.5.0" + } + }, + "node_modules/tiny-async-pool/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/tinyexec": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tmp": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, + "node_modules/tmp-promise": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", + "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tmp": "^0.2.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/truncate-utf8-bytes": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", + "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==", + "dev": true, + "license": "WTFPL", + "dependencies": { + "utf8-byte-length": "^1.0.1" + } + }, + "node_modules/ts-api-utils": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.56.1.tgz", + "integrity": "sha512-U4lM6pjmBX7J5wk4szltF7I1cGBHXZopnAXCMXb3+fZ3B/0Z3hq3wS/CCUB2NZBNAExK92mCU2tEohWuwVMsDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.56.1", + "@typescript-eslint/parser": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1", + "@typescript-eslint/utils": "8.56.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/unique-filename": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-4.0.0.tgz", + "integrity": "sha512-XSnEewXmQ+veP7xX2dS5Q4yZAvO40cBN2MWkJ7D/6sW4Dg6wYBNwM1Vrnz1FhH5AdeLIlUXRI9e28z1YZi71NQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/unique-slug": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-5.0.0.tgz", + "integrity": "sha512-9OdaqO5kwqR+1kVgHAhsp5vPNU0hnxRa26rBFNfNgM7M6pNtgzeBn3s/xbyCQL3dcjzOatcef6UUHpB/6MaETg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/utf8-byte-length": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz", + "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==", + "dev": true, + "license": "(WTFPL OR MIT)" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/verror": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.1.tgz", + "integrity": "sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/vite": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", + "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..fe29464 --- /dev/null +++ b/package.json @@ -0,0 +1,43 @@ +{ + "name": "krunker-civilian-client", + "version": "0.5.6", + "description": "Cross-platform Krunker game client", + "main": "dist/main/index.js", + "homepage": "https://gitea.crjlab.net/bigjakk/krunker-civilian-client", + "author": "Krunker Civilian Client ", + "license": "MIT", + "scripts": { + "postinstall": "node scripts/download-electron.js", + "dev": "vite build --mode development --config vite.main.config.ts && vite build --mode development --config vite.preload.config.ts && electron .", + "build:main": "vite build --config vite.main.config.ts", + "build:preload": "vite build --config vite.preload.config.ts", + "build": "npm run build:main && npm run build:preload", + "start": "npm run build && electron .", + "download-electron": "node scripts/download-electron.js", + "dist:win": "npm run build && electron-builder --win", + "dist:linux": "npm run build && electron-builder --linux", + "dist:all": "npm run build && electron-builder --win --linux", + "clean": "rimraf dist out", + "lint": "eslint src/", + "prepare": "husky" + }, + "lint-staged": { + "src/**/*.ts": "eslint --fix" + }, + "dependencies": { + "electron-store": "^8.2.0" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/node": "^22.0.0", + "electron": "npm:electron-nightly@42.0.0-nightly.20260227", + "electron-builder": "^26.0.0", + "eslint": "^10.0.2", + "husky": "^9.1.7", + "lint-staged": "^16.3.1", + "rimraf": "^6.0.1", + "typescript": "^5.7.0", + "typescript-eslint": "^8.56.1", + "vite": "^6.0.0" + } +} diff --git a/scripts/download-electron.js b/scripts/download-electron.js new file mode 100644 index 0000000..c015bd3 --- /dev/null +++ b/scripts/download-electron.js @@ -0,0 +1,208 @@ +'use strict'; + +/** + * Downloads the patched Electron build and extracts it into node_modules/electron/dist/. + * + * The patched Electron fixes input starvation ("aim freeze") when --disable-frame-rate-limit + * is active on modern Chromium. Without this, uncapped FPS causes 50-300ms input delays. + * + * The zip is hosted as a release asset on the same Gitea repo. The script checks the + * local version file to skip re-downloading if already present. + * + * Usage: + * node scripts/download-electron.js # download if needed + * node scripts/download-electron.js --force # re-download even if present + */ + +const https = require('https'); +const http = require('http'); +const fs = require('fs'); +const path = require('path'); +const { execSync } = require('child_process'); + +// ── Configuration ────────────────────────────────────────────────────────── +const ELECTRON_VERSION = '42.0.0-nightly.20260227'; +const ASSET_NAME = 'electron-v42.0.0-nightly-patched-win32-x64.zip'; +const GITEA_BASE = 'https://gitea.crjlab.net'; +const REPO = 'bigjakk/Krunker-Civilian-Client'; +// The release tag that holds the patched Electron zip. +// Upload the zip as an asset to this release on Gitea. +const RELEASE_TAG = 'electron-patched'; + +// On Windows, overwrite the npm-installed Electron with our patched build. +// On Linux/macOS (CI cross-compilation), extract to a separate dist-win/ directory +// so the npm-installed platform-native Electron stays in dist/ for bytenode compilation. +const IS_WIN = process.platform === 'win32'; +const ELECTRON_DIST = IS_WIN + ? path.resolve(__dirname, '..', 'node_modules', 'electron', 'dist') + : path.resolve(__dirname, '..', 'node_modules', 'electron', 'dist-win'); +const VERSION_FILE = path.join(ELECTRON_DIST, 'version'); +// Separate marker file to distinguish patched from stock electron-nightly. +// Both have the same version string, so VERSION_FILE alone is not sufficient. +const PATCHED_MARKER = path.join(ELECTRON_DIST, '.patched'); +const TEMP_ZIP = path.join(ELECTRON_DIST, '..', '_electron-patched.zip'); + +// ── Helpers ──────────────────────────────────────────────────────────────── + +function get(url) { + const lib = url.startsWith('https') ? https : http; + return new Promise((resolve, reject) => { + lib.get(url, { headers: { 'User-Agent': 'KCC-Build' } }, (res) => { + if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { + get(res.headers.location).then(resolve, reject); + res.resume(); + return; + } + if (res.statusCode !== 200) { + res.resume(); + reject(new Error(`HTTP ${res.statusCode} for ${url}`)); + return; + } + resolve(res); + }).on('error', reject); + }); +} + +function downloadToFile(url, dest) { + return new Promise(async (resolve, reject) => { + try { + const res = await get(url); + const total = parseInt(res.headers['content-length'] || '0', 10); + let downloaded = 0; + + const file = fs.createWriteStream(dest); + res.on('data', (chunk) => { + downloaded += chunk.length; + if (total > 0) { + const pct = ((downloaded / total) * 100).toFixed(1); + const mb = (downloaded / 1048576).toFixed(1); + const totalMb = (total / 1048576).toFixed(1); + process.stdout.write(`\r Downloading: ${pct}% (${mb}/${totalMb} MB)`); + } + }); + res.pipe(file); + file.on('finish', () => { + file.close(); + process.stdout.write('\n'); + resolve(); + }); + file.on('error', (err) => { + fs.unlinkSync(dest); + reject(err); + }); + } catch (err) { + reject(err); + } + }); +} + +async function getAssetUrl() { + const apiUrl = `${GITEA_BASE}/api/v1/repos/${REPO}/releases/tags/${RELEASE_TAG}`; + const res = await get(apiUrl); + const body = await new Promise((resolve, reject) => { + let data = ''; + res.on('data', (chunk) => { data += chunk; }); + res.on('end', () => resolve(data)); + res.on('error', reject); + }); + + const release = JSON.parse(body); + const asset = release.assets.find((a) => a.name === ASSET_NAME); + if (!asset) { + const names = release.assets.map((a) => a.name).join(', '); + throw new Error( + `Asset "${ASSET_NAME}" not found in release "${RELEASE_TAG}".\n` + + ` Available assets: ${names || '(none)'}\n` + + ` Upload the patched Electron zip to: ${GITEA_BASE}/${REPO}/releases/tag/${RELEASE_TAG}` + ); + } + + // Gitea API returns browser_download_url for direct download + return asset.browser_download_url; +} + +function extractZip(zipPath, destDir) { + // Use PowerShell on Windows, unzip on Linux/macOS + if (process.platform === 'win32') { + execSync( + `powershell -NoProfile -Command "Expand-Archive -Force -Path '${zipPath}' -DestinationPath '${destDir}'"`, + { stdio: 'inherit' } + ); + } else { + execSync(`unzip -o "${zipPath}" -d "${destDir}"`, { stdio: 'inherit' }); + } +} + +// ── Main ─────────────────────────────────────────────────────────────────── + +async function main() { + const force = process.argv.includes('--force'); + + // Check if patched version is already installed. + // The .patched marker distinguishes our build from stock electron-nightly + // (both share the same version string). + if (!force && fs.existsSync(PATCHED_MARKER)) { + const installed = fs.readFileSync(PATCHED_MARKER, 'utf8').trim(); + if (installed === ELECTRON_VERSION) { + console.log(` Patched Electron ${ELECTRON_VERSION} already installed, skipping`); + console.log(' (use --force to re-download)'); + return; + } + console.log(` Installed: ${installed}, need: ${ELECTRON_VERSION}`); + } + + // Resolve download URL from Gitea release + console.log(` Fetching release info for "${RELEASE_TAG}"...`); + const url = await getAssetUrl(); + console.log(` Asset URL: ${url}`); + + // Download + await downloadToFile(url, TEMP_ZIP); + const zipSize = (fs.statSync(TEMP_ZIP).size / 1048576).toFixed(1); + console.log(` Downloaded: ${zipSize} MB`); + + // Clear existing target dir and extract + console.log(` Extracting to ${path.relative(path.resolve(__dirname, '..'), ELECTRON_DIST)}/...`); + if (fs.existsSync(ELECTRON_DIST)) { + fs.rmSync(ELECTRON_DIST, { recursive: true, force: true }); + } + fs.mkdirSync(ELECTRON_DIST, { recursive: true }); + extractZip(TEMP_ZIP, ELECTRON_DIST); + + // Clean up temp zip + fs.unlinkSync(TEMP_ZIP); + + // Write path.txt so the electron package's lazy downloader (index.js) + // considers the binary already installed and doesn't re-download stock. + // On non-Windows (CI cross-compilation), skip this so electron-nightly still + // downloads the native Linux binary into dist/ for the Linux build target. + if (IS_WIN) { + fs.writeFileSync(path.join(ELECTRON_DIST, '..', 'path.txt'), 'electron.exe'); + } + + // Write marker and verify + if (fs.existsSync(VERSION_FILE)) { + const ver = fs.readFileSync(VERSION_FILE, 'utf8').trim(); + fs.writeFileSync(PATCHED_MARKER, ver); + console.log(` Installed patched Electron ${ver}`); + } else { + console.log(' Warning: version file not found after extraction'); + } +} + +console.log('[KCC] Setting up patched Electron...'); +main().then(() => { + console.log('[KCC] Patched Electron ready.'); +}).catch((err) => { + console.error('[KCC] Electron download failed:', err.message); + console.error(''); + console.error(' If this is your first time building, you need the patched Electron zip'); + console.error(` uploaded as a release asset on ${GITEA_BASE}/${REPO}`); + console.error(''); + console.error(' 1. Go to: ' + GITEA_BASE + '/' + REPO + '/releases/new'); + console.error(` 2. Create a release with tag: ${RELEASE_TAG}`); + console.error(` 3. Upload: ${ASSET_NAME}`); + console.error(''); + console.error(' See electron-build/BUILD.md for how to build Electron from source.'); + process.exit(1); +}); diff --git a/src/main/client-ui.ts b/src/main/client-ui.ts new file mode 100644 index 0000000..e1fd679 --- /dev/null +++ b/src/main/client-ui.ts @@ -0,0 +1,683 @@ +// ── Shared CSS theme variables (used by both main page and tab bar) ── +export const THEME_CSS = ` +:root { + /* ── Surfaces ── */ + --kpc-surface-card: rgba(255,255,255,0.04); + --kpc-surface-input: rgba(255,255,255,0.08); + --kpc-surface-hover: rgba(255,255,255,0.1); + --kpc-surface-hover-strong: rgba(255,255,255,0.15); + --kpc-surface-dialog: #1a1a1a; + --kpc-surface-raised: #212121; + + /* ── Text ── */ + --kpc-text-primary: rgba(255,255,255,0.9); + --kpc-text-secondary: rgba(255,255,255,0.7); + --kpc-text-muted: rgba(255,255,255,0.5); + --kpc-text-faint: rgba(255,255,255,0.35); + --kpc-text-dim: rgba(255,255,255,0.3); + --kpc-text-info: #888; + + /* ── Borders ── */ + --kpc-border-subtle: rgba(255,255,255,0.06); + --kpc-border-default: rgba(255,255,255,0.1); + --kpc-border-medium: rgba(255,255,255,0.15); + --kpc-border-focus: rgba(255,255,255,0.35); + + /* ── Accents ── */ + --kpc-green: #4CAF50; + --kpc-green-hover: #66bb6a; + --kpc-red: #ef5350; + --kpc-red-hover: #e57373; + --kpc-blue: #42a5f5; + --kpc-blue-hover: #64b5f6; + --kpc-orange: #ff9800; + --kpc-orange-hover: #ffb74d; + --kpc-yellow: #ffc107; + --kpc-magenta: #fc03ec; + + /* ── Controls ── */ + --kpc-toggle-off: rgba(255,255,255,0.12); + + /* ── Z-index layers ── */ + --kpc-z-notification: 100000; + --kpc-z-overlay: 10000000; + --kpc-z-popup: 10000001; +} +`; + +// ── Injected CSS for client settings in Krunker's settings panel ── +export const CLIENT_SETTINGS_CSS = ` +${THEME_CSS} +/* ── Crankshaft-style settings (Krunker-native classes) ── */ + +.kpc-settings .settName, +.kpc-settings .settName .setting-title { + color: rgba(255,255,255,.6) !important; +} + +.kpc-settings .settName { + display: grid; + grid-auto-columns: 1fr; + grid-template-columns: 0fr 1fr 0fr; + grid-template-areas: + "icon title input" + "desc desc desc"; + grid-template-rows: 0fr min-content; + align-items: center; +} +.kpc-settings .settName.multisel { + grid-template-rows: min-content 1fr; + grid-template-columns: 0fr 1fr; + grid-template-areas: + "icon title" + "input input"; +} +.kpc-settings .settName.has-button { + grid-template-areas: + "icon title button input" + "desc desc desc desc"; + grid-template-columns: 0fr 1fr min-content 0fr; +} +.kpc-settings .settName.has-button .settingsBtn { + grid-area: button; + margin: 0 .5rem; +} + +.kpc-settings .settName.kpc-button-holder { + grid-template-columns: 1fr; + grid-auto-columns: min-content; + column-gap: 0.25rem; + grid-template-areas: unset; + grid-template-rows: 0fr; + grid-auto-flow: column; +} +.kpc-settings .kpc-button-holder .buttons-title, .material-icons { color: inherit; } +.kpc-settings .kpc-button-holder .settingsBtn, +.kpc-settings .settName.has-button .settingsBtn { + width: max-content; +} + +/* type: num */ +.kpc-settings .settName.num .setting-input-wrapper { + display: flex; +} +.kpc-settings .settName.num .setting-input-wrapper .slidecontainer { + margin-top: -8px; +} + +/* type: multisel */ +.kpc-multisel-parent { + display: grid; + grid-template-columns: repeat(5, 1fr); + grid-auto-rows: 1fr; + gap: .25rem; + background: #232323; + border-radius: 10px; + margin-top: 0.8rem; +} +.kpc-multisel-parent label.hostOpt { + width: 100%; + margin: 0; + box-sizing: border-box; +} + +.kpc-settings .settName.multisel label { + font-size: 1.1rem; +} +.kpc-settings .settName.multisel input { + margin-left: .25rem; +} + +/* general settings */ +.kpc-settings .settName .setting-title { + grid-area: title; +} + +.kpc-settings .settName .s-update:disabled, +.kpc-settings .settName .s-update:disabled+.slider.round { + opacity: 0.5; + pointer-events: none; +} + +.kpc-settings .setting .switch { + box-sizing: border-box; +} + +.kpc-settings .setting .desc-icon { + grid-area: icon; + cursor: pointer; + font-size: 1rem; + width: 2.2rem; + height: 2.2rem; + line-height: 2.2rem; + border-radius: 5px !important; + color: #969696; + background-color: rgba(99, 99, 99, 0.16); + border: 2px solid rgba(78, 78, 78, 0.81); + margin-right: 10px; + display: flex; + justify-content: center; + align-items: center; +} + +.kpc-settings .setting .desc-icon.instant { + background-color: rgba(1, 89, 220, 0.16); + border: 2px solid rgba(3, 133, 255, 0.81); +} + +.kpc-settings .setting .desc-icon.instant svg path { + color: #0385ff; + fill: currentColor; +} + +.kpc-settings .setting.settName .inputGrey2, +.kpc-settings .setting.settName .switch, +.kpc-settings .setting.settName .kpc-multisel-parent, +.kpc-settings .setting.settName .setting-input-wrapper, +.kpc-settings .setting.settName .keyIcon { + grid-area: input; +} + +.kpc-settings .setting.safety-1 .desc-icon, +.kpc-settings .setting .desc-icon.refresh-icon, +.kpc-settings .setting .desc-icon.restart-icon { + background-color: rgba(99, 99, 99, 0.16); + border: 2px solid rgba(78, 78, 78, 0.81); +} + +.kpc-settings .setting.safety-1 .desc-icon svg path, +.kpc-settings .setting .desc-icon.refresh-icon svg path, +.kpc-settings .setting .desc-icon.restart-icon svg path { + color: #969696; + fill: currentColor; +} + +.kpc-settings .setting.safety-2 .desc-icon { + background-color: rgba(220, 180, 1, 0.16); + border: 2px solid rgba(241, 186, 6, 0.81); +} + +.kpc-settings .setting.safety-2 .desc-icon svg path { + color: #ffd903; + fill: currentColor; +} + +.kpc-settings .setting.safety-3 .desc-icon { + background-color: rgba(220, 118, 1, 0.16); + border: 2px solid rgba(241, 131, 6, 0.81); +} + +.kpc-settings .setting.safety-3 .desc-icon svg path { + color: #ff9203; + fill: currentColor; +} + +.kpc-settings .setting.safety-4 .desc-icon { + background-color: rgba(220, 17, 1, 0.16); + border: 2px solid rgba(239, 6, 6, 0.81); +} + +.kpc-settings .setting.safety-4 .desc-icon svg path { + color: #ff0303; + fill: currentColor; +} + +.desc-icon { + position: relative; +} + +.setting-desc-new { + display: block; + width: fit-content; + max-width: 50ch; + line-height: 30px; + font-size: 15px; + letter-spacing: 0.5px; + word-wrap: break-word; + color: rgba(255, 255, 255, 0.4) !important; + overflow: hidden; + max-height: 500px; + margin-top: 6px; + grid-area: desc; +} + +.setting-desc-new a { + font-size: inherit !important; + font-family: inherit !important; +} + +.setting-category-collapsed { + display: none; +} + +/* keybind display */ +.keyIcon.kpc-keyIcon:hover { + transform: scale(1.25); + cursor: pointer; +} + +.keyIcon.kpc-keyIcon { + display: inline-block; + transition: 0s; +} + +/* ── KPC action button grid ── */ +.kpc-action-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 6px; + padding: 0 12px 12px; +} +.kpc-action-btn { + background: var(--kpc-surface-card); + color: var(--kpc-text-primary); + border: 2px solid var(--kpc-border-medium); + padding: 10px 12px; + border-radius: 6px; + cursor: pointer; + font-size: 13px; + font-weight: 600; + text-align: center; + transition: background 0.15s, border-color 0.15s; + user-select: none; +} +.kpc-action-btn:hover { + background: var(--kpc-surface-hover); + border-color: var(--kpc-border-focus); +} +.kpc-action-btn:active { + transform: scale(0.97); +} +.kpc-action-btn.full { + grid-column: 1 / -1; +} +.kpc-action-btn.kpc-ab-purple { border-color: #ab47bc; } +.kpc-action-btn.kpc-ab-purple:hover { border-color: #ce93d8; } +.kpc-action-btn.kpc-ab-cyan { border-color: #00bcd4; } +.kpc-action-btn.kpc-ab-cyan:hover { border-color: #4dd0e1; } +.kpc-action-btn.kpc-ab-pink { border-color: #ec407a; } +.kpc-action-btn.kpc-ab-pink:hover { border-color: #f48fb1; } +.kpc-action-btn.kpc-ab-red { border-color: var(--kpc-red); } +.kpc-action-btn.kpc-ab-red:hover { border-color: var(--kpc-red-hover); } +.kpc-action-btn.kpc-ab-orange { border-color: var(--kpc-orange); } +.kpc-action-btn.kpc-ab-orange:hover { border-color: var(--kpc-orange-hover); } + +/* floating toasts css that is required */ +.kpc-holder-update { + position: absolute; + font-size: 1.125rem !important; + color: rgba(255, 255, 255, 0.7); + display: block !important; + top: 20px; + left: 20px; + background-color: black; + padding: 1rem; + border-radius: 0.5rem; + width: max-content; + z-index: 10; +} + +/* settings refresh popup */ +.refresh-popup { + height: min-content; + left: 50%; + transform: translateX(-50%); + color: rgba(255,255,255,0.6) +} +.refresh-popup span { + display: flex; + align-items: center; + column-gap: 0.5rem; + color: rgba(255,255,255,0.6); +} +.refresh-popup, +.refresh-popup span, +.refresh-popup a { + vertical-align: middle; + font-size: .8rem; + line-height: .8rem; + z-index: 12; +} +.refresh-popup svg { fill: rgba(255,255,255,0.6); } +.refresh-popup code { + color: white; + font-size: 1.2rem; + line-height: 1.2rem; + font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; + background-color: #232323; + padding: 0.08rem 0.4rem; + border-radius: 3px; + border: 2px solid #333333 +} +/* ── Keybind capture dialog ── */ +.kpc-keybind-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: var(--kpc-z-overlay); + background: rgba(0,0,0,0.7); + display: flex; + align-items: center; + justify-content: center; +} +.kpc-keybind-dialog { + background: var(--kpc-surface-dialog); + border: 1px solid var(--kpc-border-medium); + border-radius: 10px; + padding: 24px 32px; + min-width: 400px; + position: relative; +} +.kpc-keybind-dialog-title { + color: var(--kpc-text-primary); + font-size: 18px; + margin-bottom: 6px; +} +.kpc-keybind-dialog-sub { + color: var(--kpc-text-muted); + font-size: 13px; + margin-bottom: 16px; +} +.kpc-keybind-dialog-sub code { + color: #64b5f6; +} +.kpc-keybind-dialog-modifiers { + display: flex; + gap: 8px; + font-size: 14px; +} +.kpc-keybind-modifier { + background: var(--kpc-surface-raised); + color: var(--kpc-text-faint); + flex: 1; + text-align: center; + padding: 10px 0; + border-radius: 6px; + transition: background 0.15s, color 0.15s; +} +.kpc-keybind-modifier.active { + background: #1976d2; + color: #fff; +} +.kpc-keybind-dialog-cancel { + position: absolute; + top: 12px; + right: 16px; + color: #64b5f6; + cursor: pointer; + font-size: 14px; +} +.kpc-keybind-dialog-cancel:hover { + text-decoration: underline; +} +/* ── Preserved: color input, userscript meta ── */ +.kpc-color-input { + width: 36px; + height: 28px; + border: 1px solid var(--kpc-border-default); + border-radius: 4px; + background: transparent; + cursor: pointer; + padding: 0; + flex-shrink: 0; +} +.kpc-color-input::-webkit-color-swatch-wrapper { + padding: 2px; +} +.kpc-color-input::-webkit-color-swatch { + border: none; + border-radius: 2px; +} +.kpc-us-meta { + color: var(--kpc-text-dim); + font-size: 11px; + margin-top: 2px; +} +.kpc-us-settings { + padding: 4px 0 4px 20px; +} +#chatList, #chatList * { + user-select: text !important; + cursor: text; +} +#chatList.kpc-chat-paused { + border-left: 2px solid var(--kpc-yellow); +} +`; + + +// ── Matchmaker popup CSS + settings extras (injected separately) ── +export const MATCHMAKER_SETTINGS_CSS = ` +@keyframes matchmakerPopupSlideDown { + 0% { transform: translate(-50%, -500%); } + 100% { transform: translate(-50%, 0%); } +} +.onGame #matchmakerPopupContainer:not(.searching) { + opacity: 0 !important; +} +#matchmakerPopupContainer { + position: absolute; + top: 10em; + left: 50%; + z-index: var(--kpc-z-popup); + box-sizing: border-box; + width: 35em; + aspect-ratio: 2.5/1; + border-radius: 1.2em; + overflow: hidden; + background-size: 100% 100%; + pointer-events: all; + background-color: var(--kpc-surface-raised); + animation: matchmakerPopupSlideDown 0.5s ease forwards; +} +#matchmakerPopupTitle { + font-size: 1.8em; + color: white; + padding: 0.3em 0.7em; + background: rgba(0,0,0,0.5); + margin-bottom: 0.3em; +} +#matchmakerPopupDescription { + background: rgba(0,0,0,0.5); + color: var(--kpc-yellow); + box-sizing: border-box; + padding: 0.6em 1em; +} +#matchmakerPopupOptions { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + display: flex; +} +.matchmakerPopupButton { + text-align: center; + border: 0.3em solid; + box-sizing: border-box; + margin: 0.5em; + color: white; + border-radius: 0.3em; + font-size: 1.3em; + background-color: rgba(0,0,0,0.5); + padding: 0.2em 1.4em; + transition: all 0.08s; +} +#matchmakerConfirmButton { + border-color: var(--kpc-green); + flex-grow: 1; +} +#matchmakerCancelButton { + border-color: var(--kpc-red); +} +.matchmakerPopupButton:hover { + cursor: pointer; + border-color: white !important; + transform: scale(0.95); +} +.matchmakerPopupButton:active { + transform: scale(0.85); +} + +/* ── Search phase ── */ +#matchmakerPopupContainer.searching { + background-image: none !important; + background: var(--kpc-surface-raised); + width: 24em; + aspect-ratio: auto; + padding: 1em 1.5em; +} +#matchmakerPopupContainer.searching #matchmakerPopupTitle, +#matchmakerPopupContainer.searching #matchmakerPopupDescription, +#matchmakerPopupContainer.searching #matchmakerPopupOptions { + display: none; +} +#matchmakerPopupContainer:not(.searching) #matchmakerSearchContainer { + display: none; +} +#matchmakerSearchStatus { + font-size: 1.4em; + color: var(--kpc-blue); + margin-bottom: 0.6em; + text-align: center; +} +#matchmakerSearchFeed { + display: flex; + flex-direction: column; + gap: 0.15em; + overflow: hidden; + min-height: 5.6em; + margin-bottom: 0.6em; +} +@keyframes mmFeedSlideIn { + from { opacity: 0; transform: translateX(1em); } + to { opacity: 1; transform: translateX(0); } +} +.mm-feed-entry { + display: flex; + gap: 0.8em; + padding: 0.2em 0.5em; + font-size: 0.95em; + font-family: 'GameFont', monospace; + border-radius: 0.2em; + animation: mmFeedSlideIn 0.12s ease forwards; +} +.mm-feed-entry.mm-pass { background: rgba(76,175,80,0.1); } +.mm-feed-entry.mm-pass .mm-feed-region { color: var(--kpc-blue); } +.mm-feed-entry.mm-pass .mm-feed-map { color: var(--kpc-text-primary, rgba(255,255,255,0.9)); } +.mm-feed-entry.mm-pass .mm-feed-players { color: var(--kpc-green); } +.mm-feed-entry.mm-fail { background: rgba(255,255,255,0.02); } +.mm-feed-entry.mm-fail .mm-feed-region { color: var(--kpc-text-dim, rgba(255,255,255,0.3)); } +.mm-feed-entry.mm-fail .mm-feed-map { color: var(--kpc-text-muted, rgba(255,255,255,0.5)); } +.mm-feed-entry.mm-fail .mm-feed-players { color: var(--kpc-red); } +.mm-feed-entry:last-child::before { + content: '\\25B8 '; + color: var(--kpc-yellow); +} +.mm-feed-region { min-width: 2.5em; font-weight: bold; } +.mm-feed-map { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.mm-feed-players { min-width: 3em; text-align: right; font-weight: 600; } +#matchmakerSearchCounter { + font-size: 0.85em; + color: var(--kpc-yellow); + text-align: center; + margin-bottom: 0.5em; +} +#matchmakerSearchCancel { + text-align: center; + border: 0.2em solid var(--kpc-red); + color: white; + border-radius: 0.3em; + font-size: 1.1em; + background: rgba(0,0,0,0.3); + padding: 0.2em 1.2em; + cursor: pointer; + margin: 0 auto; + width: fit-content; + transition: all 0.08s; +} +#matchmakerSearchCancel:hover { + border-color: white; + transform: scale(0.95); +} +#matchmakerSearchCancel:active { + transform: scale(0.85); +} +`; + +export const TRANSLATOR_CSS = ` +.kcc-translation { + color: #88ff88; + font-style: italic; + margin-left: 8px; + margin-top: 2px; +} +`; + +// ── Alt Manager CSS ── +export const ALT_MANAGER_CSS = ` +.kpc-acc-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; } +.kpc-acc-form input { + background: var(--kpc-surface-input); border: 1px solid var(--kpc-border); border-radius: 4px; + color: #fff; padding: 6px 10px; font-size: 13px; outline: none; font-family: inherit; +} +.kpc-acc-form input:focus { border-color: var(--kpc-accent); } +.kpc-acc-form input::placeholder { color: rgba(255,255,255,0.3); } +.kpc-acc-form-buttons { display: flex; gap: 8px; } +.kpc-acc-form-buttons button { + padding: 6px 16px; border: none; border-radius: 4px; cursor: pointer; + font-size: 13px; font-family: inherit; +} +.kpc-acc-form-buttons .kpc-acc-save { + background: var(--kpc-accent); color: #fff; +} +.kpc-acc-form-buttons .kpc-acc-save:hover { filter: brightness(1.2); } +.kpc-acc-form-buttons .kpc-acc-cancel { + background: var(--kpc-surface-hover); color: #fff; +} +.kpc-acc-form-buttons .kpc-acc-cancel:hover { background: var(--kpc-surface-hover-strong); } +.kpc-acc-item { + display: flex; align-items: center; justify-content: space-between; + padding: 8px 12px; background: var(--kpc-surface-card); border-radius: 6px; margin-bottom: 6px; +} +.kpc-acc-item-info { display: flex; align-items: center; gap: 8px; } +.kpc-acc-item-label { color: #fff; font-size: 14px; font-weight: 500; } +.kpc-acc-item-role { + font-size: 11px; padding: 2px 6px; border-radius: 3px; + background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); +} +.kpc-acc-item-actions { display: flex; gap: 6px; } +.kpc-acc-item-actions button { + padding: 4px 12px; border: none; border-radius: 4px; cursor: pointer; + font-size: 12px; font-family: inherit; +} +.kpc-acc-switch { background: var(--kpc-accent); color: #fff; } +.kpc-acc-switch:hover { filter: brightness(1.2); } +.kpc-acc-delete { background: rgba(255,80,80,0.2); color: #ff5050; } +.kpc-acc-delete:hover { background: rgba(255,80,80,0.35); } +.kpc-acc-empty { color: rgba(255,255,255,0.4); font-size: 13px; text-align: center; padding: 16px 0; } +.kpc-alt-overlay-backdrop { + position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998; + background: rgba(0,0,0,0.5); +} +.kpc-alt-overlay { + position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); + background: var(--kpc-surface-dialog, #1a1a1a); border-radius: 8px; + padding: 16px; min-width: 280px; max-width: 360px; z-index: 99999; + box-shadow: 0 8px 32px rgba(0,0,0,0.6); +} +.kpc-alt-overlay h3 { + margin: 0 0 12px; color: #fff; font-size: 16px; font-weight: 600; +} +`; + +// ── HP enemy counter CSS ── +export const HP_COUNTER_CSS = ` +.kpc-hp-counter .pointVal { + color: #ff4444; font-size: 15px; font-weight: bold; +} +`; + +/** Pre-concatenated CSS for single-call injection (excludes HIDE_ADS_CSS which is separate) */ +export const ALL_CLIENT_CSS = `${CLIENT_SETTINGS_CSS}\n${MATCHMAKER_SETTINGS_CSS}\n${TRANSLATOR_CSS}\n${ALT_MANAGER_CSS}\n${HP_COUNTER_CSS}`; diff --git a/src/main/config.ts b/src/main/config.ts new file mode 100644 index 0000000..769ece6 --- /dev/null +++ b/src/main/config.ts @@ -0,0 +1,228 @@ +import Store from 'electron-store'; +import { detectPlatform } from './platform'; + +export interface Keybind { + key: string; + ctrl: boolean; + shift: boolean; + alt: boolean; +} + +export interface SavedAccount { + label: string; + username: string; + password: string; +} + +export interface AppConfig { + window: { + width: number; + height: number; + x: number | undefined; + y: number | undefined; + maximized: boolean; + fullscreen: boolean; + }; + performance: { + fpsUnlocked: boolean; + hardwareAccel: boolean; + gpuPreference: 'high-performance' | 'low-power' | 'default'; + cpuThrottleGame: number; + cpuThrottleMenu: number; + processPriority: string; + }; + game: { + lastServer: string; + socialTabBehaviour: 'New Window' | 'Same Window'; + joinAsSpectator: boolean; + rawInput: boolean; + betterChat: boolean; + chatHistorySize: number; + showPing: boolean; + hpEnemyCounter: boolean; + }; + swapper: { + enabled: boolean; + path: string; + }; + matchmaker: { + enabled: boolean; + regions: string[]; + gamemodes: string[]; + maps: string[]; + minPlayers: number; + maxPlayers: number; + minRemainingTime: number; + openServerBrowser: boolean; + autoJoin: boolean; + }; + keybinds: { + reload: Keybind; + newMatch: Keybind; + copyGameLink: Keybind; + joinFromClipboard: Keybind; + devTools: Keybind; + matchmaker: Keybind; + matchmakerAccept: Keybind; + matchmakerCancel: Keybind; + pauseChat: Keybind; + fullscreenToggle: Keybind; + }; + userscripts: { + enabled: boolean; + path: string; + }; + ui: { + showExitButton: boolean; + deathscreenAnimation: boolean; + hideMenuPopups: boolean; + cleanerMenu: boolean; + doublePing: boolean; + cssTheme: string; + loadingTheme: string; + backgroundUrl: string; + showChangelog: boolean; + lastSeenVersion: string; + }; + discord: { + enabled: boolean; + }; + translator: { + enabled: boolean; + targetLanguage: string; + showLanguageTag: boolean; + }; + advanced: { + removeUselessFeatures: boolean; + gpuRasterizing: boolean; + helpfulFlags: boolean; + disableAccelerated2D: boolean; + increaseLimits: boolean; + lowLatency: boolean; + experimentalFlags: boolean; + angleBackend: string; + verboseLogging: boolean; + }; + accounts: SavedAccount[]; + tabWindow: { + width: number; + height: number; + x: number | undefined; + y: number | undefined; + maximized: boolean; + }; + platform: { + detectedOS: string; + gpuBackend: string; + }; +} + +export const DEFAULT_KEYBINDS: AppConfig['keybinds'] = { + reload: { key: 'F5', ctrl: false, shift: false, alt: false }, + newMatch: { key: 'F4', ctrl: false, shift: false, alt: false }, + copyGameLink: { key: 'l', ctrl: true, shift: false, alt: false }, + joinFromClipboard: { key: 'j', ctrl: true, shift: false, alt: false }, + devTools: { key: 'F12', ctrl: false, shift: false, alt: false }, + matchmaker: { key: 'F6', ctrl: false, shift: false, alt: false }, + matchmakerAccept: { key: 'Enter', ctrl: false, shift: false, alt: false }, + matchmakerCancel: { key: 'Escape', ctrl: false, shift: false, alt: false }, + pauseChat: { key: 'F10', ctrl: false, shift: false, alt: false }, + fullscreenToggle: { key: 'F11', ctrl: false, shift: false, alt: false }, +}; + +const platformInfo = detectPlatform(); + +export const config = new Store({ + name: 'krunker-civilian-config', + defaults: { + window: { + width: 1600, + height: 900, + x: undefined, + y: undefined, + maximized: false, + fullscreen: false, + }, + performance: { + fpsUnlocked: true, + hardwareAccel: true, + gpuPreference: 'high-performance', + cpuThrottleGame: 1, + cpuThrottleMenu: 1.5, + processPriority: 'Normal', + }, + game: { + lastServer: '', + socialTabBehaviour: 'New Window', + joinAsSpectator: false, + rawInput: true, + betterChat: true, + chatHistorySize: 200, + showPing: true, + hpEnemyCounter: true, + }, + swapper: { + enabled: true, + path: '', + }, + matchmaker: { + enabled: true, + regions: [], + gamemodes: [], + maps: [], + minPlayers: 1, + maxPlayers: 6, + minRemainingTime: 120, + openServerBrowser: true, + autoJoin: false, + }, + keybinds: DEFAULT_KEYBINDS, + userscripts: { + enabled: true, + path: '', + }, + ui: { + showExitButton: true, + deathscreenAnimation: true, + hideMenuPopups: false, + cleanerMenu: false, + doublePing: true, + cssTheme: 'disabled', + loadingTheme: 'disabled', + backgroundUrl: '', + showChangelog: true, + lastSeenVersion: '', + }, + discord: { + enabled: false, + }, + translator: { + enabled: true, + targetLanguage: 'en', + showLanguageTag: true, + }, + advanced: { + removeUselessFeatures: true, + gpuRasterizing: false, + helpfulFlags: true, + disableAccelerated2D: false, + increaseLimits: false, + lowLatency: false, + experimentalFlags: false, + angleBackend: 'default', + verboseLogging: false, + }, + accounts: [], + tabWindow: { + width: 1280, + height: 720, + x: undefined, + y: undefined, + maximized: true, + }, + platform: { + detectedOS: platformInfo.os, + gpuBackend: platformInfo.gpuBackend, + }, + }, +}); diff --git a/src/main/css-themes.ts b/src/main/css-themes.ts new file mode 100644 index 0000000..84536c8 --- /dev/null +++ b/src/main/css-themes.ts @@ -0,0 +1,131 @@ +// ── CSS theme & loading screen background management ── +// Scans swap directory for user CSS themes and loading screen backgrounds. + +import { readdirSync, readFileSync } from 'fs'; +import { join, extname, basename } from 'path'; + +export interface ThemeEntry { + id: string; + label: string; +} + +export interface LoadingThemeEntry { + id: string; + label: string; +} + +export function listThemes(swapDir: string): ThemeEntry[] { + const entries: ThemeEntry[] = [{ id: 'disabled', label: 'Disabled' }]; + const themesDir = join(swapDir, 'themes'); + try { + const files = readdirSync(themesDir); + for (const file of files) { + if (extname(file).toLowerCase() === '.css') { + entries.push({ id: `user:${file}`, label: basename(file, '.css') }); + } + } + } catch { /* themes dir doesn't exist yet — that's fine */ } + return entries; +} + +export function getThemeCSS(themeId: string, swapDir: string): string { + if (themeId === 'disabled' || !themeId) return ''; + const prefix = 'user:'; + if (!themeId.startsWith(prefix)) return ''; + const filename = themeId.slice(prefix.length); + try { + return readFileSync(join(swapDir, 'themes', filename), 'utf-8'); + } catch { return ''; } +} + +const IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.webp']); + +export function listLoadingThemes(swapDir: string): LoadingThemeEntry[] { + const entries: LoadingThemeEntry[] = [ + { id: 'disabled', label: 'Disabled (Default)' }, + { id: 'swap:random', label: 'Random (from backgrounds/)' }, + ]; + const bgDir = join(swapDir, 'backgrounds'); + try { + const files = readdirSync(bgDir); + for (const file of files) { + if (IMAGE_EXTS.has(extname(file).toLowerCase())) { + entries.push({ id: `swap:${file}`, label: file }); + } + } + } catch { /* backgrounds dir doesn't exist yet */ } + return entries; +} + +function mimeFromExt(ext: string): string { + switch (ext.toLowerCase()) { + case '.jpg': + case '.jpeg': + return 'image/jpeg'; + case '.gif': + return 'image/gif'; + case '.webp': + return 'image/webp'; + default: + return 'image/png'; + } +} + +function getBackgroundFiles(swapDir: string): string[] { + const bgDir = join(swapDir, 'backgrounds'); + try { + return readdirSync(bgDir).filter(f => IMAGE_EXTS.has(extname(f).toLowerCase())); + } catch { return []; } +} + +function fileToDataUri(filePath: string): string { + const data = readFileSync(filePath); + const mime = mimeFromExt(extname(filePath)); + return `data:${mime};base64,${data.toString('base64')}`; +} + +export function getLoadingScreenCSS(loadingTheme: string, backgroundUrl: string, swapDir: string): string { + let imageUrl = ''; + + // Explicit URL takes priority + if (backgroundUrl) { + try { + new URL(backgroundUrl); + imageUrl = `url(${backgroundUrl})`; + } catch { /* invalid URL — ignore */ } + } + + if (!imageUrl && loadingTheme && loadingTheme !== 'disabled') { + const bgDir = join(swapDir, 'backgrounds'); + if (loadingTheme === 'swap:random') { + const files = getBackgroundFiles(swapDir); + if (files.length > 0) { + const pick = files[Math.floor(Math.random() * files.length)]; + try { + imageUrl = `url(${fileToDataUri(join(bgDir, pick))})`; + } catch { /* read failed */ } + } + } else if (loadingTheme.startsWith('swap:')) { + const filename = loadingTheme.slice(5); + try { + imageUrl = `url(${fileToDataUri(join(bgDir, filename))})`; + } catch { /* read failed */ } + } + } + + if (!imageUrl) return ''; + + return ` +#instructionHolder[style^="display: block"] { + background-image: initial !important; +} +#instructionHolder { + background-image: ${imageUrl} !important; + background-size: cover !important; + background-position: center !important; +} +#instructions { + display: block; + visibility: hidden; +}`; +} diff --git a/src/main/discord-rpc.ts b/src/main/discord-rpc.ts new file mode 100644 index 0000000..2e8b08d --- /dev/null +++ b/src/main/discord-rpc.ts @@ -0,0 +1,285 @@ +import { Socket } from 'net'; +import { electronLog } from './logger'; + +const DISCORD_CLIENT_ID = '1477679025248800982'; + +// Discord IPC opcodes +const OP_HANDSHAKE = 0; +const OP_FRAME = 1; +const OP_CLOSE = 2; + +// Rate limit: Discord rejects updates faster than 15s +const RATE_LIMIT_MS = 5000; +const RECONNECT_INTERVAL_MS = 30000; + +export interface ActivityPayload { + details?: string; + state?: string; + startTimestamp?: number; + largeImageKey?: string; + largeImageText?: string; +} + +function getPipePath(id: number): string { + if (process.platform === 'win32') { + return `\\\\?\\pipe\\discord-ipc-${id}`; + } + // Linux/macOS: check XDG_RUNTIME_DIR, TMPDIR, TMP, TEMP, /tmp + const dir = process.env.XDG_RUNTIME_DIR + || process.env.TMPDIR + || process.env.TMP + || process.env.TEMP + || '/tmp'; + return `${dir}/discord-ipc-${id}`; +} + +function encodeFrame(opcode: number, payload: object): Buffer { + const json = JSON.stringify(payload); + const jsonBuf = Buffer.from(json); + const header = Buffer.alloc(8); + header.writeUInt32LE(opcode, 0); + header.writeUInt32LE(jsonBuf.length, 4); + return Buffer.concat([header, jsonBuf]); +} + +export class DiscordRPC { + private socket: Socket | null = null; + private connected = false; + private reconnectTimer: ReturnType | null = null; + private lastUpdate = 0; + private nonce = 0; + private destroyed = false; + private recvBuf = Buffer.alloc(0); + private pendingActivity: ActivityPayload | null = null; + private flushTimer: ReturnType | null = null; + + get isConnected(): boolean { + return this.connected; + } + + connect(): void { + if (this.destroyed) return; + this.tryConnect(0); + } + + private tryConnect(pipeIndex: number): void { + if (this.destroyed || pipeIndex > 9) { + this.scheduleReconnect(); + return; + } + + const pipePath = getPipePath(pipeIndex); + const sock = new Socket(); + let settled = false; + + const onError = () => { + if (settled) return; + settled = true; + sock.destroy(); + // Try next pipe index + this.tryConnect(pipeIndex + 1); + }; + + sock.once('error', onError); + + sock.connect(pipePath, () => { + if (settled || this.destroyed) { + sock.destroy(); + return; + } + settled = true; + this.socket = sock; + this.recvBuf = Buffer.alloc(0); + + // Remove the initial error handler and set up persistent ones + sock.removeListener('error', onError); + sock.on('error', (err) => { + electronLog.warn('[KCC-Discord] Socket error:', err.message); + this.handleDisconnect(); + }); + sock.on('close', () => { + this.handleDisconnect(); + }); + sock.on('data', (data) => { + this.onData(data); + }); + + // Send handshake + const handshake = encodeFrame(OP_HANDSHAKE, { + v: 1, + client_id: DISCORD_CLIENT_ID, + }); + sock.write(handshake); + }); + + // Connection timeout — 5s + sock.setTimeout(5000, onError); + } + + private onData(data: Buffer): void { + this.recvBuf = Buffer.concat([this.recvBuf, data]); + + while (this.recvBuf.length >= 8) { + const opcode = this.recvBuf.readUInt32LE(0); + const length = this.recvBuf.readUInt32LE(4); + + if (this.recvBuf.length < 8 + length) break; + + const jsonBuf = this.recvBuf.slice(8, 8 + length); + this.recvBuf = this.recvBuf.slice(8 + length); + + try { + const payload = JSON.parse(jsonBuf.toString()); + this.handleMessage(opcode, payload); + } catch { + // Malformed JSON — ignore + } + } + } + + private handleMessage(opcode: number, payload: any): void { + if (opcode === OP_FRAME) { + if (payload.cmd === 'DISPATCH' && payload.evt === 'READY') { + this.connected = true; + electronLog.log('[KCC-Discord] Connected to Discord'); + // Flush any activity that was set before connection completed + if (this.pendingActivity) { + this.sendActivity(this.pendingActivity); + this.pendingActivity = null; + } + } + } else if (opcode === OP_CLOSE) { + electronLog.warn('[KCC-Discord] Discord closed connection:', payload.message || ''); + this.handleDisconnect(); + } + } + + private handleDisconnect(): void { + if (!this.connected && !this.socket) return; + this.connected = false; + if (this.flushTimer) { + clearTimeout(this.flushTimer); + this.flushTimer = null; + } + if (this.socket) { + this.socket.destroy(); + this.socket = null; + } + this.recvBuf = Buffer.alloc(0); + electronLog.log('[KCC-Discord] Disconnected'); + this.scheduleReconnect(); + } + + private scheduleReconnect(): void { + if (this.destroyed || this.reconnectTimer) return; + this.reconnectTimer = setTimeout(() => { + this.reconnectTimer = null; + if (!this.destroyed && !this.connected) { + this.tryConnect(0); + } + }, RECONNECT_INTERVAL_MS); + } + + setActivity(activity: ActivityPayload): void { + if (this.destroyed) return; + + // Always store latest activity so it can be sent on (re)connect + this.pendingActivity = activity; + + if (!this.connected || !this.socket) return; + + const now = Date.now(); + const elapsed = now - this.lastUpdate; + if (elapsed < RATE_LIMIT_MS) { + // Schedule a flush after the rate limit window expires + if (!this.flushTimer) { + this.flushTimer = setTimeout(() => { + this.flushTimer = null; + if (this.pendingActivity && this.connected && this.socket) { + this.sendActivity(this.pendingActivity); + this.pendingActivity = null; + } + }, RATE_LIMIT_MS - elapsed); + } + return; + } + + this.sendActivity(activity); + this.pendingActivity = null; + } + + private sendActivity(activity: ActivityPayload): void { + if (!this.socket || this.destroyed) return; + this.lastUpdate = Date.now(); + + const activityObj: any = {}; + if (activity.details) activityObj.details = activity.details; + if (activity.state) activityObj.state = activity.state; + if (activity.startTimestamp) { + activityObj.timestamps = { start: activity.startTimestamp }; + } + if (activity.largeImageKey) { + activityObj.assets = { + large_image: activity.largeImageKey, + large_text: activity.largeImageText || 'Krunker Civilian Client', + }; + } + + const frame = encodeFrame(OP_FRAME, { + cmd: 'SET_ACTIVITY', + args: { + pid: process.pid, + activity: activityObj, + }, + nonce: String(++this.nonce), + }); + + try { + this.socket.write(frame); + } catch (err) { + electronLog.warn('[KCC-Discord] Write error:', (err as Error).message); + } + } + + clearActivity(): void { + if (!this.connected || !this.socket || this.destroyed) return; + + const frame = encodeFrame(OP_FRAME, { + cmd: 'SET_ACTIVITY', + args: { + pid: process.pid, + activity: null, + }, + nonce: String(++this.nonce), + }); + + try { + this.socket.write(frame); + } catch { + // Silent + } + } + + disconnect(): void { + this.destroyed = true; + if (this.reconnectTimer) { + clearTimeout(this.reconnectTimer); + this.reconnectTimer = null; + } + if (this.flushTimer) { + clearTimeout(this.flushTimer); + this.flushTimer = null; + } + if (this.socket) { + try { + this.clearActivity(); + } catch { + // Silent + } + this.socket.destroy(); + this.socket = null; + } + this.connected = false; + this.recvBuf = Buffer.alloc(0); + } +} diff --git a/src/main/index.ts b/src/main/index.ts new file mode 100644 index 0000000..4a7d84d --- /dev/null +++ b/src/main/index.ts @@ -0,0 +1,843 @@ +import { app, BrowserWindow, Menu, clipboard, ipcMain, safeStorage, session, shell } from 'electron'; +import { join } from 'path'; +import { existsSync, mkdirSync, promises as fsp } from 'fs'; +import { get as httpsGet } from 'https'; +import { execFile } from 'child_process'; +import * as os from 'os'; +import { detectPlatform, applyPlatformFlags } from './platform'; +import { config, Keybind, DEFAULT_KEYBINDS, SavedAccount } from './config'; +import { initSwapperProtocol, registerSwapperFileProtocol, ResourceSwapper } from './swapper'; +import { UserscriptManager } from './userscripts'; +import { ALL_CLIENT_CSS } from './client-ui'; +import { electronLog, getLogPath, closeLogStreams } from './logger'; +import { checkForUpdate, downloadUpdate, installUpdate } from './updater'; +import { showUpdateWindow } from './update-window'; +import { DiscordRPC } from './discord-rpc'; +import { listThemes, getThemeCSS, listLoadingThemes, getLoadingScreenCSS } from './css-themes'; +import { TabManager } from './tab-manager'; + +// ── App version for API calls ── +// eslint-disable-next-line @typescript-eslint/no-require-imports +const appVersion: string = require('../../package.json').version; + +// ── Region ping cache ── +const SERVER_MAP: Record = { + 'us-ca-sv': 'SV', 'jb-hnd': 'TOK', 'de-fra': 'FRA', + 'as-mb': 'MBI', 'au-syd': 'SYD', 'sgp': 'SIN', + 'us-tx': 'DAL', 'me-bhn': 'BHN', 'brz': 'BRZ', 'us-nj': 'NY', +}; +let pingCache: Record = {}; +let pingCacheTime = 0; + +function osPing(host: string): Promise { + return new Promise((resolve) => { + const isWin = process.platform === 'win32'; + const args = isWin ? ['-n', '1', '-w', '1500', host] : ['-c', '1', '-W', '2', host]; + execFile('ping', args, { timeout: 3000 }, (err, stdout) => { + if (err) { resolve(-1); return; } + const match = stdout.match(/time[=<]([\d.]+)\s*ms/i); + if (match) resolve(Math.round(parseFloat(match[1]))); + else resolve(-1); + }); + }); +} + +// ── Platform flags (must run before app.ready) ── +const platformInfo = detectPlatform(); +const advancedDefaults = { + removeUselessFeatures: true, + gpuRasterizing: false, + helpfulFlags: true, + disableAccelerated2D: false, + increaseLimits: false, + lowLatency: false, + experimentalFlags: false, +}; +const advancedConfig = { ...advancedDefaults, ...config.get('advanced') }; +const perfConfig = { fpsUnlocked: true, ...config.get('performance') }; +applyPlatformFlags(platformInfo, advancedConfig, perfConfig); + +// ── App identity (must match electron-builder appId for taskbar pin persistence) ── +app.setAppUserModelId('com.krunkercivilian.client'); + +// ── Resource swapper protocol (must register before app.ready) ── +initSwapperProtocol(); + +// ── Ad-blocking URL patterns (matched in C++ layer, never hits JS for non-matches) ── +const BLOCKED_URL_PATTERNS = [ + '*://*.pollfish.com/*', + '*://www.paypalobjects.com/*', + '*://fran-cdn.frvr.com/*', + '*://c.amazon-adsystem.com/*', + '*://cdn.frvr.com/fran/*', + '*://cookiepro.com/*', + '*://*.cookiepro.com/*', + '*://www.googletagmanager.com/*', + '*://*.doubleclick.net/*', + '*://storage.googleapis.com/pollfish_production/*', + '*://coeus.frvr.com/*', + '*://apis.google.com/js/platform.js', + '*://imasdk.googleapis.com/*', +]; + +// ── CSS to hide ad containers ── +const HIDE_ADS_CSS = ` +.endAHolder, +#aHider, +#adCon, +#rightABox, +#aContainer, +#topRightAdHolder, +div#aContainer, +#braveWarning, +#topRightAdHolder { + display: none !important; +}`; + +// ── Consent dismiss script (polling only — NO MutationObserver on main frame) ── +const CONSENT_DISMISS_MAIN_JS = ` +(function dismissConsent() { + let attempts = 0; + const timer = setInterval(() => { + attempts++; + const btn = document.querySelector('.fc-cta-consent, [aria-label="Consent"], .css-47sehv'); + if (btn) { btn.click(); clearInterval(timer); } + if (attempts > 30) clearInterval(timer); + }, 500); +})();`; + +// ── Escape pointer lock fix ── +const ESCAPE_POINTERLOCK_FIX_JS = ` +document.addEventListener('keydown', function(e) { + if (e.key === 'Escape' && document.pointerLockElement) { + document.exitPointerLock(); + } +}, true);`; + +// ── Safe external URL opener (only http/https) ── +function safeOpenExternal(url: string): void { + try { + const parsed = new URL(url); + if (parsed.protocol === 'https:' || parsed.protocol === 'http:') { + shell.openExternal(url); + } + } catch { /* malformed URL — ignore */ } +} + +// ── Keybind matching ── +function matchesKeybind(input: { key: string; control: boolean; shift: boolean; alt: boolean }, bind: Keybind | undefined): boolean { + if (!bind) return false; + return input.key === bind.key + && input.control === bind.ctrl + && input.shift === bind.shift + && input.alt === bind.alt; +} + +// ── Cached keybinds (avoid re-reading electron-store on every keypress) ── +let cachedKeybinds: Record | null = null; + +function getKeybinds(): Record { + if (!cachedKeybinds) { + cachedKeybinds = { ...DEFAULT_KEYBINDS, ...config.get('keybinds') }; + } + return cachedKeybinds; +} + +// ── Debounced window state persistence ── +let saveTimer: ReturnType | null = null; + +function saveWindowState(win: BrowserWindow): void { + if (saveTimer) clearTimeout(saveTimer); + saveTimer = setTimeout(() => { + if (win.isDestroyed()) return; + const bounds = win.getBounds(); + config.set('window', { + width: bounds.width, + height: bounds.height, + x: bounds.x, + y: bounds.y, + maximized: win.isMaximized(), + fullscreen: win.isFullScreen(), + }); + }, 1000); +} + +app.whenReady().then(async () => { + electronLog.log('[KCC] App ready'); + + // ── Auto-update check (mandatory, Windows NSIS install only) ── + const isPortable = !!process.env.PORTABLE_EXECUTABLE_DIR; + const isAppImage = !!process.env.APPIMAGE; + const isDev = !app.isPackaged; + if (isDev || process.platform !== 'win32' || isPortable || isAppImage) { + electronLog.log('[KCC] Skipping auto-update (portable or non-Windows)'); + } else { + try { + electronLog.log('[KCC] Checking for updates...'); + const update = await checkForUpdate(appVersion); + if (update) { + electronLog.log(`[KCC] Update available: v${update.version}`); + const { window: updateWin, sendProgress } = showUpdateWindow(); + sendProgress(`Update available (v${update.version})`, 0); + + const tempDir = join(app.getPath('temp'), 'kcc-update'); + if (!existsSync(tempDir)) mkdirSync(tempDir, { recursive: true }); + const installerPath = join(tempDir, `KCC-${update.version}-Setup.exe`); + + let cancelled = false; + updateWin.on('closed', () => { cancelled = true; }); + + try { + await downloadUpdate(update.downloadUrl, installerPath, (pct) => { + if (!cancelled && !updateWin.isDestroyed()) { + sendProgress(`Downloading update... ${pct}%`, pct); + } + }); + + if (!cancelled) { + sendProgress('Installing update...', 100); + installUpdate(installerPath); + return; // app.quit() called by installUpdate + } + } catch (err) { + electronLog.error('[KCC] Update download failed:', err); + if (!updateWin.isDestroyed()) updateWin.close(); + } + } else { + electronLog.log('[KCC] No updates available'); + } + } catch (err) { + electronLog.error('[KCC] Update check failed:', err); + } + } + + await launchApp(); +}); + +async function launchApp(): Promise { + electronLog.log('[KCC] Starting initialization'); + + // ── Session: persistent partition + clean user-agent ── + const ses = session.fromPartition('persist:krunker'); + const rawUA = ses.getUserAgent(); + ses.setUserAgent(rawUA.replace(/\s*krunker-civilian-client\/\S+/i, '')); + + // ── Register swapper file protocol on this session ── + registerSwapperFileProtocol(ses); + + // ── Resource swapper ── + const swapperConfig = config.get('swapper'); + const swapDir = swapperConfig.path || join(app.getPath('userData'), 'Krunker Civilian Client', 'swapper'); + const swapper = swapperConfig.enabled ? new ResourceSwapper(swapDir) : null; + electronLog.log(`[KCC] Resource swapper: ${swapper ? 'enabled' : 'disabled'} (${swapDir})`); + + // ── Userscript manager ── + const usConfig = config.get('userscripts') || { enabled: true, path: '' }; + const usDir = usConfig.path || join(app.getPath('userData'), 'Krunker Civilian Client'); + const userscriptManager = usConfig.enabled ? new UserscriptManager(usDir) : null; + electronLog.log(`[KCC] Userscripts: ${userscriptManager ? 'enabled' : 'disabled'} (${usDir})`); + + // ── Ad blocking + resource swapper (single onBeforeRequest — Electron only allows one) ── + // The broad *://*.krunker.io/* pattern lets the swapper intercept any krunker asset. + // swapper.getRedirect() returns null before its async scan completes, so swapped + // resources simply pass through until the scan finishes — no re-registration needed. + const requestFilterUrls = swapper + ? [...BLOCKED_URL_PATTERNS, '*://*.krunker.io/*'] + : [...BLOCKED_URL_PATTERNS]; + + ses.webRequest.onBeforeRequest({ urls: requestFilterUrls }, (details, callback) => { + // Check swapper first — redirect matching assets to local files + if (swapper) { + const redirect = swapper.getRedirect(details.url); + if (redirect) return callback({ redirectURL: redirect }); + } + // Determine if this URL is a krunker.io request (matched by the broad swapper pattern) + // vs an ad-block pattern. krunker.io requests that weren't swapped pass through normally. + try { + if (new URL(details.url).hostname.endsWith('krunker.io')) return callback({}); + } catch { /* invalid URL — fall through to cancel */ } + // Matched an ad-block pattern — cancel it + callback({ cancel: true }); + }); + + if (swapper) { + swapper.waitForReady().then(() => { + electronLog.log(`[KCC] Swapper ready: ${swapper.patterns.length} pattern(s)`); + }); + } + + // ── CORS fix for swapped resources ── + if (swapper) { + ses.webRequest.onHeadersReceived(({ responseHeaders }, callback) => { + if (!responseHeaders) return callback({}); + for (const key in responseHeaders) { + const lowercase = key.toLowerCase(); + if (lowercase === 'access-control-allow-credentials' && responseHeaders[key][0] === 'true') { + return callback({ responseHeaders }); + } + if (lowercase === 'access-control-allow-origin') { + delete responseHeaders[key]; + break; + } + } + return callback({ + responseHeaders: { ...responseHeaders, 'access-control-allow-origin': ['*'] }, + }); + }); + } + + // ── Restore saved window bounds ── + const savedWindow = config.get('window'); + + const win = new BrowserWindow({ + width: savedWindow.width, + height: savedWindow.height, + x: savedWindow.x, + y: savedWindow.y, + frame: true, + backgroundColor: '#000000', + webPreferences: { + preload: join(__dirname, '..', 'preload', 'index.js'), + session: ses, + contextIsolation: false, + nodeIntegration: false, + sandbox: false, + spellcheck: false, + backgroundThrottling: false, + }, + }); + + if (savedWindow.fullscreen) win.setFullScreen(true); + else if (savedWindow.maximized) win.maximize(); + + // ── No application menu (prevents Escape/Alt interception) ── + Menu.setApplicationMenu(null); + + // ── Discord Rich Presence ── + let discordRpc: DiscordRPC | null = null; + { + const discordConf = config.get('discord') || { enabled: false }; + if (discordConf.enabled) { + discordRpc = new DiscordRPC(); + discordRpc.connect(); + electronLog.log('[KCC] Discord Rich Presence enabled'); + } + } + + // ── Process Priority (Windows only) ── + if (process.platform === 'win32') { + const PRIORITY_MAP: Record = { + 'High': -14, + 'Above Normal': -7, + 'Below Normal': 7, + 'Low': 19, + }; + const prioritySetting = config.get('performance')?.processPriority || 'Normal'; + const priorityVal = PRIORITY_MAP[prioritySetting]; + if (priorityVal !== undefined) { + try { os.setPriority(process.pid, priorityVal); } catch { /* ignore */ } + // Apply to child processes periodically + setInterval(() => { + for (const m of app.getAppMetrics()) { + if (m.pid !== process.pid) { + try { os.setPriority(m.pid, priorityVal); } catch { /* ignore */ } + } + } + }, 1000); + electronLog.log(`[KCC] Process priority set to ${prioritySetting}`); + } + } + + // ── CPU Throttling via Chrome DevTools Protocol ── + const throttledContents = new WeakSet(); + + function applyCpuThrottle(wc: Electron.WebContents, rate: number): void { + const clamped = Math.max(1, Math.min(3, rate)); + try { + if (!throttledContents.has(wc)) { + wc.debugger.attach('1.3'); + throttledContents.add(wc); + } + wc.debugger.sendCommand('Emulation.setCPUThrottlingRate', { rate: clamped }); + } catch { /* debugger may already be attached or detached */ } + } + + // ── Keybind capture lock (suppresses shortcuts while the keybind dialog is open) ── + let keybindCapturing = false; + ipcMain.on('keybind-capture', (_e, capturing: boolean) => { + keybindCapturing = capturing; + }); + + // ── Configurable keybinds via before-input-event ── + win.webContents.on('before-input-event', (event, input) => { + if (input.type !== 'keyDown') return; + if (keybindCapturing) return; + + const binds = getKeybinds(); + + if (matchesKeybind(input, binds.reload)) { + win.reload(); + event.preventDefault(); + } else if (matchesKeybind(input, binds.newMatch)) { + const mm = config.get('matchmaker'); + if (mm.enabled) { + win.webContents.send('matchmaker-find', { + ...mm, + acceptKey: binds.matchmakerAccept, + cancelKey: binds.matchmakerCancel, + }); + } else { + win.loadURL('https://krunker.io'); + } + event.preventDefault(); + } else if (matchesKeybind(input, binds.joinFromClipboard)) { + const text = clipboard.readText(); + try { const u = new URL(text); if (u.protocol === 'https:' && u.hostname.endsWith('krunker.io')) win.loadURL(text); } catch { /* ignore invalid URLs */ } + event.preventDefault(); + } else if (matchesKeybind(input, binds.copyGameLink)) { + clipboard.writeText(win.webContents.getURL()); + event.preventDefault(); + } else if (matchesKeybind(input, binds.devTools)) { + win.webContents.toggleDevTools(); + event.preventDefault(); + } else if (matchesKeybind(input, binds.matchmaker)) { + const mm = config.get('matchmaker'); + if (mm.enabled) { + win.webContents.send('matchmaker-find', { + ...mm, + acceptKey: binds.matchmakerAccept, + cancelKey: binds.matchmakerCancel, + }); + } else { + win.loadURL('https://krunker.io'); + } + event.preventDefault(); + } else if (matchesKeybind(input, binds.pauseChat)) { + win.webContents.send('toggle-chat-pause'); + event.preventDefault(); + } else if (matchesKeybind(input, binds.fullscreenToggle)) { + win.setFullScreen(!win.isFullScreen()); + event.preventDefault(); + } else if (input.key === 't' && input.control && !input.shift && !input.alt) { + tabManager.openTab('https://krunker.io/social.html'); + event.preventDefault(); + } else if (input.key === 'T' && input.control && input.shift && !input.alt) { + tabManager.reopenTab(); + event.preventDefault(); + } + }); + + // ── Window state persistence (debounced) ── + win.on('resize', () => saveWindowState(win)); + win.on('move', () => saveWindowState(win)); + win.on('maximize', () => saveWindowState(win)); + win.on('unmaximize', () => saveWindowState(win)); + win.on('enter-full-screen', () => saveWindowState(win)); + win.on('leave-full-screen', () => saveWindowState(win)); + + // ── URL classification ── + const GAME_PAGE_PATHS = ['/', '']; + function isGameURL(url: string): boolean { + try { + const parsed = new URL(url); + if (!parsed.hostname.includes('krunker.io')) return false; + return GAME_PAGE_PATHS.includes(parsed.pathname); + } catch { return false; } + } + + // ── Cached game config (invalidated on set-config writes to 'game') ── + const gameDefaults = { lastServer: '', socialTabBehaviour: 'New Window' }; + let cachedGameConf: typeof gameDefaults | null = null; + function getGameConf(): typeof gameDefaults { + if (!cachedGameConf) cachedGameConf = { ...gameDefaults, ...config.get('game') }; + return cachedGameConf; + } + + // ── Tab Manager ── + const preloadPath = join(__dirname, '..', 'preload', 'index.js'); + let tabMode: 'same' | 'new' = getGameConf().socialTabBehaviour === 'Same Window' ? 'same' : 'new'; + let tabManager = new TabManager( + win, ses, preloadPath, tabMode, isGameURL, + () => config.get('tabWindow'), + (state) => config.set('tabWindow', state), + ); + + // Intercept in-page navigation (e.g. window.location = '/social.html') + win.webContents.on('will-navigate', (event, url) => { + if (url.includes('krunker.io') && !isGameURL(url)) { + event.preventDefault(); + tabManager.openTab(url); + } + }); + + // Intercept target="_blank" / window.open links + win.webContents.setWindowOpenHandler(({ url }) => { + if (url.includes('krunker.io')) { + if (isGameURL(url)) { + win.loadURL(url); + } else { + setImmediate(() => tabManager.openTab(url)); + } + } else { + setImmediate(() => safeOpenExternal(url)); + } + return { action: 'deny' }; + }); + + // Right-click context menu on main window with "Open in New Tab" + win.webContents.on('context-menu', (_e, params) => { + if (!params.linkURL) return; + const items: Electron.MenuItemConstructorOptions[] = []; + if (params.linkURL.includes('krunker.io') && !isGameURL(params.linkURL)) { + items.push({ label: 'Open in New Tab', click: () => tabManager.openTab(params.linkURL) }); + } + items.push({ label: 'Copy Link', click: () => clipboard.writeText(params.linkURL) }); + if (!params.linkURL.includes('krunker.io')) { + items.push({ label: 'Open in Browser', click: () => safeOpenExternal(params.linkURL) }); + } + if (items.length) Menu.buildFromTemplate(items).popup(); + }); + + // ── Inject scripts after page loads ── + win.webContents.on('did-finish-load', () => { + electronLog.log(`[KCC] Page loaded: ${win.webContents.getURL()}`); + // Rescan swap directory so new/changed files are picked up on refresh + if (swapper) swapper.rescan().catch(() => {}); + + const cssInjections = [ + win.webContents.insertCSS(HIDE_ADS_CSS), + win.webContents.insertCSS(ALL_CLIENT_CSS), + ]; + + // Inject user CSS theme + const uiConf = config.get('ui'); + const themeCSS = getThemeCSS(uiConf?.cssTheme || 'disabled', swapDir); + if (themeCSS) cssInjections.push(win.webContents.insertCSS(themeCSS)); + + // Inject loading screen background + const loadingCSS = getLoadingScreenCSS(uiConf?.loadingTheme || 'disabled', uiConf?.backgroundUrl || '', swapDir); + if (loadingCSS) cssInjections.push(win.webContents.insertCSS(loadingCSS)); + + Promise.all(cssInjections).catch(() => {}); + + // Apply initial CPU throttle (menu state) + const perf = config.get('performance'); + applyCpuThrottle(win.webContents, perf?.cpuThrottleMenu ?? 1.5); + + win.webContents.executeJavaScript(ESCAPE_POINTERLOCK_FIX_JS).catch((err) => electronLog.warn('[KCC] Pointerlock fix inject failed:', err)); + win.webContents.executeJavaScript(CONSENT_DISMISS_MAIN_JS).catch((err) => electronLog.warn('[KCC] Consent dismiss inject failed:', err)); + // Notify preload to start hooking settings (matches Crankshaft's timing) + win.webContents.send('main_did-finish-load'); + }); + + // ── IPC handlers ── + const ALLOWED_CONFIG_KEYS = new Set([ + 'window', 'performance', 'game', 'swapper', 'matchmaker', + 'keybinds', 'userscripts', 'ui', 'discord', 'translator', + 'advanced', 'accounts', 'tabWindow', 'platform', + ]); + + ipcMain.handle('get-version', () => appVersion); + ipcMain.handle('get-platform', () => platformInfo); + ipcMain.handle('get-config', (_e, key: string) => { + if (!ALLOWED_CONFIG_KEYS.has(key)) return undefined; + return config.get(key as keyof typeof config.store); + }); + ipcMain.handle('get-all-config', (_e, keys: string[]) => { + const result: Record = {}; + for (const key of keys) { + if (ALLOWED_CONFIG_KEYS.has(key)) result[key] = config.get(key as keyof typeof config.store); + } + return result; + }); + let configWriteTimer: ReturnType | null = null; + const pendingConfigWrites = new Map(); + + ipcMain.handle('set-config', (_e, key: string, value: unknown) => { + if (!ALLOWED_CONFIG_KEYS.has(key)) return; + // Flush immediately for keys that have side effects + if (key === 'keybinds') { + config.set(key as any, value); + cachedKeybinds = null; + return; + } + // Invalidate caches immediately (not on flush) to prevent stale reads + if (key === 'game') { + cachedGameConf = null; + // Switch tab mode if socialTabBehaviour changed + const newGame = value as any; + if (newGame?.socialTabBehaviour) { + const newMode: 'same' | 'new' = newGame.socialTabBehaviour === 'Same Window' ? 'same' : 'new'; + if (newMode !== tabMode) { + tabManager.destroyAll(); + tabMode = newMode; + tabManager = new TabManager( + win, ses, preloadPath, tabMode, isGameURL, + () => config.get('tabWindow'), + (state) => config.set('tabWindow', state), + ); + } + } + } + pendingConfigWrites.set(key, value); + if (!configWriteTimer) { + configWriteTimer = setTimeout(() => { + for (const [k, v] of pendingConfigWrites) { + config.set(k as any, v); + } + pendingConfigWrites.clear(); + configWriteTimer = null; + }, 300); + } + }); + ipcMain.handle('window-minimize', () => win.minimize()); + ipcMain.handle('window-maximize', () => { + if (win.isMaximized()) win.unmaximize(); else win.maximize(); + }); + ipcMain.handle('window-close', () => win.close()); + ipcMain.handle('window-is-maximized', () => win.isMaximized()); + ipcMain.handle('toggle-devtools', () => win.webContents.toggleDevTools()); + ipcMain.handle('inject-game-click', () => { + const [width, height] = win.getContentSize(); + const x = Math.round(width / 2); + const y = Math.round(height / 2); + win.webContents.sendInputEvent({ type: 'mouseDown', x, y, button: 'left', clickCount: 1 }); + win.webContents.sendInputEvent({ type: 'mouseUp', x, y, button: 'left', clickCount: 1 }); + }); + ipcMain.handle('get-swap-dir', () => swapDir); + ipcMain.handle('open-swap-folder', () => shell.openPath(swapDir)); + + // ── Ping regions IPC handler (TCP connect timing, cached 60s) ── + ipcMain.handle('ping-regions', async () => { + if (Object.keys(pingCache).length > 0 && Date.now() - pingCacheTime < 60000) { + return pingCache; + } + try { + const data = await new Promise((resolve, reject) => { + httpsGet('https://matchmaker.krunker.io/ping-list?hostname=krunker.io', (res) => { + let body = ''; + res.on('data', (chunk: string) => { body += chunk; }); + res.on('end', () => resolve(body)); + res.on('error', reject); + }).on('error', reject); + }); + const serverIPs: Record = JSON.parse(data); + + const results: Record = {}; + + async function pingWithRetry(host: string): Promise { + const latency = await osPing(host); + if (latency >= 0) return latency; + const retry = await osPing(host); + return retry >= 0 ? retry : -1; + } + + const promises = Object.entries(serverIPs).map(async ([server, ip]) => { + const regionName = SERVER_MAP[server] ?? server; + const host = ip.split(':')[0]; + const latency = await pingWithRetry(host); + if (latency >= 0) { + results[regionName] = latency; + } + }); + await Promise.allSettled(promises); + pingCache = results; + pingCacheTime = Date.now(); + + return results; + } catch (err) { + electronLog.error('[KCC] Ping regions error:', err); + return pingCache; + } + }); + + // ── Discord Rich Presence IPC handler ── + ipcMain.on('discord-update', (_e, activity: any) => { + discordRpc?.setActivity(activity); + }); + + // ── Verbose log IPC handler (preload forwards logs here) ── + ipcMain.on('verbose-log', (_e, level: string, ...args: unknown[]) => { + if (level === 'error') electronLog.error(...args); + else if (level === 'warn') electronLog.warn(...args); + else electronLog.log(...args); + }); + + // ── CPU throttle IPC handler ── + ipcMain.on('throttle-state', (_e, state: string) => { + const perf = config.get('performance'); + const rate = state === 'game' ? (perf?.cpuThrottleGame ?? 1) : (perf?.cpuThrottleMenu ?? 1.5); + applyCpuThrottle(win.webContents, rate); + }); + + // ── CSS theme & loading background IPC handlers ── + ipcMain.handle('list-themes', () => listThemes(swapDir)); + ipcMain.handle('get-theme-css', (_e, themeId: string) => getThemeCSS(themeId, swapDir)); + ipcMain.handle('list-loading-themes', () => listLoadingThemes(swapDir)); + ipcMain.handle('get-loading-screen-css', (_e, loadingTheme: string, backgroundUrl: string) => { + return getLoadingScreenCSS(loadingTheme, backgroundUrl, swapDir); + }); + + // ── Changelog IPC handler (fetch release notes from Gitea) ── + ipcMain.handle('changelog-fetch', async (_e, version: string) => { + const tag = version.startsWith('v') ? version : `v${version}`; + try { + const data = await new Promise((resolve, reject) => { + httpsGet(`https://gitea.crjlab.net/api/v1/repos/bigjakk/Krunker-Civilian-Client/releases/tags/${tag}`, (res) => { + let body = ''; + res.on('data', (chunk: string) => { body += chunk; }); + res.on('end', () => resolve(body)); + res.on('error', reject); + }).on('error', reject); + }); + const release = JSON.parse(data); + return release.body || ''; + } catch { + return ''; + } + }); + + // ── Userscript IPC handlers ── + ipcMain.handle('userscripts-get-dir', () => userscriptManager ? userscriptManager.dir : ''); + ipcMain.handle('userscripts-open-folder', () => { + if (userscriptManager) shell.openPath(userscriptManager.dir); + }); + ipcMain.handle('userscripts-scan', async () => { + if (!userscriptManager) return { scripts: [], tracker: {} }; + const scripts = await userscriptManager.scanScripts(); + const tracker = await userscriptManager.loadTracker(scripts); + return { scripts, tracker }; + }); + ipcMain.handle('userscripts-set-tracker', (_e, tracker: Record) => { + if (userscriptManager) userscriptManager.saveTracker(tracker); + }); + ipcMain.handle('userscripts-load-prefs', (_e, filename: string) => { + if (!userscriptManager) return {}; + return userscriptManager.loadScriptPrefs(filename); + }); + ipcMain.handle('userscripts-save-prefs', (_e, filename: string, prefs: Record) => { + if (userscriptManager) userscriptManager.saveScriptPrefs(filename, prefs); + }); + + // ── Action button IPC handlers ── + ipcMain.handle('open-electron-log', () => { + shell.openPath(getLogPath('electron')); + }); + ipcMain.handle('reset-swapper', async () => { + try { + const entries = await fsp.readdir(swapDir, { withFileTypes: true }); + for (const entry of entries) { + await fsp.rm(join(swapDir, entry.name), { recursive: true, force: true }); + } + return true; + } catch (err) { + electronLog.error('[KCC] Reset swapper failed:', err); + return false; + } + }); + ipcMain.handle('restart-client', () => { + app.relaunch(); + app.quit(); + }); + ipcMain.handle('reset-options', () => { + config.clear(); + app.relaunch(); + app.quit(); + }); + ipcMain.handle('delete-all-data', async () => { + config.clear(); + const userData = app.getPath('userData'); + try { + await fsp.rm(join(userData, 'logs'), { recursive: true, force: true }); + } catch (err) { + electronLog.warn('[KCC] Partial data deletion failed (non-fatal):', err); + } + app.relaunch(); + app.quit(); + }); + + // ── Alt manager IPC handlers (credentials encrypted via safeStorage) ── + const canEncrypt = safeStorage.isEncryptionAvailable(); + if (!canEncrypt) electronLog.warn('[KCC] safeStorage encryption not available — account passwords will use base64 fallback'); + + function encryptString(plaintext: string): string { + if (canEncrypt) return safeStorage.encryptString(plaintext).toString('base64'); + return Buffer.from(plaintext).toString('base64'); + } + + function decryptString(encrypted: string): string { + if (canEncrypt) return safeStorage.decryptString(Buffer.from(encrypted, 'base64')); + return Buffer.from(encrypted, 'base64').toString(); + } + + ipcMain.handle('alt-list', () => { + const accounts = config.get('accounts') || []; + // Return only labels to the renderer — never send encrypted credentials + return accounts.map((a: SavedAccount) => ({ label: a.label })); + }); + + ipcMain.handle('alt-save', (_e, data: { label: string; username: string; password: string }) => { + const accounts = config.get('accounts') || []; + const account: SavedAccount = { + label: data.label, + username: encryptString(data.username), + password: encryptString(data.password), + }; + accounts.push(account); + config.set('accounts', accounts); + return { success: true, index: accounts.length - 1 }; + }); + + ipcMain.handle('alt-get-credentials', (_e, index: number) => { + const accounts = config.get('accounts') || []; + if (index < 0 || index >= accounts.length) return null; + const acc = accounts[index]; + try { + return { + username: decryptString(acc.username), + password: decryptString(acc.password), + }; + } catch (err) { + electronLog.error('[KCC] Failed to decrypt account credentials:', err); + return null; + } + }); + + ipcMain.handle('alt-remove', (_e, index: number) => { + const accounts = config.get('accounts') || []; + if (index < 0 || index >= accounts.length) return { success: false }; + accounts.splice(index, 1); + config.set('accounts', accounts); + return { success: true }; + }); + + ipcMain.handle('alt-rename', (_e, index: number, newLabel: string) => { + const accounts = config.get('accounts') || []; + if (index < 0 || index >= accounts.length) return { success: false }; + accounts[index].label = newLabel; + config.set('accounts', accounts); + return { success: true }; + }); + + // ── Stop page immediately on close to kill audio ── + win.on('close', () => { + win.webContents.setAudioMuted(true); + win.webContents.stop(); + }); + + // ── Shutdown: disconnect Discord, then close log streams ── + app.on('will-quit', () => { + discordRpc?.disconnect(); + electronLog.log('[KCC] Shutting down'); + closeLogStreams(); + }); + + electronLog.log('[KCC] Initialization complete — loading game'); + + // ── Load the game ── + win.loadURL('https://krunker.io'); +} + +app.on('window-all-closed', () => { + app.quit(); +}); diff --git a/src/main/logger.ts b/src/main/logger.ts new file mode 100644 index 0000000..d119004 --- /dev/null +++ b/src/main/logger.ts @@ -0,0 +1,80 @@ +import { app } from 'electron'; +import { join } from 'path'; +import { existsSync, mkdirSync, readdirSync, unlinkSync, createWriteStream, WriteStream } from 'fs'; + +const LOG_RETENTION_DAYS = 7; + +let electronStream: WriteStream; +let electronPath: string; +let ready = false; + +function dateStamp(): string { + const d = new Date(); + return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`; +} + +function pruneOldLogs(logDir: string): void { + try { + const cutoff = Date.now() - LOG_RETENTION_DAYS * 86400000; + for (const file of readdirSync(logDir)) { + const m = file.match(/^electron-(\d{4}-\d{2}-\d{2})\.log$/); + if (!m) continue; + const fileDate = new Date(m[1] + 'T00:00:00').getTime(); + if (fileDate < cutoff) { + try { unlinkSync(join(logDir, file)); } catch { /* ignore */ } + } + } + } catch { /* ignore */ } +} + +function init(): void { + if (ready) return; + const logDir = join(app.getPath('userData'), 'logs'); + if (!existsSync(logDir)) mkdirSync(logDir, { recursive: true }); + + pruneOldLogs(logDir); + + const stamp = dateStamp(); + electronPath = join(logDir, `electron-${stamp}.log`); + + // Append to today's log — one file per day, multiple sessions + electronStream = createWriteStream(electronPath, { flags: 'a' }); + + const sep = `\n${'='.repeat(60)}\n Session started ${new Date().toISOString()}\n${'='.repeat(60)}\n`; + electronStream.write(sep); + ready = true; +} + +function ts(): string { + return new Date().toISOString(); +} + +function fmt(...args: unknown[]): string { + return args.map(a => { + if (a instanceof Error) return `${a.message}\n${a.stack}`; + if (typeof a === 'string') return a; + try { return JSON.stringify(a); } catch { return String(a); } + }).join(' '); +} + +function makeLogger(getStream: () => WriteStream) { + return { + log: (...args: unknown[]) => { init(); const m = fmt(...args); console.log(m); if (!closed) getStream().write(`[${ts()}] ${m}\n`); }, + warn: (...args: unknown[]) => { init(); const m = fmt(...args); console.warn(m); if (!closed) getStream().write(`[${ts()}] WARN: ${m}\n`); }, + error: (...args: unknown[]) => { init(); const m = fmt(...args); console.error(m); if (!closed) getStream().write(`[${ts()}] ERROR: ${m}\n`); }, + }; +} + +export const electronLog = makeLogger(() => electronStream); + +export function getLogPath(_type: 'electron'): string { + init(); + return electronPath; +} + +let closed = false; + +export function closeLogStreams(): void { + closed = true; + if (electronStream) electronStream.end(); +} diff --git a/src/main/platform.ts b/src/main/platform.ts new file mode 100644 index 0000000..756b0df --- /dev/null +++ b/src/main/platform.ts @@ -0,0 +1,145 @@ +import { app } from 'electron'; +import type { AppConfig } from './config'; + +export type Platform = 'win32' | 'linux' | 'darwin'; +export type GpuBackend = 'angle' | 'opengl' | 'vulkan' | 'default'; + +export interface PlatformInfo { + os: Platform; + isWindows: boolean; + isLinux: boolean; + useNativeTitlebar: boolean; + gpuBackend: GpuBackend; +} + +export function detectPlatform(): PlatformInfo { + const os = process.platform as Platform; + const isWindows = os === 'win32'; + const isLinux = os === 'linux'; + + return { + os, + isWindows, + isLinux, + useNativeTitlebar: isLinux, + gpuBackend: isWindows ? 'angle' : 'default', + }; +} + +export function applyPlatformFlags(info: PlatformInfo, advanced: AppConfig['advanced'], performance: AppConfig['performance']): void { + // ── FPS uncap ── + // disable-frame-rate-limit causes compositor CPU spin on Chromium 84+, starving + // input events. On Electron 42 (Chromium 147), this is fixed by a patch to + // cc/scheduler/scheduler.cc in our custom Electron build. The latency recovery + // flags below are no-ops on Chromium 94+ (features were removed), but are + // harmless to keep — Chromium ignores unknown feature flags. + if (performance.fpsUnlocked) { + app.commandLine.appendSwitch('disable-frame-rate-limit'); + app.commandLine.appendSwitch('disable-gpu-vsync'); + app.commandLine.appendSwitch('max-gum-fps', '9999'); + app.commandLine.appendSwitch('enable-features', 'ImplLatencyRecovery,MainLatencyRecovery'); + } + + // ── Always-on platform flags ── + app.commandLine.appendSwitch('disable-backgrounding-occluded-windows'); + app.commandLine.appendSwitch('disable-threaded-scrolling'); + app.commandLine.appendSwitch('overscroll-history-navigation', '0'); + app.commandLine.appendSwitch('pull-to-refresh', '0'); + // WebGL is mandatory for Krunker — force it past any GPU blocklist. + // On Chromium 134+ the blocklist is stricter and silently disables WebGL on many Linux GPUs. + app.commandLine.appendSwitch('ignore-gpu-blocklist'); + + // ── ANGLE backend ── + // 'default' means platform default: D3D11 on Windows, no override on Linux + if (advanced.angleBackend && advanced.angleBackend !== 'default') { + app.commandLine.appendSwitch('use-angle', advanced.angleBackend); + } else if (info.isWindows) { + app.commandLine.appendSwitch('use-angle', 'd3d11'); + } + + if (info.isWindows) { + app.commandLine.appendSwitch('disable-features', 'CalculateNativeWinOcclusion,HardwareMediaKeyHandling'); + } + + if (info.isLinux) { + app.commandLine.appendSwitch('ozone-platform-hint', 'auto'); + // GPU sandbox can fail inside AppImage FUSE mounts and on certain Mesa driver versions, + // causing the GPU process to crash and leaving a black screen. + app.commandLine.appendSwitch('disable-gpu-sandbox'); + } + + // ── Remove useless features ── + if (advanced.removeUselessFeatures) { + app.commandLine.appendSwitch('disable-breakpad'); + app.commandLine.appendSwitch('disable-crash-reporter'); + app.commandLine.appendSwitch('disable-crashpad-forwarding'); + app.commandLine.appendSwitch('disable-print-preview'); + app.commandLine.appendSwitch('disable-metrics-reporting'); + app.commandLine.appendSwitch('disable-metrics'); + app.commandLine.appendSwitch('disable-2d-canvas-clip-aa'); + app.commandLine.appendSwitch('disable-logging'); + app.commandLine.appendSwitch('disable-hang-monitor'); + app.commandLine.appendSwitch('disable-component-update'); + app.commandLine.appendSwitch('disable-bundled-ppapi-flash'); + app.commandLine.appendSwitch('disable-nacl'); + app.commandLine.appendSwitch('disable-features', 'NativeNotifications,MediaRouter,PerformanceInterventionUI,HappinessTrackingSurveysForDesktopDemo'); + } + + // ── GPU rasterization ── + // OOP rasterization is always-on when GPU rasterization is enabled (Chromium 100+) + if (advanced.gpuRasterizing) { + app.commandLine.appendSwitch('enable-gpu-rasterization'); + app.commandLine.appendSwitch('disable-zero-copy'); + app.commandLine.appendSwitch('disable-software-rasterizer'); + app.commandLine.appendSwitch('disable-gpu-driver-bug-workarounds'); + } + + // ── Helpful flags ── + if (advanced.helpfulFlags) { + app.commandLine.appendSwitch('enable-javascript-harmony'); + app.commandLine.appendSwitch('enable-future-v8-vm-features'); + app.commandLine.appendSwitch('enable-webgl'); + app.commandLine.appendSwitch('disable-background-timer-throttling'); + app.commandLine.appendSwitch('disable-renderer-backgrounding'); + app.commandLine.appendSwitch('disable-best-effort-tasks'); + app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required'); + app.commandLine.appendSwitch('enable-features', 'V8VmFuture,WebAssemblyBaseline,WebAssemblyTiering,WebAssemblyLazyCompilation'); + } + + // ── Disable accelerated 2D canvas ── + if (advanced.disableAccelerated2D) { + app.commandLine.appendSwitch('disable-accelerated-2d-canvas'); + } + + // ── Increase limits ── + if (advanced.increaseLimits) { + app.commandLine.appendSwitch('renderer-process-limit', '100'); + app.commandLine.appendSwitch('max-active-webgl-contexts', '100'); + app.commandLine.appendSwitch('webrtc-max-cpu-consumption-percentage', '100'); + app.commandLine.appendSwitch('ignore-gpu-blocklist'); + } + + // ── Low latency ── + // High-res timers and QUIC are default on Chromium 100+. Accelerated 2D canvas + // is default on Chromium 42+. These enable flags were removed from the source. + if (advanced.lowLatency) { + app.commandLine.appendSwitch('force-high-performance-gpu'); + app.commandLine.appendSwitch('enable-quic'); + app.commandLine.appendSwitch('quic-max-packet-length', '1460'); + app.commandLine.appendSwitch('raise-timer-frequency'); + } + + // ── Experimental flags ── + // Removed dead flags: enable-accelerated-video-decode (default since Chromium 132), + // enable-native-gpu-memory-buffers (Linux-only), high-dpi-support (removed in ~M54, + // HiDPI is default since M108). Renamed ignore-gpu-blacklist → ignore-gpu-blocklist. + if (advanced.experimentalFlags) { + app.commandLine.appendSwitch('disable-low-end-device-mode'); + app.commandLine.appendSwitch('disable-gpu-watchdog'); + app.commandLine.appendSwitch('ignore-gpu-blocklist'); + app.commandLine.appendSwitch('no-pings'); + app.commandLine.appendSwitch('no-proxy-server'); + app.commandLine.appendSwitch('enable-features', 'BlinkCompositorUseDisplayThreadPriority,GpuUseDisplayThreadPriority'); + } +} + diff --git a/src/main/swapper.ts b/src/main/swapper.ts new file mode 100644 index 0000000..8c28555 --- /dev/null +++ b/src/main/swapper.ts @@ -0,0 +1,131 @@ +import { existsSync, mkdirSync, promises as fsp } from 'fs'; +import { join } from 'path'; +import { protocol, net, Session } from 'electron'; + +const PROTOCOL_NAME = 'kpc-swap'; +const TARGET_DOMAIN = 'krunker.io'; + +/** + * Convert a native file path to a proper kpc-swap:// URL. + * Windows paths like C:\foo\bar become kpc-swap://C/foo/bar + */ +function filePathToSwapURL(filePath: string): string { + const forwardSlash = filePath.replace(/\\/g, '/'); + // Windows drive letter: C:/foo → kpc-swap://C/foo + const match = forwardSlash.match(/^([A-Za-z]):\/(.*)/); + if (match) { + return `${PROTOCOL_NAME}://${match[1]}/${match[2]}`; + } + // Unix absolute: /home/user/foo → kpc-swap:///home/user/foo + return `${PROTOCOL_NAME}://${forwardSlash}`; +} + +/** + * Register the custom protocol scheme. Must be called BEFORE app.ready. + */ +export function initSwapperProtocol(): void { + protocol.registerSchemesAsPrivileged([{ + scheme: PROTOCOL_NAME, + privileges: { standard: true, secure: true, corsEnabled: true, bypassCSP: true }, + }]); +} + +/** + * Register the file protocol handler on the given session. + * Must be called AFTER app.ready. + */ +export function registerSwapperFileProtocol(ses: Session): void { + ses.protocol.handle(PROTOCOL_NAME, async (request) => { + const url = new URL(request.url); + // Reconstruct the file path from the URL + // Windows: kpc-swap://C/foo/bar → C:/foo/bar + // Unix: kpc-swap:///home/foo → /home/foo + let filePath: string; + if (url.hostname) { + // Windows drive letter is the hostname + filePath = `${url.hostname}:${url.pathname}`; + } else { + filePath = url.pathname; + } + try { + return await net.fetch(`file://${filePath}`); + } catch { + return new Response('Not found', { status: 404 }); + } + }); +} + +/** + * Scans a local directory and intercepts matching Krunker asset requests, + * redirecting them to local replacement files via a custom protocol. + */ +export class ResourceSwapper { + private swapDir: string; + private swapFiles = new Map(); + private ready = false; + private scanPromise: Promise; + + constructor(swapDir: string) { + this.swapDir = swapDir; + if (!existsSync(this.swapDir)) mkdirSync(this.swapDir, { recursive: true }); + this.scanPromise = this.scanAsync(''); + } + + /** Wait for the async directory scan to complete */ + async waitForReady(): Promise { + await this.scanPromise; + this.ready = true; + } + + /** Rescan the swap directory to pick up added/removed/changed files */ + async rescan(): Promise { + this.swapFiles.clear(); + await this.scanAsync(''); + this.ready = true; + } + + /** URL filter patterns for webRequest.onBeforeRequest — single broad pattern */ + get patterns(): string[] { + return this.swapFiles.size > 0 ? [`*://*.${TARGET_DOMAIN}/*`] : []; + } + + /** + * Returns a redirect URL if the request should be swapped, null otherwise. + * Strips /assets/ prefix so both `assets.krunker.io/assets/textures/foo.png` + * and `assets.krunker.io/textures/foo.png` resolve to the same local file. + */ + getRedirect(url: string): string | null { + if (!this.ready) return null; + try { + // Extract pathname from URL using string ops (faster than new URL()) + // URLs are like: https://assets.krunker.io/path/file.ext?v=hash + const protoEnd = url.indexOf('//'); + if (protoEnd === -1) return null; + const pathStart = url.indexOf('/', protoEnd + 2); + if (pathStart === -1) return null; + const queryStart = url.indexOf('?', pathStart); + let pathname = queryStart === -1 ? url.substring(pathStart) : url.substring(pathStart, queryStart); + if (pathname.startsWith('/assets/')) pathname = pathname.substring(7); + const localPath = this.swapFiles.get(pathname); + if (localPath) return filePathToSwapURL(localPath); + } catch { /* malformed URL — ignore */ } + return null; + } + + /** Recursively scan the swap directory and build the file map (async) */ + private async scanAsync(prefix: string): Promise { + try { + const entries = await fsp.readdir(join(this.swapDir, prefix), { withFileTypes: true }); + for (const dirent of entries) { + const name = `${prefix}/${dirent.name}`; + if (dirent.isDirectory()) { + await this.scanAsync(name); + } else { + this.swapFiles.set(name, join(this.swapDir, name)); + } + } + } catch { + console.error(`Failed to scan swap directory prefix: ${prefix}`); + } + } +} diff --git a/src/main/tab-bar-html.ts b/src/main/tab-bar-html.ts new file mode 100644 index 0000000..33aacf1 --- /dev/null +++ b/src/main/tab-bar-html.ts @@ -0,0 +1,287 @@ +// ── Inline HTML for the tab bar WebContentsView ── +// Rendered as a data URL. Communicates with TabManager via ipcRenderer. + +import { THEME_CSS } from './client-ui'; + +export const TAB_BAR_HTML = ` + + + + + + + +
+ + + +`; + +export const TAB_BAR_DATA_URL = 'data:text/html;charset=utf-8,' + encodeURIComponent(TAB_BAR_HTML); diff --git a/src/main/tab-manager.ts b/src/main/tab-manager.ts new file mode 100644 index 0000000..f130966 --- /dev/null +++ b/src/main/tab-manager.ts @@ -0,0 +1,666 @@ +import { BrowserWindow, WebContentsView, View, Menu, clipboard, ipcMain, shell } from 'electron'; +import { TAB_BAR_DATA_URL } from './tab-bar-html'; +import { ALL_CLIENT_CSS } from './client-ui'; +import { electronLog } from './logger'; + +const KRUNKER_SOCIAL = 'https://krunker.io/social.html'; +const TAB_BAR_HEIGHT = 40; +const MAX_TABS = 20; + +interface TabInfo { + id: number; + view: WebContentsView; + title: string; + url: string; + loading: boolean; +} + +interface TabWindowState { + width: number; + height: number; + x: number | undefined; + y: number | undefined; + maximized: boolean; +} + +type TabMode = 'same' | 'new'; + +export class TabManager { + private tabs: TabInfo[] = []; + private activeTabId: number | null = null; + private tabBarView: WebContentsView; + private containerView: View; + private tabWindow: BrowserWindow | null = null; + private visible = false; + private nextId = 1; + private mode: TabMode; + private mainWin: BrowserWindow; + private ses: Electron.Session; + private preloadPath: string; + private isGameURL: (url: string) => boolean; + private titlePolls = new Map>(); + private recentlyClosed: { url: string; title: string }[] = []; + private getTabWindowState: () => TabWindowState; + private saveTabWindowState: (state: TabWindowState) => void; + private tabSaveTimer: ReturnType | null = null; + + constructor( + win: BrowserWindow, + ses: Electron.Session, + preloadPath: string, + mode: TabMode, + isGameURL: (url: string) => boolean, + getTabWindowState: () => TabWindowState, + saveTabWindowState: (state: TabWindowState) => void, + ) { + this.mainWin = win; + this.ses = ses; + this.preloadPath = preloadPath; + this.mode = mode; + this.isGameURL = isGameURL; + this.getTabWindowState = getTabWindowState; + this.saveTabWindowState = saveTabWindowState; + + // ── Tab bar view (shared between both modes) ── + this.tabBarView = new WebContentsView({ + webPreferences: { + nodeIntegration: true, + contextIsolation: false, + sandbox: false, + }, + }); + this.tabBarView.webContents.loadURL(TAB_BAR_DATA_URL); + + // ── Container view (holds tab bar + active tab content) ── + this.containerView = new View(); + this.containerView.addChildView(this.tabBarView); + + // Tab bar keybinds (when tab bar itself is focused) + this.tabBarView.webContents.on('before-input-event', (event, input) => { + if (input.type !== 'keyDown') return; + if (this.handleTabShortcut(event, input)) return; + }); + + if (mode === 'same') { + this.initSameWindowMode(); + } + // 'new' mode: tabWindow created lazily on first openTab() + + this.registerIPC(); + } + + // ── Same Window Mode Setup ── + private initSameWindowMode(): void { + this.mainWin.contentView.addChildView(this.containerView); + this.containerView.setVisible(false); + this.visible = false; + this.mainWin.on('resize', () => this.updateLayout()); + } + + // ── New Window Mode: create/show the tab window ── + private ensureTabWindow(): void { + if (this.tabWindow && !this.tabWindow.isDestroyed()) return; + + const saved = this.getTabWindowState(); + + this.tabWindow = new BrowserWindow({ + width: saved.width, + height: saved.height, + x: saved.x, + y: saved.y, + frame: true, + backgroundColor: '#000000', + autoHideMenuBar: true, + title: 'KCC - Tabs', + show: false, + webPreferences: { + nodeIntegration: false, + contextIsolation: true, + sandbox: true, + }, + }); + this.tabWindow.removeMenu(); + + if (saved.maximized) this.tabWindow.maximize(); + + this.tabWindow.contentView.addChildView(this.containerView); + this.containerView.setVisible(true); + + this.tabWindow.on('resize', () => { + this.updateLayout(); + this.debounceSaveTabWindow(); + }); + this.tabWindow.on('move', () => this.debounceSaveTabWindow()); + this.tabWindow.on('close', () => { + // Flush pending save before the window is destroyed + if (this.tabSaveTimer) clearTimeout(this.tabSaveTimer); + if (this.tabWindow && !this.tabWindow.isDestroyed()) { + const bounds = this.tabWindow.getBounds(); + this.saveTabWindowState({ + width: bounds.width, + height: bounds.height, + x: bounds.x, + y: bounds.y, + maximized: this.tabWindow.isMaximized(), + }); + } + }); + this.tabWindow.on('closed', () => { + this.destroyAllTabs(); + this.tabWindow = null; + }); + + this.tabWindow.show(); + } + + private debounceSaveTabWindow(): void { + if (this.tabSaveTimer) clearTimeout(this.tabSaveTimer); + this.tabSaveTimer = setTimeout(() => { + if (!this.tabWindow || this.tabWindow.isDestroyed()) return; + const bounds = this.tabWindow.getBounds(); + this.saveTabWindowState({ + width: bounds.width, + height: bounds.height, + x: bounds.x, + y: bounds.y, + maximized: this.tabWindow.isMaximized(), + }); + }, 1000); + } + + // ── IPC from tab bar ── + private registerIPC(): void { + ipcMain.on('tab-switch', (_e, id: number) => this.switchToTab(id)); + ipcMain.on('tab-close', (_e, id: number) => this.closeTab(id)); + ipcMain.on('tab-new', () => this.openTab(KRUNKER_SOCIAL)); + ipcMain.on('tab-reorder', (_e, fromId: number, toId: number, side: string) => { + this.reorderTab(fromId, toId, side as 'before' | 'after'); + }); + ipcMain.on('tab-back-to-game', () => { + if (this.mode === 'same') { + this.hideTabs(); + } else { + this.mainWin.focus(); + } + }); + } + + // ── Open a new tab ── + openTab(url: string): number { + if (this.tabs.length >= MAX_TABS) { + const existing = this.tabs.find(t => t.url === url); + if (existing) { + this.switchToTab(existing.id); + return existing.id; + } + electronLog.warn('[KCC-Tabs] Tab limit reached, ignoring openTab'); + return -1; + } + + const id = this.nextId++; + const view = this.createTabView(id); + const tab: TabInfo = { id, view, title: this.titleFromUrl(url), url, loading: true }; + this.tabs.push(tab); + + if (this.mode === 'new') { + this.ensureTabWindow(); + } + + this.switchToTab(id); + this.showTabs(); + view.webContents.loadURL(url); + + return id; + } + + // ── Create a WebContentsView for a tab ── + private createTabView(tabId: number): WebContentsView { + const view = new WebContentsView({ + webPreferences: { + preload: this.preloadPath, + session: this.ses, + contextIsolation: false, + nodeIntegration: false, + sandbox: false, + spellcheck: false, + }, + }); + + const wc = view.webContents; + + wc.on('did-finish-load', () => { + wc.insertCSS(ALL_CLIENT_CSS).catch(() => {}); + wc.send('main_did-finish-load-tab'); + ipcMain.emit('throttle-state', { sender: wc } as any, 'menu'); + this.updateTabInfo(tabId, { loading: false }); + this.startTitleWatcher(tabId, wc); + }); + + wc.on('did-start-loading', () => { + this.updateTabInfo(tabId, { loading: true }); + }); + + wc.on('did-stop-loading', () => { + this.updateTabInfo(tabId, { loading: false }); + }); + + wc.on('page-title-updated', (_e, title) => { + if (this.isGenericTitle(title)) return; + this.updateTabInfo(tabId, { title }); + }); + + wc.on('did-navigate', (_e, url) => { + this.updateTabInfo(tabId, { url, title: this.titleFromUrl(url) }); + }); + + wc.setWindowOpenHandler(({ url: linkUrl }) => { + if (linkUrl.includes('krunker.io')) { + if (this.isGameURL(linkUrl)) { + this.mainWin.loadURL(linkUrl); + if (this.mode === 'same') this.hideTabs(); + else this.mainWin.focus(); + } else { + setImmediate(() => this.openTab(linkUrl)); + } + } else { + setImmediate(() => shell.openExternal(linkUrl)); + } + return { action: 'deny' as const }; + }); + + wc.on('will-navigate', (event, navUrl) => { + if (navUrl.includes('krunker.io') && this.isGameURL(navUrl)) { + event.preventDefault(); + this.mainWin.loadURL(navUrl); + if (this.mode === 'same') this.hideTabs(); + else this.mainWin.focus(); + } + }); + + wc.on('context-menu', (_e, params) => { + if (!params.linkURL) return; + const items: Electron.MenuItemConstructorOptions[] = []; + if (params.linkURL.includes('krunker.io') && !this.isGameURL(params.linkURL)) { + items.push({ label: 'Open in New Tab', click: () => this.openTab(params.linkURL) }); + } + items.push({ label: 'Copy Link', click: () => clipboard.writeText(params.linkURL) }); + if (!params.linkURL.includes('krunker.io')) { + items.push({ label: 'Open in Browser', click: () => shell.openExternal(params.linkURL) }); + } + if (items.length) Menu.buildFromTemplate(items).popup(); + }); + + wc.on('before-input-event', (event, input) => { + if (input.type !== 'keyDown') return; + if (this.handleTabShortcut(event, input)) return; + if (input.key === 'F12' && !input.control && !input.shift && !input.alt) { + wc.toggleDevTools(); + event.preventDefault(); + } + }); + + return view; + } + + // ── Switch active tab ── + switchToTab(id: number): void { + const tab = this.tabs.find(t => t.id === id); + if (!tab) return; + + if (this.activeTabId !== null) { + const prev = this.tabs.find(t => t.id === this.activeTabId); + if (prev) { + this.containerView.removeChildView(prev.view); + } + } + + this.activeTabId = id; + this.containerView.addChildView(tab.view); + this.updateLayout(); + this.broadcastTabState(); + } + + // ── Close a tab ── + closeTab(id: number): void { + const idx = this.tabs.findIndex(t => t.id === id); + if (idx === -1) return; + + const tab = this.tabs[idx]; + + if (this.activeTabId === id) { + this.containerView.removeChildView(tab.view); + this.activeTabId = null; + } + + this.recentlyClosed.push({ url: tab.url, title: tab.title }); + if (this.recentlyClosed.length > 10) this.recentlyClosed.shift(); + + this.stopTitleWatcher(id); + tab.view.webContents.close(); + this.tabs.splice(idx, 1); + + if (this.tabs.length > 0) { + const nextIdx = Math.min(idx, this.tabs.length - 1); + this.switchToTab(this.tabs[nextIdx].id); + } else { + if (this.mode === 'same') { + this.hideTabs(); + } else { + if (this.tabWindow && !this.tabWindow.isDestroyed()) { + this.tabWindow.contentView.removeChildView(this.containerView); + this.tabWindow.close(); + } + } + } + + this.broadcastTabState(); + } + + // ── Show / hide tabs ── + showTabs(): void { + if (this.mode === 'same') { + this.containerView.setVisible(true); + this.visible = true; + this.updateLayout(); + } else { + this.ensureTabWindow(); + if (this.tabWindow && !this.tabWindow.isDestroyed()) { + this.tabWindow.show(); + this.tabWindow.focus(); + } + this.visible = true; + } + } + + hideTabs(): void { + if (this.mode === 'same') { + this.containerView.setVisible(false); + this.visible = false; + this.mainWin.focus(); + } else { + this.mainWin.focus(); + this.visible = false; + } + } + + // ── Tab navigation ── + nextTab(): void { + if (this.tabs.length < 2 || this.activeTabId === null) return; + const idx = this.tabs.findIndex(t => t.id === this.activeTabId); + const next = (idx + 1) % this.tabs.length; + this.switchToTab(this.tabs[next].id); + } + + prevTab(): void { + if (this.tabs.length < 2 || this.activeTabId === null) return; + const idx = this.tabs.findIndex(t => t.id === this.activeTabId); + const prev = (idx - 1 + this.tabs.length) % this.tabs.length; + this.switchToTab(this.tabs[prev].id); + } + + closeCurrentTab(): void { + if (this.activeTabId !== null) this.closeTab(this.activeTabId); + } + + // ── Reorder tabs via drag ── + reorderTab(fromId: number, toId: number, side: 'before' | 'after'): void { + const fromIdx = this.tabs.findIndex(t => t.id === fromId); + const toIdx = this.tabs.findIndex(t => t.id === toId); + if (fromIdx === -1 || toIdx === -1 || fromIdx === toIdx) return; + + const [tab] = this.tabs.splice(fromIdx, 1); + let insertIdx = this.tabs.findIndex(t => t.id === toId); + if (side === 'after') insertIdx++; + this.tabs.splice(insertIdx, 0, tab); + this.broadcastTabState(); + } + + // ── Jump to tab by position (0-based, -1 = last) ── + switchToTabByIndex(index: number): void { + if (this.tabs.length === 0) return; + if (index < 0 || index >= this.tabs.length) index = this.tabs.length - 1; + this.switchToTab(this.tabs[index].id); + } + + // ── Reopen last closed tab ── + reopenTab(): void { + const entry = this.recentlyClosed.pop(); + if (entry) this.openTab(entry.url); + } + + // ── Shared shortcut handler (returns true if handled) ── + private handleTabShortcut(event: Electron.Event, input: Electron.Input): boolean { + if (input.key === 'Escape' && !input.control && !input.shift && !input.alt) { + if (this.mode === 'same') this.hideTabs(); + else this.mainWin.focus(); + event.preventDefault(); + return true; + } else if (input.key === 'w' && input.control && !input.shift && !input.alt) { + this.closeCurrentTab(); + event.preventDefault(); + return true; + } else if (input.key === 'Tab' && input.control && !input.shift && !input.alt) { + this.nextTab(); + event.preventDefault(); + return true; + } else if (input.key === 'Tab' && input.control && input.shift && !input.alt) { + this.prevTab(); + event.preventDefault(); + return true; + } else if (input.key === 't' && input.control && !input.shift && !input.alt) { + this.openTab(KRUNKER_SOCIAL); + event.preventDefault(); + return true; + } else if (input.key === 'T' && input.control && input.shift && !input.alt) { + this.reopenTab(); + event.preventDefault(); + return true; + } else if (input.key >= '1' && input.key <= '8' && input.control && !input.shift && !input.alt) { + this.switchToTabByIndex(parseInt(input.key) - 1); + event.preventDefault(); + return true; + } else if (input.key === '9' && input.control && !input.shift && !input.alt) { + this.switchToTabByIndex(-1); + event.preventDefault(); + return true; + } + return false; + } + + // ── Cleanup ── + destroyAll(): void { + this.destroyAllTabs(); + + ipcMain.removeAllListeners('tab-switch'); + ipcMain.removeAllListeners('tab-close'); + ipcMain.removeAllListeners('tab-new'); + ipcMain.removeAllListeners('tab-reorder'); + ipcMain.removeAllListeners('tab-back-to-game'); + + if (this.tabWindow && !this.tabWindow.isDestroyed()) { + this.tabWindow.contentView.removeChildView(this.containerView); + this.tabWindow.close(); + this.tabWindow = null; + } + + if (this.mode === 'same') { + try { this.mainWin.contentView.removeChildView(this.containerView); } catch { /* may already be removed */ } + } + } + + private destroyAllTabs(): void { + for (const tab of this.tabs) { + this.stopTitleWatcher(tab.id); + if (this.activeTabId === tab.id) { + this.containerView.removeChildView(tab.view); + } + if (!tab.view.webContents.isDestroyed()) { + tab.view.webContents.close(); + } + } + this.tabs = []; + this.activeTabId = null; + this.broadcastTabState(); + } + + // ── Layout ── + private updateLayout(): void { + let bounds: { width: number; height: number }; + + if (this.mode === 'same') { + const [w, h] = this.mainWin.getContentSize(); + bounds = { width: w, height: h }; + this.containerView.setBounds({ x: 0, y: 0, width: w, height: h }); + } else if (this.tabWindow && !this.tabWindow.isDestroyed()) { + const [w, h] = this.tabWindow.getContentSize(); + bounds = { width: w, height: h }; + this.containerView.setBounds({ x: 0, y: 0, width: w, height: h }); + } else { + return; + } + + this.tabBarView.setBounds({ + x: 0, y: 0, + width: bounds.width, + height: TAB_BAR_HEIGHT, + }); + + if (this.activeTabId !== null) { + const tab = this.tabs.find(t => t.id === this.activeTabId); + if (tab) { + tab.view.setBounds({ + x: 0, + y: TAB_BAR_HEIGHT, + width: bounds.width, + height: bounds.height - TAB_BAR_HEIGHT, + }); + } + } + } + + // ── Update tab metadata and broadcast ── + private updateTabInfo(id: number, updates: Partial>): void { + const tab = this.tabs.find(t => t.id === id); + if (!tab) return; + if (updates.title !== undefined) tab.title = updates.title; + if (updates.url !== undefined) tab.url = updates.url; + if (updates.loading !== undefined) tab.loading = updates.loading; + this.broadcastTabState(); + } + + private broadcastTabState(): void { + if (this.tabBarView.webContents.isDestroyed()) return; + const data = this.tabs.map(t => ({ + id: t.id, + title: t.title, + active: t.id === this.activeTabId, + loading: t.loading, + })); + this.tabBarView.webContents.send('tabs-update', data); + } + + private static readonly GENERIC_TITLES = new Set([ + 'krunker hub', 'krunker', 'krunker.io', '', + 'hub', 'social', 'profile', 'new tab', 'loading...', + ]); + + private isGenericTitle(title: string): boolean { + return TabManager.GENERIC_TITLES.has(title.toLowerCase().trim()); + } + + // ── Persistent URL watcher + DOM title extraction ── + private startTitleWatcher(tabId: number, wc: Electron.WebContents): void { + const existing = this.titlePolls.get(tabId); + if (existing) clearInterval(existing); + + let lastUrl = ''; + let lastDom = ''; + const poll = setInterval(() => { + if (wc.isDestroyed()) { + clearInterval(poll); + this.titlePolls.delete(tabId); + return; + } + wc.executeJavaScript( + `(function() { + var url = window.location.href; + var title = ''; + var ph = document.getElementById('profileHolder'); + if (ph && ph.style.display === 'block') { + var ns = document.getElementById('nameSwitch'); + if (ns && ns.innerText) title = ns.innerText; + } + return JSON.stringify({ url: url, dom: title }); + })()` + ).then((json: string) => { + const { url, dom } = JSON.parse(json); + if (url === lastUrl && dom === lastDom) return; + lastUrl = url; + lastDom = dom; + + const tab = this.tabs.find(t => t.id === tabId); + if (!tab) return; + + if (dom) { + if (tab.title !== dom) { + this.updateTabInfo(tabId, { url, title: dom }); + } else if (tab.url !== url) { + this.updateTabInfo(tabId, { url }); + } + return; + } + + if (tab.url !== url) { + this.updateTabInfo(tabId, { url, title: this.titleFromUrl(url) }); + } + }).catch(() => {}); + }, 1000); + this.titlePolls.set(tabId, poll); + } + + private stopTitleWatcher(tabId: number): void { + const poll = this.titlePolls.get(tabId); + if (poll) { + clearInterval(poll); + this.titlePolls.delete(tabId); + } + } + + // ── Extract a display title from URL ── + private titleFromUrl(url: string): string { + try { + const parsed = new URL(url); + const p = parsed.searchParams.get('p'); + const q = parsed.searchParams.get('q'); + + if (q) return q; + + if (p) { + const pageMap: Record = { + profile: 'Profile', + leaders: 'Leaderboard', + games: 'Games', + clans: 'Clans', + skins: 'Skins', + mods: 'Mods', + maps: 'Maps', + editor: 'Editor', + market: 'Market', + itemsales: 'Market Item', + inventory: 'Inventory', + settings: 'Settings', + feed: 'Hub', + }; + return pageMap[p] || p.charAt(0).toUpperCase() + p.slice(1); + } + + const path = parsed.pathname.replace(/\.html$/, '').replace(/^\//, ''); + if (path === 'social') return 'Hub'; + if (path) return path.charAt(0).toUpperCase() + path.slice(1); + + return 'New Tab'; + } catch { + return 'New Tab'; + } + } +} diff --git a/src/main/update-window.ts b/src/main/update-window.ts new file mode 100644 index 0000000..ae1cdf8 --- /dev/null +++ b/src/main/update-window.ts @@ -0,0 +1,96 @@ +import { BrowserWindow } from 'electron'; + +const UPDATE_HTML = ` + + + + + + +

Krunker Civilian Client

+
Checking for updates...
+
+
+
+ + +`; + +const UPDATE_DATA_URL = 'data:text/html;charset=utf-8,' + encodeURIComponent(UPDATE_HTML); + +export function showUpdateWindow(): { window: BrowserWindow; sendProgress: (message: string, percent?: number) => void } { + const win = new BrowserWindow({ + width: 450, + height: 180, + resizable: false, + alwaysOnTop: true, + backgroundColor: '#1a1a2e', + autoHideMenuBar: true, + title: 'Krunker Civilian Client - Update', + webPreferences: { + nodeIntegration: true, + contextIsolation: false, + sandbox: false, + }, + }); + win.removeMenu(); + + win.loadURL(UPDATE_DATA_URL); + + function sendProgress(message: string, percent?: number): void { + if (!win.isDestroyed()) { + win.webContents.send('update-progress', message, percent); + } + } + + return { window: win, sendProgress }; +} diff --git a/src/main/updater.ts b/src/main/updater.ts new file mode 100644 index 0000000..00cc96e --- /dev/null +++ b/src/main/updater.ts @@ -0,0 +1,245 @@ +import { get as httpsGet } from 'https'; +import { createWriteStream, renameSync, unlinkSync, existsSync } from 'fs'; +import { spawn } from 'child_process'; +import { app } from 'electron'; +import { electronLog } from './logger'; + +export interface UpdateInfo { + version: string; + downloadUrl: string; + fileSize: number; +} + +export type ProgressCallback = (percent: number) => void; + +const UPDATE_CONFIG = { + // Gitea provider + checkUrl: 'https://gitea.crjlab.net/api/v1/repos/bigjakk/Krunker-Civilian-Client/releases/latest', + assetPattern: /Setup\.exe$/i, + // Allowed hosts for update check and download (including redirects) + allowedHosts: ['gitea.crjlab.net'], +}; + +const CHECK_TIMEOUT_MS = 10000; +const DOWNLOAD_TIMEOUT_MS = 300000; // 5 minutes + +/** + * Validate that a redirect URL stays on an allowed host. + */ +function isAllowedRedirect(url: string): boolean { + try { + const parsed = new URL(url); + return UPDATE_CONFIG.allowedHosts.some(h => parsed.hostname === h || parsed.hostname.endsWith('.' + h)); + } catch { + return false; + } +} + +/** + * Simple semver comparison: returns true if a < b. + * Handles versions like "0.1.0", "1.2.3". + */ +function versionLessThan(a: string, b: string): boolean { + const pa = a.split('.').map(Number); + const pb = b.split('.').map(Number); + const len = Math.max(pa.length, pb.length); + for (let i = 0; i < len; i++) { + const na = pa[i] || 0; + const nb = pb[i] || 0; + if (na < nb) return true; + if (na > nb) return false; + } + return false; +} + +export function checkForUpdate(currentVersion: string): Promise { + return new Promise((resolve) => { + electronLog.log('[KCC-Update] Checking for updates at:', UPDATE_CONFIG.checkUrl); + electronLog.log('[KCC-Update] Current version:', currentVersion); + + const req = httpsGet(UPDATE_CONFIG.checkUrl, { + headers: { 'User-Agent': 'KrunkerCivilianClient/' + currentVersion }, + }, (res) => { + electronLog.log('[KCC-Update] Check response status:', res.statusCode); + // Follow redirects (with domain validation) + if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { + const redirectUrl = res.headers.location; + electronLog.log('[KCC-Update] Redirected to:', redirectUrl); + if (!isAllowedRedirect(redirectUrl)) { + electronLog.error('[KCC-Update] Redirect to untrusted host blocked:', redirectUrl); + resolve(null); + return; + } + httpsGet(redirectUrl, { + headers: { 'User-Agent': 'KrunkerCivilianClient/' + currentVersion }, + }, (redirectRes) => { + electronLog.log('[KCC-Update] Redirect response status:', redirectRes.statusCode); + handleResponse(redirectRes); + }).on('error', (err) => { + electronLog.error('[KCC-Update] Redirect error:', err); + resolve(null); + }); + return; + } + handleResponse(res); + }); + + function handleResponse(res: import('http').IncomingMessage): void { + if (res.statusCode !== 200) { + electronLog.error('[KCC-Update] Check returned status', res.statusCode); + resolve(null); + return; + } + + let data = ''; + res.on('data', (chunk: string) => { data += chunk; }); + res.on('end', () => { + try { + const release = JSON.parse(data); + const tagName: string = release.tag_name || ''; + const remoteVersion = tagName.replace(/^v/i, ''); + electronLog.log('[KCC-Update] Latest release:', remoteVersion, '| Current:', currentVersion); + + if (!remoteVersion || !versionLessThan(currentVersion, remoteVersion)) { + electronLog.log('[KCC-Update] Already up to date'); + resolve(null); + return; + } + + const assets: Array<{ name: string; browser_download_url: string; size: number }> = release.assets || []; + const setupAsset = assets.find((a) => UPDATE_CONFIG.assetPattern.test(a.name)); + if (!setupAsset) { + electronLog.error('[KCC-Update] No Setup.exe asset found in release', remoteVersion); + resolve(null); + return; + } + + // Validate the download URL points to an allowed host + if (!isAllowedRedirect(setupAsset.browser_download_url)) { + electronLog.error('[KCC-Update] Download URL points to untrusted host:', setupAsset.browser_download_url); + resolve(null); + return; + } + + electronLog.log('[KCC-Update] Update available:', remoteVersion, '| Download:', setupAsset.browser_download_url, '| Size:', setupAsset.size); + resolve({ + version: remoteVersion, + downloadUrl: setupAsset.browser_download_url, + fileSize: setupAsset.size, + }); + } catch (err) { + electronLog.error('[KCC-Update] Failed to parse release data:', err); + resolve(null); + } + }); + res.on('error', (err) => { + electronLog.error('[KCC-Update] Response error:', err); + resolve(null); + }); + } + + req.setTimeout(CHECK_TIMEOUT_MS, () => { + electronLog.error('[KCC-Update] Check timed out after', CHECK_TIMEOUT_MS, 'ms'); + req.destroy(); + resolve(null); + }); + + req.on('error', (err) => { + electronLog.error('[KCC-Update] Check error:', err); + resolve(null); + }); + }); +} + +export function downloadUpdate(url: string, destPath: string, onProgress: ProgressCallback): Promise { + return new Promise((resolve, reject) => { + const tmpPath = destPath + '.tmp'; + + function doDownload(downloadUrl: string, redirectCount = 0): void { + if (redirectCount > 5) { + reject(new Error('Too many redirects')); + return; + } + electronLog.log('[KCC-Update] Downloading from:', downloadUrl); + const req = httpsGet(downloadUrl, { + headers: { 'User-Agent': 'KrunkerCivilianClient' }, + }, (res) => { + // Follow redirects (with domain validation) + if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { + const redirectUrl = res.headers.location; + electronLog.log('[KCC-Update] Download redirected to:', redirectUrl); + if (!isAllowedRedirect(redirectUrl)) { + electronLog.error('[KCC-Update] Download redirect to untrusted host blocked:', redirectUrl); + reject(new Error('Download redirect to untrusted host: ' + redirectUrl)); + return; + } + doDownload(redirectUrl, redirectCount + 1); + return; + } + + if (res.statusCode !== 200) { + electronLog.error('[KCC-Update] Download returned status', res.statusCode, 'from:', downloadUrl); + reject(new Error('Download returned status ' + res.statusCode)); + return; + } + + const total = parseInt(res.headers['content-length'] || '0', 10); + let received = 0; + + const file = createWriteStream(tmpPath); + res.on('data', (chunk: Buffer) => { + received += chunk.length; + if (total > 0) { + onProgress(Math.round(100 * received / total)); + } + }); + res.pipe(file); + + file.on('finish', () => { + file.close(() => { + try { + if (existsSync(destPath)) unlinkSync(destPath); + renameSync(tmpPath, destPath); + resolve(); + } catch (err) { + reject(err); + } + }); + }); + + file.on('error', (err) => { + try { unlinkSync(tmpPath); } catch { /* ignore */ } + reject(err); + }); + + res.on('error', (err) => { + try { unlinkSync(tmpPath); } catch { /* ignore */ } + reject(err); + }); + }); + + req.setTimeout(DOWNLOAD_TIMEOUT_MS, () => { + req.destroy(); + try { unlinkSync(tmpPath); } catch { /* ignore */ } + reject(new Error('Download timed out')); + }); + + req.on('error', (err) => { + try { unlinkSync(tmpPath); } catch { /* ignore */ } + reject(err); + }); + } + + doDownload(url); + }); +} + +export function installUpdate(installerPath: string): void { + electronLog.log('[KCC-Update] Launching installer:', installerPath); + const child = spawn(installerPath, [], { + detached: true, + stdio: 'ignore', + }); + child.unref(); + app.quit(); +} diff --git a/src/main/userscripts.ts b/src/main/userscripts.ts new file mode 100644 index 0000000..afb0cf6 --- /dev/null +++ b/src/main/userscripts.ts @@ -0,0 +1,99 @@ +import { mkdirSync, promises as fsp } from 'fs'; +import { join, parse } from 'path'; + +export interface ScriptFile { + filename: string; + content: string; + fullpath: string; +} + +export type ScriptTracker = Record; + +/** + * Manages userscript files, tracker state, and per-script preferences. + * Scripts live in a `scripts/` subdirectory; tracker.json records enabled/disabled state; + * per-script preferences are stored in `scripts/preferences/.json`. + */ +export class UserscriptManager { + private scriptsDir: string; + private prefsDir: string; + private trackerPath: string; + + constructor(baseDir: string) { + this.scriptsDir = join(baseDir, 'scripts'); + this.prefsDir = join(this.scriptsDir, 'preferences'); + this.trackerPath = join(this.scriptsDir, 'tracker.json'); + mkdirSync(this.scriptsDir, { recursive: true }); + mkdirSync(this.prefsDir, { recursive: true }); + } + + get dir(): string { + return this.scriptsDir; + } + + /** Read all .js files from the scripts directory */ + async scanScripts(): Promise { + const scripts: ScriptFile[] = []; + try { + for (const entry of await fsp.readdir(this.scriptsDir, { withFileTypes: true })) { + if (!entry.isFile() || !entry.name.endsWith('.js')) continue; + const fullpath = join(this.scriptsDir, entry.name); + try { + const content = await fsp.readFile(fullpath, 'utf-8'); + scripts.push({ filename: entry.name, content, fullpath }); + } catch { /* skip unreadable files */ } + } + } catch { /* directory read failed */ } + return scripts; + } + + /** Load tracker.json, add new scripts as disabled, prune deleted scripts */ + async loadTracker(scripts: ScriptFile[]): Promise { + let tracker: ScriptTracker; + try { + tracker = JSON.parse(await fsp.readFile(this.trackerPath, 'utf-8')); + } catch { tracker = {}; } + + const filenames = new Set(scripts.map(s => s.filename)); + let dirty = false; + + // Add new scripts as disabled + for (const name of filenames) { + if (!(name in tracker)) { tracker[name] = false; dirty = true; } + } + + // Prune deleted scripts + for (const name of Object.keys(tracker)) { + if (!filenames.has(name)) { delete tracker[name]; dirty = true; } + } + + if (dirty) await this.saveTracker(tracker); + return tracker; + } + + /** Write tracker.json */ + async saveTracker(tracker: ScriptTracker): Promise { + try { + await fsp.writeFile(this.trackerPath, JSON.stringify(tracker, null, 2), 'utf-8'); + } catch { /* write failed */ } + } + + /** Load per-script preferences from preferences/.json */ + async loadScriptPrefs(filename: string): Promise> { + const name = parse(filename).name; + const prefsPath = join(this.prefsDir, name + '.json'); + try { + return JSON.parse(await fsp.readFile(prefsPath, 'utf-8')); + } catch { /* parse failed or file not found */ } + return {}; + } + + /** Save per-script preferences to preferences/.json */ + async saveScriptPrefs(filename: string, prefs: Record): Promise { + const name = parse(filename).name; + const prefsPath = join(this.prefsDir, name + '.json'); + try { + await fsp.writeFile(prefsPath, JSON.stringify(prefs, null, 2), 'utf-8'); + } catch { /* write failed */ } + } +} diff --git a/src/preload/changelog.ts b/src/preload/changelog.ts new file mode 100644 index 0000000..3d30cde --- /dev/null +++ b/src/preload/changelog.ts @@ -0,0 +1,129 @@ +// ── Changelog Popup ── +// Shows release notes in a Shadow DOM modal when the client version changes. + +import { ipcRenderer } from 'electron'; + +function versionLessThan(a: string, b: string): boolean { + const pa = a.split('.').map(Number); + const pb = b.split('.').map(Number); + const len = Math.max(pa.length, pb.length); + for (let i = 0; i < len; i++) { + const na = pa[i] || 0; + const nb = pb[i] || 0; + if (na < nb) return true; + if (na > nb) return false; + } + return false; +} + +function renderMarkdown(md: string): string { + const html = md + .replace(/### (.+)/g, '

$1

') + .replace(/## (.+)/g, '

$1

') + .replace(/# (.+)/g, '

$1

') + .replace(/\*\*(.+?)\*\*/g, '$1') + .replace(/\*(.+?)\*/g, '$1') + .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1'); + + // Convert list items + const lines = html.split('\n'); + let inList = false; + const out: string[] = []; + for (const line of lines) { + if (line.trimStart().startsWith('- ')) { + if (!inList) { out.push('
    '); inList = true; } + out.push('
  • ' + line.trimStart().slice(2) + '
  • '); + } else { + if (inList) { out.push('
'); inList = false; } + out.push(line); + } + } + if (inList) out.push(''); + + return out.join('\n').replace(/\n\n/g, '

').replace(/\n/g, '
'); +} + +function showChangelogPopup(version: string, body: string): void { + const host = document.createElement('div'); + host.id = 'kpc-changelog-host'; + const shadow = host.attachShadow({ mode: 'closed' }); + + const style = document.createElement('style'); + style.textContent = ` + .overlay { + position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; + background: rgba(0,0,0,0.75); z-index: 99998; + display: flex; justify-content: center; align-items: center; + font-family: 'Segoe UI', sans-serif; color: #e0e0e0; + } + .modal { + background: #1a1a2e; border-radius: 12px; padding: 24px; + min-width: 400px; max-width: 600px; max-height: 70vh; + display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,0.5); + } + .header { + display: flex; justify-content: space-between; align-items: center; + margin-bottom: 16px; + } + .header h2 { margin: 0; font-size: 1.4rem; color: #fff; } + .close-btn { + background: none; border: none; color: #888; font-size: 1.5rem; + cursor: pointer; padding: 4px 8px; border-radius: 4px; + } + .close-btn:hover { color: #fff; background: rgba(255,255,255,0.1); } + .body { + overflow-y: auto; flex: 1; line-height: 1.6; + } + .body h1 { font-size: 1.3rem; color: #fff; margin: 12px 0 6px; } + .body h2 { font-size: 1.15rem; color: #fff; margin: 10px 0 6px; } + .body h3 { font-size: 1rem; color: #ccc; margin: 8px 0 4px; } + .body ul { padding-left: 20px; margin: 6px 0; } + .body li { margin: 3px 0; } + .body a { color: #6ea8fe; } + .body strong { color: #fff; } + `; + + const overlay = document.createElement('div'); + overlay.className = 'overlay'; + overlay.addEventListener('click', (e) => { + if (e.target === overlay) host.remove(); + }); + + const modal = document.createElement('div'); + modal.className = 'modal'; + + const header = document.createElement('div'); + header.className = 'header'; + header.innerHTML = `

What's New in v${version}

`; + const closeBtn = document.createElement('button'); + closeBtn.className = 'close-btn'; + closeBtn.textContent = '\u2715'; + closeBtn.addEventListener('click', () => host.remove()); + header.appendChild(closeBtn); + + const bodyDiv = document.createElement('div'); + bodyDiv.className = 'body'; + bodyDiv.innerHTML = renderMarkdown(body); + + modal.appendChild(header); + modal.appendChild(bodyDiv); + overlay.appendChild(modal); + shadow.appendChild(style); + shadow.appendChild(overlay); + document.body.appendChild(host); +} + +export async function checkChangelog(currentVersion: string, lastSeenVersion: string): Promise { + if (lastSeenVersion && !versionLessThan(lastSeenVersion, currentVersion)) return; + + // Update lastSeenVersion regardless of whether we can fetch notes + ipcRenderer.invoke('set-config', 'ui', { + ...await ipcRenderer.invoke('get-config', 'ui'), + lastSeenVersion: currentVersion, + }); + + try { + const body = await ipcRenderer.invoke('changelog-fetch', currentVersion); + if (body) showChangelogPopup(currentVersion, body); + } catch { /* fetch failed — skip silently */ } +} diff --git a/src/preload/chat.ts b/src/preload/chat.ts new file mode 100644 index 0000000..165effe --- /dev/null +++ b/src/preload/chat.ts @@ -0,0 +1,122 @@ +// ── Better Chat + Chat History ── +// Merges team/all chat with [T]/[M] prefixes and prevents Krunker from pruning old messages. + +import type { SavedConsole } from './utils'; + +const TEAM_MODES = new Set([ + 'Team Deathmatch', 'Hardpoint', 'Capture the Flag', 'Hide & Seek', + 'Infected', 'Last Man Standing', 'Simon Says', 'Prop Hunt', + 'Boss Hunt', 'Deposit', 'Stalker', 'Kill Confirmed', + 'Defuse', 'Traitor', 'Blitz', 'Domination', + 'Squad Deathmatch', 'Team Defender', +]); + +let chatList: HTMLElement | null = null; +let observer: MutationObserver | null = null; +let historyMax = 0; +let betterChatEnabled = false; +let reInsertGuard = false; +let _con: SavedConsole | null = null; + +function isChatMessage(node: Node): node is HTMLElement { + return node.nodeType === 1 && (node as HTMLElement).id?.startsWith('chatMsg_'); +} + +function isTeamMode(): boolean { + const modeEl = document.getElementById('gameModeLabel') || document.getElementById('subGameMode'); + if (!modeEl) return false; + return TEAM_MODES.has(modeEl.textContent?.trim() || ''); +} + +function handleMutations(mutations: MutationRecord[]): void { + // ── Chat history: re-insert removed messages ── + if (historyMax > 0 && chatList && observer) { + const removed: HTMLElement[] = []; + for (const mut of mutations) { + if (reInsertGuard) break; + for (const node of mut.removedNodes) { + if (isChatMessage(node)) removed.push(node); + } + } + if (removed.length > 0) { + reInsertGuard = true; + observer.disconnect(); + const firstLive = chatList.firstChild; + for (const node of removed) { + chatList.insertBefore(node, firstLive); + } + while (chatList.children.length > historyMax) { + chatList.removeChild(chatList.firstChild!); + } + observer.observe(chatList, { childList: true }); + reInsertGuard = false; + } + } + + // ── Better chat: tag new messages ── + if (betterChatEnabled) { + const teamMode = isTeamMode(); + for (const mut of mutations) { + for (const node of mut.addedNodes) { + if (!isChatMessage(node)) continue; + const chatMsg = node.querySelector('.chatMsg'); + if (!chatMsg) continue; + + // Remove "Text & Voice Chat" system messages + if (chatMsg.textContent?.includes('Text & Voice Chat')) { + node.remove(); + continue; + } + + // Only tag in team modes with proper chat messages + if (!teamMode) continue; + if (!chatMsg.innerHTML.includes('\u202E:')) continue; + if (!node.dataset.tab) continue; + + const isTeam = node.dataset.tab === '1'; + const tag = document.createElement('div'); + tag.style.cssText = 'float:left; margin-right:4px; font-weight:bold;'; + tag.style.color = isTeam ? '#00FF00' : '#FF0000'; + tag.textContent = isTeam ? '[T]' : '[M]'; + chatMsg.insertBefore(tag, chatMsg.firstChild); + } + } + } + + // Auto-scroll unless paused + if (chatList && !chatList.classList.contains('kpc-chat-paused')) { + chatList.scrollTop = chatList.scrollHeight; + } +} + +function tryAttach(): boolean { + chatList = document.getElementById('chatList'); + if (!chatList) return false; + + observer = new MutationObserver(handleMutations); + observer.observe(chatList, { childList: true }); + _con?.log('[KCC-Chat] Observer attached to #chatList'); + return true; +} + +export function initChat(options: { betterChat: boolean; chatHistorySize: number }, con?: SavedConsole): void { + _con = con ?? null; + betterChatEnabled = options.betterChat; + historyMax = options.chatHistorySize; + + if (tryAttach()) return; + + // Poll until #chatList appears + let attempts = 0; + const poll = setInterval(() => { + if (++attempts > 120 || tryAttach()) clearInterval(poll); + }, 500); +} + +export function setBetterChat(enabled: boolean): void { + betterChatEnabled = enabled; +} + +export function setChatHistorySize(size: number): void { + historyMax = size; +} diff --git a/src/preload/competitive.ts b/src/preload/competitive.ts new file mode 100644 index 0000000..d463c0e --- /dev/null +++ b/src/preload/competitive.ts @@ -0,0 +1,68 @@ +// ── Hardpoint Enemy Counter ── +// Displays enemy capture points being scored in Hardpoint mode. + +let hpObserver: MutationObserver | null = null; +let hpCounterEl: HTMLElement | null = null; +let hpPointCounter: HTMLElement | null = null; +let hpEnemyOBJ = 0; +let hpTimeout: ReturnType | null = null; +let hpCheckInterval: ReturnType | null = null; + +function processTeamScores(): void { + const teams = document.querySelectorAll('#tScoreC1, #tScoreC2'); + for (const team of teams) { + if (team.className.includes('you')) continue; + const scoreEl = team.nextElementSibling; + if (!scoreEl) continue; + + const currentScore = parseInt(scoreEl.textContent || '0', 10); + if (currentScore > hpEnemyOBJ && hpPointCounter) { + hpPointCounter.textContent = String((currentScore - hpEnemyOBJ) / 10); + + if (hpTimeout) clearTimeout(hpTimeout); + hpTimeout = setTimeout(() => { + if (hpPointCounter) hpPointCounter.textContent = '0'; + hpTimeout = null; + }, 1600); + } + hpEnemyOBJ = currentScore; + } +} + +function setupHPDisplay(): void { + const counters = document.querySelector('.topRightCounters'); + if (!counters || hpCounterEl) return; + + hpCounterEl = document.createElement('div'); + hpCounterEl.className = 'statIcon kpc-hp-counter'; + hpCounterEl.innerHTML = + '
' + + 'on' + + '0
'; + hpPointCounter = hpCounterEl.querySelector('.pointVal'); + counters.appendChild(hpCounterEl); + + const teamScores = document.getElementById('teamScores'); + if (teamScores) { + hpObserver = new MutationObserver(processTeamScores); + hpObserver.observe(teamScores, { childList: true, subtree: true }); + } +} + +export function initHPCounter(): void { + hpCheckInterval = setInterval(() => { + if (document.querySelector('.cmpTmHed')) { + if (hpCheckInterval) { clearInterval(hpCheckInterval); hpCheckInterval = null; } + setupHPDisplay(); + } + }, 2000); +} + +export function destroyHPCounter(): void { + if (hpCheckInterval) { clearInterval(hpCheckInterval); hpCheckInterval = null; } + if (hpObserver) { hpObserver.disconnect(); hpObserver = null; } + if (hpCounterEl) { hpCounterEl.remove(); hpCounterEl = null; } + if (hpTimeout) { clearTimeout(hpTimeout); hpTimeout = null; } + hpPointCounter = null; + hpEnemyOBJ = 0; +} diff --git a/src/preload/index.ts b/src/preload/index.ts new file mode 100644 index 0000000..24579cc --- /dev/null +++ b/src/preload/index.ts @@ -0,0 +1,1960 @@ +import { ipcRenderer } from 'electron'; +import { fetchGame, MATCHMAKER_GAMEMODES, MATCHMAKER_REGIONS, MATCHMAKER_REGION_NAMES, MAP_ICON_INDICES, MATCHMAKER_MAP_NAMES } from './matchmaker'; +import type { MatchmakerConfig } from './matchmaker'; +import { initUserscripts, getInstances, setScriptEnabled } from './userscripts'; +import type { UserscriptInstance } from './userscripts'; +import { initTranslator, updateTranslatorConfig } from './translator'; +import { setDeathAnimBlock, setCleanerMenu, escapeHtml } from './utils'; +import { initChat, setBetterChat, setChatHistorySize } from './chat'; +import { initHPCounter, destroyHPCounter } from './competitive'; +import { checkChangelog } from './changelog'; +import type { Keybind } from '../main/config'; + + +// ── Save console methods before Krunker overwrites them ── +// Wrapped to forward errors/warnings always, and logs when verbose is enabled +let _verboseLogging = false; + +const _console = { + log: (...args: unknown[]) => { + console.log(...args); + if (_verboseLogging) ipcRenderer.send('verbose-log', 'log', ...args); + }, + warn: (...args: unknown[]) => { + console.warn(...args); + ipcRenderer.send('verbose-log', 'warn', ...args); + }, + error: (...args: unknown[]) => { + console.error(...args); + ipcRenderer.send('verbose-log', 'error', ...args); + }, +}; + +_console.log('[KCC] Preload script loaded'); + +// ── Krunker-native settings styling constants (from Crankshaft) ── +const SAFETY_SVG = ''; +const REFRESH_SVG = ''; +const SAFETY_DESCS = [ + 'This setting is safe/standard', + 'Proceed with caution', + 'This setting is not recommended', + 'This setting is experimental', + 'This setting is experimental and unstable. Use at your own risk.', +]; + +const enum RefreshLevel { none, refresh, restart } +let refreshLevel: number = RefreshLevel.none; +let refreshPopupEl: HTMLElement | null = null; + +function safetyIcon(safety: string): string { + return '' + SAFETY_SVG + ''; +} + +function refreshIcon(mode: 'instant' | 'refresh-icon'): string { + return '' + REFRESH_SVG + ''; +} + +function restartIcon(): string { + return '' + SAFETY_SVG + ''; +} + +function settingIcon(safety: number, instant?: boolean, refreshOnly?: boolean, restart?: boolean): string { + if (safety > 0) return safetyIcon(SAFETY_DESCS[safety]); + if (instant) return refreshIcon('instant'); + if (refreshOnly) return refreshIcon('refresh-icon'); + if (restart) return restartIcon(); + return ''; +} + +function onSettingChanged(level: 'refresh' | 'restart'): void { + const newLevel = level === 'restart' ? RefreshLevel.restart : RefreshLevel.refresh; + if (newLevel > refreshLevel) refreshLevel = newLevel; + updateRefreshNotification(); +} + +function updateRefreshNotification(): void { + if (refreshLevel === RefreshLevel.none) { + if (refreshPopupEl) { refreshPopupEl.remove(); refreshPopupEl = null; } + return; + } + if (refreshPopupEl) { try { refreshPopupEl.remove(); } catch { /* noop */ } } + refreshPopupEl = document.createElement('div'); + refreshPopupEl.className = 'kpc-holder-update refresh-popup'; + if (refreshLevel === RefreshLevel.restart) { + refreshPopupEl.innerHTML = 'Restart client fully to see changes'; + } else { + refreshPopupEl.innerHTML = '' + refreshIcon('refresh-icon') + 'Reload page with F5 or CTRL + R to see changes'; + } + document.body.appendChild(refreshPopupEl); +} + +// ── Tell Krunker this is a client (enables "Client" settings tab) ── +(window as any).OffCliV = true; + +// ── IPC bridge exposed as window.kpc ── +(window as any).kpc = { + platform: { + getInfo: () => ipcRenderer.invoke('get-platform'), + }, + config: { + get: (key: string) => ipcRenderer.invoke('get-config', key), + getAll: (keys: string[]) => ipcRenderer.invoke('get-all-config', keys), + set: (key: string, value: unknown) => ipcRenderer.invoke('set-config', key, value), + }, + window: { + minimize: () => ipcRenderer.invoke('window-minimize'), + maximize: () => ipcRenderer.invoke('window-maximize'), + close: () => ipcRenderer.invoke('window-close'), + isMaximized: () => ipcRenderer.invoke('window-is-maximized'), + }, + dev: { + toggleDevTools: () => ipcRenderer.invoke('toggle-devtools'), + }, + swapper: { + openFolder: () => ipcRenderer.invoke('open-swap-folder'), + getPath: () => ipcRenderer.invoke('get-swap-dir'), + }, + userscripts: { + openFolder: () => ipcRenderer.invoke('userscripts-open-folder'), + getPath: () => ipcRenderer.invoke('userscripts-get-dir'), + }, +}; + +// ── Client settings tab in Krunker's settings ── + +// ── Keybind helpers ── +function keybindDisplayString(bind: Keybind): string { + return (bind.shift ? 'Shift+' : '') + (bind.ctrl ? 'Ctrl+' : '') + (bind.alt ? 'Alt+' : '') + bind.key.toUpperCase(); +} + +// ── Keybind capture dialog (Crankshaft-style) ── +let capturingKeybind: { resolve: (bind: Keybind) => void } | null = null; + +const kbOverlay = document.createElement('div'); +kbOverlay.className = 'kpc-keybind-overlay'; +const kbDialog = document.createElement('div'); +kbDialog.className = 'kpc-keybind-dialog'; +const kbTitle = document.createElement('div'); +kbTitle.className = 'kpc-keybind-dialog-title'; +const kbSub = document.createElement('div'); +kbSub.className = 'kpc-keybind-dialog-sub'; +kbSub.innerHTML = 'Press any key. Press Shift+Escape to cancel.'; +const kbModifiers = document.createElement('div'); +kbModifiers.className = 'kpc-keybind-dialog-modifiers'; +const kbShift = document.createElement('div'); +kbShift.className = 'kpc-keybind-modifier'; +kbShift.textContent = 'Shift'; +const kbCtrl = document.createElement('div'); +kbCtrl.className = 'kpc-keybind-modifier'; +kbCtrl.textContent = 'Control'; +const kbAlt = document.createElement('div'); +kbAlt.className = 'kpc-keybind-modifier'; +kbAlt.textContent = 'Alt'; +const kbCancel = document.createElement('div'); +kbCancel.className = 'kpc-keybind-dialog-cancel'; +kbCancel.textContent = 'Cancel'; +kbCancel.addEventListener('click', dismissKeybindDialog); + +kbModifiers.appendChild(kbShift); +kbModifiers.appendChild(kbCtrl); +kbModifiers.appendChild(kbAlt); +kbDialog.appendChild(kbCancel); +kbDialog.appendChild(kbTitle); +kbDialog.appendChild(kbSub); +kbDialog.appendChild(kbModifiers); +kbOverlay.appendChild(kbDialog); + +function dismissKeybindDialog(): void { + kbShift.classList.remove('active'); + kbCtrl.classList.remove('active'); + kbAlt.classList.remove('active'); + document.removeEventListener('keydown', kbKeydownHandler, true); + document.removeEventListener('keyup', kbKeyupHandler, true); + if (kbOverlay.parentNode) kbOverlay.remove(); + capturingKeybind = null; + ipcRenderer.send('keybind-capture', false); +} + +function kbKeydownHandler(event: KeyboardEvent): void { + event.stopImmediatePropagation(); + event.preventDefault(); + if (event.key === 'Control') kbCtrl.classList.add('active'); + else if (event.key === 'Shift') kbShift.classList.add('active'); + else if (event.key === 'Alt') kbAlt.classList.add('active'); +} + +function kbKeyupHandler(event: KeyboardEvent): void { + event.stopImmediatePropagation(); + event.preventDefault(); + if (!capturingKeybind) return; + + if (event.key === 'Escape' && event.shiftKey) { + dismissKeybindDialog(); + return; + } + + // Modifier-only releases just clear indicators + if (event.key === 'Shift' || event.key === 'Control' || event.key === 'Alt') { + const bind: Keybind = { key: event.key, ctrl: false, shift: false, alt: false }; + capturingKeybind.resolve(bind); + dismissKeybindDialog(); + return; + } + + const bind: Keybind = { + key: event.key, + ctrl: event.ctrlKey, + shift: event.shiftKey, + alt: event.altKey, + }; + capturingKeybind.resolve(bind); + dismissKeybindDialog(); +} + +function openKeybindDialog(title: string): Promise { + return new Promise((resolve) => { + capturingKeybind = { resolve }; + kbTitle.textContent = 'Edit Keybind: ' + title; + kbShift.classList.remove('active'); + kbCtrl.classList.remove('active'); + kbAlt.classList.remove('active'); + ipcRenderer.send('keybind-capture', true); + document.addEventListener('keydown', kbKeydownHandler, true); + document.addEventListener('keyup', kbKeyupHandler, true); + document.body.appendChild(kbOverlay); + }); +} + +function createKeybindRow(label: string, desc: string, currentBind: Keybind, onBind: (bind: Keybind) => void, safety?: number, instant?: boolean): HTMLElement { + const s = safety || 0; + const row = document.createElement('div'); + row.className = 'setting settName safety-' + s + ' keybind'; + row.innerHTML = + settingIcon(s, instant) + + '' + label + '' + + '' + keybindDisplayString(currentBind) + '' + + '
' + desc + '
'; + const keyEl = row.querySelector('.kpc-keyIcon') as HTMLElement; + keyEl.addEventListener('click', () => { + openKeybindDialog(label).then((newBind) => { + keyEl.textContent = keybindDisplayString(newBind); + onBind(newBind); + }); + }); + return row; +} + +function createToggleRow(opts: { + label: string; + desc: string; + checked: boolean; + onChange: (checked: boolean) => void; + restart?: boolean; + disabled?: boolean; + safety?: number; + instant?: boolean; + refreshOnly?: boolean; +}): HTMLElement { + const s = opts.safety || 0; + const row = document.createElement('div'); + row.className = 'setting settName safety-' + s + ' bool'; + row.innerHTML = + settingIcon(s, opts.instant, opts.refreshOnly, opts.restart) + + '' + opts.label + '' + + '' + + '
' + opts.desc + '
'; + if (!opts.disabled) { + const cb = row.querySelector('input[type="checkbox"]') as HTMLInputElement; + cb.addEventListener('change', () => { + opts.onChange(cb.checked); + if (opts.restart) onSettingChanged('restart'); + else if (opts.refreshOnly) onSettingChanged('refresh'); + }); + } + return row; +} + +function createSelectRow(opts: { + label: string; + desc: string; + options: Array<{ value: string; label: string }>; + value: string; + onChange: (value: string) => void; + restart?: boolean; + safety?: number; + instant?: boolean; + refreshOnly?: boolean; +}): HTMLElement { + const s = opts.safety || 0; + const row = document.createElement('div'); + row.className = 'setting settName safety-' + s + ' sel'; + row.innerHTML = + settingIcon(s, opts.instant, opts.refreshOnly, opts.restart) + + '' + opts.label + '' + + '
' + opts.desc + '
'; + const select = document.createElement('select'); + select.className = 's-update inputGrey2'; + for (const o of opts.options) { + const option = document.createElement('option'); + option.value = o.value; + option.textContent = o.label; + if (o.value === opts.value) option.selected = true; + select.appendChild(option); + } + select.addEventListener('change', () => { + opts.onChange(select.value); + if (opts.restart) onSettingChanged('restart'); + else if (opts.refreshOnly) onSettingChanged('refresh'); + }); + row.appendChild(select); + return row; +} + +function createNumberRow(opts: { + label: string; + desc: string; + min: number; + max: number; + value: number; + onChange: (value: number) => void; + safety?: number; + restart?: boolean; + instant?: boolean; + refreshOnly?: boolean; +}): HTMLElement { + const s = opts.safety || 0; + const row = document.createElement('div'); + row.className = 'setting settName safety-' + s + ' num'; + row.innerHTML = + settingIcon(s, opts.instant, opts.refreshOnly, opts.restart) + + '' + opts.label + '' + + '' + + '
' + + '' + + '
' + + '
' + opts.desc + '
'; + const rangeInput = row.querySelector('input[type="range"]') as HTMLInputElement; + const numInput = row.querySelector('input[type="number"]') as HTMLInputElement; + rangeInput.addEventListener('input', () => { + numInput.value = rangeInput.value; + }); + rangeInput.addEventListener('change', () => { + const v = Math.max(opts.min, Math.min(opts.max, parseInt(rangeInput.value) || 0)); + rangeInput.value = String(v); + numInput.value = String(v); + opts.onChange(v); + if (opts.restart) onSettingChanged('restart'); + else if (opts.refreshOnly) onSettingChanged('refresh'); + }); + numInput.addEventListener('change', () => { + const v = Math.max(opts.min, Math.min(opts.max, parseInt(numInput.value) || 0)); + numInput.value = String(v); + rangeInput.value = String(v); + opts.onChange(v); + if (opts.restart) onSettingChanged('restart'); + else if (opts.refreshOnly) onSettingChanged('refresh'); + }); + return row; +} + +function createCheckboxGrid(opts: { + header: string; + items: Array<{ value: string; label: string }>; + selected: string[]; + onChange: (selected: string[]) => void; +}): HTMLElement { + const row = document.createElement('div'); + row.className = 'setting settName safety-0 multisel'; + row.innerHTML = '' + opts.header + ''; + const grid = document.createElement('div'); + grid.className = 'kpc-multisel-parent'; + for (const item of opts.items) { + const label = document.createElement('label'); + label.className = 'hostOpt'; + label.innerHTML = + '' + escapeHtml(item.label) + '' + + '' + + '
'; + const cb = label.querySelector('input') as HTMLInputElement; + cb.addEventListener('change', () => { + if (cb.checked) { + if (!opts.selected.includes(item.value)) opts.selected.push(item.value); + } else { + const idx = opts.selected.indexOf(item.value); + if (idx >= 0) opts.selected.splice(idx, 1); + } + opts.onChange(opts.selected); + }); + grid.appendChild(label); + } + row.appendChild(grid); + return row; +} + +// ── Double Ping Display (Krunker shows half the actual ping) ── +let _doublePingObserver: MutationObserver | null = null; + +function initDoublePing(): void { + function attach(pingEl: HTMLElement): void { + _doublePingObserver = new MutationObserver(() => { + const text = pingEl.textContent; + if (!text) return; + const match = text.match(/(\d+)/); + if (!match) return; + const doubled = parseInt(match[1]) * 2; + _doublePingObserver!.disconnect(); + pingEl.textContent = text.replace(match[1], String(doubled)); + _doublePingObserver!.observe(pingEl, { childList: true, characterData: true, subtree: true }); + }); + _doublePingObserver.observe(pingEl, { childList: true, characterData: true, subtree: true }); + } + + const el = document.getElementById('pingText'); + if (el) { attach(el); return; } + + let attempts = 0; + const poll = setInterval(() => { + if (++attempts > 60) { clearInterval(poll); return; } + const pingEl = document.getElementById('pingText'); + if (pingEl) { clearInterval(poll); attach(pingEl); } + }, 500); +} + +// ── Show Ping in Player List (numeric ms instead of icon) ── +// genList returns an HTML string — parse it, replace icon elements, return modified HTML. +function initShowPing(): void { + const w = window as any; + let attempts = 0; + const poll = setInterval(() => { + const origGenList = w.windows?.[22]?.genList; + if (origGenList && !origGenList.__kpcPingPatched) { + clearInterval(poll); + const patched = function (this: any) { + const html = origGenList.call(this); + const parser = new DOMParser(); + const doc = parser.parseFromString(html, 'text/html'); + for (const icon of doc.querySelectorAll('.pListPing.material-icons')) { + const ping = icon.getAttribute('title'); + icon.classList.remove('pListPing', 'material-icons'); + icon.removeAttribute('title'); + icon.textContent = ping ? ping + ' ' : 'N/A '; + } + return doc.body.innerHTML; + }; + (patched as any).__kpcPingPatched = true; + w.windows[22].genList = patched; + } else if (++attempts > 75) { + clearInterval(poll); + } + }, 200); +} + +function hookSettings(): void { + const w = window as any; + const settingsWindow = w.windows[0]; + let selectedTab: number = settingsWindow.tabIndex; + + function isClientTab(): boolean { + const tabs = settingsWindow.tabs[settingsWindow.settingType]; + return tabs && selectedTab === tabs.length - 1; + } + + function safeRender(): void { + if (isClientTab()) renderSettings(); + } + + const origShowWindow = w.showWindow.bind(w); + const origChangeTab = settingsWindow.changeTab.bind(settingsWindow); + const origSearchList = settingsWindow.searchList.bind(settingsWindow); + + w.showWindow = (...args: unknown[]) => { + const result = origShowWindow(...args); + if (args[0] === 1) { + if (settingsWindow.settingType === 'basic') { + settingsWindow.toggleType({ checked: true }); + } + const advSlider = document.querySelector('.advancedSwitch input#typeBtn') as HTMLInputElement | null; + if (advSlider) { + advSlider.disabled = true; + if (advSlider.nextElementSibling) { + advSlider.nextElementSibling.setAttribute('title', 'Client auto-enables advanced settings mode'); + } + } + + const searchInput = document.getElementById('settSearch') as HTMLInputElement | null; + const searchQuery = searchInput?.value?.trim() ?? ''; + if (searchQuery.length > 0) renderSettings(searchQuery); + else if (isClientTab()) renderSettings(); + } + return result; + }; + + settingsWindow.changeTab = (...args: unknown[]) => { + const result = origChangeTab(...args); + selectedTab = settingsWindow.tabIndex; + safeRender(); + return result; + }; + + settingsWindow.searchList = (...args: unknown[]) => { + const result = origSearchList(...args); + const searchInput = document.getElementById('settSearch') as HTMLInputElement | null; + const query = searchInput?.value?.trim() ?? ''; + if (query.length > 0) { + renderSettings(query); + } else { + const existing = document.querySelector('#settHolder .kpc-settings'); + if (existing && !isClientTab()) existing.remove(); + else if (isClientTab()) renderSettings(); + } + return result; + }; + + safeRender(); +} + +function createSection(title: string, collapsed?: boolean): { section: HTMLElement; body: HTMLElement } { + const section = document.createElement('div'); + const header = document.createElement('div'); + header.className = 'setHed'; + header.innerHTML = '' + (collapsed ? 'keyboard_arrow_right' : 'keyboard_arrow_down') + '' + title; + const body = document.createElement('div'); + body.className = 'setBodH' + (collapsed ? ' setting-category-collapsed' : ''); + header.addEventListener('click', () => { + const isCollapsed = body.classList.toggle('setting-category-collapsed'); + const arrow = header.querySelector('.plusOrMinus'); + if (arrow) arrow.textContent = isCollapsed ? 'keyboard_arrow_right' : 'keyboard_arrow_down'; + }); + section.appendChild(header); + section.appendChild(body); + return { section, body }; +} + +// ── Settings section builders ── + +interface SettingsBag { + binds: Record; + saveBinds: () => void; + isWindows: boolean; +} + +function buildGeneralSection( + body: HTMLElement, gameConf: any, uiConfRaw: any, perfConf: any, bag: SettingsBag, +): void { + const perfDefaults = { fpsUnlocked: true }; + const perf = { ...perfDefaults, ...perfConf }; + + body.appendChild(createToggleRow({ + label: 'Unlimited FPS', + desc: 'Uncap the frame rate (requires restart)', + checked: perf.fpsUnlocked, restart: true, + onChange: (v) => { perf.fpsUnlocked = v; ipcRenderer.invoke('set-config', 'performance', perf); }, + })); + + const gameDefaults = { lastServer: '', socialTabBehaviour: 'New Window' }; + const game = { ...gameDefaults, ...gameConf }; + + body.appendChild(createSelectRow({ + label: 'Social/Hub Tab Behaviour', + desc: 'How social, market, and editor pages open when clicked', + options: [{ value: 'New Window', label: 'Tabs (Separate Window)' }, { value: 'Same Window', label: 'Tabs (Overlay Game)' }], + value: game.socialTabBehaviour, instant: true, + onChange: (v) => { game.socialTabBehaviour = v; ipcRenderer.invoke('set-config', 'game', game); }, + })); + + const uiDefaults = { showExitButton: true, deathscreenAnimation: false, hideMenuPopups: false }; + const ui = { ...uiDefaults, ...uiConfRaw }; + + function saveUI(): void { + ipcRenderer.invoke('set-config', 'ui', ui); + } + + body.appendChild(createToggleRow({ + label: 'Show Exit Button', + desc: 'Show the exit button in the game sidebar', + checked: ui.showExitButton, instant: true, + onChange: (v) => { + ui.showExitButton = v; saveUI(); + const btn = document.getElementById('clientExit'); + if (btn) btn.style.display = v ? 'flex' : 'none'; + }, + })); + + body.appendChild(createToggleRow({ + label: 'Block Death Screen Animation', + desc: 'Disable the slide-in animation on the death screen', + checked: ui.deathscreenAnimation, instant: true, + onChange: (v) => { ui.deathscreenAnimation = v; saveUI(); setDeathAnimBlock(v); }, + })); + + body.appendChild(createToggleRow({ + label: 'Hide Menu Popups', + desc: 'Hide promotional notifications, offers, and streams on the main menu', + checked: ui.hideMenuPopups, instant: true, + onChange: (v) => { + ui.hideMenuPopups = v; saveUI(); + if (v) startHidePopups(); else stopHidePopups(); + }, + })); + + body.appendChild(createToggleRow({ + label: 'Join as Spectator', + desc: 'Automatically enable spectate mode when joining a game', + checked: game.joinAsSpectator, instant: true, + onChange: (v) => { game.joinAsSpectator = v; ipcRenderer.invoke('set-config', 'game', game); }, + })); + + body.appendChild(createToggleRow({ + label: 'Cleaner Menu', + desc: 'Hide clutter from the main menu (scrollbars, social buttons, class preview, etc.)', + checked: ui.cleanerMenu ?? false, instant: true, + onChange: (v) => { ui.cleanerMenu = v; saveUI(); setCleanerMenu(v); }, + })); + + body.appendChild(createToggleRow({ + label: 'Double Ping Display', + desc: 'Show the real ping value (Krunker displays half the actual latency)', + checked: ui.doublePing ?? true, refreshOnly: true, + onChange: (v) => { ui.doublePing = v; saveUI(); }, + })); + + body.appendChild(createToggleRow({ + label: 'Show Ping in Player List', + desc: 'Replace the ping icon with numeric millisecond values in the player list', + checked: game.showPing ?? true, refreshOnly: true, + onChange: (v) => { game.showPing = v; ipcRenderer.invoke('set-config', 'game', game); }, + })); + + if (bag.isWindows) { + body.appendChild(createToggleRow({ + label: 'Raw Input', + desc: 'Bypass OS mouse acceleration for direct 1:1 sensor input (Windows only)', + checked: game.rawInput ?? true, refreshOnly: true, + onChange: (v) => { game.rawInput = v; ipcRenderer.invoke('set-config', 'game', game); }, + })); + } + + body.appendChild(createToggleRow({ + label: 'Hardpoint Enemy Counter', + desc: 'Show enemy capture points in Hardpoint mode', + checked: game.hpEnemyCounter ?? true, refreshOnly: true, + onChange: (v) => { + game.hpEnemyCounter = v; ipcRenderer.invoke('set-config', 'game', game); + if (v) initHPCounter(); else destroyHPCounter(); + }, + })); + + body.appendChild(createToggleRow({ + label: 'Show Changelog', + desc: 'Show release notes popup when the client updates', + checked: ui.showChangelog ?? true, instant: true, + onChange: (v) => { ui.showChangelog = v; saveUI(); }, + })); + + if (ui.deathscreenAnimation) setDeathAnimBlock(true); + if (ui.hideMenuPopups) startHidePopups(); + + body.appendChild(createKeybindRow('Toggle Fullscreen', 'Fullscreen the game window (default F11)', bag.binds.fullscreenToggle, (b) => { + bag.binds.fullscreenToggle = b; + bag.saveBinds(); + }, undefined, true)); +} + +function buildSwapperSection(body: HTMLElement, swapperConf: any, uiConfRaw: any): void { + const swapEnabled = swapperConf ? swapperConf.enabled : true; + const ui = { cssTheme: 'disabled', loadingTheme: 'disabled', backgroundUrl: '', ...uiConfRaw }; + + function saveUI(): void { + ipcRenderer.invoke('set-config', 'ui', ui); + } + + body.appendChild(createToggleRow({ + label: 'Resource Swapper', + desc: 'Replace game textures, sounds, and models with local files', + checked: swapEnabled, + restart: true, + onChange: (v) => { + ipcRenderer.invoke('get-config', 'swapper').then((conf: any) => { + ipcRenderer.invoke('set-config', 'swapper', { enabled: v, path: conf ? conf.path : '' }); + }); + }, + })); + + const folderRow = document.createElement('div'); + folderRow.className = 'setting settName safety-0 has-button'; + folderRow.innerHTML = + 'Swapper Folder' + + '
Place replacement assets here (textures/, sound/, models/)
'; + const swapFolderBtn = document.createElement('div'); + swapFolderBtn.className = 'settingsBtn'; + swapFolderBtn.title = 'Open Folder'; + swapFolderBtn.innerHTML = 'folder Swapper'; + swapFolderBtn.addEventListener('click', () => ipcRenderer.invoke('open-swap-folder')); + folderRow.appendChild(swapFolderBtn); + body.appendChild(folderRow); + + // ── CSS Theme selector (populated from swap/themes/) ── + const themeRow = document.createElement('div'); + themeRow.className = 'setting settName safety-0 sel'; + themeRow.innerHTML = + 'CSS Theme' + + '
Load a custom CSS theme from swap/themes/
'; + const themeSelect = document.createElement('select'); + themeSelect.className = 's-update inputGrey2'; + themeSelect.innerHTML = ''; + themeRow.appendChild(themeSelect); + body.appendChild(themeRow); + + ipcRenderer.invoke('list-themes').then((themes: Array<{ id: string; label: string }>) => { + themeSelect.innerHTML = ''; + for (const t of themes) { + const opt = document.createElement('option'); + opt.value = t.id; + opt.textContent = t.label; + if (t.id === ui.cssTheme) opt.selected = true; + themeSelect.appendChild(opt); + } + }); + + themeSelect.addEventListener('change', () => { + ui.cssTheme = themeSelect.value; + saveUI(); + onSettingChanged('refresh'); + }); + + // ── Loading Screen Background ── + const bgRow = document.createElement('div'); + bgRow.className = 'setting settName safety-0 sel'; + bgRow.innerHTML = + 'Loading Background' + + '
Custom background image for the loading screen (swap/backgrounds/)
'; + const bgSelect = document.createElement('select'); + bgSelect.className = 's-update inputGrey2'; + bgSelect.innerHTML = ''; + bgRow.appendChild(bgSelect); + body.appendChild(bgRow); + + ipcRenderer.invoke('list-loading-themes').then((themes: Array<{ id: string; label: string }>) => { + bgSelect.innerHTML = ''; + for (const t of themes) { + const opt = document.createElement('option'); + opt.value = t.id; + opt.textContent = t.label; + if (t.id === ui.loadingTheme) opt.selected = true; + bgSelect.appendChild(opt); + } + }); + + bgSelect.addEventListener('change', () => { + ui.loadingTheme = bgSelect.value; + saveUI(); + onSettingChanged('refresh'); + }); +} + +function buildMatchmakerSection(body: HTMLElement, mmConf: any, bag: SettingsBag): void { + const mm = mmConf || { enabled: true, regions: [], gamemodes: [], minPlayers: 1, maxPlayers: 6, minRemainingTime: 120, openServerBrowser: true, autoJoin: false }; + + function saveMM(): void { + ipcRenderer.invoke('set-config', 'matchmaker', mm); + } + + body.appendChild(createToggleRow({ + label: 'Custom Matchmaker', + desc: 'Use the matchmaker hotkey to find a game matching your criteria', + checked: mm.enabled, instant: true, + onChange: (v) => { mm.enabled = v; saveMM(); }, + })); + + body.appendChild(createToggleRow({ + label: 'Open Server Browser on Cancel', + desc: 'Opens the server browser when no game is found and you cancel', + checked: mm.openServerBrowser, instant: true, + onChange: (v) => { mm.openServerBrowser = v; saveMM(); }, + })); + + body.appendChild(createToggleRow({ + label: 'Auto-Join', + desc: 'Automatically join the best match without showing the popup', + checked: mm.autoJoin ?? false, instant: true, + onChange: (v) => { mm.autoJoin = v; saveMM(); }, + })); + + body.appendChild(createKeybindRow('Matchmaker Hotkey', 'Key to trigger the custom matchmaker', bag.binds.matchmaker, (b) => { + bag.binds.matchmaker = b; + bag.saveBinds(); + }, undefined, true)); + body.appendChild(createKeybindRow('Matchmaker Accept', 'Key to accept a found game', bag.binds.matchmakerAccept, (b) => { + bag.binds.matchmakerAccept = b; + bag.saveBinds(); + }, undefined, true)); + body.appendChild(createKeybindRow('Matchmaker Cancel', 'Key to dismiss the matchmaker popup', bag.binds.matchmakerCancel, (b) => { + bag.binds.matchmakerCancel = b; + bag.saveBinds(); + }, undefined, true)); + + body.appendChild(createNumberRow({ + label: 'Min Players', desc: 'Minimum player count in lobby (0-7)', + min: 0, max: 7, value: mm.minPlayers, instant: true, + onChange: (v) => { mm.minPlayers = v; saveMM(); }, + })); + + body.appendChild(createNumberRow({ + label: 'Max Players', desc: 'Maximum player count in lobby (0-7)', + min: 0, max: 7, value: mm.maxPlayers, instant: true, + onChange: (v) => { mm.maxPlayers = v; saveMM(); }, + })); + + body.appendChild(createNumberRow({ + label: 'Min Remaining Time', desc: 'Minimum seconds remaining in match (0-480)', + min: 0, max: 480, value: mm.minRemainingTime, instant: true, + onChange: (v) => { mm.minRemainingTime = v; saveMM(); }, + })); + + body.appendChild(createCheckboxGrid({ + header: 'Regions (none selected = all)', + items: MATCHMAKER_REGIONS.map(r => ({ value: r, label: MATCHMAKER_REGION_NAMES[r] || r })), + selected: mm.regions, + onChange: () => saveMM(), + })); + + body.appendChild(createCheckboxGrid({ + header: 'Gamemodes (none selected = all)', + items: MATCHMAKER_GAMEMODES.map(gm => ({ value: gm, label: gm })), + selected: mm.gamemodes, + onChange: () => saveMM(), + })); + + if (!mm.maps) mm.maps = []; + body.appendChild(createCheckboxGrid({ + header: 'Maps (none selected = all)', + items: MAP_ICON_INDICES.map(m => ({ value: m, label: MATCHMAKER_MAP_NAMES[m] || m })), + selected: mm.maps, + onChange: () => saveMM(), + })); +} + +function buildDiscordSection(body: HTMLElement, discordConf: any): void { + const discord = { enabled: false, ...discordConf }; + + body.appendChild(createToggleRow({ + label: 'Discord Rich Presence', + desc: 'Show game activity in your Discord profile', + checked: discord.enabled, + restart: true, + onChange: (v) => { + discord.enabled = v; + ipcRenderer.invoke('set-config', 'discord', discord); + }, + })); +} + +// ── Alt Manager helpers ── +function switchToAccount(account: { username: string; password: string }): void { + const w = window as any; + if (typeof w.loginOrRegister !== 'function') return; + + function doLogin(): void { + w.loginOrRegister(); + queueMicrotask(() => { + const toggleBtn = document.querySelector('.auth-toggle-btn') as HTMLElement; + if (toggleBtn && toggleBtn.textContent?.includes('username')) toggleBtn.click(); + queueMicrotask(() => { + const nameInput = document.querySelector('#accName') as HTMLInputElement; + const passInput = document.querySelector('#accPass') as HTMLInputElement; + if (!nameInput || !passInput) return; + nameInput.value = account.username; + passInput.value = account.password; + nameInput.dispatchEvent(new Event('input', { bubbles: true })); + passInput.dispatchEvent(new Event('input', { bubbles: true })); + const submitBtn = document.querySelector('.io-button') as HTMLElement; + if (submitBtn) submitBtn.click(); + }); + }); + } + + if (typeof w.logoutAcc === 'function') { + w.logoutAcc(); + setTimeout(doLogin, 500); + } else { + doLogin(); + } +} + +function buildAccountsSection(body: HTMLElement, accountsArr: any[]): void { + const accounts: any[] = accountsArr || []; + + const addBtn = document.createElement('div'); + addBtn.className = 'setting settName safety-0 has-button'; + addBtn.innerHTML = + 'Add Account' + + '' + + '
Save a Krunker account for quick switching
'; + body.appendChild(addBtn); + + const form = document.createElement('div'); + form.className = 'kpc-acc-form'; + form.style.display = 'none'; + form.innerHTML = + '' + + '' + + '' + + '
' + + '' + + '' + + '
'; + body.appendChild(form); + + const labelIn = form.querySelector('.kpc-acc-label') as HTMLInputElement; + const userIn = form.querySelector('.kpc-acc-user') as HTMLInputElement; + const passIn = form.querySelector('.kpc-acc-pass') as HTMLInputElement; + + // Stop Krunker's global keydown handler from eating keystrokes in our inputs + form.querySelectorAll('input').forEach(input => { + input.addEventListener('keydown', (e) => e.stopPropagation()); + }); + + addBtn.querySelector('button')!.addEventListener('click', () => { + form.style.display = form.style.display === 'none' ? '' : 'none'; + }); + + form.querySelector('.kpc-acc-cancel')!.addEventListener('click', () => { + form.style.display = 'none'; + }); + + const listEl = document.createElement('div'); + body.appendChild(listEl); + + function renderList(): void { + listEl.innerHTML = ''; + if (accounts.length === 0) { + listEl.innerHTML = '
No saved accounts
'; + return; + } + accounts.forEach((acc, i) => { + const row = document.createElement('div'); + row.className = 'kpc-acc-item'; + row.innerHTML = + '
' + + '' + escapeHtml(acc.label) + '' + + '
' + + '
' + + '' + + '' + + '
'; + row.querySelector('.kpc-acc-switch')!.addEventListener('click', () => { + ipcRenderer.invoke('alt-get-credentials', i).then((creds: { username: string; password: string } | null) => { + if (creds) switchToAccount(creds); + }); + }); + row.querySelector('.kpc-acc-delete')!.addEventListener('click', () => { + ipcRenderer.invoke('alt-remove', i).then(() => { + accounts.splice(i, 1); + renderList(); + }); + }); + listEl.appendChild(row); + }); + } + renderList(); + + form.querySelector('.kpc-acc-save')!.addEventListener('click', () => { + const label = labelIn.value.trim(); + const user = userIn.value.trim(); + const pass = passIn.value; + if (!label || !user || !pass) return; + const newAcc = { label, username: user, password: pass }; + ipcRenderer.invoke('alt-save', newAcc).then(() => { + accounts.push({ label }); + labelIn.value = ''; + userIn.value = ''; + passIn.value = ''; + form.style.display = 'none'; + renderList(); + }); + }); +} + +function buildChatSection(body: HTMLElement, gameConf: any, translatorConf: any, bag: SettingsBag): void { + const game = { betterChat: true, chatHistorySize: 200, ...gameConf }; + + function saveGame(): void { + ipcRenderer.invoke('set-config', 'game', game); + } + + body.appendChild(createToggleRow({ + label: 'Better Chat', + desc: 'Merge team and all-chat with colored [T]/[M] prefixes', + checked: game.betterChat, instant: true, + onChange: (v) => { game.betterChat = v; saveGame(); setBetterChat(v); }, + })); + + body.appendChild(createNumberRow({ + label: 'Chat History Size', desc: 'Maximum chat messages to keep (0 to disable history preservation)', + min: 0, max: 1000, value: game.chatHistorySize, instant: true, + onChange: (v) => { game.chatHistorySize = v; saveGame(); setChatHistorySize(v); }, + })); + + body.appendChild(createKeybindRow('Pause Chat', 'Freeze chat auto-scroll to read history (default F10)', bag.binds.pauseChat, (b) => { + bag.binds.pauseChat = b; + bag.saveBinds(); + }, undefined, true)); + + // Translator settings inline + const tl = { enabled: true, targetLanguage: 'en', showLanguageTag: true, ...translatorConf }; + + function saveTL(): void { + ipcRenderer.invoke('set-config', 'translator', tl); + } + + body.appendChild(createToggleRow({ + label: 'Chat Translator', + desc: 'Automatically translate non-English chat messages', + checked: tl.enabled, instant: true, + onChange: (v) => { + tl.enabled = v; + saveTL(); + updateTranslatorConfig({ enabled: v }); + }, + })); + + body.appendChild(createSelectRow({ + label: 'Target Language', + desc: 'Language to translate messages into', instant: true, + options: [ + { value: 'en', label: 'English' }, + { value: 'es', label: 'Spanish' }, + { value: 'fr', label: 'French' }, + { value: 'de', label: 'German' }, + { value: 'pt', label: 'Portuguese' }, + { value: 'ru', label: 'Russian' }, + { value: 'ja', label: 'Japanese' }, + { value: 'ko', label: 'Korean' }, + { value: 'zh', label: 'Chinese' }, + { value: 'ar', label: 'Arabic' }, + { value: 'hi', label: 'Hindi' }, + { value: 'tr', label: 'Turkish' }, + { value: 'pl', label: 'Polish' }, + { value: 'it', label: 'Italian' }, + { value: 'nl', label: 'Dutch' }, + ], + value: tl.targetLanguage, + onChange: (v) => { + tl.targetLanguage = v; + saveTL(); + updateTranslatorConfig({ targetLanguage: v }); + }, + })); + + body.appendChild(createToggleRow({ + label: 'Show Language Tag', + desc: 'Show detected language code before translations (e.g. [FR])', + checked: tl.showLanguageTag, instant: true, + onChange: (v) => { + tl.showLanguageTag = v; + saveTL(); + updateTranslatorConfig({ showLanguageTag: v }); + }, + })); +} + +function buildAdvancedSection( + body: HTMLElement, advConf: any, perfConf: any, isWindows: boolean, +): void { + const advDefaults = { + removeUselessFeatures: true, + gpuRasterizing: false, + helpfulFlags: true, + disableAccelerated2D: false, + increaseLimits: false, + lowLatency: false, + experimentalFlags: false, + angleBackend: 'default', + verboseLogging: false, + }; + const adv = { ...advDefaults, ...advConf }; + const perf = { cpuThrottleGame: 1, cpuThrottleMenu: 1.5, processPriority: 'Normal', ...perfConf }; + + function savePerf(): void { + ipcRenderer.invoke('set-config', 'performance', perf); + } + + function saveAdv(): void { + ipcRenderer.invoke('set-config', 'advanced', adv); + } + + const angleOptions: Array<{ value: string; label: string }> = isWindows + ? [ + { value: 'default', label: 'Default (D3D11)' }, + { value: 'gl', label: 'OpenGL' }, + { value: 'd3d9', label: 'Direct3D 9' }, + { value: 'd3d11', label: 'Direct3D 11' }, + { value: 'd3d11on12', label: 'D3D11on12' }, + { value: 'vulkan', label: 'Vulkan' }, + ] + : [ + { value: 'default', label: 'Default' }, + { value: 'gl', label: 'OpenGL' }, + { value: 'vulkan', label: 'Vulkan' }, + ]; + + body.appendChild(createSelectRow({ + label: 'ANGLE Backend', + desc: 'Graphics API used for WebGL rendering', + options: angleOptions, + value: adv.angleBackend, restart: true, + onChange: (v) => { adv.angleBackend = v; saveAdv(); }, + })); + + const advToggles: Array<{ key: string; label: string; desc: string; safety: number }> = [ + { key: 'removeUselessFeatures', label: 'Remove Useless Features', desc: 'Disables crash reporting, metrics, print preview, and other unused Chromium features', safety: 1 }, + { key: 'gpuRasterizing', label: 'GPU Rasterization', desc: 'Force GPU rasterization and out-of-process rasterization', safety: 2 }, + { key: 'helpfulFlags', label: 'Useful Flags', desc: 'Enables WebGL, JS harmony, V8 features, background throttle prevention, and autoplay bypass', safety: 3 }, + { key: 'disableAccelerated2D', label: 'Disable Accelerated 2D Canvas', desc: 'Disables hardware-accelerated 2D canvas rendering', safety: 3 }, + { key: 'increaseLimits', label: 'Increase Limits', desc: 'Raises renderer process, WebGL context, and WebRTC CPU limits; ignores GPU blocklist', safety: 4 }, + { key: 'lowLatency', label: 'Low Latency Flags', desc: 'Enables high-resolution timer, QUIC protocol, and accelerated 2D canvas', safety: 4 }, + { key: 'experimentalFlags', label: 'Experimental Flags', desc: 'Enables accelerated video decode, native GPU memory buffers, high DPI support, and disables pings/proxy', safety: 4 }, + ]; + + for (const t of advToggles) { + body.appendChild(createToggleRow({ + label: t.label, desc: t.desc, + checked: !!adv[t.key], restart: true, + safety: t.safety, + onChange: (v) => { adv[t.key] = v; saveAdv(); }, + })); + } + + body.appendChild(createNumberRow({ + label: 'CPU Throttle (Game)', desc: 'CPU throttle rate during gameplay (1 = no throttle, 3 = heavy throttle)', + min: 1, max: 3, value: perf.cpuThrottleGame, instant: true, safety: 2, + onChange: (v) => { perf.cpuThrottleGame = v; savePerf(); }, + })); + + body.appendChild(createNumberRow({ + label: 'CPU Throttle (Menu)', desc: 'CPU throttle rate on menu screens (1 = no throttle, 3 = heavy throttle)', + min: 1, max: 3, value: perf.cpuThrottleMenu, instant: true, safety: 1, + onChange: (v) => { perf.cpuThrottleMenu = v; savePerf(); }, + })); + + if (isWindows) { + body.appendChild(createSelectRow({ + label: 'Process Priority', + desc: 'OS-level process priority for the client (Windows only)', + options: [ + { value: 'Normal', label: 'Normal' }, + { value: 'Above Normal', label: 'Above Normal' }, + { value: 'High', label: 'High' }, + { value: 'Below Normal', label: 'Below Normal' }, + { value: 'Low', label: 'Low' }, + ], + value: perf.processPriority, restart: true, safety: 2, + onChange: (v) => { perf.processPriority = v; savePerf(); }, + })); + } + + body.appendChild(createToggleRow({ + label: 'Verbose Logging', + desc: 'Forward all preload console output to the Electron log file', + checked: adv.verboseLogging, instant: true, + onChange: (v) => { + adv.verboseLogging = v; saveAdv(); + _verboseLogging = v; + }, + })); +} + +// ── Search filter + "no settings" cleanup ── +function applySearchFilter(container: HTMLElement, holder: HTMLElement, searchQuery: string): void { + const query = searchQuery.toLowerCase(); + const sections = Array.from(container.children).filter(el => el.querySelector('.setHed')); + sections.forEach(sectionEl => { + const sectionTitle = sectionEl.querySelector('.setHed')?.textContent?.toLowerCase() || ''; + const body = sectionEl.querySelector('.setBodH'); + if (!body) { (sectionEl as HTMLElement).style.display = 'none'; return; } + + if (sectionTitle.includes(query)) { + body.classList.remove('setting-category-collapsed'); + return; + } + + let visibleCount = 0; + Array.from(body.children).forEach(child => { + const el = child as HTMLElement; + const text = el.textContent?.toLowerCase() || ''; + if (text.includes(query)) { + el.style.display = ''; + visibleCount++; + } else { + el.style.display = 'none'; + } + }); + if (visibleCount === 0) { + (sectionEl as HTMLElement).style.display = 'none'; + } else { + body.classList.remove('setting-category-collapsed'); + } + }); + + const hasVisible = sections.find(el => (el as HTMLElement).style.display !== 'none'); + if (hasVisible) { + Array.from(holder.children).forEach(child => { + if ((child as HTMLElement).textContent?.toLowerCase().includes('no settings')) { + (child as HTMLElement).remove(); + } + }); + } +} + +function renderSettings(searchQuery?: string): void { + const holder = document.getElementById('settHolder'); + if (!holder) return; + + refreshLevel = RefreshLevel.none; + if (refreshPopupEl) { refreshPopupEl.remove(); refreshPopupEl = null; } + + if (searchQuery) { + const existing = holder.querySelector('.kpc-settings'); + if (existing) existing.remove(); + } else { + while (holder.firstChild) holder.removeChild(holder.firstChild); + } + + const container = document.createElement('div'); + container.className = 'kpc-settings'; + + // ── Action button grid ── + const actionGrid = document.createElement('div'); + actionGrid.className = 'kpc-action-grid'; + + const actionButtons: Array<{ label: string; color: string; full?: boolean; action: () => void }> = [ + { label: 'Open Resource Swapper', color: 'kpc-ab-pink', action: () => ipcRenderer.invoke('open-swap-folder') }, + { label: 'Reset Resource Swapper', color: 'kpc-ab-pink', action: () => { + if (confirm('Reset resource swapper? This will delete all files in the swapper folder.')) { + ipcRenderer.invoke('reset-swapper'); + } + }}, + { label: 'Open Electron Logs', color: 'kpc-ab-red', action: () => ipcRenderer.invoke('open-electron-log') }, + { label: 'Restart Client', color: 'kpc-ab-orange', full: true, action: () => ipcRenderer.invoke('restart-client') }, + { label: 'Reset Options', color: 'kpc-ab-red', action: () => { + if (confirm('Reset all settings to defaults? The client will restart.')) { + ipcRenderer.invoke('reset-options'); + } + }}, + { label: 'Delete All Data', color: 'kpc-ab-red', action: () => { + if (confirm('Delete all data (config, logs)? Scripts are preserved. The client will restart.')) { + ipcRenderer.invoke('delete-all-data'); + } + }}, + ]; + + for (const ab of actionButtons) { + const btn = document.createElement('button'); + btn.className = 'kpc-action-btn ' + ab.color + (ab.full ? ' full' : ''); + btn.textContent = ab.label; + btn.addEventListener('click', ab.action); + actionGrid.appendChild(btn); + } + container.appendChild(actionGrid); + + // ── Create section shells ── + const genSec = createSection('General'); + container.appendChild(genSec.section); + const swapSec = createSection('Swapper'); + container.appendChild(swapSec.section); + const mmSec = createSection('Matchmaker'); + container.appendChild(mmSec.section); + const chatSec = createSection('Chat'); + container.appendChild(chatSec.section); + const discordSec = createSection('Discord'); + container.appendChild(discordSec.section); + const accSec = createSection('Accounts', true); + container.appendChild(accSec.section); + const advSec = createSection('Advanced'); + container.appendChild(advSec.section); + const usSec = createSection('Userscripts'); + container.appendChild(usSec.section); + + // Load all configs in a single IPC call + platform info + Promise.all([ + ipcRenderer.invoke('get-all-config', ['swapper', 'matchmaker', 'keybinds', 'advanced', 'game', 'ui', 'discord', 'translator', 'accounts', 'performance']), + ipcRenderer.invoke('get-platform'), + ]).then(([allConf, platformInfo]: [any, any]) => { + const swapperConf = allConf.swapper; + const mmConf = allConf.matchmaker; + const keybindsConf = allConf.keybinds; + const advConf = allConf.advanced; + const gameConf = allConf.game; + const uiConfRaw = allConf.ui; + const discordConf = allConf.discord; + const translatorConf = allConf.translator; + const defaultBinds = { + matchmaker: { key: 'F6', ctrl: false, shift: false, alt: false }, + matchmakerAccept: { key: 'Enter', ctrl: false, shift: false, alt: false }, + matchmakerCancel: { key: 'Escape', ctrl: false, shift: false, alt: false }, + pauseChat: { key: 'F10', ctrl: false, shift: false, alt: false }, + fullscreenToggle: { key: 'F11', ctrl: false, shift: false, alt: false }, + }; + const binds = { ...defaultBinds, ...keybindsConf }; + const isWindows = platformInfo && platformInfo.isWindows; + + const bag: SettingsBag = { + binds, + saveBinds: () => ipcRenderer.invoke('set-config', 'keybinds', binds), + isWindows, + }; + + // Populate each section + buildGeneralSection(genSec.body, gameConf, uiConfRaw, allConf.performance, bag); + buildSwapperSection(swapSec.body, swapperConf, uiConfRaw); + buildMatchmakerSection(mmSec.body, mmConf, bag); + buildChatSection(chatSec.body, gameConf, translatorConf, bag); + buildDiscordSection(discordSec.body, discordConf); + buildAccountsSection(accSec.body, allConf.accounts); + buildAdvancedSection(advSec.body, advConf, allConf.performance, isWindows); + renderUserscriptsSection(usSec.body); + + if (searchQuery) applySearchFilter(container, holder, searchQuery); + + holder.appendChild(container); + }).catch((err: any) => { + console.error('[KCC] Settings render error:', err); + }); +} + +// ── Userscripts settings section ── +function renderUserscriptsSection(body: HTMLElement): void { + ipcRenderer.invoke('get-config', 'userscripts').then((usConf: any) => { + const us = usConf || { enabled: true, path: '' }; + + body.appendChild(createToggleRow({ + label: 'Userscripts', + desc: 'Load custom scripts from the scripts folder', + checked: us.enabled, restart: true, + onChange: (v) => { us.enabled = v; ipcRenderer.invoke('set-config', 'userscripts', us); }, + })); + + const usFolderRow = document.createElement('div'); + usFolderRow.className = 'setting settName safety-0 has-button'; + usFolderRow.innerHTML = + 'Scripts Folder' + + '
Place .js userscript files here
'; + const usFolderBtn = document.createElement('div'); + usFolderBtn.className = 'settingsBtn'; + usFolderBtn.title = 'Open Folder'; + usFolderBtn.innerHTML = 'folder Scripts'; + usFolderBtn.addEventListener('click', () => ipcRenderer.invoke('userscripts-open-folder')); + usFolderRow.appendChild(usFolderBtn); + body.appendChild(usFolderRow); + + const scriptInstances = getInstances(); + if (scriptInstances.length === 0) { + const emptyRow = document.createElement('div'); + emptyRow.className = 'setting settName safety-0'; + emptyRow.innerHTML = + '
No userscripts found. Place .js files in the scripts folder and reload.
'; + body.appendChild(emptyRow); + return; + } + + for (const inst of scriptInstances) { + const scriptRow = document.createElement('div'); + scriptRow.className = 'setting settName safety-0 bool'; + + const displayName = escapeHtml(inst.meta.name || inst.filename); + const metaParts: string[] = []; + if (inst.meta.author) metaParts.push('by ' + escapeHtml(inst.meta.author)); + if (inst.meta.version) metaParts.push('v' + escapeHtml(inst.meta.version)); + const metaLine = metaParts.length > 0 ? '' + metaParts.join(' · ') + '' : ''; + const descText = escapeHtml(inst.meta.desc || ''); + + scriptRow.innerHTML = + '' + displayName + '' + + '' + + '
' + descText + (metaLine ? '
' + metaLine : '') + '
'; + body.appendChild(scriptRow); + + const cb = scriptRow.querySelector('input[type="checkbox"]') as HTMLInputElement; + const settingsContainer = document.createElement('div'); + settingsContainer.className = 'kpc-us-settings'; + body.appendChild(settingsContainer); + + if (inst.enabled && inst.settings) { + renderScriptSettings(inst, settingsContainer); + } + + cb.addEventListener('change', () => { + const { needsReload } = setScriptEnabled(inst.filename, cb.checked, _console); + settingsContainer.innerHTML = ''; + if (cb.checked && inst.settings) { + renderScriptSettings(inst, settingsContainer); + } + if (needsReload) { + onSettingChanged('refresh'); + } + }); + } + }); +} + +function renderScriptSettings(inst: UserscriptInstance, container: HTMLElement): void { + if (!inst.settings) return; + + for (const [key, setting] of Object.entries(inst.settings)) { + const typeClass = setting.type === 'bool' ? 'bool' : setting.type === 'sel' ? 'sel' : setting.type === 'num' ? 'num' : setting.type === 'keybind' ? 'keybind' : ''; + const row = document.createElement('div'); + row.className = 'setting settName safety-0' + (typeClass ? ' ' + typeClass : ''); + row.innerHTML = + '' + escapeHtml(setting.title) + '' + + (setting.desc ? '
' + escapeHtml(setting.desc) + '
' : ''); + + switch (setting.type) { + case 'bool': { + const label = document.createElement('label'); + label.className = 'switch'; + label.innerHTML = + '' + + '
'; + row.appendChild(label); + const input = label.querySelector('input') as HTMLInputElement; + input.addEventListener('change', () => { + setting.value = input.checked; + if (typeof setting.changed === 'function') setting.changed(setting.value); + saveScriptSetting(inst, key); + }); + break; + } + case 'num': { + const input = document.createElement('input'); + input.type = 'number'; + input.className = 'rb-input s-update sliderVal'; + input.value = String(setting.value); + if (setting.min !== undefined) input.min = String(setting.min); + if (setting.max !== undefined) input.max = String(setting.max); + if (setting.step !== undefined) input.step = String(setting.step); + row.appendChild(input); + input.addEventListener('change', () => { + setting.value = parseFloat(input.value) || 0; + if (typeof setting.changed === 'function') setting.changed(setting.value); + saveScriptSetting(inst, key); + }); + break; + } + case 'sel': { + const select = document.createElement('select'); + select.className = 's-update inputGrey2'; + if (setting.opts) { + for (const opt of setting.opts) { + const option = document.createElement('option'); + option.value = String(opt); + option.textContent = String(opt); + if (String(opt) === String(setting.value)) option.selected = true; + select.appendChild(option); + } + } + row.appendChild(select); + select.addEventListener('change', () => { + setting.value = select.value; + if (typeof setting.changed === 'function') setting.changed(setting.value); + saveScriptSetting(inst, key); + }); + break; + } + case 'color': { + const input = document.createElement('input'); + input.type = 'color'; + input.className = 'kpc-color-input'; + input.value = String(setting.value) || '#ffffff'; + row.appendChild(input); + input.addEventListener('input', () => { + setting.value = input.value; + if (typeof setting.changed === 'function') setting.changed(setting.value); + saveScriptSetting(inst, key); + }); + break; + } + case 'keybind': { + const bind = setting.value as Keybind; + const keyEl = document.createElement('span'); + keyEl.className = 'keyIcon kpc-keyIcon'; + keyEl.textContent = keybindDisplayString(bind); + keyEl.addEventListener('click', () => { + openKeybindDialog(setting.title).then((newBind) => { + setting.value = newBind; + keyEl.textContent = keybindDisplayString(newBind); + if (typeof setting.changed === 'function') setting.changed(setting.value); + saveScriptSetting(inst, key); + }); + }); + row.appendChild(keyEl); + break; + } + } + + container.appendChild(row); + } +} + +function saveScriptSetting(inst: UserscriptInstance, _key: string): void { + if (!inst.settings) return; + const prefs: Record = {}; + for (const [k, s] of Object.entries(inst.settings)) { + prefs[k] = s.value; + } + ipcRenderer.invoke('userscripts-save-prefs', inst.filename, prefs); +} + +// ── Hide menu popups (polling-based, safe per MutationObserver constraint) ── +let _hidePopupsInterval: ReturnType | null = null; +const HIDE_POPUPS_CSS = + '#leftTabsHolder > .youNewDiv:not(#battlepassAd), .webpush-container, ' + + '#homeStoreAd, #streamContainerNew, #bundlePop, #genericPop.claimPop, ' + + '#newsHolder, #streamContainer { display: none !important; }'; +const HIDE_POPUPS_ELS = ['homeStoreAd', 'streamContainerNew']; + +function startHidePopups(): void { + if (_hidePopupsInterval) return; + if (!document.getElementById('kpc-hideMenuPopups')) { + const style = document.createElement('style'); + style.id = 'kpc-hideMenuPopups'; + style.textContent = HIDE_POPUPS_CSS; + document.head.appendChild(style); + } + const w = window as any; + _hidePopupsInterval = setInterval(() => { + for (const id of HIDE_POPUPS_ELS) { + const el = document.getElementById(id); + if (el && el.style.display !== 'none') el.style.display = 'none'; + } + const bundlePop = document.getElementById('bundlePop'); + if (bundlePop && bundlePop.children.length > 0 && bundlePop.style.display !== 'none') { + if (typeof w.clearPops === 'function') w.clearPops(); + } + const genericPop = document.getElementById('genericPop'); + if (genericPop && genericPop.classList.contains('claimPop') && genericPop.style.display !== 'none') { + if (typeof w.clearPops === 'function') w.clearPops(); + } + }, 1000); +} + +function stopHidePopups(): void { + if (_hidePopupsInterval) { clearInterval(_hidePopupsInterval); _hidePopupsInterval = null; } + const style = document.getElementById('kpc-hideMenuPopups'); + if (style) style.remove(); + for (const id of HIDE_POPUPS_ELS) { + const el = document.getElementById(id); + if (el) el.style.display = ''; + } +} + +// ── Matchmaker IPC listener ── +ipcRenderer.on('matchmaker-find', (_e, mmConfig: MatchmakerConfig) => { + fetchGame(mmConfig, _console).catch((err) => _console.error('[KCC] Matchmaker error:', err)); +}); + +// ── Chat pause ── +let chatPaused = false; +let chatSavedScrollTop = 0; + +function onChatWheel(e: WheelEvent): void { + const chatList = document.getElementById('chatList'); + if (!chatList) return; + chatSavedScrollTop = Math.max(0, Math.min( + chatSavedScrollTop + e.deltaY, + chatList.scrollHeight - chatList.clientHeight, + )); + chatList.scrollTop = chatSavedScrollTop; +} + +ipcRenderer.on('toggle-chat-pause', () => { + const chatList = document.getElementById('chatList'); + if (!chatList) return; + + chatPaused = !chatPaused; + + if (chatPaused) { + chatSavedScrollTop = chatList.scrollTop; + chatList.classList.add('kpc-chat-paused'); + chatList.style.overflow = 'hidden'; + chatList.addEventListener('wheel', onChatWheel, { passive: true }); + } else { + chatList.classList.remove('kpc-chat-paused'); + chatList.style.overflow = ''; + chatList.removeEventListener('wheel', onChatWheel); + chatList.scrollTop = chatList.scrollHeight; + } +}); + +// ── Wait for main process to signal page load, then poll for settings window ── +ipcRenderer.on('main_did-finish-load', () => { + _console.log('[KCC] did-finish-load received, waiting to hook settings...'); + + const isGamePage = window.location.pathname === '/' || window.location.pathname === ''; + + // ── Batch all config reads into a single IPC call ── + (window as any).closeClient = () => window.close(); + Promise.all([ + ipcRenderer.invoke('get-all-config', ['ui', 'userscripts', 'game', 'translator', 'keybinds', 'discord', 'advanced', 'performance']), + ipcRenderer.invoke('get-platform'), + ipcRenderer.invoke('get-version'), + ]).then(([allConf, _platformInfo, currentVersion]: [any, any, string]) => { + const uiConf = allConf.ui; + const usConf = allConf.userscripts; + const gameConf = allConf.game; + const translatorConf = allConf.translator; + const discordConf = allConf.discord; + const advConf = allConf.advanced; + + // ── Verbose logging toggle ── + _verboseLogging = advConf?.verboseLogging ?? false; + + // ── Exit button + UI toggles ── + const showExit = uiConf ? (uiConf.showExitButton !== false) : true; + const showExitBtn = () => { + const btn = document.getElementById('clientExit'); + if (btn) { + btn.style.display = showExit ? 'flex' : 'none'; + return true; + } + return false; + }; + if (!showExitBtn()) { + let exitAttempts = 0; + const exitPoll = setInterval(() => { + if (showExitBtn() || ++exitAttempts > 30) clearInterval(exitPoll); + }, 500); + } + + if (uiConf?.deathscreenAnimation) setDeathAnimBlock(true); + if (uiConf?.hideMenuPopups) startHidePopups(); + if (uiConf?.cleanerMenu) setCleanerMenu(true); + + // ── Double ping display ── + if (isGamePage && (uiConf?.doublePing ?? true)) { + initDoublePing(); + } + + // ── Show ping in player list ── + if (isGamePage && (gameConf?.showPing ?? true)) { + initShowPing(); + } + + // ── Raw input (Windows only — unadjustedMovement) ── + if (isGamePage && process.platform === 'win32' && (gameConf?.rawInput ?? true)) { + const origLock = HTMLCanvasElement.prototype.requestPointerLock; + HTMLCanvasElement.prototype.requestPointerLock = function (opts?: any) { + const promise = origLock.call(this, { ...opts, unadjustedMovement: true }) as any; + if (promise && typeof promise.catch === 'function') { + return promise.catch(() => origLock.call(this, opts)); + } + return promise; + }; + } + + // ── Better chat + Chat history ── + if (isGamePage) { + initChat({ + betterChat: gameConf?.betterChat ?? true, + chatHistorySize: gameConf?.chatHistorySize ?? 200, + }, _console); + } + + // ── Hardpoint enemy counter ── + if (isGamePage && (gameConf?.hpEnemyCounter ?? true)) { + initHPCounter(); + } + + // ── CPU throttle state notifications ── + if (isGamePage) { + let inGame = false; + setInterval(() => { + const uiBase = document.getElementById('uiBase'); + const nowInGame = !!uiBase && uiBase.className !== 'onMenu' && uiBase.className !== ''; + if (nowInGame !== inGame) { + inGame = nowInGame; + ipcRenderer.send('throttle-state', inGame ? 'game' : 'menu'); + } + }, 2000); + } + + // ── Changelog popup ── + if (isGamePage && (uiConf?.showChangelog ?? true)) { + checkChangelog(currentVersion, uiConf?.lastSeenVersion || ''); + } + + // ── Initialize userscripts ── + const usEnabled = usConf ? usConf.enabled : true; + if (usEnabled) { + initUserscripts(_console).catch(err => _console.error('[KCC] Userscript init error:', err)); + } + + // ── Join as Spectator — auto-enable spectate on regular game join ── + if (isGamePage && gameConf?.joinAsSpectator) { + let attempts = 0; + const poll = setInterval(() => { + if (++attempts > 300) { clearInterval(poll); return; } + const uiBase = document.getElementById('uiBase'); + if (!uiBase || uiBase.className === '') return; + if (uiBase.className === 'onMenu') { + const specBtn = document.querySelector('#spectButton input') as HTMLInputElement; + if (specBtn && !specBtn.checked) { + (window as any).setSpect(1); + } + clearInterval(poll); + } else { + clearInterval(poll); + } + }, 100); + } + + // ── Initialize chat translator (game page only) ── + if (isGamePage) { + const mergedTl = { enabled: true, targetLanguage: 'en', showLanguageTag: true, ...translatorConf }; + initTranslator(_console, mergedTl); + } + + // ── Discord Rich Presence game state polling ── + if (isGamePage && discordConf?.enabled) { + let lastDetails = ''; + let lastState = ''; + let gameStartTimestamp = Math.floor(Date.now() / 1000); + + function pollDiscordState(): void { + let details: string; + let state = ''; + let startTimestamp: number | undefined = undefined; + + const w = window as any; + const spectating = w.spectating; + + let gameActivity: any = null; + if (typeof w.getGameActivity === 'function') { + try { gameActivity = w.getGameActivity(); } catch { /* game API unavailable */ } + } + + if (spectating) { + details = 'Spectating'; + if (gameActivity?.map) { + state = gameActivity.map; + } + } else { + const uiBase = document.getElementById('uiBase'); + if (uiBase && uiBase.className === 'onMenu') { + details = 'In Menus'; + } else { + if (gameActivity?.mode && gameActivity?.map) { + details = gameActivity.mode + ' on ' + gameActivity.map; + } else { + const mapInfo = document.getElementById('mapInfo'); + details = mapInfo?.textContent || 'Playing Krunker'; + } + + if (gameActivity?.class?.name) { + state = gameActivity.class.name; + } else { + const classElem = document.getElementById('menuClassName'); + if (classElem?.textContent) state = classElem.textContent; + } + + startTimestamp = gameStartTimestamp; + } + } + + if (details !== lastDetails || state !== lastState) { + if (startTimestamp && lastDetails !== details) { + gameStartTimestamp = Math.floor(Date.now() / 1000); + startTimestamp = gameStartTimestamp; + } + lastDetails = details; + lastState = state; + ipcRenderer.send('discord-update', { + details, + state: state || undefined, + startTimestamp, + largeImageKey: 'krunker', + largeImageText: 'Krunker Civilian Client', + }); + } + } + + pollDiscordState(); + setInterval(pollDiscordState, 5000); + document.addEventListener('pointerlockchange', pollDiscordState); + } + // ── In-game Accounts quick-switch button ── + if (isGamePage) { + ipcRenderer.invoke('alt-list').then(() => { + const altBtn = document.createElement('div'); + altBtn.id = 'kpcAltBtn'; + altBtn.className = 'menuItem'; + altBtn.setAttribute('onmouseenter', 'playTick()'); + altBtn.innerHTML = + 'people' + + ''; + + function showAltManager(): void { + const windowHolder = document.getElementById('windowHolder') as HTMLElement; + const menuWindow = document.getElementById('menuWindow') as HTMLElement; + const windowHeader = document.getElementById('windowHeader') as HTMLElement; + if (!windowHolder || !menuWindow || !windowHeader) return; + + if (windowHolder.style.display !== 'none' && windowHeader.innerText === 'Alt Manager') { + windowHolder.style.display = 'none'; + return; + } + + windowHolder.className = 'popupWin'; + windowHolder.style.display = 'block'; + menuWindow.classList.value = 'dark'; + menuWindow.style.cssText = 'width:800px;max-height:calc(100% - 330px);overflow-y:auto;top:50%;transform:translate(-50%,-50%);'; + windowHeader.innerText = 'Alt Manager'; + + function renderAccountList(): void { + ipcRenderer.invoke('alt-list').then((accs: any[]) => { + let html = + '
Alt Manager
' + + '
' + + '
Add Account
' + + '
'; + + if (!accs || accs.length === 0) { + html += '
No saved accounts
'; + } else { + accs.forEach((acc, i) => { + html += + '
' + + '' + escapeHtml(acc.label) + '' + + '' + + '
' + + '
' + + 'delete' + + '
' + + '
'; + }); + } + html += '
'; + menuWindow.innerHTML = html; + + const addBtn = document.getElementById('kpcAltAddBtn'); + if (addBtn) addBtn.addEventListener('click', showAddForm); + + menuWindow.querySelectorAll('.kpc-alt-login').forEach((el) => { + el.addEventListener('click', () => { + const idx = parseInt((el as HTMLElement).dataset.idx || '0', 10); + if (accs[idx]) { + windowHolder.style.display = 'none'; + ipcRenderer.invoke('alt-get-credentials', idx).then((creds: { username: string; password: string } | null) => { + if (creds) switchToAccount(creds); + }); + } + }); + }); + + menuWindow.querySelectorAll('.kpc-alt-del').forEach((el) => { + el.addEventListener('click', () => { + const idx = parseInt((el as HTMLElement).dataset.idx || '0', 10); + if (confirm('Delete account "' + (accs[idx]?.label || '') + '"?')) { + ipcRenderer.invoke('alt-remove', idx).then(() => renderAccountList()); + } + }); + }); + }); + } + + function showAddForm(): void { + menuWindow.innerHTML = + '
' + + '
Add Account
' + + '' + + '' + + '' + + '
' + + '
Add Account
' + + '
Back
' + + '
' + + '
'; + + // Stop Krunker's global keydown handler from eating keystrokes in our inputs + menuWindow.querySelectorAll('input.accountInput').forEach((input) => { + input.addEventListener('keydown', (e) => e.stopPropagation()); + }); + + document.getElementById('kpcAltBackBtn')!.addEventListener('click', renderAccountList); + document.getElementById('kpcAltSaveBtn')!.addEventListener('click', () => { + const label = (document.getElementById('kpcAltLabel') as HTMLInputElement).value.trim(); + const user = (document.getElementById('kpcAltUser') as HTMLInputElement).value.trim(); + const pass = (document.getElementById('kpcAltPass') as HTMLInputElement).value; + if (!label || !user || !pass) return; + ipcRenderer.invoke('alt-save', { + label, + username: user, + password: pass, + }).then(() => renderAccountList()); + }); + } + + renderAccountList(); + } + + altBtn.addEventListener('click', (e) => { + e.stopPropagation(); + (window as any).playSelect?.(); + showAltManager(); + }); + + function injectAltBtn(): boolean { + if (document.getElementById('kpcAltBtn')) return true; + const menuContainer = document.getElementById('menuItemContainer'); + if (!menuContainer) return false; + const exitBtn = document.getElementById('clientExit'); + if (exitBtn) { + menuContainer.insertBefore(altBtn, exitBtn); + } else { + menuContainer.appendChild(altBtn); + } + return true; + } + + if (!injectAltBtn()) { + let attempts = 0; + const poll = setInterval(() => { + if (injectAltBtn() || ++attempts > 60) clearInterval(poll); + }, 500); + } + }); + } + + }).catch(() => {}); + + const pollInterval = setInterval(() => { + const w = window as any; + if ( + Object.hasOwn(w, 'showWindow') + && typeof w.showWindow === 'function' + && Object.hasOwn(w, 'windows') + && Array.isArray(w.windows) + && w.windows.length >= 0 + && typeof w.windows[0] !== 'undefined' + && typeof w.windows[0].changeTab === 'function' + ) { + clearInterval(pollInterval); + _console.log('[KCC] Settings window found, hooking...'); + hookSettings(); + } + }, 500); +}); + +// ── Lightweight tab page init (skips game-only features) ── +ipcRenderer.on('main_did-finish-load-tab', () => { + _console.log('[KCC] Tab page loaded'); + (window as any).closeClient = () => window.close(); +}); diff --git a/src/preload/matchmaker.ts b/src/preload/matchmaker.ts new file mode 100644 index 0000000..de07ea8 --- /dev/null +++ b/src/preload/matchmaker.ts @@ -0,0 +1,455 @@ +// ── Custom Matchmaker (ported from Crankshaft) ── +// Fetches live lobby list from matchmaker.krunker.io, filters by user criteria, +// sorts by lowest ping then highest player count, and joins the best match. +// Shows a live lobby-cycling search popup while scanning. + +import { ipcRenderer } from 'electron'; +import type { Keybind } from '../main/config'; +import type { SavedConsole } from './utils'; + +export const MATCHMAKER_GAMEMODES = ['Free for All', 'Team Deathmatch', 'Hardpoint', 'Capture the Flag', 'Parkour', 'Hide & Seek', 'Infected', 'Race', 'Last Man Standing', 'Simon Says', 'Gun Game', 'Prop Hunt', 'Boss Hunt', 'Classic FFA', 'Deposit', 'Stalker', 'King of the Hill', 'One in the Chamber', 'Trade', 'Kill Confirmed', 'Defuse', 'Sharp Shooter', 'Traitor', 'Raid', 'Blitz', 'Domination', 'Squad Deathmatch', 'Kranked FFA', 'Team Defender', 'Deposit FFA', 'Chaos Snipers', 'Bighead FFA']; +export const MATCHMAKER_REGIONS = ['MBI', 'NY', 'FRA', 'SIN', 'DAL', 'SYD', 'MIA', 'BHN', 'TOK', 'BRZ', 'AFR', 'LON', 'CHI', 'SV', 'STL', 'MX']; +export const MATCHMAKER_REGION_NAMES: Record = { MBI: 'Mumbai', NY: 'New York', FRA: 'Frankfurt', SIN: 'Singapore', DAL: 'Dallas', SYD: 'Sydney', MIA: 'Miami', BHN: 'Middle East', TOK: 'Tokyo', BRZ: 'Brazil', AFR: 'South Africa', LON: 'London', CHI: 'China', SV: 'Silicon Valley', STL: 'Seattle', MX: 'Mexico' }; +export const MAP_ICON_INDICES = ['Burg', 'Littletown', 'Sandstorm', 'Subzero', 'Undergrowth', 'Shipment', 'Freight', 'Lostworld', 'Citadel', 'Oasis', 'Kanji', 'Industry', 'Lumber', 'Evacuation', 'Site', 'SkyTemple', 'Lagoon', 'Bureau', 'Tortuga', 'Tropicano', 'Krunk_Plaza', 'Arena', 'Habitat', 'Atomic', 'Old_Burg', 'Throwback', 'Stockade', 'Facility', 'Clockwork', 'Laboratory', 'Shipyard', 'Soul Sanctum', 'Bazaar', 'Erupt', 'HQ', 'Khepri', 'Lush', 'Vivo', 'Slide Moonlight', 'Eterno Sim']; +export const MATCHMAKER_MAP_NAMES: Record = { + SkyTemple: 'Sky Temple', Krunk_Plaza: 'Krunk Plaza', Old_Burg: 'Old Burg', + 'Soul Sanctum': 'Soul Sanctum', 'Slide Moonlight': 'Slide Moonlight', 'Eterno Sim': 'Eterno Sim', +}; + +// ── Animation constants ── +const MAX_FEED_ENTRIES = 4; +const MAX_ANIMATION_MS = 2000; +const BASE_TICK_MS = 80; +const MIN_TICK_MS = 20; +const POST_SCAN_PAUSE_MS = 300; +const SCAN_FLASH_MS = 800; + +interface MatchmakerGame { + gameID: string; + region: string; + playerCount: number; + playerLimit: number; + map: string; + gamemode: string; + remainingTime: number; +} + +interface RawLobby extends MatchmakerGame { + passesFilter: boolean; +} + +export interface MatchmakerConfig { + enabled: boolean; + regions: string[]; + gamemodes: string[]; + maps: string[]; + minPlayers: number; + maxPlayers: number; + minRemainingTime: number; + openServerBrowser: boolean; + autoJoin: boolean; + acceptKey: Keybind; + cancelKey: Keybind; +} + +function secondsToTimestring(num: number): string { + const minutes = Math.floor(num / 60); + const seconds = num % 60; + if (minutes < 1) return `${num}s`; + return `${minutes}m ${seconds}s`; +} + +function matchesKey(bind: Keybind, event: KeyboardEvent): boolean { + if ((document.activeElement as HTMLElement)?.tagName === 'INPUT') return false; + return event.key === bind.key + && event.shiftKey === bind.shift + && event.altKey === bind.alt + && event.ctrlKey === bind.ctrl; +} + +// ── Popup DOM (created once, reused) ── +const POPUP_ID = 'matchmakerPopupContainer'; +const popupElement = document.createElement('div'); +popupElement.id = POPUP_ID; + +// Result-phase elements +const popupTitle = document.createElement('div'); +popupTitle.id = 'matchmakerPopupTitle'; +popupElement.appendChild(popupTitle); + +const popupDescription = document.createElement('div'); +popupDescription.id = 'matchmakerPopupDescription'; +popupElement.appendChild(popupDescription); + +const popupOptions = document.createElement('div'); +popupOptions.id = 'matchmakerPopupOptions'; + +const popupConfirmBtn = document.createElement('div'); +popupConfirmBtn.id = 'matchmakerConfirmButton'; +popupConfirmBtn.className = 'matchmakerPopupButton bigShadowT'; +popupConfirmBtn.textContent = 'Join'; +popupConfirmBtn.setAttribute('onmouseenter', 'playTick()'); +popupConfirmBtn.addEventListener('click', () => decideMatchmakerDecision(true)); + +const popupCancelBtn = document.createElement('div'); +popupCancelBtn.id = 'matchmakerCancelButton'; +popupCancelBtn.className = 'matchmakerPopupButton bigShadowT'; +popupCancelBtn.textContent = 'Cancel'; +popupCancelBtn.setAttribute('onmouseenter', 'playTick()'); +popupCancelBtn.addEventListener('click', () => decideMatchmakerDecision(false)); + +popupOptions.appendChild(popupConfirmBtn); +popupOptions.appendChild(popupCancelBtn); +popupElement.appendChild(popupOptions); + +// Search-phase elements +const searchContainer = document.createElement('div'); +searchContainer.id = 'matchmakerSearchContainer'; + +const searchStatus = document.createElement('div'); +searchStatus.id = 'matchmakerSearchStatus'; +searchContainer.appendChild(searchStatus); + +const searchFeed = document.createElement('div'); +searchFeed.id = 'matchmakerSearchFeed'; +searchContainer.appendChild(searchFeed); + +const searchCounter = document.createElement('div'); +searchCounter.id = 'matchmakerSearchCounter'; +searchContainer.appendChild(searchCounter); + +const searchCancelBtn = document.createElement('div'); +searchCancelBtn.id = 'matchmakerSearchCancel'; +searchCancelBtn.textContent = 'Cancel'; +searchCancelBtn.setAttribute('onmouseenter', 'playTick()'); +searchCancelBtn.addEventListener('click', () => abortSearch()); +searchContainer.appendChild(searchCancelBtn); + +popupElement.appendChild(searchContainer); + +// ── State ── +let popupGameID = ''; +let popupCandidates: MatchmakerGame[] = []; +let openServerBrowser = true; +let confirmKey: Keybind = { key: 'Enter', ctrl: false, shift: false, alt: false }; +let cancelKey: Keybind = { key: 'Escape', ctrl: false, shift: false, alt: false }; +let searchAborted = false; + +function abortSearch(): void { + searchAborted = true; + const w = window as any; + if (typeof w.playSelect === 'function') w.playSelect(); + dismissPopup(); +} + +async function verifyAndJoin(gameID: string): Promise { + try { + const resp = await fetch(`https://matchmaker.krunker.io/game-list?hostname=${window.location.hostname}`); + const result = await resp.json(); + const liveMap = new Map(); + for (const g of result.games) { + liveMap.set(g[0], { players: g[2], limit: g[3] }); + } + + const ordered = [gameID, ...popupCandidates.filter(c => c.gameID !== gameID).map(c => c.gameID)]; + for (const id of ordered) { + const live = liveMap.get(id); + if (live && live.players < live.limit) { + dismissPopup(); + window.location.href = `https://krunker.io/?game=${id}`; + return; + } + } + + dismissPopup(); + if (openServerBrowser && typeof (window as any).openServerWindow === 'function') { + (window as any).openServerWindow(0); + } + } catch { + dismissPopup(); + window.location.href = `https://krunker.io/?game=${gameID}`; + } +} + +function dismissPopup(): void { + document.removeEventListener('keydown', handleSearchBind, true); + document.removeEventListener('keydown', handleMatchmakerBind, true); + if (popupElement.parentNode) popupElement.remove(); + popupElement.classList.remove('searching'); +} + +function decideMatchmakerDecision(accept: boolean): void { + const w = window as any; + if (typeof w.playSelect === 'function') w.playSelect(); + + if (accept && popupGameID !== 'none') { + verifyAndJoin(popupGameID); + } else { + dismissPopup(); + if (popupGameID === 'none' && openServerBrowser && typeof w.openServerWindow === 'function') { + w.openServerWindow(0); + } + } +} + +function handleSearchBind(event: KeyboardEvent): void { + if (document.pointerLockElement) return; + if (matchesKey(cancelKey, event)) { + event.preventDefault(); + event.stopPropagation(); + abortSearch(); + } +} + +function handleMatchmakerBind(event: KeyboardEvent): void { + if (document.pointerLockElement) return; + const isAccept = matchesKey(confirmKey, event); + const isCancel = matchesKey(cancelKey, event); + if (isAccept || isCancel) { + document.removeEventListener('keydown', handleMatchmakerBind, true); + decideMatchmakerDecision(isAccept); + } +} + +function showResultPopup(game: MatchmakerGame): void { + popupElement.classList.remove('searching'); + const mapIdx = MAP_ICON_INDICES.indexOf(game.map); + popupElement.style.backgroundImage = `url(https://assets.krunker.io/img/maps/map_${mapIdx >= 0 ? mapIdx : 0}.png)`; + + popupGameID = game.gameID; + if (game.gameID === 'none') { + popupTitle.innerText = 'No Games Found...'; + popupDescription.innerHTML = 'Check the server browser to see other lobbies.'; + popupConfirmBtn.style.display = 'none'; + } else { + popupTitle.innerText = 'Game Found!'; + const regionName = MATCHMAKER_REGION_NAMES[game.region] ?? 'Unknown Region'; + popupDescription.innerHTML = `${game.gamemode} on ${game.map} (${regionName})
${game.playerCount}/${game.playerLimit} Players, ${secondsToTimestring(game.remainingTime)} Left`; + popupConfirmBtn.style.display = 'block'; + } + + // Re-trigger slide animation + popupElement.style.animation = 'none'; + void popupElement.offsetWidth; + popupElement.style.animation = ''; + + document.removeEventListener('keydown', handleSearchBind, true); + document.addEventListener('keydown', handleMatchmakerBind, true); +} + +function showSearchPopup(): void { + searchAborted = false; + popupElement.classList.add('searching'); + popupElement.style.backgroundImage = 'none'; + searchStatus.textContent = 'Connecting...'; + searchFeed.innerHTML = ''; + searchCounter.textContent = ''; + + document.removeEventListener('keydown', handleMatchmakerBind, true); + document.addEventListener('keydown', handleSearchBind, true); + + const uiBase = document.getElementById('uiBase'); + if (uiBase) uiBase.appendChild(popupElement); +} + +function createFeedEntry(lobby: RawLobby): HTMLDivElement { + const entry = document.createElement('div'); + entry.className = `mm-feed-entry ${lobby.passesFilter ? 'mm-pass' : 'mm-fail'}`; + + const region = document.createElement('span'); + region.className = 'mm-feed-region'; + region.textContent = lobby.region; + + const map = document.createElement('span'); + map.className = 'mm-feed-map'; + map.textContent = lobby.map; + + const players = document.createElement('span'); + players.className = 'mm-feed-players'; + players.textContent = `${lobby.playerCount}/${lobby.playerLimit}`; + + entry.appendChild(region); + entry.appendChild(map); + entry.appendChild(players); + return entry; +} + +async function animateLobbyScan(lobbies: RawLobby[]): Promise { + if (lobbies.length === 0) return; + + searchStatus.textContent = 'Scanning lobbies...'; + const total = lobbies.length; + + const maxEntries = Math.floor(MAX_ANIMATION_MS / BASE_TICK_MS); + const step = total > maxEntries ? total / maxEntries : 1; + const tickMs = total > maxEntries ? BASE_TICK_MS : Math.max(MIN_TICK_MS, Math.min(BASE_TICK_MS, MAX_ANIMATION_MS / total)); + + for (let f = 0; f < total; f += step) { + if (searchAborted) return; + const i = Math.min(Math.floor(f), total - 1); + + const entry = createFeedEntry(lobbies[i]); + searchFeed.appendChild(entry); + + while (searchFeed.children.length > MAX_FEED_ENTRIES) { + searchFeed.removeChild(searchFeed.firstChild!); + } + + searchCounter.textContent = `Checked: ${i + 1} / ${total} lobbies`; + + await new Promise(r => setTimeout(r, tickMs)); + } + + searchCounter.textContent = `Checked: ${total} / ${total} lobbies`; + + if (!searchAborted) { + await new Promise(r => setTimeout(r, POST_SCAN_PAUSE_MS)); + } +} + +async function fetchAllGames(mmConfig: MatchmakerConfig): Promise<{ all: RawLobby[]; filtered: MatchmakerGame[] }> { + const response = await fetch(`https://matchmaker.krunker.io/game-list?hostname=${window.location.hostname}`); + const result = await response.json(); + const all: RawLobby[] = []; + const filtered: MatchmakerGame[] = []; + + for (const game of result.games) { + const gameID: string = game[0]; + const region = gameID.split(':')[0]; + const playerCount: number = game[2]; + const playerLimit: number = game[3]; + const map: string = game[4].i; + const gamemode = MATCHMAKER_GAMEMODES[game[4].g] ?? 'Unknown Gamemode'; + const remainingTime: number = game[5]; + + let passesFilter = true; + if (mmConfig.regions.length > 0 && !mmConfig.regions.includes(region)) passesFilter = false; + else if (mmConfig.gamemodes.length > 0 && !mmConfig.gamemodes.includes(gamemode)) passesFilter = false; + else if (mmConfig.maps.length > 0 && !mmConfig.maps.includes(map)) passesFilter = false; + else if (playerCount < mmConfig.minPlayers) passesFilter = false; + else if (playerCount > mmConfig.maxPlayers) passesFilter = false; + else if (remainingTime < mmConfig.minRemainingTime) passesFilter = false; + else if (playerCount === playerLimit) passesFilter = false; + else if (window.location.href.includes(gameID)) passesFilter = false; + + const lobby = { gameID, region, playerCount, playerLimit, map, gamemode, remainingTime, passesFilter }; + all.push(lobby); + if (passesFilter) filtered.push(lobby); + } + + return { all, filtered }; +} + +function sortByPingThenPlayers(games: MatchmakerGame[], pings: Record): MatchmakerGame[] { + return games.sort((a, b) => { + const pingA = pings[a.region] ?? 999; + const pingB = pings[b.region] ?? 999; + if (pingA !== pingB) return pingA - pingB; + return b.playerCount - a.playerCount; + }); +} + +export async function fetchGame(mmConfig: MatchmakerConfig, _con?: SavedConsole): Promise { + openServerBrowser = mmConfig.openServerBrowser; + confirmKey = mmConfig.acceptKey; + cancelKey = mmConfig.cancelKey; + + // Dismiss existing popup if active (also aborts in-flight search) + searchAborted = true; + dismissPopup(); + + // Phase 1: Show search popup immediately + showSearchPopup(); + _con?.log('[KCC-MM] Fetching game list + pings...'); + + // Phase 2: Fetch data + let allLobbies: RawLobby[]; + let filtered: MatchmakerGame[]; + let pings: Record; + try { + const [fetchResult, pingResult] = await Promise.all([ + fetchAllGames(mmConfig), + ipcRenderer.invoke('ping-regions').catch(() => ({} as Record)), + ]); + allLobbies = fetchResult.all; + filtered = fetchResult.filtered; + pings = pingResult; + } catch { + if (!searchAborted) { + searchStatus.textContent = 'Failed to fetch lobbies'; + await new Promise(r => setTimeout(r, 2000)); + dismissPopup(); + } + return; + } + + if (searchAborted) return; + + _con?.log('[KCC-MM]', filtered.length, '/', allLobbies.length, 'games passed filters'); + + // Sort immediately — result is ready + if (filtered.length > 0) sortByPingThenPlayers(filtered, pings); + popupCandidates = filtered; + + // Fire animation in background (non-blocking eye candy) + animateLobbyScan(allLobbies); + + // Brief visual flash of the feed before showing result + await new Promise(r => setTimeout(r, SCAN_FLASH_MS)); + if (searchAborted) return; + + // Phase 3: Show result + if (filtered.length > 0) { + // Pick randomly from the top tier of comparable matches for variety + const top = filtered[0]; + const topPing = pings[top.region] ?? 999; + const pool = filtered.filter(g => { + const gPing = pings[g.region] ?? 999; + return Math.abs(gPing - topPing) <= 20 + && top.playerCount - g.playerCount <= 2; + }); + const best = pool[Math.floor(Math.random() * pool.length)]; + _con?.log('[KCC-MM] Best match:', best.gameID, best.region, best.map, `(${pings[best.region] ?? '?'}ms, pool: ${pool.length})`); + + if (mmConfig.autoJoin) { + // Brief "Lobby Found!" flash before joining + const regionName = MATCHMAKER_REGION_NAMES[best.region] ?? best.region; + searchStatus.textContent = 'Lobby Found!'; + searchFeed.innerHTML = ''; + const found = document.createElement('div'); + found.className = 'mm-feed-entry mm-pass'; + found.style.cssText = 'font-size:1.1em;justify-content:center;'; + found.innerHTML = + `${best.region}` + + `${best.map}` + + `${best.playerCount}/${best.playerLimit}`; + searchFeed.appendChild(found); + searchCounter.textContent = `${best.gamemode} \u00B7 ${regionName} \u00B7 ${pings[best.region] ?? '?'}ms`; + await new Promise(r => setTimeout(r, 1200)); + await verifyAndJoin(best.gameID); + return; + } + + showResultPopup(best); + } else { + _con?.log('[KCC-MM] No matching games found'); + + if (mmConfig.autoJoin) { + dismissPopup(); + if (openServerBrowser && typeof (window as any).openServerWindow === 'function') { + (window as any).openServerWindow(0); + } + return; + } + + showResultPopup({ + gameID: 'none', + region: 'none', + playerCount: 0, + playerLimit: 0, + map: MAP_ICON_INDICES[0], + gamemode: MATCHMAKER_GAMEMODES[0], + remainingTime: 0, + }); + } +} diff --git a/src/preload/translator.ts b/src/preload/translator.ts new file mode 100644 index 0000000..5d357b5 --- /dev/null +++ b/src/preload/translator.ts @@ -0,0 +1,361 @@ +import type { SavedConsole } from './utils'; + +// ── Config ── + +interface TranslatorConfig { + enabled: boolean; + targetLanguage: string; + showLanguageTag: boolean; +} + +const DEFAULTS: TranslatorConfig = { + enabled: true, + targetLanguage: 'en', + showLanguageTag: true, +}; + +// ── Module state ── + +let _con: SavedConsole; +let cfg: TranslatorConfig = { ...DEFAULTS }; +let chatObserver: MutationObserver | null = null; +let pollTimer: ReturnType | null = null; + +// ── Translation cache (sessionStorage, 10-min expiry) ── + +const CACHE_KEY_PREFIX = 'kccTL_'; +const CACHE_EXPIRY_MS = 10 * 60 * 1000; + +interface CacheEntry { + t: string; // translation + l: string; // source language + ts: number; // timestamp +} + +function cacheGet(text: string): CacheEntry | null { + try { + const raw = sessionStorage.getItem(CACHE_KEY_PREFIX + text.toLowerCase().trim()); + if (!raw) return null; + const entry: CacheEntry = JSON.parse(raw); + if (Date.now() - entry.ts > CACHE_EXPIRY_MS) return null; + return entry; + } catch { return null; } +} + +function cacheSet(text: string, translation: string, srcLang: string): void { + try { + const entry: CacheEntry = { t: translation, l: srcLang, ts: Date.now() }; + sessionStorage.setItem(CACHE_KEY_PREFIX + text.toLowerCase().trim(), JSON.stringify(entry)); + } catch { /* sessionStorage full */ } +} + +// ── Skip terms (gaming/chat slang — never sent for translation) ── + +const SKIP_TERMS = new Set([ + // Greetings & basics + 'hi', 'hey', 'hello', 'yo', 'sup', 'bye', 'cya', 'gn', 'gm', + 'yes', 'no', 'yep', 'yea', 'yeah', 'nah', 'nope', 'ok', 'okay', 'kk', + // Chat abbreviations + 'lol', 'lmao', 'lmfao', 'rofl', 'omg', 'omfg', 'wtf', 'wth', + 'bruh', 'bro', 'dude', 'man', 'brb', 'afk', 'gtg', 'g2g', + 'smh', 'tbh', 'imo', 'imho', 'ngl', 'fr', 'frfr', 'fax', + 'idk', 'idc', 'idgaf', 'nvm', 'stfu', 'pls', 'plz', + 'thx', 'ty', 'tysm', 'np', 'yw', 'mb', 'sry', 'sorry', + 'bet', 'cap', 'nocap', 'sus', 'mid', 'based', 'cringe', 'ratio', + 'rip', 'oof', 'uwu', 'owo', 'xd', 'xdd', 'xddd', 'lel', 'kek', + 'damn', 'dang', 'boi', 'fam', 'goat', 'goated', + 'lit', 'vibe', 'vibes', 'lowkey', 'highkey', 'deadass', + 'nice', 'cool', 'sick', 'fire', 'trash', 'ass', 'toxic', + 'wow', 'whoa', 'wha', 'huh', 'wat', 'wut', 'hmm', + // Gaming general + 'gg', 'ggwp', 'ggez', 'wp', 'ez', 'gl', 'hf', 'glhf', + 'nt', 'ns', 'gj', 'mvp', 'clutch', 'ace', 'carry', + 'noob', 'newb', 'n00b', 'bot', 'tryhard', 'sweat', 'sweaty', + 'hack', 'hacks', 'hacker', 'hax', 'cheater', 'cheats', + 'lag', 'laggy', 'ping', 'fps', 'dc', 'disconnect', + 'nerf', 'buff', 'op', 'broken', 'meta', 'spam', 'camp', 'camper', + 'aim', 'aimbot', 'wh', 'wallhack', 'esp', + 'rush', 'push', 'rotate', 'flank', 'peek', 'hold', + 'one', 'low', 'dead', 'down', 'res', 'revive', + 'w', 'l', 'dub', 'win', 'loss', 'f', 'ggs', + // Krunker-specific + 'kr', 'ak', 'smg', 'sniper', 'shotty', 'rev', 'semi', + 'crossy', 'famas', 'rpg', 'lmg', 'deagle', 'comp', + 'pub', 'pubs', 'ranked', 'nuke', 'nuked', 'nuking', + 'kpd', 'bhop', 'bhopping', 'slidehopping', 'slidehop', + 'krunker', 'krunky', 'yendis', 'krunkitis', + 'contra', 'relic', 'unob', 'unobtainable', 'spin', + 'market', 'trade', 'gift', 'drop', 'drops', 'skin', 'skins', + 'clan', 'verified', 'lvl', 'level', + 'trig', 'trigger', 'runner', 'det', 'detective', + 'vince', 'bowman', 'spray', 'agent', 'rocketeer', + 'streamer', 'ttv', + // Emoticons + ':)', ':(', ':d', ':p', ':o', '<3', +]); + +// ── False-positive source languages ── + +const FALSE_POSITIVE_LANGS = new Set([ + 'so', 'cy', 'ht', 'hmn', 'ceb', 'haw', 'la', 'mg', 'mi', + 'ny', 'sm', 'st', 'su', 'sw', 'tl', 'yo', 'zu', 'sn', + 'ig', 'rw', 'co', 'fy', 'gd', 'lb', 'mt', 'eo', +]); + +// ── Auto-suppression (repeated short phrases) ── + +const suppressionCounts = new Map(); +const SUPPRESS_THRESHOLD = 3; +const MIN_LATIN_WORDS = 3; +const SHORT_TEXT_THRESHOLD = 15; + +// ── Concurrency control ── + +let activeRequests = 0; +const MAX_CONCURRENT = 3; +const pendingQueue: Array<() => void> = []; + +function enqueue(fn: () => Promise): void { + if (activeRequests < MAX_CONCURRENT) { + activeRequests++; + fn().finally(() => { + activeRequests--; + if (pendingQueue.length > 0) pendingQueue.shift()!(); + }); + } else { + pendingQueue.push(() => enqueue(fn)); + } +} + +// ── System message patterns to skip ── + +const SYSTEM_PATTERNS = [ + 'joined the game', 'left the game', 'has been kicked', 'has been banned', + 'vote to kick', 'press f1', 'connecting', 'connected', 'was arrested', + 'started a vote', 'was kicked', 'was banned', +]; + +// ── Pre-translation filtering ── + +function isLatinOnly(text: string): boolean { + // eslint-disable-next-line no-control-regex + return /^[\x00-\x7F\u00C0-\u024F\u1E00-\u1EFF\s\d.,!?;:'"()\-/@#$%^&*+=~`[\]{}|\\<>]+$/u.test(text); +} + +function shouldTranslate(text: string): boolean { + const cleaned = text.trim(); + if (cleaned.length < 2) return false; + + // Tokenize for skip-term checking + const words = cleaned.replace(/[^a-zA-Z0-9\s]/g, '').toLowerCase().split(/\s+/).filter(w => w.length > 0); + if (words.length === 0) return false; + if (words.every(w => SKIP_TERMS.has(w))) return false; + + // Auto-suppressed phrases + const key = cleaned.toLowerCase(); + if ((suppressionCounts.get(key) ?? 0) >= SUPPRESS_THRESHOLD) return false; + + // Non-Latin characters = almost certainly needs translation + if (!isLatinOnly(cleaned)) return true; + + // Latin-only: require minimum word count (short English slang triggers false positives) + if (words.length < MIN_LATIN_WORDS) { + // Allow if accented characters suggest non-English + if (!/[À-ÿ]/.test(cleaned)) return false; + } + + return true; +} + +// ── Chat text extraction ── + +interface ChatExtraction { + message: string; + username: string; // "Username:" prefix or empty +} + +function extractChatText(node: HTMLElement): ChatExtraction | null { + const text = node.textContent?.trim(); + if (!text || text.length < 2) return null; + + // Skip nodes with images (kill feed has weapon/skull icons) + if (node.querySelector('img')) return null; + + // Skip commands + if (text.startsWith('/')) return null; + + // Skip system messages + const lower = text.toLowerCase(); + if (SYSTEM_PATTERNS.some(p => lower.includes(p))) return null; + + // Extract message content after "Username: " prefix + const colonIdx = text.indexOf(':'); + if (colonIdx > 0 && colonIdx < 25) { + const username = text.substring(0, colonIdx + 1); + const msg = text.substring(colonIdx + 1).trim(); + return msg.length >= 2 ? { message: msg, username } : null; + } + + return { message: text, username: '' }; +} + +// ── Google Translate API ── + +async function translateText(text: string): Promise<{ translation: string; srcLang: string } | null> { + // Check cache + const cached = cacheGet(text); + if (cached) return { translation: cached.t, srcLang: cached.l }; + + try { + const controller = new AbortController(); + const timeout = setTimeout(() => controller.abort(), 5000); + + const url = 'https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=' + + cfg.targetLanguage + '&dt=t&q=' + encodeURIComponent(text); + + const response = await fetch(url, { signal: controller.signal }); + clearTimeout(timeout); + + if (!response.ok) { + _con.warn('[KCC-TL] HTTP', response.status); + return null; + } + + const data = await response.json(); + if (!data?.[0]?.[0]) return null; + + const translation = (data[0] as any[]).map((item: any) => item[0]).join(''); + const srcLang: string = data[2] || 'unknown'; + + // Already in target language + if (srcLang === cfg.targetLanguage) return null; + + // Identical translation (strip punctuation/whitespace for robust comparison) + const norm = (s: string) => s.toLowerCase().replace(/[^a-z0-9]/g, ''); + if (norm(translation) === norm(text)) return null; + + // Post-filter: false-positive languages on short text + if (text.length < SHORT_TEXT_THRESHOLD && FALSE_POSITIVE_LANGS.has(srcLang)) { + const key = text.toLowerCase().trim(); + suppressionCounts.set(key, (suppressionCounts.get(key) ?? 0) + 1); + return null; + } + + // Track short phrases for auto-suppression learning + const wordCount = text.trim().split(/\s+/).length; + if (wordCount <= 2) { + const key = text.toLowerCase().trim(); + const count = (suppressionCounts.get(key) ?? 0) + 1; + suppressionCounts.set(key, count); + if (count >= SUPPRESS_THRESHOLD) return null; + } + + cacheSet(text, translation, srcLang); + return { translation, srcLang }; + } catch (err: any) { + if (err.name !== 'AbortError') _con.warn('[KCC-TL] Error:', err.message); + return null; + } +} + +// ── DOM manipulation ── + +function appendTranslation(chatNode: HTMLElement, username: string, translation: string, srcLang: string): void { + const div = document.createElement('div'); + div.className = 'kcc-translation'; + + const langTag = (cfg.showLanguageTag && srcLang !== 'unknown') ? ' [' + srcLang.toUpperCase() + ']' : ''; + div.textContent = '\u{1F310} ' + (username ? username + ' ' : '') + translation + langTag; + chatNode.appendChild(div); +} + +// ── Message processing ── + +function processMessage(node: HTMLElement): void { + if (node.hasAttribute('data-kpc-translated')) return; + node.setAttribute('data-kpc-translated', '1'); + + const extracted = extractChatText(node); + if (!extracted) return; + if (!shouldTranslate(extracted.message)) return; + + const { message, username } = extracted; + enqueue(async () => { + const result = await translateText(message); + if (result) appendTranslation(node, username, result.translation, result.srcLang); + }); +} + +// ── Observer lifecycle ── + +function startObserver(): void { + if (chatObserver) return; + + let attempts = 0; + pollTimer = setInterval(() => { + attempts++; + const chatList = document.getElementById('chatList'); + if (!chatList) { + if (attempts > 60) { + clearInterval(pollTimer!); + pollTimer = null; + _con.warn('[KCC-TL] #chatList not found after 30s, giving up'); + } + return; + } + + clearInterval(pollTimer!); + pollTimer = null; + + chatObserver = new MutationObserver((mutations) => { + for (const mutation of mutations) { + for (const node of mutation.addedNodes) { + if (node.nodeType === 1) processMessage(node as HTMLElement); + } + } + }); + + chatObserver.observe(chatList, { childList: true }); + _con.log('[KCC-TL] Chat observer active'); + }, 500); +} + +function stopObserver(): void { + if (pollTimer) { + clearInterval(pollTimer); + pollTimer = null; + } + if (chatObserver) { + chatObserver.disconnect(); + chatObserver = null; + } +} + +// ── Public API ── + +export function initTranslator(savedConsole: SavedConsole, initCfg: TranslatorConfig): void { + _con = savedConsole; + cfg = { + enabled: initCfg.enabled ?? DEFAULTS.enabled, + targetLanguage: initCfg.targetLanguage ?? DEFAULTS.targetLanguage, + showLanguageTag: initCfg.showLanguageTag ?? DEFAULTS.showLanguageTag, + }; + + if (!cfg.enabled) { + _con.log('[KCC-TL] Translator disabled'); + return; + } + + _con.log('[KCC-TL] Initializing (target: ' + cfg.targetLanguage + ')'); + startObserver(); +} + +export function updateTranslatorConfig(update: Partial): void { + if (update.enabled !== undefined) { + cfg.enabled = update.enabled; + if (update.enabled && !chatObserver) startObserver(); + if (!update.enabled) stopObserver(); + } + if (update.targetLanguage !== undefined) cfg.targetLanguage = update.targetLanguage; + if (update.showLanguageTag !== undefined) cfg.showLanguageTag = update.showLanguageTag; +} diff --git a/src/preload/userscripts.ts b/src/preload/userscripts.ts new file mode 100644 index 0000000..1a8bf90 --- /dev/null +++ b/src/preload/userscripts.ts @@ -0,0 +1,258 @@ +import { ipcRenderer, webFrame } from 'electron'; + +// ── Types ── + +export interface ScriptMetadata { + name: string; + author: string; + version: string; + desc: string; + src: string; + license: string; + runAt: 'document-start' | 'document-end'; + priority: number; +} + +export interface UserscriptSetting { + title: string; + type: 'bool' | 'num' | 'sel' | 'color' | 'keybind'; + value: unknown; + desc?: string; + min?: number; + max?: number; + step?: number; + opts?: (string | number)[]; + changed?: (value: unknown) => void; +} + +export interface UserscriptInstance { + filename: string; + content: string; + meta: ScriptMetadata; + enabled: boolean; + executed: boolean; + unload: (() => void) | null; + settings: Record | null; +} + +// ── State ── + +const instances: UserscriptInstance[] = []; +const cssHandles = new Map(); // identifier -> webFrame CSS key + +// ── Metadata parser ── + +export function parseMetadata(code: string): ScriptMetadata { + const meta: ScriptMetadata = { + name: '', + author: '', + version: '', + desc: '', + src: '', + license: '', + runAt: 'document-end', + priority: 0, + }; + + const startMatch = code.match(/\/\/\s*==UserScript==/); + const endMatch = code.match(/\/\/\s*==\/UserScript==/); + if (!startMatch || !endMatch) return meta; + + const block = code.substring( + startMatch.index! + startMatch[0].length, + endMatch.index!, + ); + + for (const line of block.split('\n')) { + const m = line.match(/\/\/\s*@(\S+)\s+(.*)/); + if (!m) continue; + const [, tag, val] = m; + const v = val.trim(); + switch (tag) { + case 'name': meta.name = v; break; + case 'author': meta.author = v; break; + case 'version': meta.version = v; break; + case 'desc': + case 'description': meta.desc = v; break; + case 'src': meta.src = v; break; + case 'license': meta.license = v; break; + case 'run-at': + if (v === 'document-start') meta.runAt = 'document-start'; + else meta.runAt = 'document-end'; + break; + case 'priority': + meta.priority = parseInt(v, 10) || 0; + break; + } + } + + return meta; +} + +// ── CSS injection via webFrame ── + +function toggleCSS(css: string, identifier: string, value: boolean): void { + const existing = cssHandles.get(identifier); + if (value) { + if (existing) return; // already inserted + const key = webFrame.insertCSS(css); + cssHandles.set(identifier, key); + } else { + if (!existing) return; + webFrame.removeInsertedCSS(existing); + cssHandles.delete(identifier); + } +} + +// ── Script execution ── + +function executeScript( + instance: UserscriptInstance, + _console: { log: (...args: unknown[]) => void; warn: (...args: unknown[]) => void; error: (...args: unknown[]) => void }, +): void { + if (instance.executed) return; + + const context: Record = { + _console, + _css(css: string, identifier: string, value: boolean) { + toggleCSS(css, instance.filename + ':' + identifier, value); + }, + unload: null as (() => void) | null, + settings: null as Record | null, + }; + + try { + const fn = new Function(instance.content); + const result = fn.apply(context); + + // Script returned `this` — capture settings and unload + if (result === context) { + instance.unload = (typeof context.unload === 'function') ? context.unload as () => void : null; + instance.settings = context.settings as Record | null; + } else { + instance.unload = null; + instance.settings = null; + } + + instance.executed = true; + _console.log('[KCC] Userscript executed:', instance.meta.name || instance.filename); + } catch (err) { + _console.error('[KCC] Userscript error in', instance.filename, ':', err); + } +} + +// ── Apply saved preferences ── + +async function applyPreferences(instance: UserscriptInstance): Promise { + if (!instance.settings) return; + const saved = await ipcRenderer.invoke('userscripts-load-prefs', instance.filename); + for (const key of Object.keys(instance.settings)) { + if (key in saved) { + const setting = instance.settings[key]; + setting.value = saved[key]; + if (typeof setting.changed === 'function') { + try { setting.changed(setting.value); } catch { /* ignore callback errors */ } + } + } + } +} + +// ── Public API ── + +export function getInstances(): UserscriptInstance[] { + return instances; +} + +export async function initUserscripts( + _console: { log: (...args: unknown[]) => void; warn: (...args: unknown[]) => void; error: (...args: unknown[]) => void }, +): Promise { + const { scripts, tracker } = await ipcRenderer.invoke('userscripts-scan'); + if (!scripts || scripts.length === 0) { + _console.log('[KCC] No userscripts found'); + return; + } + + // Build instances + for (const script of scripts) { + const meta = parseMetadata(script.content); + instances.push({ + filename: script.filename, + content: script.content, + meta, + enabled: tracker[script.filename] === true, + executed: false, + unload: null, + settings: null, + }); + } + + // Sort by priority descending + instances.sort((a, b) => b.meta.priority - a.meta.priority); + + // Execute document-start scripts + for (const inst of instances) { + if (inst.enabled && inst.meta.runAt === 'document-start') { + executeScript(inst, _console); + await applyPreferences(inst); + } + } + + // Execute document-end scripts + const runDocEnd = () => { + for (const inst of instances) { + if (inst.enabled && inst.meta.runAt === 'document-end' && !inst.executed) { + executeScript(inst, _console); + applyPreferences(inst); + } + } + }; + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', runDocEnd, { once: true }); + } else { + runDocEnd(); + } + + _console.log('[KCC] Userscripts initialized:', instances.length, 'scripts loaded'); +} + +export function setScriptEnabled( + filename: string, + enabled: boolean, + _console: { log: (...args: unknown[]) => void; warn: (...args: unknown[]) => void; error: (...args: unknown[]) => void }, +): { needsReload: boolean } { + const inst = instances.find(i => i.filename === filename); + if (!inst) return { needsReload: false }; + + inst.enabled = enabled; + + // Update tracker + const tracker: Record = {}; + for (const i of instances) tracker[i.filename] = i.enabled; + ipcRenderer.invoke('userscripts-set-tracker', tracker); + + if (!enabled) { + if (inst.unload && inst.executed) { + try { + inst.unload(); + _console.log('[KCC] Userscript unloaded:', inst.meta.name || inst.filename); + } catch (err) { + _console.error('[KCC] Userscript unload error:', err); + } + inst.executed = false; + inst.unload = null; + inst.settings = null; + return { needsReload: false }; + } + // No unload function — need page reload to fully disable + return { needsReload: inst.executed }; + } else { + // Enabling + if (!inst.executed) { + executeScript(inst, _console); + applyPreferences(inst); + return { needsReload: false }; + } + return { needsReload: false }; + } +} diff --git a/src/preload/utils.ts b/src/preload/utils.ts new file mode 100644 index 0000000..6d98d88 --- /dev/null +++ b/src/preload/utils.ts @@ -0,0 +1,116 @@ +// ── Shared preload utilities ── +// Common types, helpers, and constants used across preload modules. + +// ── Shared interfaces ── + +export interface SavedConsole { + log: (...args: unknown[]) => void; + warn: (...args: unknown[]) => void; + error: (...args: unknown[]) => void; +} + +// ── HTML escaping ── + +const HTML_ESCAPE_MAP: Record = { + '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', +}; + +export function escapeHtml(s: string): string { + return s.replace(/[&<>"']/g, c => HTML_ESCAPE_MAP[c]); +} + +// ── Chat message injection ── +// Creates messages in #chatHolder inside a persistent #kpcMessageHolder div. +// timeout=0 means the message is persistent (not auto-removed). + +export function genChatMsg(text: string, timeout = 2.25): HTMLElement | null { + const chatHolder = document.getElementById('chatHolder'); + if (!chatHolder) return null; + if (!document.getElementById('kpcMessageHolder')) { + chatHolder.insertAdjacentHTML('afterbegin', '
'); + } + const holder = document.getElementById('kpcMessageHolder')!; + holder.insertAdjacentHTML('beforeend', + '
' + + escapeHtml(text) + '
'); + const elem = holder.lastElementChild as HTMLElement; + if (timeout !== 0) { + setTimeout(() => { elem.remove(); }, timeout * 1000); + } + return elem; +} + +// ── Filename sanitisation ── + +export function sanitizeFilename(name: string): string { + return name.replace(/[^a-zA-Z0-9_-]/g, '_'); +} + +// ── Shared CSS constants ── + +export const DEATH_ANIM_BLOCK_ID = 'kpc-animationBlock'; +export const DEATH_ANIM_BLOCK_CSS = + '.death-ui-bottom, .death-ui-bottom-empty { animation: none !important; transition: none !important; }'; + +/** Inject or remove the death screen animation block style element. */ +export function setDeathAnimBlock(enabled: boolean): void { + let el = document.getElementById(DEATH_ANIM_BLOCK_ID); + if (enabled) { + if (!el) { + el = document.createElement('style'); + el.id = DEATH_ANIM_BLOCK_ID; + el.textContent = DEATH_ANIM_BLOCK_CSS; + document.head.appendChild(el); + } + } else if (el) { + el.remove(); + } +} + +// ── Cleaner Menu ── +// Hides clutter from the main menu for a streamlined look. + +const CLEANER_MENU_ID = 'kpc-cleanerMenu'; +const CLEANER_MENU_CSS = ` +*::-webkit-scrollbar { display: none !important; } +.settingsBtn[style*="width:auto;background-color:#994cd1"] { display: none !important; } +.setSugBox2 { display: none !important; } +.advancedSwitch { display: none !important; } +.menuSocialB { display: none !important; } +.serverHostOpH { display: none !important; } +.signup-rewards-container { display: none !important; } +#tlInfHold { display: none !important; } +#gameNameHolder { display: none !important; } +#termsInfo { display: none !important; } +#bubbleContainer { display: none !important; } +#instructions:only-child { display: none !important; } +#mapInfoHld { display: none !important; } +#krDiscountAd { display: none !important; } +#classPreviewCanvas { display: none !important; } +#menuClassSubtext { display: none !important; } +#settingsPreset { display: none !important; } +#menuClassName { display: none !important; } +#menuBtnQuickMatch { display: none !important; } +#menuClassIcn { display: none !important; } +#streamContainerNew { display: none !important; } +#editorBtnM { display: none !important; } +.verticalSeparator { visibility: hidden !important; } +#mLevelCont { background-color: transparent; } +#uiBase.onMenu #spectButton { top: 94% !important; } +.headerBarL, .headerBar, .menuBtnHL { background-color: transparent; } +.headerBarR { right: -23px !important; } +`; + +export function setCleanerMenu(enabled: boolean): void { + let el = document.getElementById(CLEANER_MENU_ID); + if (enabled) { + if (!el) { + el = document.createElement('style'); + el.id = CLEANER_MENU_ID; + el.textContent = CLEANER_MENU_CSS; + document.head.appendChild(el); + } + } else if (el) { + el.remove(); + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..e63b4a8 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "bundler", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "dist", + "rootDir": "src", + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "dist", "out"] +} diff --git a/vite.main.config.ts b/vite.main.config.ts new file mode 100644 index 0000000..63244f9 --- /dev/null +++ b/vite.main.config.ts @@ -0,0 +1,31 @@ +import { defineConfig } from 'vite'; +import { resolve } from 'path'; +import { builtinModules } from 'module'; + +// Both 'fs' and 'node:fs' forms must be externalized +const nodeBuiltins = builtinModules.flatMap((m) => [m, `node:${m}`]); + +const isProd = process.env.NODE_ENV === 'production' || !process.argv.includes('--mode'); + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, 'src/main/index.ts'), + formats: ['cjs'], + fileName: () => 'index.js', + }, + outDir: 'dist/main', + emptyDirBefore: true, + rollupOptions: { + external: ['electron', 'electron-store', ...nodeBuiltins], + }, + target: 'node20', + minify: isProd, + sourcemap: !isProd, + }, + resolve: { + // Treat this as a Node build — don't swap node builtins for browser stubs + conditions: ['node'], + mainFields: ['module', 'main'], + }, +}); diff --git a/vite.preload.config.ts b/vite.preload.config.ts new file mode 100644 index 0000000..cc165f5 --- /dev/null +++ b/vite.preload.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from 'vite'; +import { resolve } from 'path'; + +const isProd = process.env.NODE_ENV === 'production' || !process.argv.includes('--mode'); + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, 'src/preload/index.ts'), + formats: ['cjs'], + fileName: () => 'index.js', + }, + outDir: 'dist/preload', + emptyDirBefore: true, + rollupOptions: { + external: ['electron'], + }, + target: 'node20', + minify: isProd, + sourcemap: !isProd, + }, +});