From 5abca8b4422b3a7a202b6459efccdf36efa79cd3 Mon Sep 17 00:00:00 2001 From: Jens Ochsenmeier Date: Mon, 25 Mar 2024 22:48:43 +0100 Subject: [PATCH 1/4] update depencies and output --- .eslintignore | 3 +- README.md | 6 +- package-lock.json | 2370 ++++++++++------------------------- package.json | 26 +- release/lossless-min.d.cts | 150 +++ release/lossless-min.js | 2 + release/lossless-min.js.map | 1 + release/lossless.d.cts | 150 +++ release/lossless.js | 1191 ++++++++++++++++++ release/lossless.js.map | 1 + tsup.config.ts | 37 +- 11 files changed, 2220 insertions(+), 1717 deletions(-) create mode 100644 release/lossless-min.d.cts create mode 100644 release/lossless-min.js create mode 100644 release/lossless-min.js.map create mode 100644 release/lossless.d.cts create mode 100644 release/lossless.js create mode 100644 release/lossless.js.map diff --git a/.eslintignore b/.eslintignore index c795b05..b9a972a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ -build \ No newline at end of file +build +release \ No newline at end of file diff --git a/README.md b/README.md index 8bcbe4d..e8eb79e 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ var output = decoder.decompress(buffer [, offset [, length]]); ### Install Get a packaged source file from the [release folder](https://github.com/rii-mango/JPEGLosslessDecoderJS/tree/master/release): -* [lossless.js](https://raw.githubusercontent.com/rii-mango/JPEGLosslessDecoderJS/master/release/current/lossless.js) -* [lossless-min.js](https://raw.githubusercontent.com/rii-mango/JPEGLosslessDecoderJS/master/release/current/lossless-min.js) +* [lossless.js](https://raw.githubusercontent.com/rii-mango/JPEGLosslessDecoderJS/master/release/lossless.js) +* [lossless-min.js](https://raw.githubusercontent.com/rii-mango/JPEGLosslessDecoderJS/master/release/lossless-min.js) Or install via [NPM](https://www.npmjs.com/): @@ -44,7 +44,7 @@ npm test ``` npm run build ``` -This will output lossless.js and lossless-min.js to build/ +This will output `lossless.js` and `lossless-min.js` alongside declaration files and source maps to `/release`. ### Acknowledgments This decoder was originally written by Helmut Dersch for Java. I added support for selection values 2 through 7, contributed bug fixes and ported to JavaScript. diff --git a/package-lock.json b/package-lock.json index 71b35f9..7abcf50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,84 +9,34 @@ "version": "2.1.0", "license": "MIT", "devDependencies": { - "@types/node": "^20.9.4", - "@typescript-eslint/eslint-plugin": "^6.12.0", - "@typescript-eslint/parser": "^6.12.0", - "eslint": "^8.54.0", - "eslint-config-prettier": "^9.0.0", + "@types/node": "^20.11.30", + "@typescript-eslint/eslint-plugin": "^7.4.0", + "@typescript-eslint/parser": "^7.4.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", "eslint-config-standard": "^17.1.0", - "eslint-plugin-mocha": "^10.2.0", - "eslint-plugin-prettier": "^5.0.1", - "tsup": "^8.0.1", - "typescript": "^5.3.2", - "vitest": "^0.34.6" + "eslint-plugin-mocha": "^10.4.1", + "eslint-plugin-prettier": "^5.1.3", + "tsup": "^8.0.2", + "typescript": "^5.4.3", + "vitest": "^1.4.0" } }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/@esbuild/android-arm": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.7.tgz", - "integrity": "sha512-YGSPnndkcLo4PmVl2tKatEn+0mlVMr3yEpOOT0BeMria87PhvoJb5dg5f5Ft9fbCVgtAz4pWMzZVgSEGpDAlww==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.7.tgz", - "integrity": "sha512-YEDcw5IT7hW3sFKZBkCAQaOCJQLONVcD4bOyTXMZz5fr66pTHnAet46XAtbXAkJRfIn2YVhdC6R9g4xa27jQ1w==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.7.tgz", - "integrity": "sha512-jhINx8DEjz68cChFvM72YzrqfwJuFbfvSxZAk4bebpngGfNNRm+zRl4rtT9oAX6N9b6gBcFaJHFew5Blf6CvUw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@esbuild/darwin-arm64": { "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.7.tgz", - "integrity": "sha512-dr81gbmWN//3ZnBIm6YNCl4p3pjnabg1/ZVOgz2fJoUO1a3mq9WQ/1iuEluMs7mCL+Zwv7AY5e3g1hjXqQZ9Iw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -95,299 +45,10 @@ "node": ">=12" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.7.tgz", - "integrity": "sha512-Lc0q5HouGlzQEwLkgEKnWcSazqr9l9OdV2HhVasWJzLKeOt0PLhHaUHuzb8s/UIya38DJDoUm74GToZ6Wc7NGQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.7.tgz", - "integrity": "sha512-+y2YsUr0CxDFF7GWiegWjGtTUF6gac2zFasfFkRJPkMAuMy9O7+2EH550VlqVdpEEchWMynkdhC9ZjtnMiHImQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.7.tgz", - "integrity": "sha512-CdXOxIbIzPJmJhrpmJTLx+o35NoiKBIgOvmvT+jeSadYiWJn0vFKsl+0bSG/5lwjNHoIDEyMYc/GAPR9jxusTA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.7.tgz", - "integrity": "sha512-Y+SCmWxsJOdQtjcBxoacn/pGW9HDZpwsoof0ttL+2vGcHokFlfqV666JpfLCSP2xLxFpF1lj7T3Ox3sr95YXww==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.7.tgz", - "integrity": "sha512-inHqdOVCkUhHNvuQPT1oCB7cWz9qQ/Cz46xmVe0b7UXcuIJU3166aqSunsqkgSGMtUCWOZw3+KMwI6otINuC9g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.7.tgz", - "integrity": "sha512-2BbiL7nLS5ZO96bxTQkdO0euGZIUQEUXMTrqLxKUmk/Y5pmrWU84f+CMJpM8+EHaBPfFSPnomEaQiG/+Gmh61g==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.7.tgz", - "integrity": "sha512-BVFQla72KXv3yyTFCQXF7MORvpTo4uTA8FVFgmwVrqbB/4DsBFWilUm1i2Oq6zN36DOZKSVUTb16jbjedhfSHw==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.7.tgz", - "integrity": "sha512-DzAYckIaK+pS31Q/rGpvUKu7M+5/t+jI+cdleDgUwbU7KdG2eC3SUbZHlo6Q4P1CfVKZ1lUERRFP8+q0ob9i2w==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.7.tgz", - "integrity": "sha512-JQ1p0SmUteNdUaaiRtyS59GkkfTW0Edo+e0O2sihnY4FoZLz5glpWUQEKMSzMhA430ctkylkS7+vn8ziuhUugQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.7.tgz", - "integrity": "sha512-xGwVJ7eGhkprY/nB7L7MXysHduqjpzUl40+XoYDGC4UPLbnG+gsyS1wQPJ9lFPcxYAaDXbdRXd1ACs9AE9lxuw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.7.tgz", - "integrity": "sha512-U8Rhki5PVU0L0nvk+E8FjkV8r4Lh4hVEb9duR6Zl21eIEYEwXz8RScj4LZWA2i3V70V4UHVgiqMpszXvG0Yqhg==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.7.tgz", - "integrity": "sha512-ZYZopyLhm4mcoZXjFt25itRlocKlcazDVkB4AhioiL9hOWhDldU9n38g62fhOI4Pth6vp+Mrd5rFKxD0/S+7aQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.7.tgz", - "integrity": "sha512-/yfjlsYmT1O3cum3J6cmGG16Fd5tqKMcg5D+sBYLaOQExheAJhqr8xOAEIuLo8JYkevmjM5zFD9rVs3VBcsjtQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.7.tgz", - "integrity": "sha512-MYDFyV0EW1cTP46IgUJ38OnEY5TaXxjoDmwiTXPjezahQgZd+j3T55Ht8/Q9YXBM0+T9HJygrSRGV5QNF/YVDQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.7.tgz", - "integrity": "sha512-JcPvgzf2NN/y6X3UUSqP6jSS06V0DZAV/8q0PjsZyGSXsIGcG110XsdmuWiHM+pno7/mJF6fjH5/vhUz/vA9fw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.7.tgz", - "integrity": "sha512-ZA0KSYti5w5toax5FpmfcAgu3ZNJxYSRm0AW/Dao5up0YV1hDVof1NvwLomjEN+3/GMtaWDI+CIyJOMTRSTdMw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.7.tgz", - "integrity": "sha512-CTOnijBKc5Jpk6/W9hQMMvJnsSYRYgveN6O75DTACCY18RA2nqka8dTZR+x/JqXCRiKk84+5+bRKXUSbbwsS0A==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.7.tgz", - "integrity": "sha512-gRaP2sk6hc98N734luX4VpF318l3w+ofrtTu9j5L8EQXF+FzQKV6alCOHMVoJJHvVK/mGbwBXfOL1HETQu9IGQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -400,18 +61,16 @@ }, "node_modules/@eslint-community/regexpp": { "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -431,22 +90,20 @@ } }, "node_modules/@eslint/js": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", - "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", + "version": "8.57.0", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -455,9 +112,8 @@ }, "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" }, @@ -467,16 +123,14 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", - "dev": true + "version": "2.0.2", + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@jest/schemas": { "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, + "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.27.8" }, @@ -486,9 +140,8 @@ }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -500,33 +153,29 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -534,9 +183,8 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -547,18 +195,16 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -567,19 +213,10 @@ "node": ">= 8" } }, - "node_modules/@pkgr/utils": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", - "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "node_modules/@pkgr/core": { + "version": "0.1.1", "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "fast-glob": "^3.3.0", - "is-glob": "^4.0.3", - "open": "^9.1.0", - "picocolors": "^1.0.0", - "tslib": "^2.6.0" - }, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, @@ -587,222 +224,62 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.5.1.tgz", - "integrity": "sha512-YaN43wTyEBaMqLDYeze+gQ4ZrW5RbTEGtT5o1GVDkhpdNcsLTnLRcLccvwy3E9wiDKWg9RIhuoy3JQKDRBfaZA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.5.1.tgz", - "integrity": "sha512-n1bX+LCGlQVuPlCofO0zOKe1b2XkFozAVRoczT+yxWZPGnkEAKTTYVOGZz8N4sKuBnKMxDbfhUsB1uwYdup/sw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.5.1.tgz", - "integrity": "sha512-QqJBumdvfBqBBmyGHlKxje+iowZwrHna7pokj/Go3dV1PJekSKfmjKrjKQ/e6ESTGhkfPNLq3VXdYLAc+UtAQw==", + "version": "4.13.0", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.5.1.tgz", - "integrity": "sha512-RrkDNkR/P5AEQSPkxQPmd2ri8WTjSl0RYmuFOiEABkEY/FSg0a4riihWQGKDJ4LnV9gigWZlTMx2DtFGzUrYQw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.5.1.tgz", - "integrity": "sha512-ZFPxvUZmE+fkB/8D9y/SWl/XaDzNSaxd1TJUSE27XAKlRpQ2VNce/86bGd9mEUgL3qrvjJ9XTGwoX0BrJkYK/A==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.5.1.tgz", - "integrity": "sha512-FEuAjzVIld5WVhu+M2OewLmjmbXWd3q7Zcx+Rwy4QObQCqfblriDMMS7p7+pwgjZoo9BLkP3wa9uglQXzsB9ww==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.5.1.tgz", - "integrity": "sha512-f5Gs8WQixqGRtI0Iq/cMqvFYmgFzMinuJO24KRfnv7Ohi/HQclwrBCYkzQu1XfLEEt3DZyvveq9HWo4bLJf1Lw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.5.1.tgz", - "integrity": "sha512-CWPkPGrFfN2vj3mw+S7A/4ZaU3rTV7AkXUr08W9lNP+UzOvKLVf34tWCqrKrfwQ0NTk5GFqUr2XGpeR2p6R4gw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.5.1.tgz", - "integrity": "sha512-ZRETMFA0uVukUC9u31Ed1nx++29073goCxZtmZARwk5aF/ltuENaeTtRVsSQzFlzdd4J6L3qUm+EW8cbGt0CKQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.5.1.tgz", - "integrity": "sha512-ihqfNJNb2XtoZMSCPeoo0cYMgU04ksyFIoOw5S0JUVbOhafLot+KD82vpKXOurE2+9o/awrqIxku9MRR9hozHQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.5.1.tgz", - "integrity": "sha512-zK9MRpC8946lQ9ypFn4gLpdwr5a01aQ/odiIJeL9EbgZDMgbZjjT/XzTqJvDfTmnE1kHdbG20sAeNlpc91/wbg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.5.1.tgz", - "integrity": "sha512-5I3Nz4Sb9TYOtkRwlH0ow+BhMH2vnh38tZ4J4mggE48M/YyJyp/0sPSxhw1UeS1+oBgQ8q7maFtSeKpeRJu41Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@sinclair/typebox": { "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true - }, - "node_modules/@types/chai": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", - "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", - "dev": true + "dev": true, + "license": "MIT" }, - "node_modules/@types/chai-subset": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.5.tgz", - "integrity": "sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==", + "node_modules/@types/estree": { + "version": "1.0.5", "dev": true, - "dependencies": { - "@types/chai": "*" - } + "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 + "dev": true, + "license": "MIT" }, "node_modules/@types/json5": { "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/@types/node": { - "version": "20.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.4.tgz", - "integrity": "sha512-wmyg8HUhcn6ACjsn8oKYjkN/zUzQeNtMy44weTJSM6p4MMzEOuKbA3OjJ267uPCOW7Xex9dyrNTful8XTQYoDA==", + "version": "20.11.30", "dev": true, + "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", - "dev": true + "version": "7.5.8", + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.12.0.tgz", - "integrity": "sha512-XOpZ3IyJUIV1b15M7HVOpgQxPPF7lGXgsfcEIu3yDxFPaf/xZKt7s9QO/pbk7vpWQyVulpJbu4E5LwpZiQo4kA==", + "version": "7.4.0", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.12.0", - "@typescript-eslint/type-utils": "6.12.0", - "@typescript-eslint/utils": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0", + "@typescript-eslint/scope-manager": "7.4.0", + "@typescript-eslint/type-utils": "7.4.0", + "@typescript-eslint/utils": "7.4.0", + "@typescript-eslint/visitor-keys": "7.4.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -811,15 +288,15 @@ "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -828,26 +305,25 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz", - "integrity": "sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==", + "version": "7.4.0", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "6.12.0", - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/typescript-estree": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0", + "@typescript-eslint/scope-manager": "7.4.0", + "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/typescript-estree": "7.4.0", + "@typescript-eslint/visitor-keys": "7.4.0", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -856,16 +332,15 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.12.0.tgz", - "integrity": "sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw==", + "version": "7.4.0", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0" + "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/visitor-keys": "7.4.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -873,25 +348,24 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.12.0.tgz", - "integrity": "sha512-WWmRXxhm1X8Wlquj+MhsAG4dU/Blvf1xDgGaYCzfvStP2NwPQh6KBvCDbiOEvaE0filhranjIlK/2fSTVwtBng==", + "version": "7.4.0", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "6.12.0", - "@typescript-eslint/utils": "6.12.0", + "@typescript-eslint/typescript-estree": "7.4.0", + "@typescript-eslint/utils": "7.4.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -900,12 +374,11 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.12.0.tgz", - "integrity": "sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q==", + "version": "7.4.0", "dev": true, + "license": "MIT", "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -913,21 +386,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.12.0.tgz", - "integrity": "sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw==", + "version": "7.4.0", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0", + "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/visitor-keys": "7.4.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -939,42 +412,62 @@ } } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/utils": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.12.0.tgz", - "integrity": "sha512-LywPm8h3tGEbgfyjYnu3dauZ0U7R60m+miXgKcZS8c7QALO9uWJdvNoP+duKTk2XMWc7/Q3d/QiCuLN9X6SWyQ==", + "version": "7.4.0", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.12.0", - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/typescript-estree": "6.12.0", + "@typescript-eslint/scope-manager": "7.4.0", + "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/typescript-estree": "7.4.0", "semver": "^7.5.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.12.0.tgz", - "integrity": "sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw==", + "version": "7.4.0", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/types": "7.4.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -983,18 +476,16 @@ }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/@vitest/expect": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.34.6.tgz", - "integrity": "sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==", + "version": "1.4.0", "dev": true, + "license": "MIT", "dependencies": { - "@vitest/spy": "0.34.6", - "@vitest/utils": "0.34.6", + "@vitest/spy": "1.4.0", + "@vitest/utils": "1.4.0", "chai": "^4.3.10" }, "funding": { @@ -1002,13 +493,12 @@ } }, "node_modules/@vitest/runner": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.34.6.tgz", - "integrity": "sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==", + "version": "1.4.0", "dev": true, + "license": "MIT", "dependencies": { - "@vitest/utils": "0.34.6", - "p-limit": "^4.0.0", + "@vitest/utils": "1.4.0", + "p-limit": "^5.0.0", "pathe": "^1.1.1" }, "funding": { @@ -1016,15 +506,14 @@ } }, "node_modules/@vitest/runner/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "version": "5.0.0", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^1.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1032,9 +521,8 @@ }, "node_modules/@vitest/runner/node_modules/yocto-queue": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.20" }, @@ -1043,50 +531,47 @@ } }, "node_modules/@vitest/snapshot": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.34.6.tgz", - "integrity": "sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==", + "version": "1.4.0", "dev": true, + "license": "MIT", "dependencies": { - "magic-string": "^0.30.1", + "magic-string": "^0.30.5", "pathe": "^1.1.1", - "pretty-format": "^29.5.0" + "pretty-format": "^29.7.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/spy": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.34.6.tgz", - "integrity": "sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==", + "version": "1.4.0", "dev": true, + "license": "MIT", "dependencies": { - "tinyspy": "^2.1.1" + "tinyspy": "^2.2.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.34.6.tgz", - "integrity": "sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==", + "version": "1.4.0", "dev": true, + "license": "MIT", "dependencies": { - "diff-sequences": "^29.4.3", - "loupe": "^2.3.6", - "pretty-format": "^29.5.0" + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.11.3", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1096,27 +581,24 @@ }, "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/acorn-walk": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", - "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", + "version": "8.3.2", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1130,18 +612,16 @@ }, "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" }, @@ -1154,15 +634,13 @@ }, "node_modules/any-promise": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/anymatch": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1173,15 +651,13 @@ }, "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 + "dev": true, + "license": "Python-2.0" }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -1193,9 +669,8 @@ }, "node_modules/array-includes": { "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -1213,18 +688,16 @@ }, "node_modules/array-union": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/array.prototype.findlastindex": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", - "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -1242,9 +715,8 @@ }, "node_modules/array.prototype.flat": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -1261,9 +733,8 @@ }, "node_modules/array.prototype.flatmap": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -1280,9 +751,8 @@ }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", @@ -1302,18 +772,16 @@ }, "node_modules/assertion-error": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/available-typed-arrays": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">= 0.4" @@ -1324,45 +792,21 @@ }, "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 - }, - "node_modules/big-integer": { - "version": "1.6.52", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", - "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", "dev": true, - "engines": { - "node": ">=0.6" - } + "license": "MIT" }, "node_modules/binary-extensions": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/bplist-parser": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", - "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", - "dev": true, - "dependencies": { - "big-integer": "^1.6.44" - }, - "engines": { - "node": ">= 5.10.0" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1370,9 +814,8 @@ }, "node_modules/braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, + "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -1382,9 +825,8 @@ }, "node_modules/builtin-modules": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=6" @@ -1395,34 +837,17 @@ }, "node_modules/builtins": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "semver": "^7.0.0" } }, - "node_modules/bundle-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", - "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", - "dev": true, - "dependencies": { - "run-applescript": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bundle-require": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.2.tgz", - "integrity": "sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==", "dev": true, + "license": "MIT", "dependencies": { "load-tsconfig": "^0.2.3" }, @@ -1435,18 +860,16 @@ }, "node_modules/cac": { "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/call-bind": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "function-bind": "^1.1.2", @@ -1459,18 +882,16 @@ }, "node_modules/callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "version": "4.4.1", "dev": true, + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -1486,9 +907,8 @@ }, "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" @@ -1502,9 +922,8 @@ }, "node_modules/check-error": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.2" }, @@ -1514,8 +933,6 @@ }, "node_modules/chokidar": { "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { @@ -1523,6 +940,7 @@ "url": "https://paulmillr.com/funding/" } ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1541,9 +959,8 @@ }, "node_modules/chokidar/node_modules/glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -1553,9 +970,8 @@ }, "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" }, @@ -1565,30 +981,26 @@ }, "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 + "dev": true, + "license": "MIT" }, "node_modules/commander": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } }, "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 + "dev": true, + "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1600,9 +1012,8 @@ }, "node_modules/debug": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -1617,9 +1028,8 @@ }, "node_modules/deep-eql": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -1629,49 +1039,13 @@ }, "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 - }, - "node_modules/default-browser": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", - "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", - "dev": true, - "dependencies": { - "bundle-name": "^3.0.0", - "default-browser-id": "^3.0.0", - "execa": "^7.1.1", - "titleize": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser-id": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", - "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", "dev": true, - "dependencies": { - "bplist-parser": "^0.2.0", - "untildify": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "MIT" }, "node_modules/define-data-property": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "get-intrinsic": "^1.2.1", @@ -1682,23 +1056,10 @@ "node": ">= 0.4" } }, - "node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "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", "peer": true, "dependencies": { "define-data-property": "^1.0.1", @@ -1714,18 +1075,16 @@ }, "node_modules/diff-sequences": { "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/dir-glob": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, + "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -1735,9 +1094,8 @@ }, "node_modules/doctrine": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -1747,9 +1105,8 @@ }, "node_modules/es-abstract": { "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", @@ -1801,9 +1158,8 @@ }, "node_modules/es-set-tostringtag": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "get-intrinsic": "^1.2.2", @@ -1816,9 +1172,8 @@ }, "node_modules/es-shim-unscopables": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "hasown": "^2.0.0" @@ -1826,9 +1181,8 @@ }, "node_modules/es-to-primitive": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "is-callable": "^1.1.4", @@ -1844,10 +1198,9 @@ }, "node_modules/esbuild": { "version": "0.19.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.7.tgz", - "integrity": "sha512-6brbTZVqxhqgbpqBR5MzErImcpA0SQdoKOkcWK/U30HtQxnokIpG3TX2r0IJqbFUzqLjhU/zC1S5ndgakObVCQ==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -1881,9 +1234,8 @@ }, "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" }, @@ -1892,16 +1244,15 @@ } }, "node_modules/eslint": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", - "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "version": "8.57.0", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.54.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -1948,9 +1299,8 @@ }, "node_modules/eslint-compat-utils": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", - "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=12" @@ -1960,10 +1310,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", "dev": true, + "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -1973,8 +1322,6 @@ }, "node_modules/eslint-config-standard": { "version": "17.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz", - "integrity": "sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==", "dev": true, "funding": [ { @@ -1990,6 +1337,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "engines": { "node": ">=12.0.0" }, @@ -2002,9 +1350,8 @@ }, "node_modules/eslint-import-resolver-node": { "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "debug": "^3.2.7", @@ -2014,9 +1361,8 @@ }, "node_modules/eslint-import-resolver-node/node_modules/debug": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "ms": "^2.1.1" @@ -2024,9 +1370,8 @@ }, "node_modules/eslint-module-utils": { "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "debug": "^3.2.7" @@ -2042,9 +1387,8 @@ }, "node_modules/eslint-module-utils/node_modules/debug": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "ms": "^2.1.1" @@ -2052,9 +1396,8 @@ }, "node_modules/eslint-plugin-es-x": { "version": "7.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.4.0.tgz", - "integrity": "sha512-WJa3RhYzBtl8I37ebY9p76s61UhZyi4KaFOnX2A5r32RPazkXj5yoT6PGnD02dhwzEUj0KwsUdqfKDd/OuvGsw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.1.2", @@ -2073,9 +1416,8 @@ }, "node_modules/eslint-plugin-import": { "version": "2.29.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", - "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "array-includes": "^3.1.7", @@ -2105,9 +1447,8 @@ }, "node_modules/eslint-plugin-import/node_modules/debug": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "ms": "^2.1.1" @@ -2115,9 +1456,8 @@ }, "node_modules/eslint-plugin-import/node_modules/doctrine": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, + "license": "Apache-2.0", "peer": true, "dependencies": { "esutils": "^2.0.2" @@ -2128,21 +1468,20 @@ }, "node_modules/eslint-plugin-import/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", "peer": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/eslint-plugin-mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.2.0.tgz", - "integrity": "sha512-ZhdxzSZnd1P9LqDPF0DBcFLpRIGdh1zkF2JHnQklKQOvrQtT73kdP5K9V2mzvbLR+cCAO9OI48NXK/Ax9/ciCQ==", + "version": "10.4.1", "dev": true, + "license": "MIT", "dependencies": { "eslint-utils": "^3.0.0", + "globals": "^13.24.0", "rambda": "^7.4.0" }, "engines": { @@ -2154,9 +1493,8 @@ }, "node_modules/eslint-plugin-n": { "version": "16.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.3.1.tgz", - "integrity": "sha512-w46eDIkxQ2FaTHcey7G40eD+FhTXOdKudDXPUO2n9WNcslze/i/HT2qJ3GXjHngYSGDISIgPNhwGtgoix4zeOw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", @@ -2181,23 +1519,23 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", - "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", + "version": "5.1.3", "dev": true, + "license": "MIT", "dependencies": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.5" + "synckit": "^0.8.6" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/prettier" + "url": "https://opencollective.com/eslint-plugin-prettier" }, "peerDependencies": { "@types/eslint": ">=8.0.0", "eslint": ">=8.0.0", + "eslint-config-prettier": "*", "prettier": ">=3.0.0" }, "peerDependenciesMeta": { @@ -2211,9 +1549,8 @@ }, "node_modules/eslint-plugin-promise": { "version": "6.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", - "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", "dev": true, + "license": "ISC", "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2224,9 +1561,8 @@ }, "node_modules/eslint-scope": { "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -2240,9 +1576,8 @@ }, "node_modules/eslint-utils": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -2258,18 +1593,16 @@ }, "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10" } }, "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" }, @@ -2279,9 +1612,8 @@ }, "node_modules/espree": { "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -2296,9 +1628,8 @@ }, "node_modules/esquery": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -2308,9 +1639,8 @@ }, "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" }, @@ -2320,62 +1650,86 @@ }, "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/estree-walker": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.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/execa": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", - "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "version": "8.0.1", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", "is-stream": "^3.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^5.1.0", "onetime": "^6.0.0", - "signal-exit": "^3.0.7", + "signal-exit": "^4.1.0", "strip-final-newline": "^3.0.0" }, "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + "node": ">=16.17" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/execa/node_modules/get-stream": { + "version": "8.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "4.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "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==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-diff": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/fast-glob": { "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -2389,9 +1743,8 @@ }, "node_modules/fast-glob/node_modules/glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -2401,30 +1754,26 @@ }, "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 + "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 + "dev": true, + "license": "MIT" }, "node_modules/fastq": { "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } }, "node_modules/file-entry-cache": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -2434,9 +1783,8 @@ }, "node_modules/fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2446,9 +1794,8 @@ }, "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" @@ -2462,9 +1809,8 @@ }, "node_modules/flat-cache": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -2476,15 +1822,13 @@ }, "node_modules/flatted": { "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/for-each": { "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "is-callable": "^1.1.3" @@ -2492,16 +1836,13 @@ }, "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 + "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" @@ -2512,9 +1853,8 @@ }, "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", "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2522,9 +1862,8 @@ }, "node_modules/function.prototype.name": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -2541,9 +1880,8 @@ }, "node_modules/functions-have-names": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, + "license": "MIT", "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2551,18 +1889,16 @@ }, "node_modules/get-func-name": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/get-intrinsic": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "function-bind": "^1.1.2", @@ -2576,9 +1912,8 @@ }, "node_modules/get-stream": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -2588,9 +1923,8 @@ }, "node_modules/get-symbol-description": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -2605,9 +1939,8 @@ }, "node_modules/get-tsconfig": { "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -2618,9 +1951,8 @@ }, "node_modules/glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2638,9 +1970,8 @@ }, "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" }, @@ -2649,10 +1980,9 @@ } }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -2665,9 +1995,8 @@ }, "node_modules/globalthis": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "define-properties": "^1.1.3" @@ -2681,9 +2010,8 @@ }, "node_modules/globby": { "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, + "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -2701,9 +2029,8 @@ }, "node_modules/gopd": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "get-intrinsic": "^1.1.3" @@ -2714,15 +2041,13 @@ }, "node_modules/graphemer": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/has-bigints": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, + "license": "MIT", "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2730,18 +2055,16 @@ }, "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.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "get-intrinsic": "^1.2.2" @@ -2752,9 +2075,8 @@ }, "node_modules/has-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">= 0.4" @@ -2765,9 +2087,8 @@ }, "node_modules/has-symbols": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">= 0.4" @@ -2778,9 +2099,8 @@ }, "node_modules/has-tostringtag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "has-symbols": "^1.0.2" @@ -2794,9 +2114,8 @@ }, "node_modules/hasown": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "function-bind": "^1.1.2" @@ -2806,28 +2125,25 @@ } }, "node_modules/human-signals": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "version": "5.0.0", "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">=14.18.0" + "node": ">=16.17.0" } }, "node_modules/ignore": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2841,18 +2157,16 @@ }, "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==", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2860,15 +2174,13 @@ }, "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 + "dev": true, + "license": "ISC" }, "node_modules/internal-slot": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "get-intrinsic": "^1.2.2", @@ -2881,9 +2193,8 @@ }, "node_modules/is-array-buffer": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -2896,9 +2207,8 @@ }, "node_modules/is-bigint": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "has-bigints": "^1.0.1" @@ -2909,9 +2219,8 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -2921,9 +2230,8 @@ }, "node_modules/is-boolean-object": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -2938,9 +2246,8 @@ }, "node_modules/is-builtin-module": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "builtin-modules": "^3.3.0" @@ -2954,9 +2261,8 @@ }, "node_modules/is-callable": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">= 0.4" @@ -2967,9 +2273,8 @@ }, "node_modules/is-core-module": { "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "hasown": "^2.0.0" @@ -2980,9 +2285,8 @@ }, "node_modules/is-date-object": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" @@ -2994,35 +2298,18 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "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-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" }, @@ -3030,29 +2317,10 @@ "node": ">=0.10.0" } }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dev": true, - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-negative-zero": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">= 0.4" @@ -3063,18 +2331,16 @@ }, "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-number-object": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" @@ -3088,18 +2354,16 @@ }, "node_modules/is-path-inside": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-regex": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -3114,9 +2378,8 @@ }, "node_modules/is-shared-array-buffer": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2" @@ -3127,9 +2390,8 @@ }, "node_modules/is-stream": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -3139,9 +2401,8 @@ }, "node_modules/is-string": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" @@ -3155,9 +2416,8 @@ }, "node_modules/is-symbol": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "has-symbols": "^1.0.2" @@ -3171,9 +2431,8 @@ }, "node_modules/is-typed-array": { "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "which-typed-array": "^1.1.11" @@ -3187,9 +2446,8 @@ }, "node_modules/is-weakref": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2" @@ -3198,53 +2456,28 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-wsl/node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/joycon": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", - "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } }, + "node_modules/js-tokens": { + "version": "8.0.3", + "dev": true, + "license": "MIT" + }, "node_modules/js-yaml": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -3254,27 +2487,23 @@ }, "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 + "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 + "dev": true, + "license": "MIT" }, "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 + "dev": true, + "license": "MIT" }, "node_modules/json5": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "minimist": "^1.2.0" @@ -3284,25 +2513,22 @@ } }, "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true + "version": "3.2.1", + "dev": true, + "license": "MIT" }, "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/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" @@ -3313,33 +2539,33 @@ }, "node_modules/lilconfig": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", "dev": true, + "license": "MIT", "engines": { "node": ">=14" } }, "node_modules/lines-and-columns": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/load-tsconfig": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", - "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/local-pkg": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", - "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", + "version": "0.5.0", "dev": true, + "license": "MIT", + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, "engines": { "node": ">=14" }, @@ -3349,9 +2575,8 @@ }, "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" }, @@ -3364,30 +2589,26 @@ }, "node_modules/lodash.merge": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.sortby": { "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/loupe": { "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.1" } }, "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" }, @@ -3396,10 +2617,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "version": "0.30.8", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, @@ -3409,24 +2629,21 @@ }, "node_modules/merge-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, + "license": "MIT", "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -3437,9 +2654,8 @@ }, "node_modules/mimic-fn": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -3449,9 +2665,8 @@ }, "node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3461,37 +2676,33 @@ }, "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", "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/mlly": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", - "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", + "version": "1.6.1", "dev": true, + "license": "MIT", "dependencies": { - "acorn": "^8.10.0", - "pathe": "^1.1.1", + "acorn": "^8.11.3", + "pathe": "^1.1.2", "pkg-types": "^1.0.3", - "ufo": "^1.3.0" + "ufo": "^1.3.2" } }, "node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/mz": { "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", "dev": true, + "license": "MIT", "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", @@ -3500,24 +2711,21 @@ }, "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 + "dev": true, + "license": "MIT" }, "node_modules/normalize-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "5.3.0", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^4.0.0" }, @@ -3530,9 +2738,8 @@ }, "node_modules/npm-run-path/node_modules/path-key": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -3542,18 +2749,16 @@ }, "node_modules/object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, + "license": "MIT", "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3561,9 +2766,8 @@ }, "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", "peer": true, "engines": { "node": ">= 0.4" @@ -3571,9 +2775,8 @@ }, "node_modules/object.assign": { "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -3590,9 +2793,8 @@ }, "node_modules/object.fromentries": { "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -3608,9 +2810,8 @@ }, "node_modules/object.groupby": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", - "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -3621,9 +2822,8 @@ }, "node_modules/object.values": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -3639,41 +2839,21 @@ }, "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": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", - "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", "dev": true, + "license": "MIT", "dependencies": { - "default-browser": "^4.0.0", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "is-wsl": "^2.2.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=14.16" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3681,9 +2861,8 @@ }, "node_modules/optionator": { "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, + "license": "MIT", "dependencies": { "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", @@ -3698,9 +2877,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" }, @@ -3713,9 +2891,8 @@ }, "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" }, @@ -3728,9 +2905,8 @@ }, "node_modules/parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -3740,73 +2916,64 @@ }, "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/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-parse": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/path-type": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/pathe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", - "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", - "dev": true + "version": "1.1.2", + "dev": true, + "license": "MIT" }, "node_modules/pathval": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/picocolors": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "dev": true, + "license": "ISC" }, "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" }, @@ -3816,18 +2983,16 @@ }, "node_modules/pirates": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } }, "node_modules/pkg-types": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", - "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", "dev": true, + "license": "MIT", "dependencies": { "jsonc-parser": "^3.2.0", "mlly": "^1.2.0", @@ -3835,9 +3000,7 @@ } }, "node_modules/postcss": { - "version": "8.4.33", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", - "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "version": "8.4.38", "dev": true, "funding": [ { @@ -3853,10 +3016,11 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -3864,8 +3028,6 @@ }, "node_modules/postcss-load-config": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", - "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", "dev": true, "funding": [ { @@ -3877,6 +3039,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "lilconfig": "^3.0.0", "yaml": "^2.3.4" @@ -3899,8 +3062,6 @@ }, "node_modules/postcss/node_modules/nanoid": { "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { @@ -3908,6 +3069,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -3917,18 +3079,16 @@ }, "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/prettier": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", - "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true, + "license": "MIT", "peer": true, "bin": { "prettier": "bin/prettier.cjs" @@ -3942,9 +3102,8 @@ }, "node_modules/prettier-linter-helpers": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, + "license": "MIT", "dependencies": { "fast-diff": "^1.1.2" }, @@ -3954,9 +3113,8 @@ }, "node_modules/pretty-format": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -3968,9 +3126,8 @@ }, "node_modules/pretty-format/node_modules/ansi-styles": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3980,17 +3137,14 @@ }, "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/queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -4005,25 +3159,23 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/rambda": { "version": "7.5.0", - "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.5.0.tgz", - "integrity": "sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/react-is": { "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/readdirp": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -4033,9 +3185,8 @@ }, "node_modules/regexp.prototype.flags": { "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -4051,9 +3202,8 @@ }, "node_modules/resolve": { "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "is-core-module": "^2.13.0", @@ -4069,18 +3219,16 @@ }, "node_modules/resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, + "license": "MIT", "peer": true, "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" @@ -4088,9 +3236,8 @@ }, "node_modules/reusify": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -4098,9 +3245,8 @@ }, "node_modules/rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -4112,10 +3258,12 @@ } }, "node_modules/rollup": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.5.1.tgz", - "integrity": "sha512-0EQribZoPKpb5z1NW/QYm3XSR//Xr8BeEXU49Lc/mQmpmVVG5jPUVrpc2iptup/0WMrY9mzas0fxH+TjYvG2CA==", + "version": "4.13.0", "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.5" + }, "bin": { "rollup": "dist/bin/rollup" }, @@ -4124,129 +3272,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.5.1", - "@rollup/rollup-android-arm64": "4.5.1", - "@rollup/rollup-darwin-arm64": "4.5.1", - "@rollup/rollup-darwin-x64": "4.5.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.5.1", - "@rollup/rollup-linux-arm64-gnu": "4.5.1", - "@rollup/rollup-linux-arm64-musl": "4.5.1", - "@rollup/rollup-linux-x64-gnu": "4.5.1", - "@rollup/rollup-linux-x64-musl": "4.5.1", - "@rollup/rollup-win32-arm64-msvc": "4.5.1", - "@rollup/rollup-win32-ia32-msvc": "4.5.1", - "@rollup/rollup-win32-x64-msvc": "4.5.1", + "@rollup/rollup-android-arm-eabi": "4.13.0", + "@rollup/rollup-android-arm64": "4.13.0", + "@rollup/rollup-darwin-arm64": "4.13.0", + "@rollup/rollup-darwin-x64": "4.13.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.13.0", + "@rollup/rollup-linux-arm64-gnu": "4.13.0", + "@rollup/rollup-linux-arm64-musl": "4.13.0", + "@rollup/rollup-linux-riscv64-gnu": "4.13.0", + "@rollup/rollup-linux-x64-gnu": "4.13.0", + "@rollup/rollup-linux-x64-musl": "4.13.0", + "@rollup/rollup-win32-arm64-msvc": "4.13.0", + "@rollup/rollup-win32-ia32-msvc": "4.13.0", + "@rollup/rollup-win32-x64-msvc": "4.13.0", "fsevents": "~2.3.2" } }, - "node_modules/run-applescript": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", - "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", - "dev": true, - "dependencies": { - "execa": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/run-applescript/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/run-applescript/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/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==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/run-applescript/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/run-applescript/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -4262,15 +3305,15 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/safe-array-concat": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -4287,16 +3330,14 @@ }, "node_modules/safe-array-concat/node_modules/isarray": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/safe-regex-test": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -4309,9 +3350,8 @@ }, "node_modules/semver": { "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -4324,9 +3364,8 @@ }, "node_modules/set-function-length": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "define-data-property": "^1.1.1", @@ -4340,9 +3379,8 @@ }, "node_modules/set-function-name": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "define-data-property": "^1.0.1", @@ -4355,9 +3393,8 @@ }, "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" }, @@ -4367,18 +3404,16 @@ }, "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/side-channel": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.0", @@ -4391,30 +3426,26 @@ }, "node_modules/siginfo": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true + "dev": true, + "license": "ISC" }, "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 + "dev": true, + "license": "ISC" }, "node_modules/slash": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/source-map": { "version": "0.8.0-beta.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", - "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "whatwg-url": "^7.0.0" }, @@ -4423,31 +3454,27 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/stackback": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/std-env": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.5.0.tgz", - "integrity": "sha512-JGUEaALvL0Mf6JCfYnJOTcobY+Nc7sG/TemDRBqCA0wEr4DER7zDchaaixTlmOxAjG1uRJmX82EQcxwTQTkqVA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/string.prototype.trim": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -4463,9 +3490,8 @@ }, "node_modules/string.prototype.trimend": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -4478,9 +3504,8 @@ }, "node_modules/string.prototype.trimstart": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -4493,9 +3518,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" }, @@ -4505,9 +3529,8 @@ }, "node_modules/strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=4" @@ -4515,9 +3538,8 @@ }, "node_modules/strip-final-newline": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -4527,9 +3549,8 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -4538,12 +3559,11 @@ } }, "node_modules/strip-literal": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", - "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "version": "2.0.0", "dev": true, + "license": "MIT", "dependencies": { - "acorn": "^8.10.0" + "js-tokens": "^8.0.2" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -4551,9 +3571,8 @@ }, "node_modules/sucrase": { "version": "3.34.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz", - "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", @@ -4573,9 +3592,8 @@ }, "node_modules/sucrase/node_modules/glob": { "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4593,9 +3611,8 @@ }, "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" }, @@ -4605,9 +3622,8 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">= 0.4" @@ -4617,13 +3633,12 @@ } }, "node_modules/synckit": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", - "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "version": "0.8.8", "dev": true, + "license": "MIT", "dependencies": { - "@pkgr/utils": "^2.3.1", - "tslib": "^2.5.0" + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -4634,24 +3649,21 @@ }, "node_modules/text-table": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/thenify": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", "dev": true, + "license": "MIT", "dependencies": { "any-promise": "^1.0.0" } }, "node_modules/thenify-all": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", "dev": true, + "license": "MIT", "dependencies": { "thenify": ">= 3.1.0 < 4" }, @@ -4661,45 +3673,29 @@ }, "node_modules/tinybench": { "version": "2.5.1", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.1.tgz", - "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tinypool": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.7.0.tgz", - "integrity": "sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==", + "version": "0.8.3", "dev": true, + "license": "MIT", "engines": { "node": ">=14.0.0" } }, "node_modules/tinyspy": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.0.tgz", - "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", + "version": "2.2.1", "dev": true, + "license": "MIT", "engines": { "node": ">=14.0.0" } }, - "node_modules/titleize": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", - "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "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" }, @@ -4709,29 +3705,26 @@ }, "node_modules/tr46": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", "dev": true, + "license": "MIT", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/tree-kill": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, + "license": "MIT", "bin": { "tree-kill": "cli.js" } }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.3.0", "dev": true, + "license": "MIT", "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -4739,15 +3732,13 @@ }, "node_modules/ts-interface-checker": { "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/tsconfig-paths": { "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "@types/json5": "^0.0.29", @@ -4758,15 +3749,13 @@ }, "node_modules/tslib": { "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/tsup": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.0.1.tgz", - "integrity": "sha512-hvW7gUSG96j53ZTSlT4j/KL0q1Q2l6TqGBFc6/mu/L46IoNWqLLUzLRLP1R8Q7xrJTmkDxxDoojV5uCVs1sVOg==", + "version": "8.0.2", "dev": true, + "license": "MIT", "dependencies": { "bundle-require": "^4.0.0", "cac": "^6.7.12", @@ -4813,9 +3802,8 @@ }, "node_modules/tsup/node_modules/execa": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -4836,18 +3824,16 @@ }, "node_modules/tsup/node_modules/human-signals": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } }, "node_modules/tsup/node_modules/is-stream": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -4857,18 +3843,16 @@ }, "node_modules/tsup/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==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/tsup/node_modules/npm-run-path": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -4878,9 +3862,8 @@ }, "node_modules/tsup/node_modules/onetime": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -4893,27 +3876,24 @@ }, "node_modules/tsup/node_modules/resolve-from": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/tsup/node_modules/strip-final-newline": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "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" }, @@ -4923,18 +3903,16 @@ }, "node_modules/type-detect": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -4944,9 +3922,8 @@ }, "node_modules/typed-array-buffer": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -4959,9 +3936,8 @@ }, "node_modules/typed-array-byte-length": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -4978,9 +3954,8 @@ }, "node_modules/typed-array-byte-offset": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "available-typed-arrays": "^1.0.5", @@ -4998,9 +3973,8 @@ }, "node_modules/typed-array-length": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -5012,10 +3986,9 @@ } }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.4.3", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -5025,16 +3998,14 @@ } }, "node_modules/ufo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", - "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==", - "dev": true + "version": "1.5.3", + "dev": true, + "license": "MIT" }, "node_modules/unbox-primitive": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.2", @@ -5048,37 +4019,25 @@ }, "node_modules/undici-types": { "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true, - "engines": { - "node": ">=8" - } + "license": "MIT" }, "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/vite": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", - "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", + "version": "5.2.6", "dev": true, + "license": "MIT", "dependencies": { - "esbuild": "^0.19.3", - "postcss": "^8.4.32", - "rollup": "^4.2.0" + "esbuild": "^0.20.1", + "postcss": "^8.4.36", + "rollup": "^4.13.0" }, "bin": { "vite": "bin/vite.js" @@ -5126,82 +4085,128 @@ } }, "node_modules/vite-node": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.34.6.tgz", - "integrity": "sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==", + "version": "1.4.0", "dev": true, + "license": "MIT", "dependencies": { "cac": "^6.7.14", "debug": "^4.3.4", - "mlly": "^1.4.0", "pathe": "^1.1.1", "picocolors": "^1.0.0", - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0-0" + "vite": "^5.0.0" }, "bin": { "vite-node": "vite-node.mjs" }, "engines": { - "node": ">=v14.18.0" + "node": "^18.0.0 || >=20.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.20.2", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.20.2", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" + } + }, "node_modules/vitest": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.34.6.tgz", - "integrity": "sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==", - "dev": true, - "dependencies": { - "@types/chai": "^4.3.5", - "@types/chai-subset": "^1.3.3", - "@types/node": "*", - "@vitest/expect": "0.34.6", - "@vitest/runner": "0.34.6", - "@vitest/snapshot": "0.34.6", - "@vitest/spy": "0.34.6", - "@vitest/utils": "0.34.6", - "acorn": "^8.9.0", - "acorn-walk": "^8.2.0", - "cac": "^6.7.14", + "version": "1.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "1.4.0", + "@vitest/runner": "1.4.0", + "@vitest/snapshot": "1.4.0", + "@vitest/spy": "1.4.0", + "@vitest/utils": "1.4.0", + "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", - "local-pkg": "^0.4.3", - "magic-string": "^0.30.1", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", "pathe": "^1.1.1", "picocolors": "^1.0.0", - "std-env": "^3.3.3", - "strip-literal": "^1.0.1", - "tinybench": "^2.5.0", - "tinypool": "^0.7.0", - "vite": "^3.1.0 || ^4.0.0 || ^5.0.0-0", - "vite-node": "0.34.6", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.2", + "vite": "^5.0.0", + "vite-node": "1.4.0", "why-is-node-running": "^2.2.2" }, "bin": { "vitest": "vitest.mjs" }, "engines": { - "node": ">=v14.18.0" + "node": "^18.0.0 || >=20.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "@edge-runtime/vm": "*", - "@vitest/browser": "*", - "@vitest/ui": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.4.0", + "@vitest/ui": "1.4.0", "happy-dom": "*", - "jsdom": "*", - "playwright": "*", - "safaridriver": "*", - "webdriverio": "*" + "jsdom": "*" }, "peerDependenciesMeta": { "@edge-runtime/vm": { "optional": true }, + "@types/node": { + "optional": true + }, "@vitest/browser": { "optional": true }, @@ -5213,29 +4218,18 @@ }, "jsdom": { "optional": true - }, - "playwright": { - "optional": true - }, - "safaridriver": { - "optional": true - }, - "webdriverio": { - "optional": true } } }, "node_modules/webidl-conversions": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/whatwg-url": { "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", "dev": true, + "license": "MIT", "dependencies": { "lodash.sortby": "^4.7.0", "tr46": "^1.0.1", @@ -5244,9 +4238,8 @@ }, "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" }, @@ -5259,9 +4252,8 @@ }, "node_modules/which-boxed-primitive": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "is-bigint": "^1.0.1", @@ -5276,9 +4268,8 @@ }, "node_modules/which-typed-array": { "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "available-typed-arrays": "^1.0.5", @@ -5296,9 +4287,8 @@ }, "node_modules/why-is-node-running": { "version": "2.2.2", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", - "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", "dev": true, + "license": "MIT", "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" @@ -5312,30 +4302,26 @@ }, "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 + "dev": true, + "license": "ISC" }, "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 + "dev": true, + "license": "ISC" }, "node_modules/yaml": { "version": "2.3.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", - "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", "dev": true, + "license": "ISC", "engines": { "node": ">= 14" } }, "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" }, diff --git a/package.json b/package.json index dd170b9..a0d710e 100644 --- a/package.json +++ b/package.json @@ -2,27 +2,27 @@ "name": "jpeg-lossless-decoder-js", "version": "2.1.0", "description": "A JavaScript JPEG Lossless decoder.", - "main": "build/main.js", - "types": "build/main.d.ts", + "main": "release/lossless.js", + "types": "release/lossless.d.cts", "type": "module", "directories": { "test": "tests" }, "devDependencies": { - "@types/node": "^20.9.4", - "@typescript-eslint/eslint-plugin": "^6.12.0", - "@typescript-eslint/parser": "^6.12.0", - "eslint": "^8.54.0", - "eslint-config-prettier": "^9.0.0", + "@types/node": "^20.11.30", + "@typescript-eslint/eslint-plugin": "^7.4.0", + "@typescript-eslint/parser": "^7.4.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", "eslint-config-standard": "^17.1.0", - "eslint-plugin-mocha": "^10.2.0", - "eslint-plugin-prettier": "^5.0.1", - "tsup": "^8.0.1", - "typescript": "^5.3.2", - "vitest": "^0.34.6" + "eslint-plugin-mocha": "^10.4.1", + "eslint-plugin-prettier": "^5.1.3", + "tsup": "^8.0.2", + "typescript": "^5.4.3", + "vitest": "^1.4.0" }, "scripts": { - "test": "vitest", + "test": "vitest run", "build": "tsup", "lint": "eslint ." }, diff --git a/release/lossless-min.d.cts b/release/lossless-min.d.cts new file mode 100644 index 0000000..0a9aed9 --- /dev/null +++ b/release/lossless-min.d.cts @@ -0,0 +1,150 @@ +declare const ComponentSpec: { + hSamp: number; + quantTableSel: number; + vSamp: number; +}; + +declare class DataStream { + buffer: Uint8Array; + index: number; + constructor(data: ArrayBuffer, offset?: number, length?: number); + get16(): number; + get8(): number; +} + +declare class FrameHeader { + dimX: number; + dimY: number; + numComp: number; + precision: number; + components: Array; + read(data: DataStream): number; +} + +declare class HuffmanTable { + static MSB: number; + l: number[][][]; + th: number[]; + v: number[][][][]; + tc: number[][]; + constructor(); + read(data: DataStream, HuffTab: number[][][]): number; + buildHuffTable(tab: number[], L: number[], V: number[][]): void; +} + +declare class QuantizationTable { + precision: number[]; + tq: number[]; + quantTables: number[][]; + static enhanceQuantizationTable: (qtab: number[], table: number[]) => void; + read(data: DataStream, table: number[]): number; +} + +declare const ScanComponent: { + acTabSel: number; + dcTabSel: number; + scanCompSel: number; +}; + +declare class ScanHeader { + ah: number; + al: number; + numComp: number; + selection: number; + spectralEnd: number; + components: Array; + read(data: DataStream): number; +} + +declare class Decoder { + static IDCT_P: number[]; + static TABLE: number[]; + static MAX_HUFFMAN_SUBTREE: number; + static MSB: number; + static RESTART_MARKER_BEGIN: number; + static RESTART_MARKER_END: number; + buffer: ArrayBuffer | null; + stream: DataStream | null; + frame: FrameHeader; + huffTable: HuffmanTable; + quantTable: QuantizationTable; + scan: ScanHeader; + DU: number[][][]; + HuffTab: number[][][]; + IDCT_Source: number[]; + nBlock: number[]; + acTab: number[][]; + dcTab: number[][]; + qTab: number[][]; + marker: number; + markerIndex: number; + numComp: number; + restartInterval: number; + selection: number; + xDim: number; + yDim: number; + xLoc: number; + yLoc: number; + outputData: Uint8Array | Uint16Array | null; + restarting: boolean; + mask: number; + numBytes: number; + precision: number | undefined; + components: Array; + getter: null | ((index: number, compOffset: number) => number); + setter: null | ((index: number, val: number, compOffset?: number) => void); + output: null | ((PRED: number[]) => void); + selector: null | ((compOffset?: number) => number); + /** + * The Decoder constructor. + * @property {number} numBytes - number of bytes per component + * @type {Function} + */ + constructor(buffer?: ArrayBuffer | null, numBytes?: number); + /** + * Returns decompressed data. + */ + decompress(buffer: ArrayBuffer, offset: number, length: number): ArrayBuffer; + decode(buffer?: ArrayBuffer, offset?: number, length?: number, numBytes?: number): Uint8Array | Uint16Array; + decodeUnit(prev: number[], temp: number[], index: number[]): number; + select1(compOffset?: number): number; + select2(compOffset?: number): number; + select3(compOffset?: number): number; + select4(compOffset?: number): number; + select5(compOffset?: number): number; + select6(compOffset?: number): number; + select7(compOffset?: number): number; + decodeRGB(prev: number[], temp: number[], index: number[]): number; + decodeSingle(prev: number[], temp: number[], index: number[]): number; + getHuffmanValue(table: number[], temp: number[], index: number[]): number; + getn(PRED: number[], n: number, temp: number[], index: number[]): number; + getPreviousX(compOffset?: number): number; + getPreviousXY(compOffset?: number): number; + getPreviousY(compOffset?: number): number; + isLastPixel(): boolean; + outputSingle(PRED: number[]): void; + outputRGB(PRED: number[]): void; + setValue8(index: number, val: number): void; + getValue8(index: number): number; + setValueRGB(index: number, val: number, compOffset?: number): void; + getValueRGB(index: number, compOffset: number): number; + readApp(): number | null; + readComment(): string | null; + readNumber(): number | null; +} + +type NestedArray = Array>; +declare const createArray: (...dimensions: number[]) => NestedArray; +declare const makeCRCTable: () => number[]; +declare const crcTable: number[]; +declare const crc32: (buffer: ArrayBuffer) => number; + +declare const utils_crc32: typeof crc32; +declare const utils_crcTable: typeof crcTable; +declare const utils_createArray: typeof createArray; +declare const utils_makeCRCTable: typeof makeCRCTable; +declare namespace utils { + export { utils_crc32 as crc32, utils_crcTable as crcTable, utils_createArray as createArray, utils_makeCRCTable as makeCRCTable }; +} + +export { ComponentSpec, DataStream, Decoder, FrameHeader, HuffmanTable, QuantizationTable, ScanComponent, ScanHeader, utils as Utils }; diff --git a/release/lossless-min.js b/release/lossless-min.js new file mode 100644 index 0000000..524b794 --- /dev/null +++ b/release/lossless-min.js @@ -0,0 +1,2 @@ +"use strict";var y=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var k=(a,t)=>{for(var e in t)y(a,e,{get:t[e],enumerable:!0})},I=(a,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of B(t))!C.call(a,s)&&s!==e&&y(a,s,{get:()=>t[s],enumerable:!(r=L(t,s))||r.enumerable});return a};var v=a=>I(y({},"__esModule",{value:!0}),a);var H={};k(H,{ComponentSpec:()=>w,DataStream:()=>b,Decoder:()=>E,FrameHeader:()=>x,HuffmanTable:()=>p,QuantizationTable:()=>d,ScanComponent:()=>R,ScanHeader:()=>g,Utils:()=>T});module.exports=v(H);var w={hSamp:0,quantTableSel:0,vSamp:0};var b=class{buffer;index;constructor(t,e,r){this.buffer=new Uint8Array(t,e,r),this.index=0}get16(){let t=(this.buffer[this.index]<<8)+this.buffer[this.index+1];return this.index+=2,t}get8(){let t=this.buffer[this.index];return this.index+=1,t}};var x=class{dimX=0;dimY=0;numComp=0;precision=0;components=[];read(t){let e=0,r,s=t.get16();e+=2,this.precision=t.get8(),e+=1,this.dimY=t.get16(),e+=2,this.dimX=t.get16(),e+=2,this.numComp=t.get8(),e+=1;for(let i=1;i<=this.numComp;i+=1){if(e>s)throw new Error("ERROR: frame format error");let n=t.get8();if(e+=1,e>=s)throw new Error("ERROR: frame format error [c>=Lf]");r=t.get8(),e+=1,this.components[n]||(this.components[n]={...w}),this.components[n].hSamp=r>>4,this.components[n].vSamp=r&15,this.components[n].quantTableSel=t.get8(),e+=1}if(e!==s)throw new Error("ERROR: frame format error [Lf!=count]");return 1}};var T={};k(T,{crc32:()=>P,crcTable:()=>S,createArray:()=>c,makeCRCTable:()=>D});var c=(...a)=>{if(a.length>1){let t=a[0],e=a.slice(1),r=[];for(let s=0;s>>1:a>>>1;t[e]=a}return t},S=D(),P=function(a){let t=new Uint8Array(a),e=-1;for(let r=0;r>>8^S[(e^t[r])&255];return(e^-1)>>>0};var p=class a{static MSB=2147483648;l;th;v;tc;constructor(){this.l=c(4,2,16),this.th=[0,0,0,0],this.v=c(4,2,16,200),this.tc=[[0,0],[0,0],[0,0],[0,0]]}read(t,e){let r=0,s,i,n,o,f,u=t.get16();for(r+=2;r3)throw new Error("ERROR: Huffman table ID > 3");if(n=s>>4,n>2)throw new Error("ERROR: Huffman table [Table class > 2 ]");for(this.th[i]=1,this.tc[i][n]=1,o=0;o<16;o+=1)this.l[i][n][o]=t.get8(),r+=1;for(o=0;o<16;o+=1)for(f=0;fu)throw new Error("ERROR: Huffman table format error [count>Lh]");this.v[i][n][o][f]=t.get8(),r+=1}}if(r!==u)throw new Error("ERROR: Huffman table format error [count!=Lf]");for(o=0;o<4;o+=1)for(f=0;f<2;f+=1)this.tc[o][f]!==0&&this.buildHuffTable(e[o][f],this.l[o][f],this.v[o][f]);return 1}buildHuffTable(t,e,r){let s,i,n,o,f;for(i=0,n=0;n<8;n+=1)for(o=0;o>n+1;f+=1)t[i]=r[n][o]|n+1<<8,i+=1;for(n=1;i<256;n+=1,i+=1)t[i]=n|a.MSB;for(s=1,i=0,n=8;n<16;n+=1)for(o=0;o>n-7;f+=1)t[s*256+i]=r[n][o]|n+1<<8,i+=1;if(i>=256){if(i>256)throw new Error("ERROR: Huffman table error(1)!");i=0,s+=1}}}};var d=class a{precision=[];tq=[0,0,0,0];quantTables=c(4,64);static enhanceQuantizationTable=function(t,e){for(let r=0;r<8;r+=1)t[e[0*8+r]]*=90,t[e[4*8+r]]*=90,t[e[2*8+r]]*=118,t[e[6*8+r]]*=49,t[e[5*8+r]]*=71,t[e[1*8+r]]*=126,t[e[7*8+r]]*=25,t[e[3*8+r]]*=106;for(let r=0;r<8;r+=1)t[e[0+8*r]]*=90,t[e[4+8*r]]*=90,t[e[2+8*r]]*=118,t[e[6+8*r]]*=49,t[e[5+8*r]]*=71,t[e[1+8*r]]*=126,t[e[7+8*r]]*=25,t[e[3+8*r]]*=106;for(let r=0;r<64;r+=1)t[r]>>=6};read(t,e){let r=0,s,i,n,o=t.get16();for(r+=2;r3)throw new Error("ERROR: Quantization table ID > 3");if(this.precision[i]=s>>4,this.precision[i]===0)this.precision[i]=8;else if(this.precision[i]===1)this.precision[i]=16;else throw new Error("ERROR: Quantization table precision error");if(this.tq[i]=1,this.precision[i]===8){for(n=0;n<64;n+=1){if(r>o)throw new Error("ERROR: Quantization table format error");this.quantTables[i][n]=t.get8(),r+=1}a.enhanceQuantizationTable(this.quantTables[i],e)}else{for(n=0;n<64;n+=1){if(r>o)throw new Error("ERROR: Quantization table format error");this.quantTables[i][n]=t.get16(),r+=2}a.enhanceQuantizationTable(this.quantTables[i],e)}}if(r!==o)throw new Error("ERROR: Quantization table error [count!=Lq]");return 1}};var R={acTabSel:0,dcTabSel:0,scanCompSel:0};var g=class{ah=0;al=0;numComp=0;selection=0;spectralEnd=0;components=[];read(t){let e=0,r,s,i=t.get16();for(e+=2,this.numComp=t.get8(),e+=1,r=0;ri)throw new Error("ERROR: scan header format error");this.components[r].scanCompSel=t.get8(),e+=1,s=t.get8(),e+=1,this.components[r].dcTabSel=s>>4,this.components[r].acTabSel=s&15}if(this.selection=t.get8(),e+=1,this.spectralEnd=t.get8(),e+=1,s=t.get8(),this.ah=s>>4,this.al=s&15,e+=1,e!==i)throw new Error("ERROR: scan header format error [count!=Ns]");return 1}};var A=function(){let a=new ArrayBuffer(2);return new DataView(a).setInt16(0,256,!0),new Int16Array(a)[0]===256}(),E=class a{static IDCT_P=[0,5,40,16,45,2,7,42,21,56,8,61,18,47,1,4,41,23,58,13,32,24,37,10,63,17,44,3,6,43,20,57,15,34,29,48,53,26,39,9,60,19,46,22,59,12,33,31,50,55,25,36,11,62,14,35,28,49,52,27,38,30,51,54];static TABLE=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63];static MAX_HUFFMAN_SUBTREE=50;static MSB=2147483648;static RESTART_MARKER_BEGIN=65488;static RESTART_MARKER_END=65495;buffer=null;stream=null;frame=new x;huffTable=new p;quantTable=new d;scan=new g;DU=c(10,4,64);HuffTab=c(4,2,50*256);IDCT_Source=[];nBlock=[];acTab=c(10,1);dcTab=c(10,1);qTab=c(10,1);marker=0;markerIndex=0;numComp=0;restartInterval=0;selection=0;xDim=0;yDim=0;xLoc=0;yLoc=0;outputData=null;restarting=!1;mask=0;numBytes=0;precision=void 0;components=[];getter=null;setter=null;output=null;selector=null;constructor(t,e){this.buffer=t??null,this.numBytes=e??0}decompress(t,e,r){return this.decode(t,e,r).buffer}decode(t,e,r,s){let i=0,n=[],o,f,u=[],l=[],m;t&&(this.buffer=t),s!==void 0&&(this.numBytes=s),this.stream=new b(this.buffer,e,r),this.buffer=null,this.xLoc=0,this.yLoc=0;let h=this.stream.get16();if(h!==65496)throw new Error("Not a JPEG file");for(h=this.stream.get16();h>>4!==4092||h===65476;){switch(h){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,a.TABLE);break;case 65501:this.restartInterval=this.readNumber()??0;break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(h>>8!==255)throw new Error("ERROR: format throw new IOException! (decode)")}h=this.stream.get16()}if(h<65472||h>65479)throw new Error("ERROR: could not handle arithmetic code!");this.frame.read(this.stream),h=this.stream.get16();do{for(;h!==65498;){switch(h){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,a.TABLE);break;case 65501:this.restartInterval=this.readNumber()??0;break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(h>>8!==255)throw new Error("ERROR: format throw new IOException! (Parser.decode)")}h=this.stream.get16()}switch(this.precision=this.frame.precision,this.components=this.frame.components,this.numBytes||(this.numBytes=Math.round(Math.ceil(this.precision/8))),this.numBytes===1?this.mask=255:this.mask=65535,this.scan.read(this.stream),this.numComp=this.scan.numComp,this.selection=this.scan.selection,this.numBytes===1?this.numComp===3?(this.getter=this.getValueRGB,this.setter=this.setValueRGB,this.output=this.outputRGB):(this.getter=this.getValue8,this.setter=this.setValue8,this.output=this.outputSingle):(this.getter=this.getValue8,this.setter=this.setValue8,this.output=this.outputSingle),this.selection){case 2:this.selector=this.select2;break;case 3:this.selector=this.select3;break;case 4:this.selector=this.select4;break;case 5:this.selector=this.select5;break;case 6:this.selector=this.select6;break;case 7:this.selector=this.select7;break;default:this.selector=this.select1;break}for(o=0;o=a.RESTART_MARKER_BEGIN&&h<=a.RESTART_MARKER_END))break}h===65500&&i===1&&(this.readNumber(),h=this.stream.get16())}while(h!==65497&&this.xLoc>1)}select6(t){return this.getPreviousY(t)+(this.getPreviousX(t)-this.getPreviousXY(t)>>1)}select7(t){return(this.getPreviousX(t)+this.getPreviousY(t))/2}decodeRGB(t,e,r){if(this.selector===null)throw new Error("decode hasn't run yet");let s,i,n,o,f,u,l;for(t[0]=this.selector(0),t[1]=this.selector(1),t[2]=this.selector(2),o=0;o=65280)return m;for(t[o]=this.IDCT_Source[0]=t[o]+this.getn(r,m,e,r),this.IDCT_Source[0]*=n[0],l=1;l<64;l+=1){if(m=this.getHuffmanValue(s,e,r),m>=65280)return m;if(l+=m>>4,m&15)this.IDCT_Source[a.IDCT_P[l]]=this.getn(r,m&15,e,r)*n[l];else if(!(m>>4))break}}return 0}decodeSingle(t,e,r){if(this.selector===null)throw new Error("decode hasn't run yet");let s,i,n,o;for(this.restarting?(this.restarting=!1,t[0]=1<=65280)return s;if(n=this.getn(t,s,e,r),o=n>>8,o>=a.RESTART_MARKER_BEGIN&&o<=a.RESTART_MARKER_END)return o;t[0]+=n}return 0}getHuffmanValue(t,e,r){let s,i;if(!this.stream)throw new Error("stream not initialized");if(r[0]<8?(e[0]<<=8,i=this.stream.get8(),i===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),e[0]|=i):r[0]-=8,s=t[e[0]>>r[0]],s&a.MSB){if(this.markerIndex!==0)return this.markerIndex=0,65280|this.marker;e[0]&=65535>>16-r[0],e[0]<<=8,i=this.stream.get8(),i===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),e[0]|=i,s=t[(s&255)*256+(e[0]>>r[0])],r[0]+=8}if(r[0]+=8-(s>>8),r[0]<0)throw new Error("index="+r[0]+" temp="+e[0]+" code="+s+" in HuffmanValue()");return r[0]>16-r[0],s&255)}getn(t,e,r,s){let i,n;if(this.stream===null)throw new Error("stream not initialized");if(e===0)return 0;if(e===16)return t[0]>=0?-32768:32768;if(s[0]-=e,s[0]>=0){if(s[0]>s[0],r[0]&=65535>>16-s[0]}else{if(r[0]<<=8,n=this.stream.get8(),n===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),r[0]|=n,s[0]+=8,s[0]<0){if(this.markerIndex!==0)return this.markerIndex=0,(65280|this.marker)<<8;r[0]<<=8,n=this.stream.get8(),n===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),r[0]|=n,s[0]+=8}if(s[0]<0)throw new Error("index="+s[0]+" in getn()");if(s[0]>s[0],r[0]&=65535>>16-s[0]}return i<1<0?this.getter(this.yLoc*this.xDim+this.xLoc-1,t):this.yLoc>0?this.getPreviousY(t):1<0&&this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc-1,t):this.getPreviousY(t)}getPreviousY(t=0){if(this.getter===null)throw new Error("decode hasn't run yet");return this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc,t):this.getPreviousX(t)}isLastPixel(){return this.xLoc===this.xDim-1&&this.yLoc===this.yDim-1}outputSingle(t){if(this.setter===null)throw new Error("decode hasn't run yet");this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))}outputRGB(t){if(this.setter===null)throw new Error("decode hasn't run yet");let e=this.yLoc*this.xDim+this.xLoc;this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))}setValue8(t,e){if(!this.outputData)throw new Error("output data not ready");A?this.outputData[t]=e:this.outputData[t]=(e&255)<<8|e>>8&255}getValue8(t){if(this.outputData===null)throw new Error("output data not ready");if(A)return this.outputData[t];{let e=this.outputData[t];return(e&255)<<8|e>>8&255}}setValueRGB(t,e,r=0){this.outputData!==null&&(this.outputData[t*3+r]=e)}getValueRGB(t,e){if(this.outputData===null)throw new Error("output data not ready");return this.outputData[t*3+e]}readApp(){if(this.stream===null)return null;let t=0,e=this.stream.get16();for(t+=2;t = []\n\n read(data: DataStream) {\n let count = 0\n let temp\n\n const length = data.get16()\n count += 2\n\n this.precision = data.get8()\n count += 1\n\n this.dimY = data.get16()\n count += 2\n\n this.dimX = data.get16()\n count += 2\n\n this.numComp = data.get8()\n count += 1\n for (let i = 1; i <= this.numComp; i += 1) {\n if (count > length) {\n throw new Error('ERROR: frame format error')\n }\n\n const c = data.get8()\n count += 1\n\n if (count >= length) {\n throw new Error('ERROR: frame format error [c>=Lf]')\n }\n\n temp = data.get8()\n count += 1\n\n if (!this.components[c]) {\n this.components[c] = { ...ComponentSpec }\n }\n\n this.components[c].hSamp = temp >> 4\n this.components[c].vSamp = temp & 0x0f\n this.components[c].quantTableSel = data.get8()\n count += 1\n }\n\n if (count !== length) {\n throw new Error('ERROR: frame format error [Lf!=count]')\n }\n\n return 1\n }\n}\n","type NestedArray = Array>\n\n// https://stackoverflow.com/a/12588826\nexport const createArray = (...dimensions: number[]): NestedArray => {\n if (dimensions.length > 1) {\n const dim = dimensions[0]\n const rest = dimensions.slice(1)\n const newArray = []\n for (let i = 0; i < dim; i++) {\n newArray[i] = createArray(...rest)\n }\n return newArray\n } else {\n return Array(dimensions[0]).fill(undefined)\n }\n}\n\n// http://stackoverflow.com/questions/18638900/javascript-crc32\nexport const makeCRCTable = function () {\n let c\n const crcTable = []\n for (let n = 0; n < 256; n++) {\n c = n\n for (let k = 0; k < 8; k++) {\n c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1\n }\n crcTable[n] = c\n }\n return crcTable\n}\n\nexport const crcTable = makeCRCTable()\n\nexport const crc32 = function (buffer: ArrayBuffer) {\n const uint8view = new Uint8Array(buffer)\n let crc = 0 ^ -1\n\n for (let i = 0; i < uint8view.length; i++) {\n crc = (crc >>> 8) ^ crcTable[(crc ^ uint8view[i]) & 0xff]\n }\n\n return (crc ^ -1) >>> 0\n}\n","import { DataStream } from './data-stream.js'\nimport { createArray } from './utils.js'\n\nexport class HuffmanTable {\n static MSB = 0x80000000\n\n l: number[][][]\n th: number[]\n v: number[][][][]\n tc: number[][]\n\n constructor() {\n this.l = createArray(4, 2, 16) as number[][][]\n this.th = [0, 0, 0, 0]\n this.v = createArray(4, 2, 16, 200) as number[][][][]\n this.tc = [\n [0, 0],\n [0, 0],\n [0, 0],\n [0, 0]\n ]\n }\n\n read(data: DataStream, HuffTab: number[][][]) {\n let count = 0\n let temp\n let t\n let c\n let i\n let j\n\n const length = data.get16()\n count += 2\n\n while (count < length) {\n temp = data.get8()\n count += 1\n t = temp & 0x0f\n if (t > 3) {\n throw new Error('ERROR: Huffman table ID > 3')\n }\n\n c = temp >> 4\n if (c > 2) {\n throw new Error('ERROR: Huffman table [Table class > 2 ]')\n }\n\n this.th[t] = 1\n this.tc[t][c] = 1\n\n for (i = 0; i < 16; i += 1) {\n this.l[t][c][i] = data.get8()\n count += 1\n }\n\n for (i = 0; i < 16; i += 1) {\n for (j = 0; j < this.l[t][c][i]; j += 1) {\n if (count > length) {\n throw new Error('ERROR: Huffman table format error [count>Lh]')\n }\n\n this.v[t][c][i][j] = data.get8()\n count += 1\n }\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Huffman table format error [count!=Lf]')\n }\n\n for (i = 0; i < 4; i += 1) {\n for (j = 0; j < 2; j += 1) {\n if (this.tc[i][j] !== 0) {\n this.buildHuffTable(HuffTab[i][j], this.l[i][j], this.v[i][j])\n }\n }\n }\n\n return 1\n }\n\n //\tBuild_HuffTab()\n //\tParameter: t table ID\n //\t c table class ( 0 for DC, 1 for AC )\n //\t L[i] # of codewords which length is i\n //\t V[i][j] Huffman Value (length=i)\n //\tEffect:\n //\t build up HuffTab[t][c] using L and V.\n buildHuffTable(tab: number[], L: number[], V: number[][]) {\n let currentTable, k, i, j, n\n const temp = 256\n k = 0\n\n for (i = 0; i < 8; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i + 1); n += 1) {\n tab[k] = V[i][j] | ((i + 1) << 8)\n k += 1\n }\n }\n }\n\n for (i = 1; k < 256; i += 1, k += 1) {\n tab[k] = i | HuffmanTable.MSB\n }\n\n currentTable = 1\n k = 0\n\n for (i = 8; i < 16; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i - 7); n += 1) {\n tab[currentTable * 256 + k] = V[i][j] | ((i + 1) << 8)\n k += 1\n }\n\n if (k >= 256) {\n if (k > 256) {\n throw new Error('ERROR: Huffman table error(1)!')\n }\n\n k = 0\n currentTable += 1\n }\n }\n }\n }\n}\n","import { DataStream } from './data-stream.js'\nimport { createArray } from './utils.js'\n\nexport class QuantizationTable {\n precision: number[] = [] // Quantization precision 8 or 16\n tq = [0, 0, 0, 0] // 1: this table is presented\n quantTables: number[][] = createArray(4, 64) as number[][] // Tables\n\n static enhanceQuantizationTable = function (qtab: number[], table: number[]) {\n for (let i = 0; i < 8; i += 1) {\n qtab[table[0 * 8 + i]] *= 90\n qtab[table[4 * 8 + i]] *= 90\n qtab[table[2 * 8 + i]] *= 118\n qtab[table[6 * 8 + i]] *= 49\n qtab[table[5 * 8 + i]] *= 71\n qtab[table[1 * 8 + i]] *= 126\n qtab[table[7 * 8 + i]] *= 25\n qtab[table[3 * 8 + i]] *= 106\n }\n\n for (let i = 0; i < 8; i += 1) {\n qtab[table[0 + 8 * i]] *= 90\n qtab[table[4 + 8 * i]] *= 90\n qtab[table[2 + 8 * i]] *= 118\n qtab[table[6 + 8 * i]] *= 49\n qtab[table[5 + 8 * i]] *= 71\n qtab[table[1 + 8 * i]] *= 126\n qtab[table[7 + 8 * i]] *= 25\n qtab[table[3 + 8 * i]] *= 106\n }\n\n for (let i = 0; i < 64; i += 1) {\n qtab[i] >>= 6\n }\n }\n\n read(data: DataStream, table: number[]) {\n let count = 0\n let temp\n let t\n let i\n\n const length = data.get16()\n count += 2\n\n while (count < length) {\n temp = data.get8()\n count += 1\n t = temp & 0x0f\n\n if (t > 3) {\n throw new Error('ERROR: Quantization table ID > 3')\n }\n\n this.precision[t] = temp >> 4\n\n if (this.precision[t] === 0) {\n this.precision[t] = 8\n } else if (this.precision[t] === 1) {\n this.precision[t] = 16\n } else {\n throw new Error('ERROR: Quantization table precision error')\n }\n\n this.tq[t] = 1\n\n if (this.precision[t] === 8) {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error')\n }\n\n this.quantTables[t][i] = data.get8()\n count += 1\n }\n\n QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table)\n } else {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error')\n }\n\n this.quantTables[t][i] = data.get16()\n count += 2\n }\n\n QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table)\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Quantization table error [count!=Lq]')\n }\n\n return 1\n }\n}\n","export const ScanComponent = {\n acTabSel: 0, // AC table selector\n dcTabSel: 0, // DC table selector\n scanCompSel: 0 // Scan component selector\n}\n","import { DataStream } from './data-stream.js'\nimport { ScanComponent } from './scan-component.js'\n\nexport class ScanHeader {\n ah = 0\n al = 0\n numComp = 0 // Number of components in the scan\n selection = 0 // Start of spectral or predictor selection\n spectralEnd = 0 // End of spectral selection\n components: Array = []\n\n read(data: DataStream) {\n let count = 0\n let i\n let temp\n\n const length = data.get16()\n count += 2\n\n this.numComp = data.get8()\n count += 1\n\n for (i = 0; i < this.numComp; i += 1) {\n this.components[i] = { ...ScanComponent }\n\n if (count > length) {\n throw new Error('ERROR: scan header format error')\n }\n\n this.components[i].scanCompSel = data.get8()\n count += 1\n\n temp = data.get8()\n count += 1\n\n this.components[i].dcTabSel = temp >> 4\n this.components[i].acTabSel = temp & 0x0f\n }\n\n this.selection = data.get8()\n count += 1\n\n this.spectralEnd = data.get8()\n count += 1\n\n temp = data.get8()\n this.ah = temp >> 4\n this.al = temp & 0x0f\n count += 1\n\n if (count !== length) {\n throw new Error('ERROR: scan header format error [count!=Ns]')\n }\n\n return 1\n }\n}\n","import { ComponentSpec } from './component-spec.js'\nimport { DataStream } from './data-stream.js'\nimport { FrameHeader } from './frame-header.js'\nimport { HuffmanTable } from './huffman-table.js'\nimport { QuantizationTable } from './quantization-table.js'\nimport { ScanHeader } from './scan-header.js'\nimport { createArray } from './utils.js'\n\nconst littleEndian = (function () {\n const buffer = new ArrayBuffer(2)\n new DataView(buffer).setInt16(0, 256, true /* littleEndian */)\n // Int16Array uses the platform's endianness.\n return new Int16Array(buffer)[0] === 256\n})()\n\nexport class Decoder {\n static IDCT_P = [\n 0, 5, 40, 16, 45, 2, 7, 42, 21, 56, 8, 61, 18, 47, 1, 4, 41, 23, 58, 13, 32, 24, 37, 10, 63, 17, 44, 3, 6, 43, 20,\n 57, 15, 34, 29, 48, 53, 26, 39, 9, 60, 19, 46, 22, 59, 12, 33, 31, 50, 55, 25, 36, 11, 62, 14, 35, 28, 49, 52, 27,\n 38, 30, 51, 54\n ]\n\n static TABLE = [\n 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44,\n 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49,\n 57, 58, 62, 63\n ]\n\n static MAX_HUFFMAN_SUBTREE = 50\n static MSB = 0x80000000\n static RESTART_MARKER_BEGIN = 0xffd0\n static RESTART_MARKER_END = 0xffd7\n\n buffer: ArrayBuffer | null = null\n stream: DataStream | null = null\n frame = new FrameHeader()\n huffTable = new HuffmanTable()\n quantTable = new QuantizationTable()\n scan = new ScanHeader()\n DU: number[][][] = createArray(10, 4, 64) as number[][][] // at most 10 data units in a MCU, at most 4 data units in one component\n HuffTab: number[][][] = createArray(4, 2, 50 * 256) as number[][][]\n IDCT_Source: number[] = []\n nBlock: number[] = [] // number of blocks in the i-th Comp in a scan\n acTab: number[][] = createArray(10, 1) as number[][] // ac HuffTab for the i-th Comp in a scan\n dcTab: number[][] = createArray(10, 1) as number[][] // dc HuffTab for the i-th Comp in a scan\n qTab: number[][] = createArray(10, 1) as number[][] // quantization table for the i-th Comp in a scan\n marker = 0\n markerIndex = 0\n numComp = 0\n restartInterval = 0\n selection = 0\n xDim = 0\n yDim = 0\n xLoc = 0\n yLoc = 0\n outputData: Uint8Array | Uint16Array | null = null\n restarting = false\n mask = 0\n numBytes = 0\n\n precision: number | undefined = undefined\n components: Array = []\n\n getter: null | ((index: number, compOffset: number) => number) = null\n setter: null | ((index: number, val: number, compOffset?: number) => void) = null\n output: null | ((PRED: number[]) => void) = null\n selector: null | ((compOffset?: number) => number) = null\n\n /**\n * The Decoder constructor.\n * @property {number} numBytes - number of bytes per component\n * @type {Function}\n */\n constructor(buffer?: ArrayBuffer | null, numBytes?: number) {\n this.buffer = buffer ?? null\n this.numBytes = numBytes ?? 0\n }\n\n /**\n * Returns decompressed data.\n */\n decompress(buffer: ArrayBuffer, offset: number, length: number): ArrayBuffer {\n const result = this.decode(buffer, offset, length)\n return result.buffer\n }\n\n decode(buffer?: ArrayBuffer, offset?: number, length?: number, numBytes?: number) {\n let scanNum = 0\n const pred = []\n let i\n let compN\n const temp = []\n const index = []\n let mcuNum\n\n if (buffer) {\n this.buffer = buffer\n }\n\n if (numBytes !== undefined) {\n this.numBytes = numBytes\n }\n\n this.stream = new DataStream(this.buffer as ArrayBuffer, offset, length)\n this.buffer = null\n\n this.xLoc = 0\n this.yLoc = 0\n let current = this.stream.get16()\n\n if (current !== 0xffd8) {\n // SOI\n throw new Error('Not a JPEG file')\n }\n\n current = this.stream.get16()\n\n while (current >> 4 !== 0x0ffc || current === 0xffc4) {\n // SOF 0~15\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab)\n break\n case 0xffcc: // DAC\n throw new Error(\"Program doesn't support arithmetic coding. (format throw new IOException)\")\n case 0xffdb:\n this.quantTable.read(this.stream, Decoder.TABLE)\n break\n case 0xffdd:\n this.restartInterval = this.readNumber() ?? 0\n break\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp()\n break\n case 0xfffe:\n this.readComment()\n break\n default:\n if (current >> 8 !== 0xff) {\n throw new Error('ERROR: format throw new IOException! (decode)')\n }\n }\n\n current = this.stream.get16()\n }\n\n if (current < 0xffc0 || current > 0xffc7) {\n throw new Error('ERROR: could not handle arithmetic code!')\n }\n\n this.frame.read(this.stream)\n current = this.stream.get16()\n\n do {\n while (current !== 0x0ffda) {\n // SOS\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab)\n break\n case 0xffcc: // DAC\n throw new Error(\"Program doesn't support arithmetic coding. (format throw new IOException)\")\n case 0xffdb:\n this.quantTable.read(this.stream, Decoder.TABLE)\n break\n case 0xffdd:\n this.restartInterval = this.readNumber() ?? 0\n break\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp()\n break\n case 0xfffe:\n this.readComment()\n break\n default:\n if (current >> 8 !== 0xff) {\n throw new Error('ERROR: format throw new IOException! (Parser.decode)')\n }\n }\n\n current = this.stream.get16()\n }\n\n this.precision = this.frame.precision\n this.components = this.frame.components\n\n if (!this.numBytes) {\n this.numBytes = Math.round(Math.ceil(this.precision / 8))\n }\n\n if (this.numBytes === 1) {\n this.mask = 0xff\n } else {\n this.mask = 0xffff\n }\n\n this.scan.read(this.stream)\n this.numComp = this.scan.numComp\n this.selection = this.scan.selection\n\n if (this.numBytes === 1) {\n if (this.numComp === 3) {\n this.getter = this.getValueRGB\n this.setter = this.setValueRGB\n this.output = this.outputRGB\n } else {\n this.getter = this.getValue8\n this.setter = this.setValue8\n this.output = this.outputSingle\n }\n } else {\n this.getter = this.getValue8\n this.setter = this.setValue8\n this.output = this.outputSingle\n }\n\n switch (this.selection) {\n case 2:\n this.selector = this.select2\n break\n case 3:\n this.selector = this.select3\n break\n case 4:\n this.selector = this.select4\n break\n case 5:\n this.selector = this.select5\n break\n case 6:\n this.selector = this.select6\n break\n case 7:\n this.selector = this.select7\n break\n default:\n this.selector = this.select1\n break\n }\n\n // this.scanComps = this.scan.components\n // this.quantTables = this.quantTable.quantTables\n\n for (i = 0; i < this.numComp; i += 1) {\n compN = this.scan.components[i].scanCompSel\n this.qTab[i] = this.quantTable.quantTables[this.components[compN].quantTableSel]\n this.nBlock[i] = this.components[compN].vSamp * this.components[compN].hSamp\n this.dcTab[i] = this.HuffTab[this.scan.components[i].dcTabSel][0]\n this.acTab[i] = this.HuffTab[this.scan.components[i].acTabSel][1]\n }\n\n this.xDim = this.frame.dimX\n this.yDim = this.frame.dimY\n if (this.numBytes === 1) {\n this.outputData = new Uint8Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp))\n } else {\n this.outputData = new Uint16Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp))\n }\n\n scanNum += 1\n\n while (true) {\n // Decode one scan\n temp[0] = 0\n index[0] = 0\n\n for (i = 0; i < 10; i += 1) {\n pred[i] = 1 << (this.precision - 1)\n }\n\n if (this.restartInterval === 0) {\n current = this.decodeUnit(pred, temp, index)\n\n while (current === 0 && this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.output(pred)\n current = this.decodeUnit(pred, temp, index)\n }\n\n break // current=MARKER\n }\n\n for (mcuNum = 0; mcuNum < this.restartInterval; mcuNum += 1) {\n this.restarting = mcuNum === 0\n current = this.decodeUnit(pred, temp, index)\n this.output(pred)\n\n if (current !== 0) {\n break\n }\n }\n\n if (current === 0) {\n if (this.markerIndex !== 0) {\n current = 0xff00 | this.marker\n this.markerIndex = 0\n } else {\n current = this.stream.get16()\n }\n }\n\n if (!(current >= Decoder.RESTART_MARKER_BEGIN && current <= Decoder.RESTART_MARKER_END)) {\n break // current=MARKER\n }\n }\n\n if (current === 0xffdc && scanNum === 1) {\n // DNL\n this.readNumber()\n current = this.stream.get16()\n }\n } while (current !== 0xffd9 && this.xLoc < this.xDim && this.yLoc < this.yDim && scanNum === 0)\n\n return this.outputData\n }\n\n decodeUnit(prev: number[], temp: number[], index: number[]): number {\n if (this.numComp === 1) {\n return this.decodeSingle(prev, temp, index)\n } else if (this.numComp === 3) {\n return this.decodeRGB(prev, temp, index)\n } else {\n return -1\n }\n }\n\n select1(compOffset?: number) {\n return this.getPreviousX(compOffset)\n }\n\n select2(compOffset?: number) {\n return this.getPreviousY(compOffset)\n }\n\n select3(compOffset?: number) {\n return this.getPreviousXY(compOffset)\n }\n\n select4(compOffset?: number) {\n return this.getPreviousX(compOffset) + this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)\n }\n\n select5(compOffset?: number) {\n return this.getPreviousX(compOffset) + ((this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)) >> 1)\n }\n\n select6(compOffset?: number) {\n return this.getPreviousY(compOffset) + ((this.getPreviousX(compOffset) - this.getPreviousXY(compOffset)) >> 1)\n }\n\n select7(compOffset?: number) {\n return (this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) / 2\n }\n\n decodeRGB(prev: number[], temp: number[], index: number[]) {\n if (this.selector === null) throw new Error(\"decode hasn't run yet\")\n\n let actab, dctab, qtab, ctrC, i, k, j\n\n prev[0] = this.selector(0)\n prev[1] = this.selector(1)\n prev[2] = this.selector(2)\n\n for (ctrC = 0; ctrC < this.numComp; ctrC += 1) {\n qtab = this.qTab[ctrC]\n actab = this.acTab[ctrC]\n dctab = this.dcTab[ctrC]\n for (i = 0; i < this.nBlock[ctrC]; i += 1) {\n for (k = 0; k < this.IDCT_Source.length; k += 1) {\n this.IDCT_Source[k] = 0\n }\n\n let value = this.getHuffmanValue(dctab, temp, index)\n\n if (value >= 0xff00) {\n return value\n }\n\n prev[ctrC] = this.IDCT_Source[0] = prev[ctrC] + this.getn(index, value, temp, index)\n this.IDCT_Source[0] *= qtab[0]\n\n for (j = 1; j < 64; j += 1) {\n value = this.getHuffmanValue(actab, temp, index)\n\n if (value >= 0xff00) {\n return value\n }\n\n j += value >> 4\n\n if ((value & 0x0f) === 0) {\n if (value >> 4 === 0) {\n break\n }\n } else {\n this.IDCT_Source[Decoder.IDCT_P[j]] = this.getn(index, value & 0x0f, temp, index) * qtab[j]\n }\n }\n }\n }\n\n return 0\n }\n\n decodeSingle(prev: number[], temp: number[], index: number[]) {\n if (this.selector === null) throw new Error(\"decode hasn't run yet\")\n\n let value, i, n, nRestart\n\n if (this.restarting) {\n this.restarting = false\n prev[0] = 1 << (this.frame.precision - 1)\n } else {\n prev[0] = this.selector()\n }\n\n for (i = 0; i < this.nBlock[0]; i += 1) {\n value = this.getHuffmanValue(this.dcTab[0], temp, index)\n if (value >= 0xff00) {\n return value\n }\n\n n = this.getn(prev, value, temp, index)\n nRestart = n >> 8\n\n if (nRestart >= Decoder.RESTART_MARKER_BEGIN && nRestart <= Decoder.RESTART_MARKER_END) {\n return nRestart\n }\n\n prev[0] += n\n }\n\n return 0\n }\n\n //\tHuffman table for fast search: (HuffTab) 8-bit Look up table 2-layer search architecture, 1st-layer represent 256 node (8 bits) if codeword-length > 8\n //\tbits, then the entry of 1st-layer = (# of 2nd-layer table) | MSB and it is stored in the 2nd-layer Size of tables in each layer are 256.\n //\tHuffTab[*][*][0-256] is always the only 1st-layer table.\n //\n //\tAn entry can be: (1) (# of 2nd-layer table) | MSB , for code length > 8 in 1st-layer (2) (Code length) << 8 | HuffVal\n //\n //\tHuffmanValue(table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n //\t ):\n //\t return: Huffman Value of table\n //\t 0xFF?? if it receives a MARKER\n //\t Parameter: table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n //\t temp temp storage for remainded bits\n //\t index index to bit of temp\n //\t in FILE pointer\n //\t Effect:\n //\t temp store new remainded bits\n //\t index change to new index\n //\t in change to new position\n //\t NOTE:\n //\t Initial by temp=0; index=0;\n //\t NOTE: (explain temp and index)\n //\t temp: is always in the form at calling time or returning time\n //\t | byte 4 | byte 3 | byte 2 | byte 1 |\n //\t | 0 | 0 | 00000000 | 00000??? | if not a MARKER\n //\t ^index=3 (from 0 to 15)\n //\t 321\n //\t NOTE (marker and marker_index):\n //\t If get a MARKER from 'in', marker=the low-byte of the MARKER\n //\t and marker_index=9\n //\t If marker_index=9 then index is always > 8, or HuffmanValue()\n //\t will not be called\n getHuffmanValue(table: number[], temp: number[], index: number[]): number {\n let code, input\n const mask = 0xffff\n\n if (!this.stream) throw new Error('stream not initialized')\n\n if (index[0] < 8) {\n temp[0] <<= 8\n input = this.stream.get8()\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n temp[0] |= input\n } else {\n index[0] -= 8\n }\n\n code = table[temp[0] >> index[0]]\n\n if ((code & Decoder.MSB) !== 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0\n return 0xff00 | this.marker\n }\n\n temp[0] &= mask >> (16 - index[0])\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n code = table[(code & 0xff) * 256 + (temp[0] >> index[0])]\n index[0] += 8\n }\n\n index[0] += 8 - (code >> 8)\n\n if (index[0] < 0) {\n throw new Error('index=' + index[0] + ' temp=' + temp[0] + ' code=' + code + ' in HuffmanValue()')\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0\n return 0xff00 | this.marker\n }\n\n temp[0] &= mask >> (16 - index[0])\n return code & 0xff\n }\n\n getn(PRED: number[], n: number, temp: number[], index: number[]) {\n let result, input\n const one = 1\n const n_one = -1\n const mask = 0xffff\n\n if (this.stream === null) throw new Error('stream not initialized')\n\n if (n === 0) {\n return 0\n }\n\n if (n === 16) {\n if (PRED[0] >= 0) {\n return -32768\n } else {\n return 32768\n }\n }\n\n index[0] -= n\n\n if (index[0] >= 0) {\n if (index[0] < this.markerIndex && !this.isLastPixel()) {\n // this was corrupting the last pixel in some cases\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n result = temp[0] >> index[0]\n temp[0] &= mask >> (16 - index[0])\n } else {\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n index[0] += 8\n\n if (index[0] < 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n index[0] += 8\n }\n\n if (index[0] < 0) {\n throw new Error('index=' + index[0] + ' in getn()')\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n result = temp[0] >> index[0]\n temp[0] &= mask >> (16 - index[0])\n }\n\n if (result < one << (n - 1)) {\n result += (n_one << n) + 1\n }\n\n return result\n }\n\n getPreviousX(compOffset = 0): number {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc > 0) {\n return this.getter(this.yLoc * this.xDim + this.xLoc - 1, compOffset)\n } else if (this.yLoc > 0) {\n return this.getPreviousY(compOffset)\n } else {\n return 1 << (this.frame.precision - 1)\n }\n }\n\n getPreviousXY(compOffset = 0) {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc > 0 && this.yLoc > 0) {\n return this.getter((this.yLoc - 1) * this.xDim + this.xLoc - 1, compOffset)\n } else {\n return this.getPreviousY(compOffset)\n }\n }\n\n getPreviousY(compOffset = 0) {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.yLoc > 0) {\n return this.getter((this.yLoc - 1) * this.xDim + this.xLoc, compOffset)\n } else {\n return this.getPreviousX(compOffset)\n }\n }\n\n isLastPixel() {\n return this.xLoc === this.xDim - 1 && this.yLoc === this.yDim - 1\n }\n\n outputSingle(PRED: number[]) {\n if (this.setter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(this.yLoc * this.xDim + this.xLoc, this.mask & PRED[0])\n\n this.xLoc += 1\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1\n this.xLoc = 0\n }\n }\n }\n\n outputRGB(PRED: number[]) {\n if (this.setter === null) throw new Error(\"decode hasn't run yet\")\n\n const offset = this.yLoc * this.xDim + this.xLoc\n\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(offset, PRED[0], 0)\n this.setter(offset, PRED[1], 1)\n this.setter(offset, PRED[2], 2)\n\n this.xLoc += 1\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1\n this.xLoc = 0\n }\n }\n }\n\n setValue8(index: number, val: number) {\n if (!this.outputData) throw new Error('output data not ready')\n\n if (littleEndian) {\n this.outputData[index] = val\n } else {\n this.outputData[index] = ((val & 0xff) << 8) | ((val >> 8) & 0xff)\n }\n }\n\n getValue8(index: number) {\n if (this.outputData === null) throw new Error('output data not ready')\n if (littleEndian) {\n return this.outputData[index] // mask should not be necessary because outputData is either Int8Array or Int16Array\n } else {\n const val = this.outputData[index]\n return ((val & 0xff) << 8) | ((val >> 8) & 0xff)\n }\n }\n\n setValueRGB(index: number, val: number, compOffset = 0) {\n if (this.outputData === null) return\n this.outputData[index * 3 + compOffset] = val\n }\n\n getValueRGB(index: number, compOffset: number) {\n if (this.outputData === null) throw new Error('output data not ready')\n return this.outputData[index * 3 + compOffset]\n }\n\n readApp() {\n if (this.stream === null) return null\n\n let count = 0\n const length = this.stream.get16()\n count += 2\n\n while (count < length) {\n this.stream.get8()\n count += 1\n }\n\n return length\n }\n\n readComment() {\n if (this.stream === null) return null\n\n let sb = ''\n let count = 0\n\n const length = this.stream.get16()\n count += 2\n\n while (count < length) {\n sb += this.stream.get8()\n count += 1\n }\n\n return sb\n }\n\n readNumber() {\n if (this.stream === null) return null\n\n const Ld = this.stream.get16()\n\n if (Ld !== 4) {\n throw new Error('ERROR: Define number format throw new IOException [Ld!=4]')\n }\n\n return this.stream.get16()\n }\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,eAAAC,EAAA,YAAAC,EAAA,gBAAAC,EAAA,iBAAAC,EAAA,sBAAAC,EAAA,kBAAAC,EAAA,eAAAC,EAAA,UAAAC,IAAA,eAAAC,EAAAX,GCAO,IAAMY,EAAgB,CAC3B,MAAO,EACP,cAAe,EACf,MAAO,CACT,ECJO,IAAMC,EAAN,KAAiB,CACtB,OACA,MAEA,YAAYC,EAAmBC,EAAiBC,EAAiB,CAC/D,KAAK,OAAS,IAAI,WAAWF,EAAMC,EAAQC,CAAM,EACjD,KAAK,MAAQ,CACf,CAEA,OAAQ,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AWL,EAAQ,EAAIK,CAAU,EAAIe,EAC5C,CAEA,YAAYpB,EAAeK,EAAoB,CAC7C,GAAI,KAAK,aAAe,KAAM,MAAM,IAAI,MAAM,uBAAuB,EACrE,OAAO,KAAK,WAAWL,EAAQ,EAAIK,CAAU,CAC/C,CAEA,SAAU,CACR,GAAI,KAAK,SAAW,KAAM,OAAO,KAEjC,IAAIgB,EAAQ,EACN3B,EAAS,KAAK,OAAO,MAAM,EAGjC,IAFA2B,GAAS,EAEFA,EAAQ3B,GACb,KAAK,OAAO,KAAK,EACjB2B,GAAS,EAGX,OAAO3B,CACT,CAEA,aAAc,CACZ,GAAI,KAAK,SAAW,KAAM,OAAO,KAEjC,IAAI4B,EAAK,GACLD,EAAQ,EAEN3B,EAAS,KAAK,OAAO,MAAM,EAGjC,IAFA2B,GAAS,EAEFA,EAAQ3B,GACb4B,GAAM,KAAK,OAAO,KAAK,EACvBD,GAAS,EAGX,OAAOC,CACT,CAEA,YAAa,CACX,GAAI,KAAK,SAAW,KAAM,OAAO,KAIjC,GAFW,KAAK,OAAO,MAAM,IAElB,EACT,MAAM,IAAI,MAAM,2DAA2D,EAG7E,OAAO,KAAK,OAAO,MAAM,CAC3B,CACF","names":["main_exports","__export","ComponentSpec","DataStream","Decoder","FrameHeader","HuffmanTable","QuantizationTable","ScanComponent","ScanHeader","utils_exports","__toCommonJS","ComponentSpec","DataStream","data","offset","length","value","FrameHeader","data","count","temp","length","c","ComponentSpec","utils_exports","__export","crc32","crcTable","createArray","makeCRCTable","dimensions","dim","rest","newArray","i","c","n","k","buffer","uint8view","crc","HuffmanTable","_HuffmanTable","createArray","data","HuffTab","count","temp","t","c","i","j","length","tab","L","V","currentTable","k","n","QuantizationTable","_QuantizationTable","createArray","qtab","table","i","data","count","temp","t","length","ScanComponent","ScanHeader","data","count","i","temp","length","ScanComponent","littleEndian","buffer","Decoder","_Decoder","FrameHeader","HuffmanTable","QuantizationTable","ScanHeader","createArray","numBytes","offset","length","scanNum","pred","i","compN","temp","index","mcuNum","DataStream","current","prev","compOffset","actab","dctab","qtab","ctrC","k","j","value","nRestart","table","code","input","PRED","n","result","val","count","sb"]} \ No newline at end of file diff --git a/release/lossless.d.cts b/release/lossless.d.cts new file mode 100644 index 0000000..0a9aed9 --- /dev/null +++ b/release/lossless.d.cts @@ -0,0 +1,150 @@ +declare const ComponentSpec: { + hSamp: number; + quantTableSel: number; + vSamp: number; +}; + +declare class DataStream { + buffer: Uint8Array; + index: number; + constructor(data: ArrayBuffer, offset?: number, length?: number); + get16(): number; + get8(): number; +} + +declare class FrameHeader { + dimX: number; + dimY: number; + numComp: number; + precision: number; + components: Array; + read(data: DataStream): number; +} + +declare class HuffmanTable { + static MSB: number; + l: number[][][]; + th: number[]; + v: number[][][][]; + tc: number[][]; + constructor(); + read(data: DataStream, HuffTab: number[][][]): number; + buildHuffTable(tab: number[], L: number[], V: number[][]): void; +} + +declare class QuantizationTable { + precision: number[]; + tq: number[]; + quantTables: number[][]; + static enhanceQuantizationTable: (qtab: number[], table: number[]) => void; + read(data: DataStream, table: number[]): number; +} + +declare const ScanComponent: { + acTabSel: number; + dcTabSel: number; + scanCompSel: number; +}; + +declare class ScanHeader { + ah: number; + al: number; + numComp: number; + selection: number; + spectralEnd: number; + components: Array; + read(data: DataStream): number; +} + +declare class Decoder { + static IDCT_P: number[]; + static TABLE: number[]; + static MAX_HUFFMAN_SUBTREE: number; + static MSB: number; + static RESTART_MARKER_BEGIN: number; + static RESTART_MARKER_END: number; + buffer: ArrayBuffer | null; + stream: DataStream | null; + frame: FrameHeader; + huffTable: HuffmanTable; + quantTable: QuantizationTable; + scan: ScanHeader; + DU: number[][][]; + HuffTab: number[][][]; + IDCT_Source: number[]; + nBlock: number[]; + acTab: number[][]; + dcTab: number[][]; + qTab: number[][]; + marker: number; + markerIndex: number; + numComp: number; + restartInterval: number; + selection: number; + xDim: number; + yDim: number; + xLoc: number; + yLoc: number; + outputData: Uint8Array | Uint16Array | null; + restarting: boolean; + mask: number; + numBytes: number; + precision: number | undefined; + components: Array; + getter: null | ((index: number, compOffset: number) => number); + setter: null | ((index: number, val: number, compOffset?: number) => void); + output: null | ((PRED: number[]) => void); + selector: null | ((compOffset?: number) => number); + /** + * The Decoder constructor. + * @property {number} numBytes - number of bytes per component + * @type {Function} + */ + constructor(buffer?: ArrayBuffer | null, numBytes?: number); + /** + * Returns decompressed data. + */ + decompress(buffer: ArrayBuffer, offset: number, length: number): ArrayBuffer; + decode(buffer?: ArrayBuffer, offset?: number, length?: number, numBytes?: number): Uint8Array | Uint16Array; + decodeUnit(prev: number[], temp: number[], index: number[]): number; + select1(compOffset?: number): number; + select2(compOffset?: number): number; + select3(compOffset?: number): number; + select4(compOffset?: number): number; + select5(compOffset?: number): number; + select6(compOffset?: number): number; + select7(compOffset?: number): number; + decodeRGB(prev: number[], temp: number[], index: number[]): number; + decodeSingle(prev: number[], temp: number[], index: number[]): number; + getHuffmanValue(table: number[], temp: number[], index: number[]): number; + getn(PRED: number[], n: number, temp: number[], index: number[]): number; + getPreviousX(compOffset?: number): number; + getPreviousXY(compOffset?: number): number; + getPreviousY(compOffset?: number): number; + isLastPixel(): boolean; + outputSingle(PRED: number[]): void; + outputRGB(PRED: number[]): void; + setValue8(index: number, val: number): void; + getValue8(index: number): number; + setValueRGB(index: number, val: number, compOffset?: number): void; + getValueRGB(index: number, compOffset: number): number; + readApp(): number | null; + readComment(): string | null; + readNumber(): number | null; +} + +type NestedArray = Array>; +declare const createArray: (...dimensions: number[]) => NestedArray; +declare const makeCRCTable: () => number[]; +declare const crcTable: number[]; +declare const crc32: (buffer: ArrayBuffer) => number; + +declare const utils_crc32: typeof crc32; +declare const utils_crcTable: typeof crcTable; +declare const utils_createArray: typeof createArray; +declare const utils_makeCRCTable: typeof makeCRCTable; +declare namespace utils { + export { utils_crc32 as crc32, utils_crcTable as crcTable, utils_createArray as createArray, utils_makeCRCTable as makeCRCTable }; +} + +export { ComponentSpec, DataStream, Decoder, FrameHeader, HuffmanTable, QuantizationTable, ScanComponent, ScanHeader, utils as Utils }; diff --git a/release/lossless.js b/release/lossless.js new file mode 100644 index 0000000..94a42ab --- /dev/null +++ b/release/lossless.js @@ -0,0 +1,1191 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/main.ts +var main_exports = {}; +__export(main_exports, { + ComponentSpec: () => ComponentSpec, + DataStream: () => DataStream, + Decoder: () => Decoder, + FrameHeader: () => FrameHeader, + HuffmanTable: () => HuffmanTable, + QuantizationTable: () => QuantizationTable, + ScanComponent: () => ScanComponent, + ScanHeader: () => ScanHeader, + Utils: () => utils_exports +}); +module.exports = __toCommonJS(main_exports); + +// src/component-spec.ts +var ComponentSpec = { + hSamp: 0, + quantTableSel: 0, + vSamp: 0 +}; + +// src/data-stream.ts +var DataStream = class { + buffer; + index; + constructor(data, offset, length) { + this.buffer = new Uint8Array(data, offset, length); + this.index = 0; + } + get16() { + const value = (this.buffer[this.index] << 8) + this.buffer[this.index + 1]; + this.index += 2; + return value; + } + get8() { + const value = this.buffer[this.index]; + this.index += 1; + return value; + } +}; + +// src/frame-header.ts +var FrameHeader = class { + dimX = 0; + dimY = 0; + numComp = 0; + precision = 0; + components = []; + read(data) { + let count = 0; + let temp; + const length = data.get16(); + count += 2; + this.precision = data.get8(); + count += 1; + this.dimY = data.get16(); + count += 2; + this.dimX = data.get16(); + count += 2; + this.numComp = data.get8(); + count += 1; + for (let i = 1; i <= this.numComp; i += 1) { + if (count > length) { + throw new Error("ERROR: frame format error"); + } + const c = data.get8(); + count += 1; + if (count >= length) { + throw new Error("ERROR: frame format error [c>=Lf]"); + } + temp = data.get8(); + count += 1; + if (!this.components[c]) { + this.components[c] = { ...ComponentSpec }; + } + this.components[c].hSamp = temp >> 4; + this.components[c].vSamp = temp & 15; + this.components[c].quantTableSel = data.get8(); + count += 1; + } + if (count !== length) { + throw new Error("ERROR: frame format error [Lf!=count]"); + } + return 1; + } +}; + +// src/utils.ts +var utils_exports = {}; +__export(utils_exports, { + crc32: () => crc32, + crcTable: () => crcTable, + createArray: () => createArray, + makeCRCTable: () => makeCRCTable +}); +var createArray = (...dimensions) => { + if (dimensions.length > 1) { + const dim = dimensions[0]; + const rest = dimensions.slice(1); + const newArray = []; + for (let i = 0; i < dim; i++) { + newArray[i] = createArray(...rest); + } + return newArray; + } else { + return Array(dimensions[0]).fill(void 0); + } +}; +var makeCRCTable = function() { + let c; + const crcTable2 = []; + for (let n = 0; n < 256; n++) { + c = n; + for (let k = 0; k < 8; k++) { + c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; + } + crcTable2[n] = c; + } + return crcTable2; +}; +var crcTable = makeCRCTable(); +var crc32 = function(buffer) { + const uint8view = new Uint8Array(buffer); + let crc = 0 ^ -1; + for (let i = 0; i < uint8view.length; i++) { + crc = crc >>> 8 ^ crcTable[(crc ^ uint8view[i]) & 255]; + } + return (crc ^ -1) >>> 0; +}; + +// src/huffman-table.ts +var HuffmanTable = class _HuffmanTable { + static MSB = 2147483648; + l; + th; + v; + tc; + constructor() { + this.l = createArray(4, 2, 16); + this.th = [0, 0, 0, 0]; + this.v = createArray(4, 2, 16, 200); + this.tc = [ + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ]; + } + read(data, HuffTab) { + let count = 0; + let temp; + let t; + let c; + let i; + let j; + const length = data.get16(); + count += 2; + while (count < length) { + temp = data.get8(); + count += 1; + t = temp & 15; + if (t > 3) { + throw new Error("ERROR: Huffman table ID > 3"); + } + c = temp >> 4; + if (c > 2) { + throw new Error("ERROR: Huffman table [Table class > 2 ]"); + } + this.th[t] = 1; + this.tc[t][c] = 1; + for (i = 0; i < 16; i += 1) { + this.l[t][c][i] = data.get8(); + count += 1; + } + for (i = 0; i < 16; i += 1) { + for (j = 0; j < this.l[t][c][i]; j += 1) { + if (count > length) { + throw new Error("ERROR: Huffman table format error [count>Lh]"); + } + this.v[t][c][i][j] = data.get8(); + count += 1; + } + } + } + if (count !== length) { + throw new Error("ERROR: Huffman table format error [count!=Lf]"); + } + for (i = 0; i < 4; i += 1) { + for (j = 0; j < 2; j += 1) { + if (this.tc[i][j] !== 0) { + this.buildHuffTable(HuffTab[i][j], this.l[i][j], this.v[i][j]); + } + } + } + return 1; + } + // Build_HuffTab() + // Parameter: t table ID + // c table class ( 0 for DC, 1 for AC ) + // L[i] # of codewords which length is i + // V[i][j] Huffman Value (length=i) + // Effect: + // build up HuffTab[t][c] using L and V. + buildHuffTable(tab, L, V) { + let currentTable, k, i, j, n; + const temp = 256; + k = 0; + for (i = 0; i < 8; i += 1) { + for (j = 0; j < L[i]; j += 1) { + for (n = 0; n < temp >> i + 1; n += 1) { + tab[k] = V[i][j] | i + 1 << 8; + k += 1; + } + } + } + for (i = 1; k < 256; i += 1, k += 1) { + tab[k] = i | _HuffmanTable.MSB; + } + currentTable = 1; + k = 0; + for (i = 8; i < 16; i += 1) { + for (j = 0; j < L[i]; j += 1) { + for (n = 0; n < temp >> i - 7; n += 1) { + tab[currentTable * 256 + k] = V[i][j] | i + 1 << 8; + k += 1; + } + if (k >= 256) { + if (k > 256) { + throw new Error("ERROR: Huffman table error(1)!"); + } + k = 0; + currentTable += 1; + } + } + } + } +}; + +// src/quantization-table.ts +var QuantizationTable = class _QuantizationTable { + precision = []; + // Quantization precision 8 or 16 + tq = [0, 0, 0, 0]; + // 1: this table is presented + quantTables = createArray(4, 64); + // Tables + static enhanceQuantizationTable = function(qtab, table) { + for (let i = 0; i < 8; i += 1) { + qtab[table[0 * 8 + i]] *= 90; + qtab[table[4 * 8 + i]] *= 90; + qtab[table[2 * 8 + i]] *= 118; + qtab[table[6 * 8 + i]] *= 49; + qtab[table[5 * 8 + i]] *= 71; + qtab[table[1 * 8 + i]] *= 126; + qtab[table[7 * 8 + i]] *= 25; + qtab[table[3 * 8 + i]] *= 106; + } + for (let i = 0; i < 8; i += 1) { + qtab[table[0 + 8 * i]] *= 90; + qtab[table[4 + 8 * i]] *= 90; + qtab[table[2 + 8 * i]] *= 118; + qtab[table[6 + 8 * i]] *= 49; + qtab[table[5 + 8 * i]] *= 71; + qtab[table[1 + 8 * i]] *= 126; + qtab[table[7 + 8 * i]] *= 25; + qtab[table[3 + 8 * i]] *= 106; + } + for (let i = 0; i < 64; i += 1) { + qtab[i] >>= 6; + } + }; + read(data, table) { + let count = 0; + let temp; + let t; + let i; + const length = data.get16(); + count += 2; + while (count < length) { + temp = data.get8(); + count += 1; + t = temp & 15; + if (t > 3) { + throw new Error("ERROR: Quantization table ID > 3"); + } + this.precision[t] = temp >> 4; + if (this.precision[t] === 0) { + this.precision[t] = 8; + } else if (this.precision[t] === 1) { + this.precision[t] = 16; + } else { + throw new Error("ERROR: Quantization table precision error"); + } + this.tq[t] = 1; + if (this.precision[t] === 8) { + for (i = 0; i < 64; i += 1) { + if (count > length) { + throw new Error("ERROR: Quantization table format error"); + } + this.quantTables[t][i] = data.get8(); + count += 1; + } + _QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table); + } else { + for (i = 0; i < 64; i += 1) { + if (count > length) { + throw new Error("ERROR: Quantization table format error"); + } + this.quantTables[t][i] = data.get16(); + count += 2; + } + _QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table); + } + } + if (count !== length) { + throw new Error("ERROR: Quantization table error [count!=Lq]"); + } + return 1; + } +}; + +// src/scan-component.ts +var ScanComponent = { + acTabSel: 0, + // AC table selector + dcTabSel: 0, + // DC table selector + scanCompSel: 0 + // Scan component selector +}; + +// src/scan-header.ts +var ScanHeader = class { + ah = 0; + al = 0; + numComp = 0; + // Number of components in the scan + selection = 0; + // Start of spectral or predictor selection + spectralEnd = 0; + // End of spectral selection + components = []; + read(data) { + let count = 0; + let i; + let temp; + const length = data.get16(); + count += 2; + this.numComp = data.get8(); + count += 1; + for (i = 0; i < this.numComp; i += 1) { + this.components[i] = { ...ScanComponent }; + if (count > length) { + throw new Error("ERROR: scan header format error"); + } + this.components[i].scanCompSel = data.get8(); + count += 1; + temp = data.get8(); + count += 1; + this.components[i].dcTabSel = temp >> 4; + this.components[i].acTabSel = temp & 15; + } + this.selection = data.get8(); + count += 1; + this.spectralEnd = data.get8(); + count += 1; + temp = data.get8(); + this.ah = temp >> 4; + this.al = temp & 15; + count += 1; + if (count !== length) { + throw new Error("ERROR: scan header format error [count!=Ns]"); + } + return 1; + } +}; + +// src/decoder.ts +var littleEndian = function() { + const buffer = new ArrayBuffer(2); + new DataView(buffer).setInt16( + 0, + 256, + true + /* littleEndian */ + ); + return new Int16Array(buffer)[0] === 256; +}(); +var Decoder = class _Decoder { + static IDCT_P = [ + 0, + 5, + 40, + 16, + 45, + 2, + 7, + 42, + 21, + 56, + 8, + 61, + 18, + 47, + 1, + 4, + 41, + 23, + 58, + 13, + 32, + 24, + 37, + 10, + 63, + 17, + 44, + 3, + 6, + 43, + 20, + 57, + 15, + 34, + 29, + 48, + 53, + 26, + 39, + 9, + 60, + 19, + 46, + 22, + 59, + 12, + 33, + 31, + 50, + 55, + 25, + 36, + 11, + 62, + 14, + 35, + 28, + 49, + 52, + 27, + 38, + 30, + 51, + 54 + ]; + static TABLE = [ + 0, + 1, + 5, + 6, + 14, + 15, + 27, + 28, + 2, + 4, + 7, + 13, + 16, + 26, + 29, + 42, + 3, + 8, + 12, + 17, + 25, + 30, + 41, + 43, + 9, + 11, + 18, + 24, + 31, + 40, + 44, + 53, + 10, + 19, + 23, + 32, + 39, + 45, + 52, + 54, + 20, + 22, + 33, + 38, + 46, + 51, + 55, + 60, + 21, + 34, + 37, + 47, + 50, + 56, + 59, + 61, + 35, + 36, + 48, + 49, + 57, + 58, + 62, + 63 + ]; + static MAX_HUFFMAN_SUBTREE = 50; + static MSB = 2147483648; + static RESTART_MARKER_BEGIN = 65488; + static RESTART_MARKER_END = 65495; + buffer = null; + stream = null; + frame = new FrameHeader(); + huffTable = new HuffmanTable(); + quantTable = new QuantizationTable(); + scan = new ScanHeader(); + DU = createArray(10, 4, 64); + // at most 10 data units in a MCU, at most 4 data units in one component + HuffTab = createArray(4, 2, 50 * 256); + IDCT_Source = []; + nBlock = []; + // number of blocks in the i-th Comp in a scan + acTab = createArray(10, 1); + // ac HuffTab for the i-th Comp in a scan + dcTab = createArray(10, 1); + // dc HuffTab for the i-th Comp in a scan + qTab = createArray(10, 1); + // quantization table for the i-th Comp in a scan + marker = 0; + markerIndex = 0; + numComp = 0; + restartInterval = 0; + selection = 0; + xDim = 0; + yDim = 0; + xLoc = 0; + yLoc = 0; + outputData = null; + restarting = false; + mask = 0; + numBytes = 0; + precision = void 0; + components = []; + getter = null; + setter = null; + output = null; + selector = null; + /** + * The Decoder constructor. + * @property {number} numBytes - number of bytes per component + * @type {Function} + */ + constructor(buffer, numBytes) { + this.buffer = buffer ?? null; + this.numBytes = numBytes ?? 0; + } + /** + * Returns decompressed data. + */ + decompress(buffer, offset, length) { + const result = this.decode(buffer, offset, length); + return result.buffer; + } + decode(buffer, offset, length, numBytes) { + let scanNum = 0; + const pred = []; + let i; + let compN; + const temp = []; + const index = []; + let mcuNum; + if (buffer) { + this.buffer = buffer; + } + if (numBytes !== void 0) { + this.numBytes = numBytes; + } + this.stream = new DataStream(this.buffer, offset, length); + this.buffer = null; + this.xLoc = 0; + this.yLoc = 0; + let current = this.stream.get16(); + if (current !== 65496) { + throw new Error("Not a JPEG file"); + } + current = this.stream.get16(); + while (current >> 4 !== 4092 || current === 65476) { + switch (current) { + case 65476: + this.huffTable.read(this.stream, this.HuffTab); + break; + case 65484: + throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)"); + case 65499: + this.quantTable.read(this.stream, _Decoder.TABLE); + break; + case 65501: + this.restartInterval = this.readNumber() ?? 0; + break; + case 65504: + case 65505: + case 65506: + case 65507: + case 65508: + case 65509: + case 65510: + case 65511: + case 65512: + case 65513: + case 65514: + case 65515: + case 65516: + case 65517: + case 65518: + case 65519: + this.readApp(); + break; + case 65534: + this.readComment(); + break; + default: + if (current >> 8 !== 255) { + throw new Error("ERROR: format throw new IOException! (decode)"); + } + } + current = this.stream.get16(); + } + if (current < 65472 || current > 65479) { + throw new Error("ERROR: could not handle arithmetic code!"); + } + this.frame.read(this.stream); + current = this.stream.get16(); + do { + while (current !== 65498) { + switch (current) { + case 65476: + this.huffTable.read(this.stream, this.HuffTab); + break; + case 65484: + throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)"); + case 65499: + this.quantTable.read(this.stream, _Decoder.TABLE); + break; + case 65501: + this.restartInterval = this.readNumber() ?? 0; + break; + case 65504: + case 65505: + case 65506: + case 65507: + case 65508: + case 65509: + case 65510: + case 65511: + case 65512: + case 65513: + case 65514: + case 65515: + case 65516: + case 65517: + case 65518: + case 65519: + this.readApp(); + break; + case 65534: + this.readComment(); + break; + default: + if (current >> 8 !== 255) { + throw new Error("ERROR: format throw new IOException! (Parser.decode)"); + } + } + current = this.stream.get16(); + } + this.precision = this.frame.precision; + this.components = this.frame.components; + if (!this.numBytes) { + this.numBytes = Math.round(Math.ceil(this.precision / 8)); + } + if (this.numBytes === 1) { + this.mask = 255; + } else { + this.mask = 65535; + } + this.scan.read(this.stream); + this.numComp = this.scan.numComp; + this.selection = this.scan.selection; + if (this.numBytes === 1) { + if (this.numComp === 3) { + this.getter = this.getValueRGB; + this.setter = this.setValueRGB; + this.output = this.outputRGB; + } else { + this.getter = this.getValue8; + this.setter = this.setValue8; + this.output = this.outputSingle; + } + } else { + this.getter = this.getValue8; + this.setter = this.setValue8; + this.output = this.outputSingle; + } + switch (this.selection) { + case 2: + this.selector = this.select2; + break; + case 3: + this.selector = this.select3; + break; + case 4: + this.selector = this.select4; + break; + case 5: + this.selector = this.select5; + break; + case 6: + this.selector = this.select6; + break; + case 7: + this.selector = this.select7; + break; + default: + this.selector = this.select1; + break; + } + for (i = 0; i < this.numComp; i += 1) { + compN = this.scan.components[i].scanCompSel; + this.qTab[i] = this.quantTable.quantTables[this.components[compN].quantTableSel]; + this.nBlock[i] = this.components[compN].vSamp * this.components[compN].hSamp; + this.dcTab[i] = this.HuffTab[this.scan.components[i].dcTabSel][0]; + this.acTab[i] = this.HuffTab[this.scan.components[i].acTabSel][1]; + } + this.xDim = this.frame.dimX; + this.yDim = this.frame.dimY; + if (this.numBytes === 1) { + this.outputData = new Uint8Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp)); + } else { + this.outputData = new Uint16Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp)); + } + scanNum += 1; + while (true) { + temp[0] = 0; + index[0] = 0; + for (i = 0; i < 10; i += 1) { + pred[i] = 1 << this.precision - 1; + } + if (this.restartInterval === 0) { + current = this.decodeUnit(pred, temp, index); + while (current === 0 && this.xLoc < this.xDim && this.yLoc < this.yDim) { + this.output(pred); + current = this.decodeUnit(pred, temp, index); + } + break; + } + for (mcuNum = 0; mcuNum < this.restartInterval; mcuNum += 1) { + this.restarting = mcuNum === 0; + current = this.decodeUnit(pred, temp, index); + this.output(pred); + if (current !== 0) { + break; + } + } + if (current === 0) { + if (this.markerIndex !== 0) { + current = 65280 | this.marker; + this.markerIndex = 0; + } else { + current = this.stream.get16(); + } + } + if (!(current >= _Decoder.RESTART_MARKER_BEGIN && current <= _Decoder.RESTART_MARKER_END)) { + break; + } + } + if (current === 65500 && scanNum === 1) { + this.readNumber(); + current = this.stream.get16(); + } + } while (current !== 65497 && this.xLoc < this.xDim && this.yLoc < this.yDim && scanNum === 0); + return this.outputData; + } + decodeUnit(prev, temp, index) { + if (this.numComp === 1) { + return this.decodeSingle(prev, temp, index); + } else if (this.numComp === 3) { + return this.decodeRGB(prev, temp, index); + } else { + return -1; + } + } + select1(compOffset) { + return this.getPreviousX(compOffset); + } + select2(compOffset) { + return this.getPreviousY(compOffset); + } + select3(compOffset) { + return this.getPreviousXY(compOffset); + } + select4(compOffset) { + return this.getPreviousX(compOffset) + this.getPreviousY(compOffset) - this.getPreviousXY(compOffset); + } + select5(compOffset) { + return this.getPreviousX(compOffset) + (this.getPreviousY(compOffset) - this.getPreviousXY(compOffset) >> 1); + } + select6(compOffset) { + return this.getPreviousY(compOffset) + (this.getPreviousX(compOffset) - this.getPreviousXY(compOffset) >> 1); + } + select7(compOffset) { + return (this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) / 2; + } + decodeRGB(prev, temp, index) { + if (this.selector === null) + throw new Error("decode hasn't run yet"); + let actab, dctab, qtab, ctrC, i, k, j; + prev[0] = this.selector(0); + prev[1] = this.selector(1); + prev[2] = this.selector(2); + for (ctrC = 0; ctrC < this.numComp; ctrC += 1) { + qtab = this.qTab[ctrC]; + actab = this.acTab[ctrC]; + dctab = this.dcTab[ctrC]; + for (i = 0; i < this.nBlock[ctrC]; i += 1) { + for (k = 0; k < this.IDCT_Source.length; k += 1) { + this.IDCT_Source[k] = 0; + } + let value = this.getHuffmanValue(dctab, temp, index); + if (value >= 65280) { + return value; + } + prev[ctrC] = this.IDCT_Source[0] = prev[ctrC] + this.getn(index, value, temp, index); + this.IDCT_Source[0] *= qtab[0]; + for (j = 1; j < 64; j += 1) { + value = this.getHuffmanValue(actab, temp, index); + if (value >= 65280) { + return value; + } + j += value >> 4; + if ((value & 15) === 0) { + if (value >> 4 === 0) { + break; + } + } else { + this.IDCT_Source[_Decoder.IDCT_P[j]] = this.getn(index, value & 15, temp, index) * qtab[j]; + } + } + } + } + return 0; + } + decodeSingle(prev, temp, index) { + if (this.selector === null) + throw new Error("decode hasn't run yet"); + let value, i, n, nRestart; + if (this.restarting) { + this.restarting = false; + prev[0] = 1 << this.frame.precision - 1; + } else { + prev[0] = this.selector(); + } + for (i = 0; i < this.nBlock[0]; i += 1) { + value = this.getHuffmanValue(this.dcTab[0], temp, index); + if (value >= 65280) { + return value; + } + n = this.getn(prev, value, temp, index); + nRestart = n >> 8; + if (nRestart >= _Decoder.RESTART_MARKER_BEGIN && nRestart <= _Decoder.RESTART_MARKER_END) { + return nRestart; + } + prev[0] += n; + } + return 0; + } + // Huffman table for fast search: (HuffTab) 8-bit Look up table 2-layer search architecture, 1st-layer represent 256 node (8 bits) if codeword-length > 8 + // bits, then the entry of 1st-layer = (# of 2nd-layer table) | MSB and it is stored in the 2nd-layer Size of tables in each layer are 256. + // HuffTab[*][*][0-256] is always the only 1st-layer table. + // + // An entry can be: (1) (# of 2nd-layer table) | MSB , for code length > 8 in 1st-layer (2) (Code length) << 8 | HuffVal + // + // HuffmanValue(table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...) + // ): + // return: Huffman Value of table + // 0xFF?? if it receives a MARKER + // Parameter: table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...) + // temp temp storage for remainded bits + // index index to bit of temp + // in FILE pointer + // Effect: + // temp store new remainded bits + // index change to new index + // in change to new position + // NOTE: + // Initial by temp=0; index=0; + // NOTE: (explain temp and index) + // temp: is always in the form at calling time or returning time + // | byte 4 | byte 3 | byte 2 | byte 1 | + // | 0 | 0 | 00000000 | 00000??? | if not a MARKER + // ^index=3 (from 0 to 15) + // 321 + // NOTE (marker and marker_index): + // If get a MARKER from 'in', marker=the low-byte of the MARKER + // and marker_index=9 + // If marker_index=9 then index is always > 8, or HuffmanValue() + // will not be called + getHuffmanValue(table, temp, index) { + let code, input; + const mask = 65535; + if (!this.stream) + throw new Error("stream not initialized"); + if (index[0] < 8) { + temp[0] <<= 8; + input = this.stream.get8(); + if (input === 255) { + this.marker = this.stream.get8(); + if (this.marker !== 0) { + this.markerIndex = 9; + } + } + temp[0] |= input; + } else { + index[0] -= 8; + } + code = table[temp[0] >> index[0]]; + if ((code & _Decoder.MSB) !== 0) { + if (this.markerIndex !== 0) { + this.markerIndex = 0; + return 65280 | this.marker; + } + temp[0] &= mask >> 16 - index[0]; + temp[0] <<= 8; + input = this.stream.get8(); + if (input === 255) { + this.marker = this.stream.get8(); + if (this.marker !== 0) { + this.markerIndex = 9; + } + } + temp[0] |= input; + code = table[(code & 255) * 256 + (temp[0] >> index[0])]; + index[0] += 8; + } + index[0] += 8 - (code >> 8); + if (index[0] < 0) { + throw new Error("index=" + index[0] + " temp=" + temp[0] + " code=" + code + " in HuffmanValue()"); + } + if (index[0] < this.markerIndex) { + this.markerIndex = 0; + return 65280 | this.marker; + } + temp[0] &= mask >> 16 - index[0]; + return code & 255; + } + getn(PRED, n, temp, index) { + let result, input; + const one = 1; + const n_one = -1; + const mask = 65535; + if (this.stream === null) + throw new Error("stream not initialized"); + if (n === 0) { + return 0; + } + if (n === 16) { + if (PRED[0] >= 0) { + return -32768; + } else { + return 32768; + } + } + index[0] -= n; + if (index[0] >= 0) { + if (index[0] < this.markerIndex && !this.isLastPixel()) { + this.markerIndex = 0; + return (65280 | this.marker) << 8; + } + result = temp[0] >> index[0]; + temp[0] &= mask >> 16 - index[0]; + } else { + temp[0] <<= 8; + input = this.stream.get8(); + if (input === 255) { + this.marker = this.stream.get8(); + if (this.marker !== 0) { + this.markerIndex = 9; + } + } + temp[0] |= input; + index[0] += 8; + if (index[0] < 0) { + if (this.markerIndex !== 0) { + this.markerIndex = 0; + return (65280 | this.marker) << 8; + } + temp[0] <<= 8; + input = this.stream.get8(); + if (input === 255) { + this.marker = this.stream.get8(); + if (this.marker !== 0) { + this.markerIndex = 9; + } + } + temp[0] |= input; + index[0] += 8; + } + if (index[0] < 0) { + throw new Error("index=" + index[0] + " in getn()"); + } + if (index[0] < this.markerIndex) { + this.markerIndex = 0; + return (65280 | this.marker) << 8; + } + result = temp[0] >> index[0]; + temp[0] &= mask >> 16 - index[0]; + } + if (result < one << n - 1) { + result += (n_one << n) + 1; + } + return result; + } + getPreviousX(compOffset = 0) { + if (this.getter === null) + throw new Error("decode hasn't run yet"); + if (this.xLoc > 0) { + return this.getter(this.yLoc * this.xDim + this.xLoc - 1, compOffset); + } else if (this.yLoc > 0) { + return this.getPreviousY(compOffset); + } else { + return 1 << this.frame.precision - 1; + } + } + getPreviousXY(compOffset = 0) { + if (this.getter === null) + throw new Error("decode hasn't run yet"); + if (this.xLoc > 0 && this.yLoc > 0) { + return this.getter((this.yLoc - 1) * this.xDim + this.xLoc - 1, compOffset); + } else { + return this.getPreviousY(compOffset); + } + } + getPreviousY(compOffset = 0) { + if (this.getter === null) + throw new Error("decode hasn't run yet"); + if (this.yLoc > 0) { + return this.getter((this.yLoc - 1) * this.xDim + this.xLoc, compOffset); + } else { + return this.getPreviousX(compOffset); + } + } + isLastPixel() { + return this.xLoc === this.xDim - 1 && this.yLoc === this.yDim - 1; + } + outputSingle(PRED) { + if (this.setter === null) + throw new Error("decode hasn't run yet"); + if (this.xLoc < this.xDim && this.yLoc < this.yDim) { + this.setter(this.yLoc * this.xDim + this.xLoc, this.mask & PRED[0]); + this.xLoc += 1; + if (this.xLoc >= this.xDim) { + this.yLoc += 1; + this.xLoc = 0; + } + } + } + outputRGB(PRED) { + if (this.setter === null) + throw new Error("decode hasn't run yet"); + const offset = this.yLoc * this.xDim + this.xLoc; + if (this.xLoc < this.xDim && this.yLoc < this.yDim) { + this.setter(offset, PRED[0], 0); + this.setter(offset, PRED[1], 1); + this.setter(offset, PRED[2], 2); + this.xLoc += 1; + if (this.xLoc >= this.xDim) { + this.yLoc += 1; + this.xLoc = 0; + } + } + } + setValue8(index, val) { + if (!this.outputData) + throw new Error("output data not ready"); + if (littleEndian) { + this.outputData[index] = val; + } else { + this.outputData[index] = (val & 255) << 8 | val >> 8 & 255; + } + } + getValue8(index) { + if (this.outputData === null) + throw new Error("output data not ready"); + if (littleEndian) { + return this.outputData[index]; + } else { + const val = this.outputData[index]; + return (val & 255) << 8 | val >> 8 & 255; + } + } + setValueRGB(index, val, compOffset = 0) { + if (this.outputData === null) + return; + this.outputData[index * 3 + compOffset] = val; + } + getValueRGB(index, compOffset) { + if (this.outputData === null) + throw new Error("output data not ready"); + return this.outputData[index * 3 + compOffset]; + } + readApp() { + if (this.stream === null) + return null; + let count = 0; + const length = this.stream.get16(); + count += 2; + while (count < length) { + this.stream.get8(); + count += 1; + } + return length; + } + readComment() { + if (this.stream === null) + return null; + let sb = ""; + let count = 0; + const length = this.stream.get16(); + count += 2; + while (count < length) { + sb += this.stream.get8(); + count += 1; + } + return sb; + } + readNumber() { + if (this.stream === null) + return null; + const Ld = this.stream.get16(); + if (Ld !== 4) { + throw new Error("ERROR: Define number format throw new IOException [Ld!=4]"); + } + return this.stream.get16(); + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + ComponentSpec, + DataStream, + Decoder, + FrameHeader, + HuffmanTable, + QuantizationTable, + ScanComponent, + ScanHeader, + Utils +}); +//# sourceMappingURL=lossless.js.map \ No newline at end of file diff --git a/release/lossless.js.map b/release/lossless.js.map new file mode 100644 index 0000000..783a175 --- /dev/null +++ b/release/lossless.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/main.ts","../src/component-spec.ts","../src/data-stream.ts","../src/frame-header.ts","../src/utils.ts","../src/huffman-table.ts","../src/quantization-table.ts","../src/scan-component.ts","../src/scan-header.ts","../src/decoder.ts"],"sourcesContent":["export { ComponentSpec } from './component-spec.js'\nexport { DataStream } from './data-stream.js'\nexport { Decoder } from './decoder.js'\nexport { FrameHeader } from './frame-header.js'\nexport { HuffmanTable } from './huffman-table.js'\nexport { QuantizationTable } from './quantization-table.js'\nexport { ScanComponent } from './scan-component.js'\nexport { ScanHeader } from './scan-header.js'\nexport * as Utils from './utils.js'\n","export const ComponentSpec = {\n hSamp: 0,\n quantTableSel: 0,\n vSamp: 0\n}\n","export class DataStream {\n buffer: Uint8Array\n index: number\n\n constructor(data: ArrayBuffer, offset?: number, length?: number) {\n this.buffer = new Uint8Array(data, offset, length)\n this.index = 0\n }\n\n get16() {\n // var value = this.buffer.getUint16(this.index, false);\n const value = (this.buffer[this.index] << 8) + this.buffer[this.index + 1] // DataView is big-endian by default\n this.index += 2\n return value\n }\n\n get8() {\n // var value = this.buffer.getUint8(this.index);\n const value = this.buffer[this.index]\n this.index += 1\n return value\n }\n}\n","import { ComponentSpec } from './component-spec.js'\nimport { DataStream } from './data-stream.js'\n\nexport class FrameHeader {\n dimX = 0\n dimY = 0\n numComp = 0\n precision = 0\n components: Array = []\n\n read(data: DataStream) {\n let count = 0\n let temp\n\n const length = data.get16()\n count += 2\n\n this.precision = data.get8()\n count += 1\n\n this.dimY = data.get16()\n count += 2\n\n this.dimX = data.get16()\n count += 2\n\n this.numComp = data.get8()\n count += 1\n for (let i = 1; i <= this.numComp; i += 1) {\n if (count > length) {\n throw new Error('ERROR: frame format error')\n }\n\n const c = data.get8()\n count += 1\n\n if (count >= length) {\n throw new Error('ERROR: frame format error [c>=Lf]')\n }\n\n temp = data.get8()\n count += 1\n\n if (!this.components[c]) {\n this.components[c] = { ...ComponentSpec }\n }\n\n this.components[c].hSamp = temp >> 4\n this.components[c].vSamp = temp & 0x0f\n this.components[c].quantTableSel = data.get8()\n count += 1\n }\n\n if (count !== length) {\n throw new Error('ERROR: frame format error [Lf!=count]')\n }\n\n return 1\n }\n}\n","type NestedArray = Array>\n\n// https://stackoverflow.com/a/12588826\nexport const createArray = (...dimensions: number[]): NestedArray => {\n if (dimensions.length > 1) {\n const dim = dimensions[0]\n const rest = dimensions.slice(1)\n const newArray = []\n for (let i = 0; i < dim; i++) {\n newArray[i] = createArray(...rest)\n }\n return newArray\n } else {\n return Array(dimensions[0]).fill(undefined)\n }\n}\n\n// http://stackoverflow.com/questions/18638900/javascript-crc32\nexport const makeCRCTable = function () {\n let c\n const crcTable = []\n for (let n = 0; n < 256; n++) {\n c = n\n for (let k = 0; k < 8; k++) {\n c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1\n }\n crcTable[n] = c\n }\n return crcTable\n}\n\nexport const crcTable = makeCRCTable()\n\nexport const crc32 = function (buffer: ArrayBuffer) {\n const uint8view = new Uint8Array(buffer)\n let crc = 0 ^ -1\n\n for (let i = 0; i < uint8view.length; i++) {\n crc = (crc >>> 8) ^ crcTable[(crc ^ uint8view[i]) & 0xff]\n }\n\n return (crc ^ -1) >>> 0\n}\n","import { DataStream } from './data-stream.js'\nimport { createArray } from './utils.js'\n\nexport class HuffmanTable {\n static MSB = 0x80000000\n\n l: number[][][]\n th: number[]\n v: number[][][][]\n tc: number[][]\n\n constructor() {\n this.l = createArray(4, 2, 16) as number[][][]\n this.th = [0, 0, 0, 0]\n this.v = createArray(4, 2, 16, 200) as number[][][][]\n this.tc = [\n [0, 0],\n [0, 0],\n [0, 0],\n [0, 0]\n ]\n }\n\n read(data: DataStream, HuffTab: number[][][]) {\n let count = 0\n let temp\n let t\n let c\n let i\n let j\n\n const length = data.get16()\n count += 2\n\n while (count < length) {\n temp = data.get8()\n count += 1\n t = temp & 0x0f\n if (t > 3) {\n throw new Error('ERROR: Huffman table ID > 3')\n }\n\n c = temp >> 4\n if (c > 2) {\n throw new Error('ERROR: Huffman table [Table class > 2 ]')\n }\n\n this.th[t] = 1\n this.tc[t][c] = 1\n\n for (i = 0; i < 16; i += 1) {\n this.l[t][c][i] = data.get8()\n count += 1\n }\n\n for (i = 0; i < 16; i += 1) {\n for (j = 0; j < this.l[t][c][i]; j += 1) {\n if (count > length) {\n throw new Error('ERROR: Huffman table format error [count>Lh]')\n }\n\n this.v[t][c][i][j] = data.get8()\n count += 1\n }\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Huffman table format error [count!=Lf]')\n }\n\n for (i = 0; i < 4; i += 1) {\n for (j = 0; j < 2; j += 1) {\n if (this.tc[i][j] !== 0) {\n this.buildHuffTable(HuffTab[i][j], this.l[i][j], this.v[i][j])\n }\n }\n }\n\n return 1\n }\n\n //\tBuild_HuffTab()\n //\tParameter: t table ID\n //\t c table class ( 0 for DC, 1 for AC )\n //\t L[i] # of codewords which length is i\n //\t V[i][j] Huffman Value (length=i)\n //\tEffect:\n //\t build up HuffTab[t][c] using L and V.\n buildHuffTable(tab: number[], L: number[], V: number[][]) {\n let currentTable, k, i, j, n\n const temp = 256\n k = 0\n\n for (i = 0; i < 8; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i + 1); n += 1) {\n tab[k] = V[i][j] | ((i + 1) << 8)\n k += 1\n }\n }\n }\n\n for (i = 1; k < 256; i += 1, k += 1) {\n tab[k] = i | HuffmanTable.MSB\n }\n\n currentTable = 1\n k = 0\n\n for (i = 8; i < 16; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i - 7); n += 1) {\n tab[currentTable * 256 + k] = V[i][j] | ((i + 1) << 8)\n k += 1\n }\n\n if (k >= 256) {\n if (k > 256) {\n throw new Error('ERROR: Huffman table error(1)!')\n }\n\n k = 0\n currentTable += 1\n }\n }\n }\n }\n}\n","import { DataStream } from './data-stream.js'\nimport { createArray } from './utils.js'\n\nexport class QuantizationTable {\n precision: number[] = [] // Quantization precision 8 or 16\n tq = [0, 0, 0, 0] // 1: this table is presented\n quantTables: number[][] = createArray(4, 64) as number[][] // Tables\n\n static enhanceQuantizationTable = function (qtab: number[], table: number[]) {\n for (let i = 0; i < 8; i += 1) {\n qtab[table[0 * 8 + i]] *= 90\n qtab[table[4 * 8 + i]] *= 90\n qtab[table[2 * 8 + i]] *= 118\n qtab[table[6 * 8 + i]] *= 49\n qtab[table[5 * 8 + i]] *= 71\n qtab[table[1 * 8 + i]] *= 126\n qtab[table[7 * 8 + i]] *= 25\n qtab[table[3 * 8 + i]] *= 106\n }\n\n for (let i = 0; i < 8; i += 1) {\n qtab[table[0 + 8 * i]] *= 90\n qtab[table[4 + 8 * i]] *= 90\n qtab[table[2 + 8 * i]] *= 118\n qtab[table[6 + 8 * i]] *= 49\n qtab[table[5 + 8 * i]] *= 71\n qtab[table[1 + 8 * i]] *= 126\n qtab[table[7 + 8 * i]] *= 25\n qtab[table[3 + 8 * i]] *= 106\n }\n\n for (let i = 0; i < 64; i += 1) {\n qtab[i] >>= 6\n }\n }\n\n read(data: DataStream, table: number[]) {\n let count = 0\n let temp\n let t\n let i\n\n const length = data.get16()\n count += 2\n\n while (count < length) {\n temp = data.get8()\n count += 1\n t = temp & 0x0f\n\n if (t > 3) {\n throw new Error('ERROR: Quantization table ID > 3')\n }\n\n this.precision[t] = temp >> 4\n\n if (this.precision[t] === 0) {\n this.precision[t] = 8\n } else if (this.precision[t] === 1) {\n this.precision[t] = 16\n } else {\n throw new Error('ERROR: Quantization table precision error')\n }\n\n this.tq[t] = 1\n\n if (this.precision[t] === 8) {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error')\n }\n\n this.quantTables[t][i] = data.get8()\n count += 1\n }\n\n QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table)\n } else {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error')\n }\n\n this.quantTables[t][i] = data.get16()\n count += 2\n }\n\n QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table)\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Quantization table error [count!=Lq]')\n }\n\n return 1\n }\n}\n","export const ScanComponent = {\n acTabSel: 0, // AC table selector\n dcTabSel: 0, // DC table selector\n scanCompSel: 0 // Scan component selector\n}\n","import { DataStream } from './data-stream.js'\nimport { ScanComponent } from './scan-component.js'\n\nexport class ScanHeader {\n ah = 0\n al = 0\n numComp = 0 // Number of components in the scan\n selection = 0 // Start of spectral or predictor selection\n spectralEnd = 0 // End of spectral selection\n components: Array = []\n\n read(data: DataStream) {\n let count = 0\n let i\n let temp\n\n const length = data.get16()\n count += 2\n\n this.numComp = data.get8()\n count += 1\n\n for (i = 0; i < this.numComp; i += 1) {\n this.components[i] = { ...ScanComponent }\n\n if (count > length) {\n throw new Error('ERROR: scan header format error')\n }\n\n this.components[i].scanCompSel = data.get8()\n count += 1\n\n temp = data.get8()\n count += 1\n\n this.components[i].dcTabSel = temp >> 4\n this.components[i].acTabSel = temp & 0x0f\n }\n\n this.selection = data.get8()\n count += 1\n\n this.spectralEnd = data.get8()\n count += 1\n\n temp = data.get8()\n this.ah = temp >> 4\n this.al = temp & 0x0f\n count += 1\n\n if (count !== length) {\n throw new Error('ERROR: scan header format error [count!=Ns]')\n }\n\n return 1\n }\n}\n","import { ComponentSpec } from './component-spec.js'\nimport { DataStream } from './data-stream.js'\nimport { FrameHeader } from './frame-header.js'\nimport { HuffmanTable } from './huffman-table.js'\nimport { QuantizationTable } from './quantization-table.js'\nimport { ScanHeader } from './scan-header.js'\nimport { createArray } from './utils.js'\n\nconst littleEndian = (function () {\n const buffer = new ArrayBuffer(2)\n new DataView(buffer).setInt16(0, 256, true /* littleEndian */)\n // Int16Array uses the platform's endianness.\n return new Int16Array(buffer)[0] === 256\n})()\n\nexport class Decoder {\n static IDCT_P = [\n 0, 5, 40, 16, 45, 2, 7, 42, 21, 56, 8, 61, 18, 47, 1, 4, 41, 23, 58, 13, 32, 24, 37, 10, 63, 17, 44, 3, 6, 43, 20,\n 57, 15, 34, 29, 48, 53, 26, 39, 9, 60, 19, 46, 22, 59, 12, 33, 31, 50, 55, 25, 36, 11, 62, 14, 35, 28, 49, 52, 27,\n 38, 30, 51, 54\n ]\n\n static TABLE = [\n 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44,\n 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49,\n 57, 58, 62, 63\n ]\n\n static MAX_HUFFMAN_SUBTREE = 50\n static MSB = 0x80000000\n static RESTART_MARKER_BEGIN = 0xffd0\n static RESTART_MARKER_END = 0xffd7\n\n buffer: ArrayBuffer | null = null\n stream: DataStream | null = null\n frame = new FrameHeader()\n huffTable = new HuffmanTable()\n quantTable = new QuantizationTable()\n scan = new ScanHeader()\n DU: number[][][] = createArray(10, 4, 64) as number[][][] // at most 10 data units in a MCU, at most 4 data units in one component\n HuffTab: number[][][] = createArray(4, 2, 50 * 256) as number[][][]\n IDCT_Source: number[] = []\n nBlock: number[] = [] // number of blocks in the i-th Comp in a scan\n acTab: number[][] = createArray(10, 1) as number[][] // ac HuffTab for the i-th Comp in a scan\n dcTab: number[][] = createArray(10, 1) as number[][] // dc HuffTab for the i-th Comp in a scan\n qTab: number[][] = createArray(10, 1) as number[][] // quantization table for the i-th Comp in a scan\n marker = 0\n markerIndex = 0\n numComp = 0\n restartInterval = 0\n selection = 0\n xDim = 0\n yDim = 0\n xLoc = 0\n yLoc = 0\n outputData: Uint8Array | Uint16Array | null = null\n restarting = false\n mask = 0\n numBytes = 0\n\n precision: number | undefined = undefined\n components: Array = []\n\n getter: null | ((index: number, compOffset: number) => number) = null\n setter: null | ((index: number, val: number, compOffset?: number) => void) = null\n output: null | ((PRED: number[]) => void) = null\n selector: null | ((compOffset?: number) => number) = null\n\n /**\n * The Decoder constructor.\n * @property {number} numBytes - number of bytes per component\n * @type {Function}\n */\n constructor(buffer?: ArrayBuffer | null, numBytes?: number) {\n this.buffer = buffer ?? null\n this.numBytes = numBytes ?? 0\n }\n\n /**\n * Returns decompressed data.\n */\n decompress(buffer: ArrayBuffer, offset: number, length: number): ArrayBuffer {\n const result = this.decode(buffer, offset, length)\n return result.buffer\n }\n\n decode(buffer?: ArrayBuffer, offset?: number, length?: number, numBytes?: number) {\n let scanNum = 0\n const pred = []\n let i\n let compN\n const temp = []\n const index = []\n let mcuNum\n\n if (buffer) {\n this.buffer = buffer\n }\n\n if (numBytes !== undefined) {\n this.numBytes = numBytes\n }\n\n this.stream = new DataStream(this.buffer as ArrayBuffer, offset, length)\n this.buffer = null\n\n this.xLoc = 0\n this.yLoc = 0\n let current = this.stream.get16()\n\n if (current !== 0xffd8) {\n // SOI\n throw new Error('Not a JPEG file')\n }\n\n current = this.stream.get16()\n\n while (current >> 4 !== 0x0ffc || current === 0xffc4) {\n // SOF 0~15\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab)\n break\n case 0xffcc: // DAC\n throw new Error(\"Program doesn't support arithmetic coding. (format throw new IOException)\")\n case 0xffdb:\n this.quantTable.read(this.stream, Decoder.TABLE)\n break\n case 0xffdd:\n this.restartInterval = this.readNumber() ?? 0\n break\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp()\n break\n case 0xfffe:\n this.readComment()\n break\n default:\n if (current >> 8 !== 0xff) {\n throw new Error('ERROR: format throw new IOException! (decode)')\n }\n }\n\n current = this.stream.get16()\n }\n\n if (current < 0xffc0 || current > 0xffc7) {\n throw new Error('ERROR: could not handle arithmetic code!')\n }\n\n this.frame.read(this.stream)\n current = this.stream.get16()\n\n do {\n while (current !== 0x0ffda) {\n // SOS\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab)\n break\n case 0xffcc: // DAC\n throw new Error(\"Program doesn't support arithmetic coding. (format throw new IOException)\")\n case 0xffdb:\n this.quantTable.read(this.stream, Decoder.TABLE)\n break\n case 0xffdd:\n this.restartInterval = this.readNumber() ?? 0\n break\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp()\n break\n case 0xfffe:\n this.readComment()\n break\n default:\n if (current >> 8 !== 0xff) {\n throw new Error('ERROR: format throw new IOException! (Parser.decode)')\n }\n }\n\n current = this.stream.get16()\n }\n\n this.precision = this.frame.precision\n this.components = this.frame.components\n\n if (!this.numBytes) {\n this.numBytes = Math.round(Math.ceil(this.precision / 8))\n }\n\n if (this.numBytes === 1) {\n this.mask = 0xff\n } else {\n this.mask = 0xffff\n }\n\n this.scan.read(this.stream)\n this.numComp = this.scan.numComp\n this.selection = this.scan.selection\n\n if (this.numBytes === 1) {\n if (this.numComp === 3) {\n this.getter = this.getValueRGB\n this.setter = this.setValueRGB\n this.output = this.outputRGB\n } else {\n this.getter = this.getValue8\n this.setter = this.setValue8\n this.output = this.outputSingle\n }\n } else {\n this.getter = this.getValue8\n this.setter = this.setValue8\n this.output = this.outputSingle\n }\n\n switch (this.selection) {\n case 2:\n this.selector = this.select2\n break\n case 3:\n this.selector = this.select3\n break\n case 4:\n this.selector = this.select4\n break\n case 5:\n this.selector = this.select5\n break\n case 6:\n this.selector = this.select6\n break\n case 7:\n this.selector = this.select7\n break\n default:\n this.selector = this.select1\n break\n }\n\n // this.scanComps = this.scan.components\n // this.quantTables = this.quantTable.quantTables\n\n for (i = 0; i < this.numComp; i += 1) {\n compN = this.scan.components[i].scanCompSel\n this.qTab[i] = this.quantTable.quantTables[this.components[compN].quantTableSel]\n this.nBlock[i] = this.components[compN].vSamp * this.components[compN].hSamp\n this.dcTab[i] = this.HuffTab[this.scan.components[i].dcTabSel][0]\n this.acTab[i] = this.HuffTab[this.scan.components[i].acTabSel][1]\n }\n\n this.xDim = this.frame.dimX\n this.yDim = this.frame.dimY\n if (this.numBytes === 1) {\n this.outputData = new Uint8Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp))\n } else {\n this.outputData = new Uint16Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp))\n }\n\n scanNum += 1\n\n while (true) {\n // Decode one scan\n temp[0] = 0\n index[0] = 0\n\n for (i = 0; i < 10; i += 1) {\n pred[i] = 1 << (this.precision - 1)\n }\n\n if (this.restartInterval === 0) {\n current = this.decodeUnit(pred, temp, index)\n\n while (current === 0 && this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.output(pred)\n current = this.decodeUnit(pred, temp, index)\n }\n\n break // current=MARKER\n }\n\n for (mcuNum = 0; mcuNum < this.restartInterval; mcuNum += 1) {\n this.restarting = mcuNum === 0\n current = this.decodeUnit(pred, temp, index)\n this.output(pred)\n\n if (current !== 0) {\n break\n }\n }\n\n if (current === 0) {\n if (this.markerIndex !== 0) {\n current = 0xff00 | this.marker\n this.markerIndex = 0\n } else {\n current = this.stream.get16()\n }\n }\n\n if (!(current >= Decoder.RESTART_MARKER_BEGIN && current <= Decoder.RESTART_MARKER_END)) {\n break // current=MARKER\n }\n }\n\n if (current === 0xffdc && scanNum === 1) {\n // DNL\n this.readNumber()\n current = this.stream.get16()\n }\n } while (current !== 0xffd9 && this.xLoc < this.xDim && this.yLoc < this.yDim && scanNum === 0)\n\n return this.outputData\n }\n\n decodeUnit(prev: number[], temp: number[], index: number[]): number {\n if (this.numComp === 1) {\n return this.decodeSingle(prev, temp, index)\n } else if (this.numComp === 3) {\n return this.decodeRGB(prev, temp, index)\n } else {\n return -1\n }\n }\n\n select1(compOffset?: number) {\n return this.getPreviousX(compOffset)\n }\n\n select2(compOffset?: number) {\n return this.getPreviousY(compOffset)\n }\n\n select3(compOffset?: number) {\n return this.getPreviousXY(compOffset)\n }\n\n select4(compOffset?: number) {\n return this.getPreviousX(compOffset) + this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)\n }\n\n select5(compOffset?: number) {\n return this.getPreviousX(compOffset) + ((this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)) >> 1)\n }\n\n select6(compOffset?: number) {\n return this.getPreviousY(compOffset) + ((this.getPreviousX(compOffset) - this.getPreviousXY(compOffset)) >> 1)\n }\n\n select7(compOffset?: number) {\n return (this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) / 2\n }\n\n decodeRGB(prev: number[], temp: number[], index: number[]) {\n if (this.selector === null) throw new Error(\"decode hasn't run yet\")\n\n let actab, dctab, qtab, ctrC, i, k, j\n\n prev[0] = this.selector(0)\n prev[1] = this.selector(1)\n prev[2] = this.selector(2)\n\n for (ctrC = 0; ctrC < this.numComp; ctrC += 1) {\n qtab = this.qTab[ctrC]\n actab = this.acTab[ctrC]\n dctab = this.dcTab[ctrC]\n for (i = 0; i < this.nBlock[ctrC]; i += 1) {\n for (k = 0; k < this.IDCT_Source.length; k += 1) {\n this.IDCT_Source[k] = 0\n }\n\n let value = this.getHuffmanValue(dctab, temp, index)\n\n if (value >= 0xff00) {\n return value\n }\n\n prev[ctrC] = this.IDCT_Source[0] = prev[ctrC] + this.getn(index, value, temp, index)\n this.IDCT_Source[0] *= qtab[0]\n\n for (j = 1; j < 64; j += 1) {\n value = this.getHuffmanValue(actab, temp, index)\n\n if (value >= 0xff00) {\n return value\n }\n\n j += value >> 4\n\n if ((value & 0x0f) === 0) {\n if (value >> 4 === 0) {\n break\n }\n } else {\n this.IDCT_Source[Decoder.IDCT_P[j]] = this.getn(index, value & 0x0f, temp, index) * qtab[j]\n }\n }\n }\n }\n\n return 0\n }\n\n decodeSingle(prev: number[], temp: number[], index: number[]) {\n if (this.selector === null) throw new Error(\"decode hasn't run yet\")\n\n let value, i, n, nRestart\n\n if (this.restarting) {\n this.restarting = false\n prev[0] = 1 << (this.frame.precision - 1)\n } else {\n prev[0] = this.selector()\n }\n\n for (i = 0; i < this.nBlock[0]; i += 1) {\n value = this.getHuffmanValue(this.dcTab[0], temp, index)\n if (value >= 0xff00) {\n return value\n }\n\n n = this.getn(prev, value, temp, index)\n nRestart = n >> 8\n\n if (nRestart >= Decoder.RESTART_MARKER_BEGIN && nRestart <= Decoder.RESTART_MARKER_END) {\n return nRestart\n }\n\n prev[0] += n\n }\n\n return 0\n }\n\n //\tHuffman table for fast search: (HuffTab) 8-bit Look up table 2-layer search architecture, 1st-layer represent 256 node (8 bits) if codeword-length > 8\n //\tbits, then the entry of 1st-layer = (# of 2nd-layer table) | MSB and it is stored in the 2nd-layer Size of tables in each layer are 256.\n //\tHuffTab[*][*][0-256] is always the only 1st-layer table.\n //\n //\tAn entry can be: (1) (# of 2nd-layer table) | MSB , for code length > 8 in 1st-layer (2) (Code length) << 8 | HuffVal\n //\n //\tHuffmanValue(table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n //\t ):\n //\t return: Huffman Value of table\n //\t 0xFF?? if it receives a MARKER\n //\t Parameter: table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n //\t temp temp storage for remainded bits\n //\t index index to bit of temp\n //\t in FILE pointer\n //\t Effect:\n //\t temp store new remainded bits\n //\t index change to new index\n //\t in change to new position\n //\t NOTE:\n //\t Initial by temp=0; index=0;\n //\t NOTE: (explain temp and index)\n //\t temp: is always in the form at calling time or returning time\n //\t | byte 4 | byte 3 | byte 2 | byte 1 |\n //\t | 0 | 0 | 00000000 | 00000??? | if not a MARKER\n //\t ^index=3 (from 0 to 15)\n //\t 321\n //\t NOTE (marker and marker_index):\n //\t If get a MARKER from 'in', marker=the low-byte of the MARKER\n //\t and marker_index=9\n //\t If marker_index=9 then index is always > 8, or HuffmanValue()\n //\t will not be called\n getHuffmanValue(table: number[], temp: number[], index: number[]): number {\n let code, input\n const mask = 0xffff\n\n if (!this.stream) throw new Error('stream not initialized')\n\n if (index[0] < 8) {\n temp[0] <<= 8\n input = this.stream.get8()\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n temp[0] |= input\n } else {\n index[0] -= 8\n }\n\n code = table[temp[0] >> index[0]]\n\n if ((code & Decoder.MSB) !== 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0\n return 0xff00 | this.marker\n }\n\n temp[0] &= mask >> (16 - index[0])\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n code = table[(code & 0xff) * 256 + (temp[0] >> index[0])]\n index[0] += 8\n }\n\n index[0] += 8 - (code >> 8)\n\n if (index[0] < 0) {\n throw new Error('index=' + index[0] + ' temp=' + temp[0] + ' code=' + code + ' in HuffmanValue()')\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0\n return 0xff00 | this.marker\n }\n\n temp[0] &= mask >> (16 - index[0])\n return code & 0xff\n }\n\n getn(PRED: number[], n: number, temp: number[], index: number[]) {\n let result, input\n const one = 1\n const n_one = -1\n const mask = 0xffff\n\n if (this.stream === null) throw new Error('stream not initialized')\n\n if (n === 0) {\n return 0\n }\n\n if (n === 16) {\n if (PRED[0] >= 0) {\n return -32768\n } else {\n return 32768\n }\n }\n\n index[0] -= n\n\n if (index[0] >= 0) {\n if (index[0] < this.markerIndex && !this.isLastPixel()) {\n // this was corrupting the last pixel in some cases\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n result = temp[0] >> index[0]\n temp[0] &= mask >> (16 - index[0])\n } else {\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n index[0] += 8\n\n if (index[0] < 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n index[0] += 8\n }\n\n if (index[0] < 0) {\n throw new Error('index=' + index[0] + ' in getn()')\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n result = temp[0] >> index[0]\n temp[0] &= mask >> (16 - index[0])\n }\n\n if (result < one << (n - 1)) {\n result += (n_one << n) + 1\n }\n\n return result\n }\n\n getPreviousX(compOffset = 0): number {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc > 0) {\n return this.getter(this.yLoc * this.xDim + this.xLoc - 1, compOffset)\n } else if (this.yLoc > 0) {\n return this.getPreviousY(compOffset)\n } else {\n return 1 << (this.frame.precision - 1)\n }\n }\n\n getPreviousXY(compOffset = 0) {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc > 0 && this.yLoc > 0) {\n return this.getter((this.yLoc - 1) * this.xDim + this.xLoc - 1, compOffset)\n } else {\n return this.getPreviousY(compOffset)\n }\n }\n\n getPreviousY(compOffset = 0) {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.yLoc > 0) {\n return this.getter((this.yLoc - 1) * this.xDim + this.xLoc, compOffset)\n } else {\n return this.getPreviousX(compOffset)\n }\n }\n\n isLastPixel() {\n return this.xLoc === this.xDim - 1 && this.yLoc === this.yDim - 1\n }\n\n outputSingle(PRED: number[]) {\n if (this.setter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(this.yLoc * this.xDim + this.xLoc, this.mask & PRED[0])\n\n this.xLoc += 1\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1\n this.xLoc = 0\n }\n }\n }\n\n outputRGB(PRED: number[]) {\n if (this.setter === null) throw new Error(\"decode hasn't run yet\")\n\n const offset = this.yLoc * this.xDim + this.xLoc\n\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(offset, PRED[0], 0)\n this.setter(offset, PRED[1], 1)\n this.setter(offset, PRED[2], 2)\n\n this.xLoc += 1\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1\n this.xLoc = 0\n }\n }\n }\n\n setValue8(index: number, val: number) {\n if (!this.outputData) throw new Error('output data not ready')\n\n if (littleEndian) {\n this.outputData[index] = val\n } else {\n this.outputData[index] = ((val & 0xff) << 8) | ((val >> 8) & 0xff)\n }\n }\n\n getValue8(index: number) {\n if (this.outputData === null) throw new Error('output data not ready')\n if (littleEndian) {\n return this.outputData[index] // mask should not be necessary because outputData is either Int8Array or Int16Array\n } else {\n const val = this.outputData[index]\n return ((val & 0xff) << 8) | ((val >> 8) & 0xff)\n }\n }\n\n setValueRGB(index: number, val: number, compOffset = 0) {\n if (this.outputData === null) return\n this.outputData[index * 3 + compOffset] = val\n }\n\n getValueRGB(index: number, compOffset: number) {\n if (this.outputData === null) throw new Error('output data not ready')\n return this.outputData[index * 3 + compOffset]\n }\n\n readApp() {\n if (this.stream === null) return null\n\n let count = 0\n const length = this.stream.get16()\n count += 2\n\n while (count < length) {\n this.stream.get8()\n count += 1\n }\n\n return length\n }\n\n readComment() {\n if (this.stream === null) return null\n\n let sb = ''\n let count = 0\n\n const length = this.stream.get16()\n count += 2\n\n while (count < length) {\n sb += this.stream.get8()\n count += 1\n }\n\n return sb\n }\n\n readNumber() {\n if (this.stream === null) return null\n\n const Ld = this.stream.get16()\n\n if (Ld !== 4) {\n throw new Error('ERROR: Define number format throw new IOException [Ld!=4]')\n }\n\n return this.stream.get16()\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,gBAAgB;AAAA,EAC3B,OAAO;AAAA,EACP,eAAe;AAAA,EACf,OAAO;AACT;;;ACJO,IAAM,aAAN,MAAiB;AAAA,EACtB;AAAA,EACA;AAAA,EAEA,YAAY,MAAmB,QAAiB,QAAiB;AAC/D,SAAK,SAAS,IAAI,WAAW,MAAM,QAAQ,MAAM;AACjD,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,QAAQ;AAEN,UAAM,SAAS,KAAK,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK,OAAO,KAAK,QAAQ,CAAC;AACzE,SAAK,SAAS;AACd,WAAO;AAAA,EACT;AAAA,EAEA,OA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AA,EAC3B;AACF;","names":["crcTable"]} \ No newline at end of file diff --git a/tsup.config.ts b/tsup.config.ts index 889a603..2bc5638 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,10 +1,31 @@ import { defineConfig } from 'tsup' -export default defineConfig({ - entry: ['src/main.ts'], - outDir: 'build', - splitting: false, - sourcemap: true, - clean: true, - dts: true -}) +export default defineConfig([ + { + entry: { + lossless: 'src/main.ts' + }, + outExtension: () => ({ + js: '.js' + }), + outDir: 'release', + splitting: false, + sourcemap: true, + clean: true, + dts: true + }, + { + entry: { + 'lossless-min': 'src/main.ts' + }, + outExtension: () => ({ + js: '.js' + }), + outDir: 'release', + splitting: false, + sourcemap: true, + clean: false, + minify: true, + dts: true + } +]) From e184cd959e65771536bdbb24aaf51c61314cc4f6 Mon Sep 17 00:00:00 2001 From: Jens Ochsenmeier Date: Mon, 25 Mar 2024 22:54:39 +0100 Subject: [PATCH 2/4] remove files from git that aren't directly linked in the README --- .gitignore | 2 + release/lossless-min.d.cts | 150 ------------------------------------ release/lossless-min.js.map | 1 - release/lossless.d.cts | 150 ------------------------------------ 4 files changed, 2 insertions(+), 301 deletions(-) delete mode 100644 release/lossless-min.d.cts delete mode 100644 release/lossless-min.js.map delete mode 100644 release/lossless.d.cts diff --git a/.gitignore b/.gitignore index ba4e10c..52fe5d1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ node_modules/ .idea/ release.sh .DS_Store +*.d.cts +*.js.map \ No newline at end of file diff --git a/release/lossless-min.d.cts b/release/lossless-min.d.cts deleted file mode 100644 index 0a9aed9..0000000 --- a/release/lossless-min.d.cts +++ /dev/null @@ -1,150 +0,0 @@ -declare const ComponentSpec: { - hSamp: number; - quantTableSel: number; - vSamp: number; -}; - -declare class DataStream { - buffer: Uint8Array; - index: number; - constructor(data: ArrayBuffer, offset?: number, length?: number); - get16(): number; - get8(): number; -} - -declare class FrameHeader { - dimX: number; - dimY: number; - numComp: number; - precision: number; - components: Array; - read(data: DataStream): number; -} - -declare class HuffmanTable { - static MSB: number; - l: number[][][]; - th: number[]; - v: number[][][][]; - tc: number[][]; - constructor(); - read(data: DataStream, HuffTab: number[][][]): number; - buildHuffTable(tab: number[], L: number[], V: number[][]): void; -} - -declare class QuantizationTable { - precision: number[]; - tq: number[]; - quantTables: number[][]; - static enhanceQuantizationTable: (qtab: number[], table: number[]) => void; - read(data: DataStream, table: number[]): number; -} - -declare const ScanComponent: { - acTabSel: number; - dcTabSel: number; - scanCompSel: number; -}; - -declare class ScanHeader { - ah: number; - al: number; - numComp: number; - selection: number; - spectralEnd: number; - components: Array; - read(data: DataStream): number; -} - -declare class Decoder { - static IDCT_P: number[]; - static TABLE: number[]; - static MAX_HUFFMAN_SUBTREE: number; - static MSB: number; - static RESTART_MARKER_BEGIN: number; - static RESTART_MARKER_END: number; - buffer: ArrayBuffer | null; - stream: DataStream | null; - frame: FrameHeader; - huffTable: HuffmanTable; - quantTable: QuantizationTable; - scan: ScanHeader; - DU: number[][][]; - HuffTab: number[][][]; - IDCT_Source: number[]; - nBlock: number[]; - acTab: number[][]; - dcTab: number[][]; - qTab: number[][]; - marker: number; - markerIndex: number; - numComp: number; - restartInterval: number; - selection: number; - xDim: number; - yDim: number; - xLoc: number; - yLoc: number; - outputData: Uint8Array | Uint16Array | null; - restarting: boolean; - mask: number; - numBytes: number; - precision: number | undefined; - components: Array; - getter: null | ((index: number, compOffset: number) => number); - setter: null | ((index: number, val: number, compOffset?: number) => void); - output: null | ((PRED: number[]) => void); - selector: null | ((compOffset?: number) => number); - /** - * The Decoder constructor. - * @property {number} numBytes - number of bytes per component - * @type {Function} - */ - constructor(buffer?: ArrayBuffer | null, numBytes?: number); - /** - * Returns decompressed data. - */ - decompress(buffer: ArrayBuffer, offset: number, length: number): ArrayBuffer; - decode(buffer?: ArrayBuffer, offset?: number, length?: number, numBytes?: number): Uint8Array | Uint16Array; - decodeUnit(prev: number[], temp: number[], index: number[]): number; - select1(compOffset?: number): number; - select2(compOffset?: number): number; - select3(compOffset?: number): number; - select4(compOffset?: number): number; - select5(compOffset?: number): number; - select6(compOffset?: number): number; - select7(compOffset?: number): number; - decodeRGB(prev: number[], temp: number[], index: number[]): number; - decodeSingle(prev: number[], temp: number[], index: number[]): number; - getHuffmanValue(table: number[], temp: number[], index: number[]): number; - getn(PRED: number[], n: number, temp: number[], index: number[]): number; - getPreviousX(compOffset?: number): number; - getPreviousXY(compOffset?: number): number; - getPreviousY(compOffset?: number): number; - isLastPixel(): boolean; - outputSingle(PRED: number[]): void; - outputRGB(PRED: number[]): void; - setValue8(index: number, val: number): void; - getValue8(index: number): number; - setValueRGB(index: number, val: number, compOffset?: number): void; - getValueRGB(index: number, compOffset: number): number; - readApp(): number | null; - readComment(): string | null; - readNumber(): number | null; -} - -type NestedArray = Array>; -declare const createArray: (...dimensions: number[]) => NestedArray; -declare const makeCRCTable: () => number[]; -declare const crcTable: number[]; -declare const crc32: (buffer: ArrayBuffer) => number; - -declare const utils_crc32: typeof crc32; -declare const utils_crcTable: typeof crcTable; -declare const utils_createArray: typeof createArray; -declare const utils_makeCRCTable: typeof makeCRCTable; -declare namespace utils { - export { utils_crc32 as crc32, utils_crcTable as crcTable, utils_createArray as createArray, utils_makeCRCTable as makeCRCTable }; -} - -export { ComponentSpec, DataStream, Decoder, FrameHeader, HuffmanTable, QuantizationTable, ScanComponent, ScanHeader, utils as Utils }; diff --git a/release/lossless-min.js.map b/release/lossless-min.js.map deleted file mode 100644 index bec1646..0000000 --- a/release/lossless-min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/main.ts","../src/component-spec.ts","../src/data-stream.ts","../src/frame-header.ts","../src/utils.ts","../src/huffman-table.ts","../src/quantization-table.ts","../src/scan-component.ts","../src/scan-header.ts","../src/decoder.ts"],"sourcesContent":["export { ComponentSpec } from './component-spec.js'\nexport { DataStream } from './data-stream.js'\nexport { Decoder } from './decoder.js'\nexport { FrameHeader } from './frame-header.js'\nexport { HuffmanTable } from './huffman-table.js'\nexport { QuantizationTable } from './quantization-table.js'\nexport { ScanComponent } from './scan-component.js'\nexport { ScanHeader } from './scan-header.js'\nexport * as Utils from './utils.js'\n","export const ComponentSpec = {\n hSamp: 0,\n quantTableSel: 0,\n vSamp: 0\n}\n","export class DataStream {\n buffer: Uint8Array\n index: number\n\n constructor(data: ArrayBuffer, offset?: number, length?: number) {\n this.buffer = new Uint8Array(data, offset, length)\n this.index = 0\n }\n\n get16() {\n // var value = this.buffer.getUint16(this.index, false);\n const value = (this.buffer[this.index] << 8) + this.buffer[this.index + 1] // DataView is big-endian by default\n this.index += 2\n return value\n }\n\n get8() {\n // var value = this.buffer.getUint8(this.index);\n const value = this.buffer[this.index]\n this.index += 1\n return value\n }\n}\n","import { ComponentSpec } from './component-spec.js'\nimport { DataStream } from './data-stream.js'\n\nexport class FrameHeader {\n dimX = 0\n dimY = 0\n numComp = 0\n precision = 0\n components: Array = []\n\n read(data: DataStream) {\n let count = 0\n let temp\n\n const length = data.get16()\n count += 2\n\n this.precision = data.get8()\n count += 1\n\n this.dimY = data.get16()\n count += 2\n\n this.dimX = data.get16()\n count += 2\n\n this.numComp = data.get8()\n count += 1\n for (let i = 1; i <= this.numComp; i += 1) {\n if (count > length) {\n throw new Error('ERROR: frame format error')\n }\n\n const c = data.get8()\n count += 1\n\n if (count >= length) {\n throw new Error('ERROR: frame format error [c>=Lf]')\n }\n\n temp = data.get8()\n count += 1\n\n if (!this.components[c]) {\n this.components[c] = { ...ComponentSpec }\n }\n\n this.components[c].hSamp = temp >> 4\n this.components[c].vSamp = temp & 0x0f\n this.components[c].quantTableSel = data.get8()\n count += 1\n }\n\n if (count !== length) {\n throw new Error('ERROR: frame format error [Lf!=count]')\n }\n\n return 1\n }\n}\n","type NestedArray = Array>\n\n// https://stackoverflow.com/a/12588826\nexport const createArray = (...dimensions: number[]): NestedArray => {\n if (dimensions.length > 1) {\n const dim = dimensions[0]\n const rest = dimensions.slice(1)\n const newArray = []\n for (let i = 0; i < dim; i++) {\n newArray[i] = createArray(...rest)\n }\n return newArray\n } else {\n return Array(dimensions[0]).fill(undefined)\n }\n}\n\n// http://stackoverflow.com/questions/18638900/javascript-crc32\nexport const makeCRCTable = function () {\n let c\n const crcTable = []\n for (let n = 0; n < 256; n++) {\n c = n\n for (let k = 0; k < 8; k++) {\n c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1\n }\n crcTable[n] = c\n }\n return crcTable\n}\n\nexport const crcTable = makeCRCTable()\n\nexport const crc32 = function (buffer: ArrayBuffer) {\n const uint8view = new Uint8Array(buffer)\n let crc = 0 ^ -1\n\n for (let i = 0; i < uint8view.length; i++) {\n crc = (crc >>> 8) ^ crcTable[(crc ^ uint8view[i]) & 0xff]\n }\n\n return (crc ^ -1) >>> 0\n}\n","import { DataStream } from './data-stream.js'\nimport { createArray } from './utils.js'\n\nexport class HuffmanTable {\n static MSB = 0x80000000\n\n l: number[][][]\n th: number[]\n v: number[][][][]\n tc: number[][]\n\n constructor() {\n this.l = createArray(4, 2, 16) as number[][][]\n this.th = [0, 0, 0, 0]\n this.v = createArray(4, 2, 16, 200) as number[][][][]\n this.tc = [\n [0, 0],\n [0, 0],\n [0, 0],\n [0, 0]\n ]\n }\n\n read(data: DataStream, HuffTab: number[][][]) {\n let count = 0\n let temp\n let t\n let c\n let i\n let j\n\n const length = data.get16()\n count += 2\n\n while (count < length) {\n temp = data.get8()\n count += 1\n t = temp & 0x0f\n if (t > 3) {\n throw new Error('ERROR: Huffman table ID > 3')\n }\n\n c = temp >> 4\n if (c > 2) {\n throw new Error('ERROR: Huffman table [Table class > 2 ]')\n }\n\n this.th[t] = 1\n this.tc[t][c] = 1\n\n for (i = 0; i < 16; i += 1) {\n this.l[t][c][i] = data.get8()\n count += 1\n }\n\n for (i = 0; i < 16; i += 1) {\n for (j = 0; j < this.l[t][c][i]; j += 1) {\n if (count > length) {\n throw new Error('ERROR: Huffman table format error [count>Lh]')\n }\n\n this.v[t][c][i][j] = data.get8()\n count += 1\n }\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Huffman table format error [count!=Lf]')\n }\n\n for (i = 0; i < 4; i += 1) {\n for (j = 0; j < 2; j += 1) {\n if (this.tc[i][j] !== 0) {\n this.buildHuffTable(HuffTab[i][j], this.l[i][j], this.v[i][j])\n }\n }\n }\n\n return 1\n }\n\n //\tBuild_HuffTab()\n //\tParameter: t table ID\n //\t c table class ( 0 for DC, 1 for AC )\n //\t L[i] # of codewords which length is i\n //\t V[i][j] Huffman Value (length=i)\n //\tEffect:\n //\t build up HuffTab[t][c] using L and V.\n buildHuffTable(tab: number[], L: number[], V: number[][]) {\n let currentTable, k, i, j, n\n const temp = 256\n k = 0\n\n for (i = 0; i < 8; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i + 1); n += 1) {\n tab[k] = V[i][j] | ((i + 1) << 8)\n k += 1\n }\n }\n }\n\n for (i = 1; k < 256; i += 1, k += 1) {\n tab[k] = i | HuffmanTable.MSB\n }\n\n currentTable = 1\n k = 0\n\n for (i = 8; i < 16; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i - 7); n += 1) {\n tab[currentTable * 256 + k] = V[i][j] | ((i + 1) << 8)\n k += 1\n }\n\n if (k >= 256) {\n if (k > 256) {\n throw new Error('ERROR: Huffman table error(1)!')\n }\n\n k = 0\n currentTable += 1\n }\n }\n }\n }\n}\n","import { DataStream } from './data-stream.js'\nimport { createArray } from './utils.js'\n\nexport class QuantizationTable {\n precision: number[] = [] // Quantization precision 8 or 16\n tq = [0, 0, 0, 0] // 1: this table is presented\n quantTables: number[][] = createArray(4, 64) as number[][] // Tables\n\n static enhanceQuantizationTable = function (qtab: number[], table: number[]) {\n for (let i = 0; i < 8; i += 1) {\n qtab[table[0 * 8 + i]] *= 90\n qtab[table[4 * 8 + i]] *= 90\n qtab[table[2 * 8 + i]] *= 118\n qtab[table[6 * 8 + i]] *= 49\n qtab[table[5 * 8 + i]] *= 71\n qtab[table[1 * 8 + i]] *= 126\n qtab[table[7 * 8 + i]] *= 25\n qtab[table[3 * 8 + i]] *= 106\n }\n\n for (let i = 0; i < 8; i += 1) {\n qtab[table[0 + 8 * i]] *= 90\n qtab[table[4 + 8 * i]] *= 90\n qtab[table[2 + 8 * i]] *= 118\n qtab[table[6 + 8 * i]] *= 49\n qtab[table[5 + 8 * i]] *= 71\n qtab[table[1 + 8 * i]] *= 126\n qtab[table[7 + 8 * i]] *= 25\n qtab[table[3 + 8 * i]] *= 106\n }\n\n for (let i = 0; i < 64; i += 1) {\n qtab[i] >>= 6\n }\n }\n\n read(data: DataStream, table: number[]) {\n let count = 0\n let temp\n let t\n let i\n\n const length = data.get16()\n count += 2\n\n while (count < length) {\n temp = data.get8()\n count += 1\n t = temp & 0x0f\n\n if (t > 3) {\n throw new Error('ERROR: Quantization table ID > 3')\n }\n\n this.precision[t] = temp >> 4\n\n if (this.precision[t] === 0) {\n this.precision[t] = 8\n } else if (this.precision[t] === 1) {\n this.precision[t] = 16\n } else {\n throw new Error('ERROR: Quantization table precision error')\n }\n\n this.tq[t] = 1\n\n if (this.precision[t] === 8) {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error')\n }\n\n this.quantTables[t][i] = data.get8()\n count += 1\n }\n\n QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table)\n } else {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error')\n }\n\n this.quantTables[t][i] = data.get16()\n count += 2\n }\n\n QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table)\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Quantization table error [count!=Lq]')\n }\n\n return 1\n }\n}\n","export const ScanComponent = {\n acTabSel: 0, // AC table selector\n dcTabSel: 0, // DC table selector\n scanCompSel: 0 // Scan component selector\n}\n","import { DataStream } from './data-stream.js'\nimport { ScanComponent } from './scan-component.js'\n\nexport class ScanHeader {\n ah = 0\n al = 0\n numComp = 0 // Number of components in the scan\n selection = 0 // Start of spectral or predictor selection\n spectralEnd = 0 // End of spectral selection\n components: Array = []\n\n read(data: DataStream) {\n let count = 0\n let i\n let temp\n\n const length = data.get16()\n count += 2\n\n this.numComp = data.get8()\n count += 1\n\n for (i = 0; i < this.numComp; i += 1) {\n this.components[i] = { ...ScanComponent }\n\n if (count > length) {\n throw new Error('ERROR: scan header format error')\n }\n\n this.components[i].scanCompSel = data.get8()\n count += 1\n\n temp = data.get8()\n count += 1\n\n this.components[i].dcTabSel = temp >> 4\n this.components[i].acTabSel = temp & 0x0f\n }\n\n this.selection = data.get8()\n count += 1\n\n this.spectralEnd = data.get8()\n count += 1\n\n temp = data.get8()\n this.ah = temp >> 4\n this.al = temp & 0x0f\n count += 1\n\n if (count !== length) {\n throw new Error('ERROR: scan header format error [count!=Ns]')\n }\n\n return 1\n }\n}\n","import { ComponentSpec } from './component-spec.js'\nimport { DataStream } from './data-stream.js'\nimport { FrameHeader } from './frame-header.js'\nimport { HuffmanTable } from './huffman-table.js'\nimport { QuantizationTable } from './quantization-table.js'\nimport { ScanHeader } from './scan-header.js'\nimport { createArray } from './utils.js'\n\nconst littleEndian = (function () {\n const buffer = new ArrayBuffer(2)\n new DataView(buffer).setInt16(0, 256, true /* littleEndian */)\n // Int16Array uses the platform's endianness.\n return new Int16Array(buffer)[0] === 256\n})()\n\nexport class Decoder {\n static IDCT_P = [\n 0, 5, 40, 16, 45, 2, 7, 42, 21, 56, 8, 61, 18, 47, 1, 4, 41, 23, 58, 13, 32, 24, 37, 10, 63, 17, 44, 3, 6, 43, 20,\n 57, 15, 34, 29, 48, 53, 26, 39, 9, 60, 19, 46, 22, 59, 12, 33, 31, 50, 55, 25, 36, 11, 62, 14, 35, 28, 49, 52, 27,\n 38, 30, 51, 54\n ]\n\n static TABLE = [\n 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44,\n 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49,\n 57, 58, 62, 63\n ]\n\n static MAX_HUFFMAN_SUBTREE = 50\n static MSB = 0x80000000\n static RESTART_MARKER_BEGIN = 0xffd0\n static RESTART_MARKER_END = 0xffd7\n\n buffer: ArrayBuffer | null = null\n stream: DataStream | null = null\n frame = new FrameHeader()\n huffTable = new HuffmanTable()\n quantTable = new QuantizationTable()\n scan = new ScanHeader()\n DU: number[][][] = createArray(10, 4, 64) as number[][][] // at most 10 data units in a MCU, at most 4 data units in one component\n HuffTab: number[][][] = createArray(4, 2, 50 * 256) as number[][][]\n IDCT_Source: number[] = []\n nBlock: number[] = [] // number of blocks in the i-th Comp in a scan\n acTab: number[][] = createArray(10, 1) as number[][] // ac HuffTab for the i-th Comp in a scan\n dcTab: number[][] = createArray(10, 1) as number[][] // dc HuffTab for the i-th Comp in a scan\n qTab: number[][] = createArray(10, 1) as number[][] // quantization table for the i-th Comp in a scan\n marker = 0\n markerIndex = 0\n numComp = 0\n restartInterval = 0\n selection = 0\n xDim = 0\n yDim = 0\n xLoc = 0\n yLoc = 0\n outputData: Uint8Array | Uint16Array | null = null\n restarting = false\n mask = 0\n numBytes = 0\n\n precision: number | undefined = undefined\n components: Array = []\n\n getter: null | ((index: number, compOffset: number) => number) = null\n setter: null | ((index: number, val: number, compOffset?: number) => void) = null\n output: null | ((PRED: number[]) => void) = null\n selector: null | ((compOffset?: number) => number) = null\n\n /**\n * The Decoder constructor.\n * @property {number} numBytes - number of bytes per component\n * @type {Function}\n */\n constructor(buffer?: ArrayBuffer | null, numBytes?: number) {\n this.buffer = buffer ?? null\n this.numBytes = numBytes ?? 0\n }\n\n /**\n * Returns decompressed data.\n */\n decompress(buffer: ArrayBuffer, offset: number, length: number): ArrayBuffer {\n const result = this.decode(buffer, offset, length)\n return result.buffer\n }\n\n decode(buffer?: ArrayBuffer, offset?: number, length?: number, numBytes?: number) {\n let scanNum = 0\n const pred = []\n let i\n let compN\n const temp = []\n const index = []\n let mcuNum\n\n if (buffer) {\n this.buffer = buffer\n }\n\n if (numBytes !== undefined) {\n this.numBytes = numBytes\n }\n\n this.stream = new DataStream(this.buffer as ArrayBuffer, offset, length)\n this.buffer = null\n\n this.xLoc = 0\n this.yLoc = 0\n let current = this.stream.get16()\n\n if (current !== 0xffd8) {\n // SOI\n throw new Error('Not a JPEG file')\n }\n\n current = this.stream.get16()\n\n while (current >> 4 !== 0x0ffc || current === 0xffc4) {\n // SOF 0~15\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab)\n break\n case 0xffcc: // DAC\n throw new Error(\"Program doesn't support arithmetic coding. (format throw new IOException)\")\n case 0xffdb:\n this.quantTable.read(this.stream, Decoder.TABLE)\n break\n case 0xffdd:\n this.restartInterval = this.readNumber() ?? 0\n break\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp()\n break\n case 0xfffe:\n this.readComment()\n break\n default:\n if (current >> 8 !== 0xff) {\n throw new Error('ERROR: format throw new IOException! (decode)')\n }\n }\n\n current = this.stream.get16()\n }\n\n if (current < 0xffc0 || current > 0xffc7) {\n throw new Error('ERROR: could not handle arithmetic code!')\n }\n\n this.frame.read(this.stream)\n current = this.stream.get16()\n\n do {\n while (current !== 0x0ffda) {\n // SOS\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab)\n break\n case 0xffcc: // DAC\n throw new Error(\"Program doesn't support arithmetic coding. (format throw new IOException)\")\n case 0xffdb:\n this.quantTable.read(this.stream, Decoder.TABLE)\n break\n case 0xffdd:\n this.restartInterval = this.readNumber() ?? 0\n break\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp()\n break\n case 0xfffe:\n this.readComment()\n break\n default:\n if (current >> 8 !== 0xff) {\n throw new Error('ERROR: format throw new IOException! (Parser.decode)')\n }\n }\n\n current = this.stream.get16()\n }\n\n this.precision = this.frame.precision\n this.components = this.frame.components\n\n if (!this.numBytes) {\n this.numBytes = Math.round(Math.ceil(this.precision / 8))\n }\n\n if (this.numBytes === 1) {\n this.mask = 0xff\n } else {\n this.mask = 0xffff\n }\n\n this.scan.read(this.stream)\n this.numComp = this.scan.numComp\n this.selection = this.scan.selection\n\n if (this.numBytes === 1) {\n if (this.numComp === 3) {\n this.getter = this.getValueRGB\n this.setter = this.setValueRGB\n this.output = this.outputRGB\n } else {\n this.getter = this.getValue8\n this.setter = this.setValue8\n this.output = this.outputSingle\n }\n } else {\n this.getter = this.getValue8\n this.setter = this.setValue8\n this.output = this.outputSingle\n }\n\n switch (this.selection) {\n case 2:\n this.selector = this.select2\n break\n case 3:\n this.selector = this.select3\n break\n case 4:\n this.selector = this.select4\n break\n case 5:\n this.selector = this.select5\n break\n case 6:\n this.selector = this.select6\n break\n case 7:\n this.selector = this.select7\n break\n default:\n this.selector = this.select1\n break\n }\n\n // this.scanComps = this.scan.components\n // this.quantTables = this.quantTable.quantTables\n\n for (i = 0; i < this.numComp; i += 1) {\n compN = this.scan.components[i].scanCompSel\n this.qTab[i] = this.quantTable.quantTables[this.components[compN].quantTableSel]\n this.nBlock[i] = this.components[compN].vSamp * this.components[compN].hSamp\n this.dcTab[i] = this.HuffTab[this.scan.components[i].dcTabSel][0]\n this.acTab[i] = this.HuffTab[this.scan.components[i].acTabSel][1]\n }\n\n this.xDim = this.frame.dimX\n this.yDim = this.frame.dimY\n if (this.numBytes === 1) {\n this.outputData = new Uint8Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp))\n } else {\n this.outputData = new Uint16Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp))\n }\n\n scanNum += 1\n\n while (true) {\n // Decode one scan\n temp[0] = 0\n index[0] = 0\n\n for (i = 0; i < 10; i += 1) {\n pred[i] = 1 << (this.precision - 1)\n }\n\n if (this.restartInterval === 0) {\n current = this.decodeUnit(pred, temp, index)\n\n while (current === 0 && this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.output(pred)\n current = this.decodeUnit(pred, temp, index)\n }\n\n break // current=MARKER\n }\n\n for (mcuNum = 0; mcuNum < this.restartInterval; mcuNum += 1) {\n this.restarting = mcuNum === 0\n current = this.decodeUnit(pred, temp, index)\n this.output(pred)\n\n if (current !== 0) {\n break\n }\n }\n\n if (current === 0) {\n if (this.markerIndex !== 0) {\n current = 0xff00 | this.marker\n this.markerIndex = 0\n } else {\n current = this.stream.get16()\n }\n }\n\n if (!(current >= Decoder.RESTART_MARKER_BEGIN && current <= Decoder.RESTART_MARKER_END)) {\n break // current=MARKER\n }\n }\n\n if (current === 0xffdc && scanNum === 1) {\n // DNL\n this.readNumber()\n current = this.stream.get16()\n }\n } while (current !== 0xffd9 && this.xLoc < this.xDim && this.yLoc < this.yDim && scanNum === 0)\n\n return this.outputData\n }\n\n decodeUnit(prev: number[], temp: number[], index: number[]): number {\n if (this.numComp === 1) {\n return this.decodeSingle(prev, temp, index)\n } else if (this.numComp === 3) {\n return this.decodeRGB(prev, temp, index)\n } else {\n return -1\n }\n }\n\n select1(compOffset?: number) {\n return this.getPreviousX(compOffset)\n }\n\n select2(compOffset?: number) {\n return this.getPreviousY(compOffset)\n }\n\n select3(compOffset?: number) {\n return this.getPreviousXY(compOffset)\n }\n\n select4(compOffset?: number) {\n return this.getPreviousX(compOffset) + this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)\n }\n\n select5(compOffset?: number) {\n return this.getPreviousX(compOffset) + ((this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)) >> 1)\n }\n\n select6(compOffset?: number) {\n return this.getPreviousY(compOffset) + ((this.getPreviousX(compOffset) - this.getPreviousXY(compOffset)) >> 1)\n }\n\n select7(compOffset?: number) {\n return (this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) / 2\n }\n\n decodeRGB(prev: number[], temp: number[], index: number[]) {\n if (this.selector === null) throw new Error(\"decode hasn't run yet\")\n\n let actab, dctab, qtab, ctrC, i, k, j\n\n prev[0] = this.selector(0)\n prev[1] = this.selector(1)\n prev[2] = this.selector(2)\n\n for (ctrC = 0; ctrC < this.numComp; ctrC += 1) {\n qtab = this.qTab[ctrC]\n actab = this.acTab[ctrC]\n dctab = this.dcTab[ctrC]\n for (i = 0; i < this.nBlock[ctrC]; i += 1) {\n for (k = 0; k < this.IDCT_Source.length; k += 1) {\n this.IDCT_Source[k] = 0\n }\n\n let value = this.getHuffmanValue(dctab, temp, index)\n\n if (value >= 0xff00) {\n return value\n }\n\n prev[ctrC] = this.IDCT_Source[0] = prev[ctrC] + this.getn(index, value, temp, index)\n this.IDCT_Source[0] *= qtab[0]\n\n for (j = 1; j < 64; j += 1) {\n value = this.getHuffmanValue(actab, temp, index)\n\n if (value >= 0xff00) {\n return value\n }\n\n j += value >> 4\n\n if ((value & 0x0f) === 0) {\n if (value >> 4 === 0) {\n break\n }\n } else {\n this.IDCT_Source[Decoder.IDCT_P[j]] = this.getn(index, value & 0x0f, temp, index) * qtab[j]\n }\n }\n }\n }\n\n return 0\n }\n\n decodeSingle(prev: number[], temp: number[], index: number[]) {\n if (this.selector === null) throw new Error(\"decode hasn't run yet\")\n\n let value, i, n, nRestart\n\n if (this.restarting) {\n this.restarting = false\n prev[0] = 1 << (this.frame.precision - 1)\n } else {\n prev[0] = this.selector()\n }\n\n for (i = 0; i < this.nBlock[0]; i += 1) {\n value = this.getHuffmanValue(this.dcTab[0], temp, index)\n if (value >= 0xff00) {\n return value\n }\n\n n = this.getn(prev, value, temp, index)\n nRestart = n >> 8\n\n if (nRestart >= Decoder.RESTART_MARKER_BEGIN && nRestart <= Decoder.RESTART_MARKER_END) {\n return nRestart\n }\n\n prev[0] += n\n }\n\n return 0\n }\n\n //\tHuffman table for fast search: (HuffTab) 8-bit Look up table 2-layer search architecture, 1st-layer represent 256 node (8 bits) if codeword-length > 8\n //\tbits, then the entry of 1st-layer = (# of 2nd-layer table) | MSB and it is stored in the 2nd-layer Size of tables in each layer are 256.\n //\tHuffTab[*][*][0-256] is always the only 1st-layer table.\n //\n //\tAn entry can be: (1) (# of 2nd-layer table) | MSB , for code length > 8 in 1st-layer (2) (Code length) << 8 | HuffVal\n //\n //\tHuffmanValue(table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n //\t ):\n //\t return: Huffman Value of table\n //\t 0xFF?? if it receives a MARKER\n //\t Parameter: table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n //\t temp temp storage for remainded bits\n //\t index index to bit of temp\n //\t in FILE pointer\n //\t Effect:\n //\t temp store new remainded bits\n //\t index change to new index\n //\t in change to new position\n //\t NOTE:\n //\t Initial by temp=0; index=0;\n //\t NOTE: (explain temp and index)\n //\t temp: is always in the form at calling time or returning time\n //\t | byte 4 | byte 3 | byte 2 | byte 1 |\n //\t | 0 | 0 | 00000000 | 00000??? | if not a MARKER\n //\t ^index=3 (from 0 to 15)\n //\t 321\n //\t NOTE (marker and marker_index):\n //\t If get a MARKER from 'in', marker=the low-byte of the MARKER\n //\t and marker_index=9\n //\t If marker_index=9 then index is always > 8, or HuffmanValue()\n //\t will not be called\n getHuffmanValue(table: number[], temp: number[], index: number[]): number {\n let code, input\n const mask = 0xffff\n\n if (!this.stream) throw new Error('stream not initialized')\n\n if (index[0] < 8) {\n temp[0] <<= 8\n input = this.stream.get8()\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n temp[0] |= input\n } else {\n index[0] -= 8\n }\n\n code = table[temp[0] >> index[0]]\n\n if ((code & Decoder.MSB) !== 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0\n return 0xff00 | this.marker\n }\n\n temp[0] &= mask >> (16 - index[0])\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n code = table[(code & 0xff) * 256 + (temp[0] >> index[0])]\n index[0] += 8\n }\n\n index[0] += 8 - (code >> 8)\n\n if (index[0] < 0) {\n throw new Error('index=' + index[0] + ' temp=' + temp[0] + ' code=' + code + ' in HuffmanValue()')\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0\n return 0xff00 | this.marker\n }\n\n temp[0] &= mask >> (16 - index[0])\n return code & 0xff\n }\n\n getn(PRED: number[], n: number, temp: number[], index: number[]) {\n let result, input\n const one = 1\n const n_one = -1\n const mask = 0xffff\n\n if (this.stream === null) throw new Error('stream not initialized')\n\n if (n === 0) {\n return 0\n }\n\n if (n === 16) {\n if (PRED[0] >= 0) {\n return -32768\n } else {\n return 32768\n }\n }\n\n index[0] -= n\n\n if (index[0] >= 0) {\n if (index[0] < this.markerIndex && !this.isLastPixel()) {\n // this was corrupting the last pixel in some cases\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n result = temp[0] >> index[0]\n temp[0] &= mask >> (16 - index[0])\n } else {\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n index[0] += 8\n\n if (index[0] < 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n index[0] += 8\n }\n\n if (index[0] < 0) {\n throw new Error('index=' + index[0] + ' in getn()')\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n result = temp[0] >> index[0]\n temp[0] &= mask >> (16 - index[0])\n }\n\n if (result < one << (n - 1)) {\n result += (n_one << n) + 1\n }\n\n return result\n }\n\n getPreviousX(compOffset = 0): number {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc > 0) {\n return this.getter(this.yLoc * this.xDim + this.xLoc - 1, compOffset)\n } else if (this.yLoc > 0) {\n return this.getPreviousY(compOffset)\n } else {\n return 1 << (this.frame.precision - 1)\n }\n }\n\n getPreviousXY(compOffset = 0) {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc > 0 && this.yLoc > 0) {\n return this.getter((this.yLoc - 1) * this.xDim + this.xLoc - 1, compOffset)\n } else {\n return this.getPreviousY(compOffset)\n }\n }\n\n getPreviousY(compOffset = 0) {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.yLoc > 0) {\n return this.getter((this.yLoc - 1) * this.xDim + this.xLoc, compOffset)\n } else {\n return this.getPreviousX(compOffset)\n }\n }\n\n isLastPixel() {\n return this.xLoc === this.xDim - 1 && this.yLoc === this.yDim - 1\n }\n\n outputSingle(PRED: number[]) {\n if (this.setter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(this.yLoc * this.xDim + this.xLoc, this.mask & PRED[0])\n\n this.xLoc += 1\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1\n this.xLoc = 0\n }\n }\n }\n\n outputRGB(PRED: number[]) {\n if (this.setter === null) throw new Error(\"decode hasn't run yet\")\n\n const offset = this.yLoc * this.xDim + this.xLoc\n\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(offset, PRED[0], 0)\n this.setter(offset, PRED[1], 1)\n this.setter(offset, PRED[2], 2)\n\n this.xLoc += 1\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1\n this.xLoc = 0\n }\n }\n }\n\n setValue8(index: number, val: number) {\n if (!this.outputData) throw new Error('output data not ready')\n\n if (littleEndian) {\n this.outputData[index] = val\n } else {\n this.outputData[index] = ((val & 0xff) << 8) | ((val >> 8) & 0xff)\n }\n }\n\n getValue8(index: number) {\n if (this.outputData === null) throw new Error('output data not ready')\n if (littleEndian) {\n return this.outputData[index] // mask should not be necessary because outputData is either Int8Array or Int16Array\n } else {\n const val = this.outputData[index]\n return ((val & 0xff) << 8) | ((val >> 8) & 0xff)\n }\n }\n\n setValueRGB(index: number, val: number, compOffset = 0) {\n if (this.outputData === null) return\n this.outputData[index * 3 + compOffset] = val\n }\n\n getValueRGB(index: number, compOffset: number) {\n if (this.outputData === null) throw new Error('output data not ready')\n return this.outputData[index * 3 + compOffset]\n }\n\n readApp() {\n if (this.stream === null) return null\n\n let count = 0\n const length = this.stream.get16()\n count += 2\n\n while (count < length) {\n this.stream.get8()\n count += 1\n }\n\n return length\n }\n\n readComment() {\n if (this.stream === null) return null\n\n let sb = ''\n let count = 0\n\n const length = this.stream.get16()\n count += 2\n\n while (count < length) {\n sb += this.stream.get8()\n count += 1\n }\n\n return sb\n }\n\n readNumber() {\n if (this.stream === null) return null\n\n const Ld = this.stream.get16()\n\n if (Ld !== 4) {\n throw new Error('ERROR: Define number format throw new IOException [Ld!=4]')\n }\n\n return this.stream.get16()\n }\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,eAAAC,EAAA,YAAAC,EAAA,gBAAAC,EAAA,iBAAAC,EAAA,sBAAAC,EAAA,kBAAAC,EAAA,eAAAC,EAAA,UAAAC,IAAA,eAAAC,EAAAX,GCAO,IAAMY,EAAgB,CAC3B,MAAO,EACP,cAAe,EACf,MAAO,CACT,ECJO,IAAMC,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KAAK,WAAWpB,CAAK,EACjC,OAASoB,EAAM,MAAS,EAAOA,GAAO,EAAK,GAC7C,CACF,CAEA,YAAYpB,EAAeoB,EAAaf,EAAa,EAAG,CAClD,KAAK,aAAe,OACxB,KAAK,WAAWL,EAAQ,EAAIK,CAAU,EAAIe,EAC5C,CAEA,YAAYpB,EAAeK,EAAoB,CAC7C,GAAI,KAAK,aAAe,KAAM,MAAM,IAAI,MAAM,uBAAuB,EACrE,OAAO,KAAK,WAAWL,EAAQ,EAAIK,CAAU,CAC/C,CAEA,SAAU,CACR,GAAI,KAAK,SAAW,KAAM,OAAO,KAEjC,IAAIgB,EAAQ,EACN3B,EAAS,KAAK,OAAO,MAAM,EAGjC,IAFA2B,GAAS,EAEFA,EAAQ3B,GACb,KAAK,OAAO,KAAK,EACjB2B,GAAS,EAGX,OAAO3B,CACT,CAEA,aAAc,CACZ,GAAI,KAAK,SAAW,KAAM,OAAO,KAEjC,IAAI4B,EAAK,GACLD,EAAQ,EAEN3B,EAAS,KAAK,OAAO,MAAM,EAGjC,IAFA2B,GAAS,EAEFA,EAAQ3B,GACb4B,GAAM,KAAK,OAAO,KAAK,EACvBD,GAAS,EAGX,OAAOC,CACT,CAEA,YAAa,CACX,GAAI,KAAK,SAAW,KAAM,OAAO,KAIjC,GAFW,KAAK,OAAO,MAAM,IAElB,EACT,MAAM,IAAI,MAAM,2DAA2D,EAG7E,OAAO,KAAK,OAAO,MAAM,CAC3B,CACF","names":["main_exports","__export","ComponentSpec","DataStream","Decoder","FrameHeader","HuffmanTable","QuantizationTable","ScanComponent","ScanHeader","utils_exports","__toCommonJS","ComponentSpec","DataStream","data","offset","length","value","FrameHeader","data","count","temp","length","c","ComponentSpec","utils_exports","__export","crc32","crcTable","createArray","makeCRCTable","dimensions","dim","rest","newArray","i","c","n","k","buffer","uint8view","crc","HuffmanTable","_HuffmanTable","createArray","data","HuffTab","count","temp","t","c","i","j","length","tab","L","V","currentTable","k","n","QuantizationTable","_QuantizationTable","createArray","qtab","table","i","data","count","temp","t","length","ScanComponent","ScanHeader","data","count","i","temp","length","ScanComponent","littleEndian","buffer","Decoder","_Decoder","FrameHeader","HuffmanTable","QuantizationTable","ScanHeader","createArray","numBytes","offset","length","scanNum","pred","i","compN","temp","index","mcuNum","DataStream","current","prev","compOffset","actab","dctab","qtab","ctrC","k","j","value","nRestart","table","code","input","PRED","n","result","val","count","sb"]} \ No newline at end of file diff --git a/release/lossless.d.cts b/release/lossless.d.cts deleted file mode 100644 index 0a9aed9..0000000 --- a/release/lossless.d.cts +++ /dev/null @@ -1,150 +0,0 @@ -declare const ComponentSpec: { - hSamp: number; - quantTableSel: number; - vSamp: number; -}; - -declare class DataStream { - buffer: Uint8Array; - index: number; - constructor(data: ArrayBuffer, offset?: number, length?: number); - get16(): number; - get8(): number; -} - -declare class FrameHeader { - dimX: number; - dimY: number; - numComp: number; - precision: number; - components: Array; - read(data: DataStream): number; -} - -declare class HuffmanTable { - static MSB: number; - l: number[][][]; - th: number[]; - v: number[][][][]; - tc: number[][]; - constructor(); - read(data: DataStream, HuffTab: number[][][]): number; - buildHuffTable(tab: number[], L: number[], V: number[][]): void; -} - -declare class QuantizationTable { - precision: number[]; - tq: number[]; - quantTables: number[][]; - static enhanceQuantizationTable: (qtab: number[], table: number[]) => void; - read(data: DataStream, table: number[]): number; -} - -declare const ScanComponent: { - acTabSel: number; - dcTabSel: number; - scanCompSel: number; -}; - -declare class ScanHeader { - ah: number; - al: number; - numComp: number; - selection: number; - spectralEnd: number; - components: Array; - read(data: DataStream): number; -} - -declare class Decoder { - static IDCT_P: number[]; - static TABLE: number[]; - static MAX_HUFFMAN_SUBTREE: number; - static MSB: number; - static RESTART_MARKER_BEGIN: number; - static RESTART_MARKER_END: number; - buffer: ArrayBuffer | null; - stream: DataStream | null; - frame: FrameHeader; - huffTable: HuffmanTable; - quantTable: QuantizationTable; - scan: ScanHeader; - DU: number[][][]; - HuffTab: number[][][]; - IDCT_Source: number[]; - nBlock: number[]; - acTab: number[][]; - dcTab: number[][]; - qTab: number[][]; - marker: number; - markerIndex: number; - numComp: number; - restartInterval: number; - selection: number; - xDim: number; - yDim: number; - xLoc: number; - yLoc: number; - outputData: Uint8Array | Uint16Array | null; - restarting: boolean; - mask: number; - numBytes: number; - precision: number | undefined; - components: Array; - getter: null | ((index: number, compOffset: number) => number); - setter: null | ((index: number, val: number, compOffset?: number) => void); - output: null | ((PRED: number[]) => void); - selector: null | ((compOffset?: number) => number); - /** - * The Decoder constructor. - * @property {number} numBytes - number of bytes per component - * @type {Function} - */ - constructor(buffer?: ArrayBuffer | null, numBytes?: number); - /** - * Returns decompressed data. - */ - decompress(buffer: ArrayBuffer, offset: number, length: number): ArrayBuffer; - decode(buffer?: ArrayBuffer, offset?: number, length?: number, numBytes?: number): Uint8Array | Uint16Array; - decodeUnit(prev: number[], temp: number[], index: number[]): number; - select1(compOffset?: number): number; - select2(compOffset?: number): number; - select3(compOffset?: number): number; - select4(compOffset?: number): number; - select5(compOffset?: number): number; - select6(compOffset?: number): number; - select7(compOffset?: number): number; - decodeRGB(prev: number[], temp: number[], index: number[]): number; - decodeSingle(prev: number[], temp: number[], index: number[]): number; - getHuffmanValue(table: number[], temp: number[], index: number[]): number; - getn(PRED: number[], n: number, temp: number[], index: number[]): number; - getPreviousX(compOffset?: number): number; - getPreviousXY(compOffset?: number): number; - getPreviousY(compOffset?: number): number; - isLastPixel(): boolean; - outputSingle(PRED: number[]): void; - outputRGB(PRED: number[]): void; - setValue8(index: number, val: number): void; - getValue8(index: number): number; - setValueRGB(index: number, val: number, compOffset?: number): void; - getValueRGB(index: number, compOffset: number): number; - readApp(): number | null; - readComment(): string | null; - readNumber(): number | null; -} - -type NestedArray = Array>; -declare const createArray: (...dimensions: number[]) => NestedArray; -declare const makeCRCTable: () => number[]; -declare const crcTable: number[]; -declare const crc32: (buffer: ArrayBuffer) => number; - -declare const utils_crc32: typeof crc32; -declare const utils_crcTable: typeof crcTable; -declare const utils_createArray: typeof createArray; -declare const utils_makeCRCTable: typeof makeCRCTable; -declare namespace utils { - export { utils_crc32 as crc32, utils_crcTable as crcTable, utils_createArray as createArray, utils_makeCRCTable as makeCRCTable }; -} - -export { ComponentSpec, DataStream, Decoder, FrameHeader, HuffmanTable, QuantizationTable, ScanComponent, ScanHeader, utils as Utils }; From 5c13f64bc32ad7024e96326d6e7ad4b2e209617d Mon Sep 17 00:00:00 2001 From: Jens Ochsenmeier Date: Mon, 25 Mar 2024 22:55:19 +0100 Subject: [PATCH 3/4] removed one more map --- release/lossless.js.map | 1 - 1 file changed, 1 deletion(-) delete mode 100644 release/lossless.js.map diff --git a/release/lossless.js.map b/release/lossless.js.map deleted file mode 100644 index 783a175..0000000 --- a/release/lossless.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/main.ts","../src/component-spec.ts","../src/data-stream.ts","../src/frame-header.ts","../src/utils.ts","../src/huffman-table.ts","../src/quantization-table.ts","../src/scan-component.ts","../src/scan-header.ts","../src/decoder.ts"],"sourcesContent":["export { ComponentSpec } from './component-spec.js'\nexport { DataStream } from './data-stream.js'\nexport { Decoder } from './decoder.js'\nexport { FrameHeader } from './frame-header.js'\nexport { HuffmanTable } from './huffman-table.js'\nexport { QuantizationTable } from './quantization-table.js'\nexport { ScanComponent } from './scan-component.js'\nexport { ScanHeader } from './scan-header.js'\nexport * as Utils from './utils.js'\n","export const ComponentSpec = {\n hSamp: 0,\n quantTableSel: 0,\n vSamp: 0\n}\n","export class DataStream {\n buffer: Uint8Array\n index: number\n\n constructor(data: ArrayBuffer, offset?: number, length?: number) {\n this.buffer = new Uint8Array(data, offset, length)\n this.index = 0\n }\n\n get16() {\n // var value = this.buffer.getUint16(this.index, false);\n const value = (this.buffer[this.index] << 8) + this.buffer[this.index + 1] // DataView is big-endian by default\n this.index += 2\n return value\n }\n\n get8() {\n // var value = this.buffer.getUint8(this.index);\n const value = this.buffer[this.index]\n this.index += 1\n return value\n }\n}\n","import { ComponentSpec } from './component-spec.js'\nimport { DataStream } from './data-stream.js'\n\nexport class FrameHeader {\n dimX = 0\n dimY = 0\n numComp = 0\n precision = 0\n components: Array = []\n\n read(data: DataStream) {\n let count = 0\n let temp\n\n const length = data.get16()\n count += 2\n\n this.precision = data.get8()\n count += 1\n\n this.dimY = data.get16()\n count += 2\n\n this.dimX = data.get16()\n count += 2\n\n this.numComp = data.get8()\n count += 1\n for (let i = 1; i <= this.numComp; i += 1) {\n if (count > length) {\n throw new Error('ERROR: frame format error')\n }\n\n const c = data.get8()\n count += 1\n\n if (count >= length) {\n throw new Error('ERROR: frame format error [c>=Lf]')\n }\n\n temp = data.get8()\n count += 1\n\n if (!this.components[c]) {\n this.components[c] = { ...ComponentSpec }\n }\n\n this.components[c].hSamp = temp >> 4\n this.components[c].vSamp = temp & 0x0f\n this.components[c].quantTableSel = data.get8()\n count += 1\n }\n\n if (count !== length) {\n throw new Error('ERROR: frame format error [Lf!=count]')\n }\n\n return 1\n }\n}\n","type NestedArray = Array>\n\n// https://stackoverflow.com/a/12588826\nexport const createArray = (...dimensions: number[]): NestedArray => {\n if (dimensions.length > 1) {\n const dim = dimensions[0]\n const rest = dimensions.slice(1)\n const newArray = []\n for (let i = 0; i < dim; i++) {\n newArray[i] = createArray(...rest)\n }\n return newArray\n } else {\n return Array(dimensions[0]).fill(undefined)\n }\n}\n\n// http://stackoverflow.com/questions/18638900/javascript-crc32\nexport const makeCRCTable = function () {\n let c\n const crcTable = []\n for (let n = 0; n < 256; n++) {\n c = n\n for (let k = 0; k < 8; k++) {\n c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1\n }\n crcTable[n] = c\n }\n return crcTable\n}\n\nexport const crcTable = makeCRCTable()\n\nexport const crc32 = function (buffer: ArrayBuffer) {\n const uint8view = new Uint8Array(buffer)\n let crc = 0 ^ -1\n\n for (let i = 0; i < uint8view.length; i++) {\n crc = (crc >>> 8) ^ crcTable[(crc ^ uint8view[i]) & 0xff]\n }\n\n return (crc ^ -1) >>> 0\n}\n","import { DataStream } from './data-stream.js'\nimport { createArray } from './utils.js'\n\nexport class HuffmanTable {\n static MSB = 0x80000000\n\n l: number[][][]\n th: number[]\n v: number[][][][]\n tc: number[][]\n\n constructor() {\n this.l = createArray(4, 2, 16) as number[][][]\n this.th = [0, 0, 0, 0]\n this.v = createArray(4, 2, 16, 200) as number[][][][]\n this.tc = [\n [0, 0],\n [0, 0],\n [0, 0],\n [0, 0]\n ]\n }\n\n read(data: DataStream, HuffTab: number[][][]) {\n let count = 0\n let temp\n let t\n let c\n let i\n let j\n\n const length = data.get16()\n count += 2\n\n while (count < length) {\n temp = data.get8()\n count += 1\n t = temp & 0x0f\n if (t > 3) {\n throw new Error('ERROR: Huffman table ID > 3')\n }\n\n c = temp >> 4\n if (c > 2) {\n throw new Error('ERROR: Huffman table [Table class > 2 ]')\n }\n\n this.th[t] = 1\n this.tc[t][c] = 1\n\n for (i = 0; i < 16; i += 1) {\n this.l[t][c][i] = data.get8()\n count += 1\n }\n\n for (i = 0; i < 16; i += 1) {\n for (j = 0; j < this.l[t][c][i]; j += 1) {\n if (count > length) {\n throw new Error('ERROR: Huffman table format error [count>Lh]')\n }\n\n this.v[t][c][i][j] = data.get8()\n count += 1\n }\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Huffman table format error [count!=Lf]')\n }\n\n for (i = 0; i < 4; i += 1) {\n for (j = 0; j < 2; j += 1) {\n if (this.tc[i][j] !== 0) {\n this.buildHuffTable(HuffTab[i][j], this.l[i][j], this.v[i][j])\n }\n }\n }\n\n return 1\n }\n\n //\tBuild_HuffTab()\n //\tParameter: t table ID\n //\t c table class ( 0 for DC, 1 for AC )\n //\t L[i] # of codewords which length is i\n //\t V[i][j] Huffman Value (length=i)\n //\tEffect:\n //\t build up HuffTab[t][c] using L and V.\n buildHuffTable(tab: number[], L: number[], V: number[][]) {\n let currentTable, k, i, j, n\n const temp = 256\n k = 0\n\n for (i = 0; i < 8; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i + 1); n += 1) {\n tab[k] = V[i][j] | ((i + 1) << 8)\n k += 1\n }\n }\n }\n\n for (i = 1; k < 256; i += 1, k += 1) {\n tab[k] = i | HuffmanTable.MSB\n }\n\n currentTable = 1\n k = 0\n\n for (i = 8; i < 16; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i - 7); n += 1) {\n tab[currentTable * 256 + k] = V[i][j] | ((i + 1) << 8)\n k += 1\n }\n\n if (k >= 256) {\n if (k > 256) {\n throw new Error('ERROR: Huffman table error(1)!')\n }\n\n k = 0\n currentTable += 1\n }\n }\n }\n }\n}\n","import { DataStream } from './data-stream.js'\nimport { createArray } from './utils.js'\n\nexport class QuantizationTable {\n precision: number[] = [] // Quantization precision 8 or 16\n tq = [0, 0, 0, 0] // 1: this table is presented\n quantTables: number[][] = createArray(4, 64) as number[][] // Tables\n\n static enhanceQuantizationTable = function (qtab: number[], table: number[]) {\n for (let i = 0; i < 8; i += 1) {\n qtab[table[0 * 8 + i]] *= 90\n qtab[table[4 * 8 + i]] *= 90\n qtab[table[2 * 8 + i]] *= 118\n qtab[table[6 * 8 + i]] *= 49\n qtab[table[5 * 8 + i]] *= 71\n qtab[table[1 * 8 + i]] *= 126\n qtab[table[7 * 8 + i]] *= 25\n qtab[table[3 * 8 + i]] *= 106\n }\n\n for (let i = 0; i < 8; i += 1) {\n qtab[table[0 + 8 * i]] *= 90\n qtab[table[4 + 8 * i]] *= 90\n qtab[table[2 + 8 * i]] *= 118\n qtab[table[6 + 8 * i]] *= 49\n qtab[table[5 + 8 * i]] *= 71\n qtab[table[1 + 8 * i]] *= 126\n qtab[table[7 + 8 * i]] *= 25\n qtab[table[3 + 8 * i]] *= 106\n }\n\n for (let i = 0; i < 64; i += 1) {\n qtab[i] >>= 6\n }\n }\n\n read(data: DataStream, table: number[]) {\n let count = 0\n let temp\n let t\n let i\n\n const length = data.get16()\n count += 2\n\n while (count < length) {\n temp = data.get8()\n count += 1\n t = temp & 0x0f\n\n if (t > 3) {\n throw new Error('ERROR: Quantization table ID > 3')\n }\n\n this.precision[t] = temp >> 4\n\n if (this.precision[t] === 0) {\n this.precision[t] = 8\n } else if (this.precision[t] === 1) {\n this.precision[t] = 16\n } else {\n throw new Error('ERROR: Quantization table precision error')\n }\n\n this.tq[t] = 1\n\n if (this.precision[t] === 8) {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error')\n }\n\n this.quantTables[t][i] = data.get8()\n count += 1\n }\n\n QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table)\n } else {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error')\n }\n\n this.quantTables[t][i] = data.get16()\n count += 2\n }\n\n QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table)\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Quantization table error [count!=Lq]')\n }\n\n return 1\n }\n}\n","export const ScanComponent = {\n acTabSel: 0, // AC table selector\n dcTabSel: 0, // DC table selector\n scanCompSel: 0 // Scan component selector\n}\n","import { DataStream } from './data-stream.js'\nimport { ScanComponent } from './scan-component.js'\n\nexport class ScanHeader {\n ah = 0\n al = 0\n numComp = 0 // Number of components in the scan\n selection = 0 // Start of spectral or predictor selection\n spectralEnd = 0 // End of spectral selection\n components: Array = []\n\n read(data: DataStream) {\n let count = 0\n let i\n let temp\n\n const length = data.get16()\n count += 2\n\n this.numComp = data.get8()\n count += 1\n\n for (i = 0; i < this.numComp; i += 1) {\n this.components[i] = { ...ScanComponent }\n\n if (count > length) {\n throw new Error('ERROR: scan header format error')\n }\n\n this.components[i].scanCompSel = data.get8()\n count += 1\n\n temp = data.get8()\n count += 1\n\n this.components[i].dcTabSel = temp >> 4\n this.components[i].acTabSel = temp & 0x0f\n }\n\n this.selection = data.get8()\n count += 1\n\n this.spectralEnd = data.get8()\n count += 1\n\n temp = data.get8()\n this.ah = temp >> 4\n this.al = temp & 0x0f\n count += 1\n\n if (count !== length) {\n throw new Error('ERROR: scan header format error [count!=Ns]')\n }\n\n return 1\n }\n}\n","import { ComponentSpec } from './component-spec.js'\nimport { DataStream } from './data-stream.js'\nimport { FrameHeader } from './frame-header.js'\nimport { HuffmanTable } from './huffman-table.js'\nimport { QuantizationTable } from './quantization-table.js'\nimport { ScanHeader } from './scan-header.js'\nimport { createArray } from './utils.js'\n\nconst littleEndian = (function () {\n const buffer = new ArrayBuffer(2)\n new DataView(buffer).setInt16(0, 256, true /* littleEndian */)\n // Int16Array uses the platform's endianness.\n return new Int16Array(buffer)[0] === 256\n})()\n\nexport class Decoder {\n static IDCT_P = [\n 0, 5, 40, 16, 45, 2, 7, 42, 21, 56, 8, 61, 18, 47, 1, 4, 41, 23, 58, 13, 32, 24, 37, 10, 63, 17, 44, 3, 6, 43, 20,\n 57, 15, 34, 29, 48, 53, 26, 39, 9, 60, 19, 46, 22, 59, 12, 33, 31, 50, 55, 25, 36, 11, 62, 14, 35, 28, 49, 52, 27,\n 38, 30, 51, 54\n ]\n\n static TABLE = [\n 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44,\n 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49,\n 57, 58, 62, 63\n ]\n\n static MAX_HUFFMAN_SUBTREE = 50\n static MSB = 0x80000000\n static RESTART_MARKER_BEGIN = 0xffd0\n static RESTART_MARKER_END = 0xffd7\n\n buffer: ArrayBuffer | null = null\n stream: DataStream | null = null\n frame = new FrameHeader()\n huffTable = new HuffmanTable()\n quantTable = new QuantizationTable()\n scan = new ScanHeader()\n DU: number[][][] = createArray(10, 4, 64) as number[][][] // at most 10 data units in a MCU, at most 4 data units in one component\n HuffTab: number[][][] = createArray(4, 2, 50 * 256) as number[][][]\n IDCT_Source: number[] = []\n nBlock: number[] = [] // number of blocks in the i-th Comp in a scan\n acTab: number[][] = createArray(10, 1) as number[][] // ac HuffTab for the i-th Comp in a scan\n dcTab: number[][] = createArray(10, 1) as number[][] // dc HuffTab for the i-th Comp in a scan\n qTab: number[][] = createArray(10, 1) as number[][] // quantization table for the i-th Comp in a scan\n marker = 0\n markerIndex = 0\n numComp = 0\n restartInterval = 0\n selection = 0\n xDim = 0\n yDim = 0\n xLoc = 0\n yLoc = 0\n outputData: Uint8Array | Uint16Array | null = null\n restarting = false\n mask = 0\n numBytes = 0\n\n precision: number | undefined = undefined\n components: Array = []\n\n getter: null | ((index: number, compOffset: number) => number) = null\n setter: null | ((index: number, val: number, compOffset?: number) => void) = null\n output: null | ((PRED: number[]) => void) = null\n selector: null | ((compOffset?: number) => number) = null\n\n /**\n * The Decoder constructor.\n * @property {number} numBytes - number of bytes per component\n * @type {Function}\n */\n constructor(buffer?: ArrayBuffer | null, numBytes?: number) {\n this.buffer = buffer ?? null\n this.numBytes = numBytes ?? 0\n }\n\n /**\n * Returns decompressed data.\n */\n decompress(buffer: ArrayBuffer, offset: number, length: number): ArrayBuffer {\n const result = this.decode(buffer, offset, length)\n return result.buffer\n }\n\n decode(buffer?: ArrayBuffer, offset?: number, length?: number, numBytes?: number) {\n let scanNum = 0\n const pred = []\n let i\n let compN\n const temp = []\n const index = []\n let mcuNum\n\n if (buffer) {\n this.buffer = buffer\n }\n\n if (numBytes !== undefined) {\n this.numBytes = numBytes\n }\n\n this.stream = new DataStream(this.buffer as ArrayBuffer, offset, length)\n this.buffer = null\n\n this.xLoc = 0\n this.yLoc = 0\n let current = this.stream.get16()\n\n if (current !== 0xffd8) {\n // SOI\n throw new Error('Not a JPEG file')\n }\n\n current = this.stream.get16()\n\n while (current >> 4 !== 0x0ffc || current === 0xffc4) {\n // SOF 0~15\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab)\n break\n case 0xffcc: // DAC\n throw new Error(\"Program doesn't support arithmetic coding. (format throw new IOException)\")\n case 0xffdb:\n this.quantTable.read(this.stream, Decoder.TABLE)\n break\n case 0xffdd:\n this.restartInterval = this.readNumber() ?? 0\n break\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp()\n break\n case 0xfffe:\n this.readComment()\n break\n default:\n if (current >> 8 !== 0xff) {\n throw new Error('ERROR: format throw new IOException! (decode)')\n }\n }\n\n current = this.stream.get16()\n }\n\n if (current < 0xffc0 || current > 0xffc7) {\n throw new Error('ERROR: could not handle arithmetic code!')\n }\n\n this.frame.read(this.stream)\n current = this.stream.get16()\n\n do {\n while (current !== 0x0ffda) {\n // SOS\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab)\n break\n case 0xffcc: // DAC\n throw new Error(\"Program doesn't support arithmetic coding. (format throw new IOException)\")\n case 0xffdb:\n this.quantTable.read(this.stream, Decoder.TABLE)\n break\n case 0xffdd:\n this.restartInterval = this.readNumber() ?? 0\n break\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp()\n break\n case 0xfffe:\n this.readComment()\n break\n default:\n if (current >> 8 !== 0xff) {\n throw new Error('ERROR: format throw new IOException! (Parser.decode)')\n }\n }\n\n current = this.stream.get16()\n }\n\n this.precision = this.frame.precision\n this.components = this.frame.components\n\n if (!this.numBytes) {\n this.numBytes = Math.round(Math.ceil(this.precision / 8))\n }\n\n if (this.numBytes === 1) {\n this.mask = 0xff\n } else {\n this.mask = 0xffff\n }\n\n this.scan.read(this.stream)\n this.numComp = this.scan.numComp\n this.selection = this.scan.selection\n\n if (this.numBytes === 1) {\n if (this.numComp === 3) {\n this.getter = this.getValueRGB\n this.setter = this.setValueRGB\n this.output = this.outputRGB\n } else {\n this.getter = this.getValue8\n this.setter = this.setValue8\n this.output = this.outputSingle\n }\n } else {\n this.getter = this.getValue8\n this.setter = this.setValue8\n this.output = this.outputSingle\n }\n\n switch (this.selection) {\n case 2:\n this.selector = this.select2\n break\n case 3:\n this.selector = this.select3\n break\n case 4:\n this.selector = this.select4\n break\n case 5:\n this.selector = this.select5\n break\n case 6:\n this.selector = this.select6\n break\n case 7:\n this.selector = this.select7\n break\n default:\n this.selector = this.select1\n break\n }\n\n // this.scanComps = this.scan.components\n // this.quantTables = this.quantTable.quantTables\n\n for (i = 0; i < this.numComp; i += 1) {\n compN = this.scan.components[i].scanCompSel\n this.qTab[i] = this.quantTable.quantTables[this.components[compN].quantTableSel]\n this.nBlock[i] = this.components[compN].vSamp * this.components[compN].hSamp\n this.dcTab[i] = this.HuffTab[this.scan.components[i].dcTabSel][0]\n this.acTab[i] = this.HuffTab[this.scan.components[i].acTabSel][1]\n }\n\n this.xDim = this.frame.dimX\n this.yDim = this.frame.dimY\n if (this.numBytes === 1) {\n this.outputData = new Uint8Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp))\n } else {\n this.outputData = new Uint16Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp))\n }\n\n scanNum += 1\n\n while (true) {\n // Decode one scan\n temp[0] = 0\n index[0] = 0\n\n for (i = 0; i < 10; i += 1) {\n pred[i] = 1 << (this.precision - 1)\n }\n\n if (this.restartInterval === 0) {\n current = this.decodeUnit(pred, temp, index)\n\n while (current === 0 && this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.output(pred)\n current = this.decodeUnit(pred, temp, index)\n }\n\n break // current=MARKER\n }\n\n for (mcuNum = 0; mcuNum < this.restartInterval; mcuNum += 1) {\n this.restarting = mcuNum === 0\n current = this.decodeUnit(pred, temp, index)\n this.output(pred)\n\n if (current !== 0) {\n break\n }\n }\n\n if (current === 0) {\n if (this.markerIndex !== 0) {\n current = 0xff00 | this.marker\n this.markerIndex = 0\n } else {\n current = this.stream.get16()\n }\n }\n\n if (!(current >= Decoder.RESTART_MARKER_BEGIN && current <= Decoder.RESTART_MARKER_END)) {\n break // current=MARKER\n }\n }\n\n if (current === 0xffdc && scanNum === 1) {\n // DNL\n this.readNumber()\n current = this.stream.get16()\n }\n } while (current !== 0xffd9 && this.xLoc < this.xDim && this.yLoc < this.yDim && scanNum === 0)\n\n return this.outputData\n }\n\n decodeUnit(prev: number[], temp: number[], index: number[]): number {\n if (this.numComp === 1) {\n return this.decodeSingle(prev, temp, index)\n } else if (this.numComp === 3) {\n return this.decodeRGB(prev, temp, index)\n } else {\n return -1\n }\n }\n\n select1(compOffset?: number) {\n return this.getPreviousX(compOffset)\n }\n\n select2(compOffset?: number) {\n return this.getPreviousY(compOffset)\n }\n\n select3(compOffset?: number) {\n return this.getPreviousXY(compOffset)\n }\n\n select4(compOffset?: number) {\n return this.getPreviousX(compOffset) + this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)\n }\n\n select5(compOffset?: number) {\n return this.getPreviousX(compOffset) + ((this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)) >> 1)\n }\n\n select6(compOffset?: number) {\n return this.getPreviousY(compOffset) + ((this.getPreviousX(compOffset) - this.getPreviousXY(compOffset)) >> 1)\n }\n\n select7(compOffset?: number) {\n return (this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) / 2\n }\n\n decodeRGB(prev: number[], temp: number[], index: number[]) {\n if (this.selector === null) throw new Error(\"decode hasn't run yet\")\n\n let actab, dctab, qtab, ctrC, i, k, j\n\n prev[0] = this.selector(0)\n prev[1] = this.selector(1)\n prev[2] = this.selector(2)\n\n for (ctrC = 0; ctrC < this.numComp; ctrC += 1) {\n qtab = this.qTab[ctrC]\n actab = this.acTab[ctrC]\n dctab = this.dcTab[ctrC]\n for (i = 0; i < this.nBlock[ctrC]; i += 1) {\n for (k = 0; k < this.IDCT_Source.length; k += 1) {\n this.IDCT_Source[k] = 0\n }\n\n let value = this.getHuffmanValue(dctab, temp, index)\n\n if (value >= 0xff00) {\n return value\n }\n\n prev[ctrC] = this.IDCT_Source[0] = prev[ctrC] + this.getn(index, value, temp, index)\n this.IDCT_Source[0] *= qtab[0]\n\n for (j = 1; j < 64; j += 1) {\n value = this.getHuffmanValue(actab, temp, index)\n\n if (value >= 0xff00) {\n return value\n }\n\n j += value >> 4\n\n if ((value & 0x0f) === 0) {\n if (value >> 4 === 0) {\n break\n }\n } else {\n this.IDCT_Source[Decoder.IDCT_P[j]] = this.getn(index, value & 0x0f, temp, index) * qtab[j]\n }\n }\n }\n }\n\n return 0\n }\n\n decodeSingle(prev: number[], temp: number[], index: number[]) {\n if (this.selector === null) throw new Error(\"decode hasn't run yet\")\n\n let value, i, n, nRestart\n\n if (this.restarting) {\n this.restarting = false\n prev[0] = 1 << (this.frame.precision - 1)\n } else {\n prev[0] = this.selector()\n }\n\n for (i = 0; i < this.nBlock[0]; i += 1) {\n value = this.getHuffmanValue(this.dcTab[0], temp, index)\n if (value >= 0xff00) {\n return value\n }\n\n n = this.getn(prev, value, temp, index)\n nRestart = n >> 8\n\n if (nRestart >= Decoder.RESTART_MARKER_BEGIN && nRestart <= Decoder.RESTART_MARKER_END) {\n return nRestart\n }\n\n prev[0] += n\n }\n\n return 0\n }\n\n //\tHuffman table for fast search: (HuffTab) 8-bit Look up table 2-layer search architecture, 1st-layer represent 256 node (8 bits) if codeword-length > 8\n //\tbits, then the entry of 1st-layer = (# of 2nd-layer table) | MSB and it is stored in the 2nd-layer Size of tables in each layer are 256.\n //\tHuffTab[*][*][0-256] is always the only 1st-layer table.\n //\n //\tAn entry can be: (1) (# of 2nd-layer table) | MSB , for code length > 8 in 1st-layer (2) (Code length) << 8 | HuffVal\n //\n //\tHuffmanValue(table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n //\t ):\n //\t return: Huffman Value of table\n //\t 0xFF?? if it receives a MARKER\n //\t Parameter: table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n //\t temp temp storage for remainded bits\n //\t index index to bit of temp\n //\t in FILE pointer\n //\t Effect:\n //\t temp store new remainded bits\n //\t index change to new index\n //\t in change to new position\n //\t NOTE:\n //\t Initial by temp=0; index=0;\n //\t NOTE: (explain temp and index)\n //\t temp: is always in the form at calling time or returning time\n //\t | byte 4 | byte 3 | byte 2 | byte 1 |\n //\t | 0 | 0 | 00000000 | 00000??? | if not a MARKER\n //\t ^index=3 (from 0 to 15)\n //\t 321\n //\t NOTE (marker and marker_index):\n //\t If get a MARKER from 'in', marker=the low-byte of the MARKER\n //\t and marker_index=9\n //\t If marker_index=9 then index is always > 8, or HuffmanValue()\n //\t will not be called\n getHuffmanValue(table: number[], temp: number[], index: number[]): number {\n let code, input\n const mask = 0xffff\n\n if (!this.stream) throw new Error('stream not initialized')\n\n if (index[0] < 8) {\n temp[0] <<= 8\n input = this.stream.get8()\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n temp[0] |= input\n } else {\n index[0] -= 8\n }\n\n code = table[temp[0] >> index[0]]\n\n if ((code & Decoder.MSB) !== 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0\n return 0xff00 | this.marker\n }\n\n temp[0] &= mask >> (16 - index[0])\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n code = table[(code & 0xff) * 256 + (temp[0] >> index[0])]\n index[0] += 8\n }\n\n index[0] += 8 - (code >> 8)\n\n if (index[0] < 0) {\n throw new Error('index=' + index[0] + ' temp=' + temp[0] + ' code=' + code + ' in HuffmanValue()')\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0\n return 0xff00 | this.marker\n }\n\n temp[0] &= mask >> (16 - index[0])\n return code & 0xff\n }\n\n getn(PRED: number[], n: number, temp: number[], index: number[]) {\n let result, input\n const one = 1\n const n_one = -1\n const mask = 0xffff\n\n if (this.stream === null) throw new Error('stream not initialized')\n\n if (n === 0) {\n return 0\n }\n\n if (n === 16) {\n if (PRED[0] >= 0) {\n return -32768\n } else {\n return 32768\n }\n }\n\n index[0] -= n\n\n if (index[0] >= 0) {\n if (index[0] < this.markerIndex && !this.isLastPixel()) {\n // this was corrupting the last pixel in some cases\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n result = temp[0] >> index[0]\n temp[0] &= mask >> (16 - index[0])\n } else {\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n index[0] += 8\n\n if (index[0] < 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n temp[0] <<= 8\n input = this.stream.get8()\n\n if (input === 0xff) {\n this.marker = this.stream.get8()\n if (this.marker !== 0) {\n this.markerIndex = 9\n }\n }\n\n temp[0] |= input\n index[0] += 8\n }\n\n if (index[0] < 0) {\n throw new Error('index=' + index[0] + ' in getn()')\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0\n return (0xff00 | this.marker) << 8\n }\n\n result = temp[0] >> index[0]\n temp[0] &= mask >> (16 - index[0])\n }\n\n if (result < one << (n - 1)) {\n result += (n_one << n) + 1\n }\n\n return result\n }\n\n getPreviousX(compOffset = 0): number {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc > 0) {\n return this.getter(this.yLoc * this.xDim + this.xLoc - 1, compOffset)\n } else if (this.yLoc > 0) {\n return this.getPreviousY(compOffset)\n } else {\n return 1 << (this.frame.precision - 1)\n }\n }\n\n getPreviousXY(compOffset = 0) {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc > 0 && this.yLoc > 0) {\n return this.getter((this.yLoc - 1) * this.xDim + this.xLoc - 1, compOffset)\n } else {\n return this.getPreviousY(compOffset)\n }\n }\n\n getPreviousY(compOffset = 0) {\n if (this.getter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.yLoc > 0) {\n return this.getter((this.yLoc - 1) * this.xDim + this.xLoc, compOffset)\n } else {\n return this.getPreviousX(compOffset)\n }\n }\n\n isLastPixel() {\n return this.xLoc === this.xDim - 1 && this.yLoc === this.yDim - 1\n }\n\n outputSingle(PRED: number[]) {\n if (this.setter === null) throw new Error(\"decode hasn't run yet\")\n\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(this.yLoc * this.xDim + this.xLoc, this.mask & PRED[0])\n\n this.xLoc += 1\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1\n this.xLoc = 0\n }\n }\n }\n\n outputRGB(PRED: number[]) {\n if (this.setter === null) throw new Error(\"decode hasn't run yet\")\n\n const offset = this.yLoc * this.xDim + this.xLoc\n\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(offset, PRED[0], 0)\n this.setter(offset, PRED[1], 1)\n this.setter(offset, PRED[2], 2)\n\n this.xLoc += 1\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1\n this.xLoc = 0\n }\n }\n }\n\n setValue8(index: number, val: number) {\n if (!this.outputData) throw new Error('output data not ready')\n\n if (littleEndian) {\n this.outputData[index] = val\n } else {\n this.outputData[index] = ((val & 0xff) << 8) | ((val >> 8) & 0xff)\n }\n }\n\n getValue8(index: number) {\n if (this.outputData === null) throw new Error('output data not ready')\n if (littleEndian) {\n return this.outputData[index] // mask should not be necessary because outputData is either Int8Array or Int16Array\n } else {\n const val = this.outputData[index]\n return ((val & 0xff) << 8) | ((val >> 8) & 0xff)\n }\n }\n\n setValueRGB(index: number, val: number, compOffset = 0) {\n if (this.outputData === null) return\n this.outputData[index * 3 + compOffset] = val\n }\n\n getValueRGB(index: number, compOffset: number) {\n if (this.outputData === null) throw new Error('output data not ready')\n return this.outputData[index * 3 + compOffset]\n }\n\n readApp() {\n if (this.stream === null) return null\n\n let count = 0\n const length = this.stream.get16()\n count += 2\n\n while (count < length) {\n this.stream.get8()\n count += 1\n }\n\n return length\n }\n\n readComment() {\n if (this.stream === null) return null\n\n let sb = ''\n let count = 0\n\n const length = this.stream.get16()\n count += 2\n\n while (count < length) {\n sb += this.stream.get8()\n count += 1\n }\n\n return sb\n }\n\n readNumber() {\n if (this.stream === null) return null\n\n const Ld = this.stream.get16()\n\n if (Ld !== 4) {\n throw new Error('ERROR: Define number format throw new IOException [Ld!=4]')\n }\n\n return this.stream.get16()\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,gBAAgB;AAAA,EAC3B,OAAO;AAAA,EACP,eAAe;AAAA,EACf,OAAO;AACT;;;ACJO,IAAM,aAAN,MAAiB;AAAA,EACtB;AAAA,EACA;AAAA,EAEA,YAAY,MAAmB,QAAiB,QAAiB;AAC/D,SAAK,SAAS,IAAI,WAAW,MAAM,QAAQ,MAAM;AACjD,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,QAAQ;AAEN,UAAM,SAAS,KAAK,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK,OAAO,KAAK,QAAQ,CAAC;AACzE,SAAK,SAAS;AACd,WAAO;AAAA,EACT;AAAA,EAEA,OAAO;AAEL,UAAM,QAAQ,KAAK,OAAO,KAAK,KAAK;AACpC,SAAK,SAAS;AACd,WAAO;AAAA,EACT;AACF;;;ACnBO,IAAM,cAAN,MAAkB;AAAA,EACvB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAA0C,CAAC;AAAA,EAE3C,KAAK,M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AK;AACjC,cAAS,MAAM,QAAS,IAAO,OAAO,IAAK;AAAA,IAC7C;AAAA,EACF;AAAA,EAEA,YAAY,OAAe,KAAa,aAAa,GAAG;AACtD,QAAI,KAAK,eAAe;AAAM;AAC9B,SAAK,WAAW,QAAQ,IAAI,UAAU,IAAI;AAAA,EAC5C;AAAA,EAEA,YAAY,OAAe,YAAoB;AAC7C,QAAI,KAAK,eAAe;AAAM,YAAM,IAAI,MAAM,uBAAuB;AACrE,WAAO,KAAK,WAAW,QAAQ,IAAI,UAAU;AAAA,EAC/C;AAAA,EAEA,UAAU;AACR,QAAI,KAAK,WAAW;AAAM,aAAO;AAEjC,QAAI,QAAQ;AACZ,UAAM,SAAS,KAAK,OAAO,MAAM;AACjC,aAAS;AAET,WAAO,QAAQ,QAAQ;AACrB,WAAK,OAAO,KAAK;AACjB,eAAS;AAAA,IACX;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,cAAc;AACZ,QAAI,KAAK,WAAW;AAAM,aAAO;AAEjC,QAAI,KAAK;AACT,QAAI,QAAQ;AAEZ,UAAM,SAAS,KAAK,OAAO,MAAM;AACjC,aAAS;AAET,WAAO,QAAQ,QAAQ;AACrB,YAAM,KAAK,OAAO,KAAK;AACvB,eAAS;AAAA,IACX;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,aAAa;AACX,QAAI,KAAK,WAAW;AAAM,aAAO;AAEjC,UAAM,KAAK,KAAK,OAAO,MAAM;AAE7B,QAAI,OAAO,GAAG;AACZ,YAAM,IAAI,MAAM,2DAA2D;AAAA,IAC7E;AAEA,WAAO,KAAK,OAAO,MAAM;AAAA,EAC3B;AACF;","names":["crcTable"]} \ No newline at end of file From 87668bae0d8a194d180fcba390ea08e451f2d683 Mon Sep 17 00:00:00 2001 From: Jens Ochsenmeier Date: Mon, 25 Mar 2024 23:33:02 +0100 Subject: [PATCH 4/4] add rollup binaries optionally for github actions --- package-lock.json | 15 +++++++++++++++ package.json | 3 +++ 2 files changed, 18 insertions(+) diff --git a/package-lock.json b/package-lock.json index 7abcf50..468be25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,9 @@ "tsup": "^8.0.2", "typescript": "^5.4.3", "vitest": "^1.4.0" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "4.13.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -236,6 +239,18 @@ "darwin" ] }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz", + "integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "dev": true, diff --git a/package.json b/package.json index a0d710e..5d5bcbe 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,9 @@ "typescript": "^5.4.3", "vitest": "^1.4.0" }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "4.13.0" + }, "scripts": { "test": "vitest run", "build": "tsup",